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
this up() migration is autogenerated, please modify it to your needs
public function up(Schema $schema) : void { $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); $this->addSql(' -- MySQL dump 10.16 Distrib 10.1.37-MariaDB, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: internations -- ------------------------------------------------------ -- Server version 10.1.37-MariaDB-1~xenial /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE=\'+00:00\' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=\'NO_AUTO_VALUE_ON_ZERO\' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Table structure for table `grp` -- DROP TABLE IF EXISTS `grp`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `grp` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `grp` -- LOCK TABLES `grp` WRITE; /*!40000 ALTER TABLE `grp` DISABLE KEYS */; INSERT INTO `grp` VALUES (1,\'devs\'),(2,\'operations\'); /*!40000 ALTER TABLE `grp` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `grps_users` -- DROP TABLE IF EXISTS `grps_users`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `grps_users` ( `id` int(11) NOT NULL AUTO_INCREMENT, `grp_id_id` int(11) NOT NULL, `user_id_id` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `IDX_504D2FDC98A86D6D` (`grp_id_id`), KEY `IDX_504D2FDC9D86650F` (`user_id_id`), CONSTRAINT `FK_504D2FDC98A86D6D` FOREIGN KEY (`grp_id_id`) REFERENCES `grp` (`id`), CONSTRAINT `FK_504D2FDC9D86650F` FOREIGN KEY (`user_id_id`) REFERENCES `user` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `grps_users` -- LOCK TABLES `grps_users` WRITE; /*!40000 ALTER TABLE `grps_users` DISABLE KEYS */; INSERT INTO `grps_users` VALUES (1,2,3),(2,2,2),(3,1,1),(4,1,2); /*!40000 ALTER TABLE `grps_users` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `migration_versions` -- DROP TABLE IF EXISTS `migration_versions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `migration_versions` ( `version` varchar(255) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`version`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `migration_versions` -- -- -- Table structure for table `user` -- DROP TABLE IF EXISTS `user`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `user` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `user` -- LOCK TABLES `user` WRITE; /*!40000 ALTER TABLE `user` DISABLE KEYS */; INSERT INTO `user` VALUES (1,\'craig\'),(2,\'helder\'),(3,\'suzy\'); /*!40000 ALTER TABLE `user` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -- Dump completed on 2018-12-19 14:22:37 '); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function up();", "abstract public function up();", "abstract public function up();", "abstract public function up();", "public function up()\n {\n $this->execute(\"\n ALTER TABLE `tcmn_communication` \n CHANGE `tcmn_pprs_id` `tcmn_pprs_id` SMALLINT(5) UNSIGNED NULL COMMENT 'person',\n CHANGE `tcmn_tmed_id` `tcmn_tmed_id` TINYINT(4) UNSIGNED NULL COMMENT 'medijs';\n \");\n }", "public function up()\n {\n // This migration was removed, but fails when uninstalling plugin\n }", "public function up()\n {\n $this->execute(\"\n\n ALTER TABLE `cucp_user_company_position` \n ADD COLUMN `cucp_role` CHAR(20) NULL AFTER `cucp_name`;\n\n \");\n }", "public function up()\n\t{\n\t\t$this->dbforge->add_column($this->table, $this->field);\n\t}", "public function migrateUp()\n {\n //$this->migrate('up');\n $this->artisan('migrate');\n }", "public function up()\n {\n dbexec('ALTER TABLE #__subscriptions_coupons\n ADD `created_on` datetime DEFAULT NULL AFTER `usage`,\n ADD `created_by` bigint(11) unsigned DEFAULT NULL AFTER `created_on`,\n ADD INDEX `created_by` (`created_by`),\n ADD `modified_on` datetime DEFAULT NULL AFTER `created_by`,\n ADD `modified_by` bigint(11) unsigned DEFAULT NULL AFTER `modified_on`,\n ADD INDEX `modified_by` (`modified_by`) \n ');\n \n dbexec('ALTER TABLE #__subscriptions_vats\n ADD `created_on` datetime DEFAULT NULL AFTER `data`,\n ADD `created_by` bigint(11) unsigned DEFAULT NULL AFTER `created_on`,\n ADD INDEX `created_by` (`created_by`),\n ADD `modified_on` datetime DEFAULT NULL AFTER `created_by`,\n ADD `modified_by` bigint(11) unsigned DEFAULT NULL AFTER `modified_on`,\n ADD INDEX `modified_by` (`modified_by`) \n ');\n }", "public function up()\n\t{\n\t\t$this->dbforge->modify_column($this->table, $this->field);\n\t}", "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 up()\n {\n }", "public function up()\n {\n $user = $this->table('products', ['collation' => 'utf8mb4_persian_ci', 'engine' => 'InnoDB']);\n $user\n ->addColumn('name', STRING, [LIMIT => 20])\n ->addColumn('count', STRING, [LIMIT => 75])\n ->addColumn('code', STRING, [LIMIT => 100])\n ->addColumn('buy_price', STRING, [LIMIT => 30])\n ->addColumn('sell_price', STRING, [LIMIT => 30])\n ->addColumn('aed_price', STRING, [LIMIT => 50])\n ->addTimestamps()\n ->save();\n }", "public function up()\n {\n // Drop table 'table_name' if it exists\n $this->dbforge->drop_table('lecturer', true);\n\n // Table structure for table 'table_name'\n $this->dbforge->add_field(array(\n 'nip' => array(\n \t'type' => 'VARCHAR(16)',\n\t\t\t\t'null' => true,\n\t\t\t\t'unique' => true\n\t\t\t),\n 'nik' => array(\n \t'type' => 'VARCHAR(16)',\n\t\t\t\t'null' => false,\n\t\t\t\t'unique' => true\n\t\t\t),\n 'name' => array(\n 'type' => 'VARCHAR(24)',\n 'null' => false,\n ),\n\t\t\t'id_study_program' => array(\n\t\t\t\t'type' => 'VARCHAR(24)',\n\t\t\t\t'null' => false,\n\t\t\t)\n\n ));\n $this->dbforge->add_key('nik', true);\n $this->dbforge->create_table('lecturer');\n }", "public function up()\n\t{\n\t\t// are not setting the foreign key constraint, to allow the examination module to work without the intravitreal\n\t\t// injection module being installed\n\t\t$this->addColumn('et_ophciexamination_injectionmanagementcomplex', 'left_treatment_id', 'int(10) unsigned');\n\t\t$this->addColumn('et_ophciexamination_injectionmanagementcomplex', 'right_treatment_id', 'int(10) unsigned');\n\t}", "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 preUp()\n {\n }", "public function up()\n\t{\n\t\t// create the purchase_order_details table\n\t\tSchema::create('purchase_order_details', function($table) {\n\t\t\t$table->engine = 'InnoDB';\n\t\t $table->increments('id');\t\t \n\t\t $table->integer('purchase_order_id')->unsigned();//->foreign()->references('id')->on('orders');\n\t\t $table->integer('product_id')->unsigned();//->foreign()->references('id')->on('products');\n\t\t $table->integer('quantity');\t\t \t \n\t\t $table->integer('created_by')->unsigned();//->foreign()->references('id')->on('users');\t\t \n\t\t $table->integer('updated_by')->unsigned();\n\t\t $table->timestamps();\t\t \n\t\t});\t\n\t}", "public function up()\n {\n if (!$this->isEdu()) {\n return;\n }\n \n $this->edu_up();\n }", "public function up()\n\t{\t\t\n\t\tDB::table('professor')->insert(array(\n\t\t\t'user_id'=>'2',\t\t\t\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\t\t\n\n\t\tDB::table('professor')->insert(array(\n\t\t\t'user_id'=>'3',\t\t\t\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\n\t\t//\n\t}", "public function up()\n {\n $table = $this->table('qobo_translations_translations');\n $table->renameColumn('object_foreign_key', 'foreign_key');\n $table->renameColumn('object_model', 'model');\n $table->renameColumn('object_field', 'field');\n $table->renameColumn('translation', 'content');\n\n if (!$table->hasColumn('locale')) {\n $table->addColumn('locale', 'char', [\n 'default' => null,\n 'limit' => 6,\n ]);\n }\n $table->update();\n\n $table = TableRegistry::getTableLocator()->get(\"Translations.Translations\");\n $entities = $table->find()->all();\n foreach($entities as $entity) {\n $entity->setDirty('locale', true);\n $table->save($entity);\n }\n }", "public function up()\n {\n $this->addForeignKey('tours_fk', 'tours', 'id', 'tour_to_hotel', 'tour_id');\n\n $this->addForeignKey('t2h_fkh', 'tour_to_hotel', 'hotel_id', 'hotels', 'id');\n $this->addForeignKey('t2h_fkt', 'tour_to_hotel', 'tour_id', 'tours', 'id');\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 up()\n {\n $fields = array(\n 'first_login' => array('type' => 'char', 'constraint' => '1', 'default' => '1'),\n );\n $this->dbforge->add_column('user', $fields);\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 safeUp()\n {\n $this->alterColumn('item_keuangan', 'created_at', \"TIMESTAMP NOT NULL DEFAULT '2000-01-01 00:00:00'\");\n\n /* Tambah Field */\n $this->addColumn('item_keuangan', 'status', \"TINYINT(1) NOT NULL DEFAULT '1' COMMENT '0=tidak aktif; 1=aktif;' AFTER `jenis`\");\n }", "public function up()\n {\n $this->addForeignKey(\n 'fk_category_product_from_category',\n 'category_product',\n 'category_id',\n 'category',\n 'id',\n 'NO ACTION',\n 'NO ACTION'\n );\n\n $this->addForeignKey(\n 'fk_category_product_from_product',\n 'category_product',\n 'product_id',\n 'product',\n 'id',\n 'NO ACTION',\n 'NO ACTION'\n );\n }", "public function up()\n\t{\n\t\t$this->dropColumn('korzet','utca'); \n\t\t$this->addColumn('korzet','utca','string NOT NULL');\n\t}", "public function up()\n {\n Schema::table($this->table, function (Blueprint $table) {\n // $table->bigInteger('user_id')->default(0)->after('id'); // Example\n $table->dropColumn([\n // 'user_id', // Example\n ]);\n });\n }", "public function up()\n {\n // $this->fields()->create([]);\n // $this->streams()->create([]);\n // $this->assignments()->create([]);\n }", "public function up()\n {\n $table = $this->table('admins');\n $table->addColumn('name', 'string')\n ->addColumn('role', 'string')\n ->addColumn('username', 'string')\n ->addColumn('password', 'string')\n ->addColumn('created', 'datetime')\n ->addColumn('modified', 'datetime', ['null' => true])\n ->create();\n\n\n $data = [ \n [\n 'name' => 'Pedro Santos', \n 'username' => '[email protected]',\n 'password' => '101010',\n 'role' => 'Suporte',\n 'modified' => false\n ],\n ];\n\n $adminTable = TableRegistry::get('Admins');\n foreach ($data as $value) {\n $adminTable->save($adminTable->newEntity($value));\n }\n }", "public function up(): void\n {\n try {\n // SM: We NEVER delete this table.\n if ($this->db->tableExists('prom2_pages')) {\n return;\n }\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"CREATE TABLE `prom2_pages` (\n `cntPageID` int(10) unsigned NOT NULL AUTO_INCREMENT,\n `txtRelativeURL` varchar(255) NOT NULL COMMENT 'Relative URL',\n `txtTitle` varchar(70) NOT NULL COMMENT 'Title',\n `txtContent` text NOT NULL COMMENT 'Content',\n `blnRobots_DoNotAllow` bit(1) NOT NULL DEFAULT b'1',\n PRIMARY KEY (`cntPageID`),\n UNIQUE KEY `txtRelativeURL` (`txtRelativeURL`),\n KEY `txtTitle` (`txtTitle`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }", "public function up()\n\t{\n\t\t// Add data to committee-members\n\t\tDB::table('committee_members')->insert(array(\n\t\t\t'name' => 'Brian O\\'Sullivan',\n\t\t\t'role' => 'Chairman',\n\t\t\t'telephone' => '087-1234567',\n\t\t\t'email' => '[email protected]'\n\t\t));\n\t\tDB::table('committee_members')->insert(array(\n\t\t\t'name' => 'Anthony Barker',\n\t\t\t'role' => 'PRO',\n\t\t\t'telephone' => '087-1234567',\n\t\t\t'email' => '[email protected]'\n\t\t));\t\t\n\t}", "public function up()\n {\n $this->query(\"UPDATE `subscription_types` SET `user_label` = `name` WHERE `user_label` = '' OR `user_label` IS NULL;\");\n\n $this->table('subscription_types')\n ->changeColumn('user_label', 'string', ['null' => false])\n ->update();\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}", "public function up()\n\t{\n\t\techo $this->migration('up');\n\n\t\tci('o_role_model')->migration_add('Cookie Admin', 'Cookie Designer and Eater', $this->hash());\n\t\t\n\t\treturn true;\n\t}", "public function up()\n {\n\t\t$this->addColumn('{{%user}}', 'is_super', Schema::TYPE_SMALLINT . \"(1) NULL DEFAULT '0' AFTER `status`\");\n\t\t\n\t\t//Add new column for Option Group table\n\t\t$this->addColumn('{{%option_group}}', 'option_type', Schema::TYPE_STRING . \"(25) NULL DEFAULT 'text' AFTER `title`\");\n\t\t\n\t\t//Add new column for Order table\n\t\t$this->addColumn('{{%order}}', 'is_readed', Schema::TYPE_SMALLINT . \"(1) NULL DEFAULT '0' AFTER `shipment_method`\");\n }", "public function up()\n {\n $this->addColumn(\\backend\\models\\VodProfile::tableName(), 'language', \"char(5) not null default 'en-US'\");\n }", "public function up()\n {\n if (!Schema::hasTable($this->table))\n Schema::create($this->table, function (Blueprint $table)\n {\n $table->integer('parent_id')->unsigned()->index();\n $table->foreign('parent_id')->references('id')->on('organisations')->onDelete('restrict');\n\n $table->integer('child_id')->unsigned()->index();\n $table->foreign('child_id')->references('id')->on('organisations')->onDelete('restrict');\n\n $table->primary(['parent_id','child_id'],'organisation_relations_primary');\n\n $table->timestamps();\n $table->softDeletes();\n\n $table->engine = 'InnoDB';\n });\n }", "public function up(){\n $table = $this->table('users', array('id'=>false, 'primary_key'=>'id'));\n $table->addColumn('id', 'integer', array('identity'=>true, 'signed'=>false));\n $table->addColumn('email', 'string', array('limit'=>100));\n $table->save();\n }", "public function up() { return $this->run('up'); }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'l_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\t\t\t\t'model_id' => 'INT UNSIGNED NOT NULL',\n\t\t\t\t'lang_id' => 'VARCHAR(5) NULL DEFAULT NULL',\n\n\t\t\t\t// examples:\n\t\t\t\t'l_label' => 'VARCHAR(200) NULL DEFAULT NULL',\n\t\t\t\t'l_announce' => 'TEXT NULL DEFAULT NULL',\n\t\t\t\t//'l_content' => 'TEXT NULL DEFAULT NULL',\n\n\t\t\t\t'INDEX key_model_id_lang_id (model_id, lang_id)',\n\t\t\t\t'INDEX key_model_id (model_id)',\n\t\t\t\t'INDEX key_lang_id (lang_id)',\n\n\t\t\t\t'CONSTRAINT fk_principles_lang_model_id_to_main_model_id FOREIGN KEY (model_id) REFERENCES ' . $this->relatedTableName . ' (id) ON DELETE CASCADE ON UPDATE CASCADE',\n\t\t\t\t'CONSTRAINT fk_principles_lang_lang_id_to_language_id FOREIGN KEY (lang_id) REFERENCES {{language}} (code) ON DELETE RESTRICT ON UPDATE CASCADE',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function up()\n\t{\n\t\t// create the purchase_orders table\n\t\tSchema::create('purchase_orders', function($table) {\n\t\t\t$table->engine = 'InnoDB';\n\t\t $table->increments('id');\n\t\t $table->string('order_number', 128);\n\t\t $table->string('approved',50);\n\t\t $table->date('purchase_date');\t\t \t \t\t \t \n\t\t $table->integer('created_by')->unsigned();//->foreign()->references('id')->on('users');\t\t \t\t \n\t\t $table->integer('updated_by')->unsigned();\t\t \n\t\t $table->timestamps();\t\t \n\t\t});\t\n\t}", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\n\t\t\t\t'label' => 'VARCHAR(20) NULL DEFAULT NULL COMMENT \"language label\"',\n\t\t\t\t'code' => 'VARCHAR(5) NOT NULL COMMENT \"language code\"',\n\t\t\t\t'locale' => 'VARCHAR (5) NULL DEFAULT NULL',\n\n\t\t\t\t'visible' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"0 - not visible; 1 - visible\"',\n\t\t\t\t'published' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"0 - not published; 1 - published\"',\n\t\t\t\t'position' => 'INT UNSIGNED NOT NULL DEFAULT 0 COMMENT \"order by position DESC\"',\n\t\t\t\t'created' => 'INT UNSIGNED NOT NULL COMMENT \"unix timestamp - creation time\"',\n\t\t\t\t'modified' => 'INT UNSIGNED NOT NULL COMMENT \"unix timestamp - last entity modified time\"',\n\n\t\t\t\t'UNIQUE key_unique_code (code)',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\n\t\t$this->insert('{{language}}', array(\n\t\t\t'label' => 'рус',\n\t\t\t'code' => 'ru',\n\t\t\t'locale' => 'ru',\n\t\t));\n\t}", "public function up()\n {\n $this->execute('Update goods SET price_rub = price WHERE currency_id = 1');\n }", "public function up()\n\t{\n $this->dropColumn('calculo','fecha');\n\n //add column fecha in producto\n $this->addColumn('producto','fecha','date');\n\t}", "public function up(){\n Schema::table('entries', function (Blueprint $table) {\n $table->renameColumn('value', 'entry_value');\n });\n }", "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 getUpSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `department_summary`\n\n CHANGE `twitter_account` `positive_twitter_account` TEXT NOT NULL,\n\n ADD `negative_twitter_account` TEXT NOT NULL AFTER `positive_twitter_account`;\n\nALTER TABLE `tweets`\n\n CHANGE `positive_twitter_account` `twitter_account` TEXT NOT NULL,\n\n DROP `negative_twitter_account`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "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 {\n $this->addColumn('{{%organization}}', 'legal_entity', $this->string()->null());\n $this->addColumn('{{%organization}}', 'contact_name', $this->string()->null());\n $this->addColumn('{{%organization}}', 'about', $this->text()->null());\n $this->addColumn('{{%organization}}', 'picture', $this->string()->null());\n }", "public function up()\n {\n $this->table('agent_order_consignee_address')\n ->addColumn(Column::string('order_number')->setUnique()->setComment('订单编号'))\n \t\t->addColumn(Column::integer('agent_id')->setComment('代理商ID'))\n\t ->addColumn(Column::integer('create_time')->setDefault(1)->setComment('创建时间'))\n\t \n\t ->addColumn(Column::string('consignee_name')->setComment('收货人姓名'))\n\t ->addColumn(Column::string('consignee_phone')->setComment('收货人电话'))\n\t ->addColumn(Column::string('province')->setComment('省份'))\n\t ->addColumn(Column::string('city')->setComment('城市'))\n\t ->addColumn(Column::string('area')->setComment('地区'))\n\t ->addColumn(Column::string('address')->setComment('收货人详细地址'))\n ->create(); \n }", "public function up()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'l_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\t\t\t\t'model_id' => 'INT UNSIGNED NOT NULL',\n\t\t\t\t'lang_id' => 'VARCHAR(5) NULL DEFAULT NULL',\n\n\t\t\t\t'l_value' => 'TEXT NULL DEFAULT NULL',\n\n\t\t\t\t'INDEX key_model_id_lang_id (model_id, lang_id)',\n\t\t\t\t'INDEX key_model_id (model_id)',\n\t\t\t\t'INDEX key_lang_id (lang_id)',\n\n\t\t\t\t'CONSTRAINT fk_configuration_lang_model_id_to_main_model_id FOREIGN KEY (model_id) REFERENCES ' . $this->relatedTableName . ' (id) ON DELETE CASCADE ON UPDATE CASCADE',\n\t\t\t\t'CONSTRAINT fk_configuration_lang_lang_id_to_language_id FOREIGN KEY (lang_id) REFERENCES {{language}} (code) ON DELETE RESTRICT ON UPDATE CASCADE',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function safeUp()\r\n {\r\n $this->up();\r\n }", "public function up(){\n // $table->table('kelas')\n // ->addColumn('Id', 'int', \"11\", false, null, true, true)\n // ->addColumn('NamaKelas', 'varchar', \"100\")\n // ->create();\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 safeUp()\n\t{\n\t\t$this->up();\n\t}", "public function safeUp()\n {\n $this->up();\n }", "public function safeUp()\n {\n $this->up();\n }", "public function up(){\n // $table->table('kelassiswa')\n // ->addColumn('Id', 'int', \"11\", false, null, true, true)\n // ->addColumn('Kelas_Id', 'int', \"11\")\n // ->addColumn('Peserta_Id', 'int', \"11\")\n // ->addForeignKey('Peserta_Id', 'peserta', \"Id\", \"CASCADE\")\n // ->addForeignKey('Kelas_Id', 'kelas', \"Id\")\n // ->create();\n\n }", "public function up()\n\t{\n\t\tSchema::table('project_sections', function($t){\n\t\t\t$t->integer('created_by_project_id')->nullable()->unsigned();\n\t\t\t$t->boolean('public')->default(0);\n\n $t->foreign('created_by_project_id')->references('id')->on('projects')->on_delete('SET NULL');\n\t\t});\n\t}", "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 {\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_create');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_mods');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_modpacks');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->boolean('solder_keys')->default(0);\n $table->boolean('solder_clients')->default(0);\n $table->boolean('modpacks_create')->default(0);\n $table->boolean('modpacks_manage')->default(0);\n $table->boolean('modpacks_delete')->default(0);\n });\n }", "public function up()\n {\n Schema::dropIfExists('db_question_new.t_answer_type');\n Schema::create('db_question_new.t_answer_type', function (Blueprint $table){\n $table->increments('id');\n t_field($table->integer('answer_type_no'),\"答案序号\");\n t_field($table->string('name'),\"步骤名字\");\n t_field($table->integer('subject'),\"科目id\");\n t_field($table->integer('open_flag')->default(1),\"开启与否\");\n }); \n }", "public function up()\n\t{\n\t\t$sql = \"create table tbl_rights\n\t\t\t\t(\n\t\t\t\t\titemname varchar(64) not null,\n\t\t\t\t\ttype integer not null,\n\t\t\t\t\tweight integer not null,\n\t\t\t\t\tprimary key (itemname),\n\t\t\t\t\tforeign key (itemname) references tbl_auth_item (name) on delete cascade on update cascade\n\t\t\t\t)\";\n\t\t $this->execute($sql);\n\t\t \n\t}", "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 up()\n {\n // add foreign key for table `articles`\n $this->addForeignKey(\n 'fk-comments-article_id',\n 'comments',\n 'article_id',\n 'article',\n 'id'\n );\n }", "public function safeUp()\r\n\t{\r\n\t\t$this->up();\r\n\t}", "public function up()\n {\n\n $tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\n $this->createTable($this->createTableName, [\n 'id' => $this->primaryKey(),\n 'name' => $this->string()->notNull(),\n 'type' => $this->integer(1)->notNull(),\n 'location' => $this->text()->defaultValue(null),\n 'description' => $this->text()->defaultValue(null),\n 'created_by' => $this->integer()->notNull(),\n 'start_at' => $this->integer()->defaultValue(null),\n 'active' => $this->boolean()->defaultValue(true),\n\n ],$tableOptions);\n\n\n $this->addColumn($this->updateTableNameHoliday, $this->addColumnOne, $this->integer()->notNull()->after('name'));\n $this->addColumn($this->updateTableNameHoliday, $this->addColumnTwo, $this->integer()->notNull()->after($this->addColumnOne));\n $this->addColumn($this->updateTableNameHolidayConfig, $this->addColumnOne, $this->integer()->notNull()->after('name'));\n $this->addColumn($this->updateTableNameHolidayConfig, $this->addColumnTwo, $this->integer()->notNull()->after($this->addColumnOne));\n\n $moduleInvite = Module::findOne(['name' => 'Actioncalendar', 'slug' => 'actioncalendar']);\n if(empty($moduleInvite)) {\n $this->batchInsert('{{%module}}', ['parent_id', 'name', 'slug', 'visible', 'sorting'], [\n [null, 'Actioncalendar', 'actioncalendar', 1, 22],\n ]);\n }\n\n }", "public function up()\n\t{\n\t\tSchema::table('user_hasil', function($table)\n\t\t{\n\t\t\t$table->create();\n\t\t\t$table->integer('user_id');\n\t\t\t$table->string('grade', 2);\n\t\t\t$table->decimal('hasil', 5, 2);\n\t\t\t$table->year('tahun');\n\t\t\t$table->timestamps();\n\n\t\t\t$table->foreign('user_id')->references('id')->on('users')->on_update('cascade');\n\t\t});\n\t}", "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 up()\n {\n $this->alterColumn('{{%hystorical_data}}', 'project_id', $this->integer());\n\n $this->dropForeignKey('fk-hystorical_data-project_id',\n '{{%hystorical_data}}');\n\n $this->addForeignKey(\n 'fk-hystorical_data-project_id',\n '{{%hystorical_data}}',\n 'project_id',\n '{{%projects}}',\n 'id',\n 'SET NULL'\n );\n }", "public function up()\n\t{\n\t\tSchema::create('flows_steps', function($table) {\n\n\t\t\t$table->engine = 'InnoDB';\n\n\t\t $table->increments('stepid');\n\t\t $table->integer('flowid');\n\t\t $table->string('step', 100);\n\t\t $table->integer('roleid');\n\t\t $table->integer('parentid');\n\t\t $table->integer('state');\n\t\t $table->integer('page');\n\t\t $table->integer('condition2');\n\t\t $table->timestamps();\n\n\t\t});\n\t}", "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 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 up()\n\t{\n\t\t$this->execute(\"\n INSERT INTO `authitem` VALUES('D2finv.FiitInvoiceItem.*', 0, 'Edit invoice items', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FiitInvoiceItem.View', 0, 'View invoice items', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FinvInvoice.*', 0, 'Edit invoice records', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FinvInvoice.View', 0, 'View invoice records', NULL, 'N;');\n \n INSERT INTO `authitem` VALUES('InvoiceEdit', 2, 'Edit invoice records', NULL, 'N;');\n INSERT INTO `authitem` VALUES('InvoiceView', 2, 'View invoice records', NULL, 'N;');\n \n INSERT INTO `authitemchild` VALUES('InvoiceEdit', 'D2finv.FiitInvoiceItem.*');\n INSERT INTO `authitemchild` VALUES('InvoiceView', 'D2finv.FiitInvoiceItem.View');\n INSERT INTO `authitemchild` VALUES('InvoiceEdit', 'D2finv.FinvInvoice.*');\n INSERT INTO `authitemchild` VALUES('InvoiceView', 'D2finv.FinvInvoice.View');\n \");\n\t}", "public function up()\n {\n $this->createTable('post',[\n 'id' => $this->primaryKey(),\n 'author_id' => $this->integer(),\n 'title' => $this->string(255)->notNull()->unique(),\n 'content' => $this->text(),\n 'published_at' => $this->dateTime()->defaultExpression('CURRENT_TIMESTAMP'),\n 'updated_at' => $this->dateTime()->defaultExpression('CURRENT_TIMESTAMP'),\n 'status' => \"ENUM('draft','published')\",\n 'image' => $this->string(255)\n ]); \n\n $this->addForeignKey(\n 'fk_post_author_id',\n 'post',\n 'author_id',\n 'user',\n 'id',\n 'CASCADE',\n 'NO ACTION'\n );\n }", "public function up()\n\t{\n// $import->import();\n\t}", "public function up()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{rights}}\")){\n\t\t\t$this->dropTable(\"authItem\");\n\t\t}\n\n\t\t$this->createTable(\"{{rights}}\", array(\n\t\t\t\"itemname\" => \"varchar(64) CHARACTER SET UTF8 NOT NULL\",\n\t\t\t\"type\"\t => \"int not null\",\n\t\t\t\"weight\" => \"int not null\",\n\t\t\t\"PRIMARY KEY (itemname)\"\n\t\t\t));\n\t}", "public function up() {\r\n\t\t// UP\r\n\t\t$column = parent::Column();\r\n\t\t$column->setName('id')\r\n\t\t\t\t->setType('biginteger')\r\n\t\t\t\t->setIdentity(true);\r\n\t\tif (!$this->hasTable('propertystorage')) {\r\n\t\t\t$this->table('propertystorage', [\r\n\t\t\t\t\t\t'id' => false,\r\n\t\t\t\t\t\t'primary_key' => 'id'\r\n\t\t\t\t\t])->addColumn($column)\r\n\t\t\t\t\t->addColumn('path', 'text', ['limit' => 1024])\r\n\t\t\t\t\t->addColumn('name', 'text', ['limit' => 100])\r\n\t\t\t\t\t->addColumn('valuetype', 'integer',[])\r\n\t\t\t\t\t->addColumn('value', 'text', [])\r\n\t\t\t\t\t->create();\r\n\t\t}\r\n\t}", "public function up()\n {\n $perfis = [\n [\n 'id' => 1,\n 'perfil' => 'Genérico',\n 'ativo' => 1\n ]\n ];\n\n $this->insert('singular_perfil', $perfis);\n\n $usuarios = [\n [\n 'id' => 1,\n 'nome' => 'Singular Framework',\n 'login' => 'singular',\n 'senha' => 'singular',\n 'perfil_id' => 1\n ]\n ];\n\n $this->insert('singular_usuario', $usuarios);\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 up()\n\t{\n\t\t$demoUser = new User();\n\t\t$demoUser->username = \"demo\";\n\t\t$demoUser->email = '[email protected]';\n\t\t$demoUser->password = 'password';\n\t\t$demoUser->create_time = new CDbExpression('NOW()');\n\t\t$demoUser->update_time = new CDbExpression('NOW()');\n\n\t\t$demoUser->save();\n\n\t\t$adminUser = new User();\n\t\t$adminUser->username = \"admin\";\n\t\t$adminUser->email = '[email protected]';\n\t\t$adminUser->password = 'password';\n\t\t$adminUser->create_time = new CDbExpression('NOW()');\n\t\t$adminUser->update_time = new CDbExpression('NOW()');\n\n\t\t$adminUser->save();\n\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 safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t'like',\n\t\t\tarray(\n\t\t\t\t'id'=>'int(11) UNSIGNED NOT NULL AUTO_INCREMENT',\n\t\t\t\t'user_id' => 'int(11) UNSIGNED NOT NULL',\n\t\t\t\t'post_id' => 'int (11) NOT NULL',\n\t\t\t\t'status' => 'TINYINT(1)',\n\t\t\t\t'created_at' => 'int(11)',\n\t\t\t\t'updated_at' => 'int(11)',\n\t\t\t\t'PRIMARY KEY (id)',\n\t\t\t\t),\n\t\t\t'ENGINE=InnoDB'\n\n\t\t\t);\n\t}", "public function up()\n\t{\n\t\tSchema::table('entries', function($table) {\n $table->create();\n $table->increments('id');\n $table->string('title', 128);\n $table->string('body');\n $table->integer('users_id')->unsigned();\n $table->index('users_id');\n $table->integer('last_edited_by');\n $table->foreign('users_id')->references('id')->on('users')->on_delete('no action');\n $table->timestamps();\n });\n\t}", "public function up()\n {\n $this->alterColumn(\\app\\models\\EmailImportLead::tableName(), 'password', $this->string()->null());\n $this->alterColumn(\\app\\models\\EmailImportLead::tableName(), 'status', $this->integer()->null());\n }", "public function up()\n {\n\t\t$tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\t\t\n\t\t$TABLE_NAME = 'HaberDeneme12';\n $this->createTable($TABLE_NAME, [\n 'HaberID' => $this->integer(10)->notNull(),\n 'Kategori' => $this->string(12)->notNull(),\n 'Baslik' => $this->string(128)->notNull(),\n 'Ozet' => $this->text()->notNull(),\n 'Detay' => $this->text()->notNull(),\n 'Resim' => $this->text()->notNull(),\n 'EklenmeTarihi' => $this->date(),\n 'GuncellenmeTarihi' => $this->date()\n ], $tableOptions);\n\t\t\n\t\t\n\t\t$TABLE_NAME = 'HaberKategoriDeneme12';\n\t\t $this->createTable($TABLE_NAME, [\n 'KategoriID' => $this->integer(10)->notNull(),\n 'Kategori' => $this->string(20)->notNull()\n ], $tableOptions);\n\t\t\n }", "public function up()\n\t{\n\t\t$fields = array(\n \"`piezas` DECIMAL(3,2) DEFAULT NULL\",\n\n\t\t);\n\t\t$this->dbforge->add_column('rel_monto_servicios', $fields);\n\n\t}", "public function up()\n {\n $this->insert('key_value', [\n 'key' => 'day_feed_count_dnr',\n 'value' => '15',\n ]);\n }", "public function up()\n {\n // 创建操作记录表\n $tables = $this->table('history');\n // 用户动作\n $tables->addColumn('action', 'string', ['limit' => 20])\n ->addColumn('ip', 'string', ['limit' => 129])\n // 建立用户\n ->addColumn('user_id', 'integer')\n // 登录时间\n ->addColumn('operation_time', 'datetime')\n // 操作详情\n ->addColumn('desc', 'string',['limit'=>500,'null' => true])\n ->create();\n }", "public function up()\n {\n $table = $this->table('vehicle_model_suggestions');\n\n if (!$table->exists()) {\n $table\n ->addPrimaryKey('id')\n ->addColumn('vehicle_id', 'integer', ['null' => false])\n ->addColumn('vehicle_model_id', 'integer', ['null' => false])\n ->addColumn('suggestion', 'text')\n ->addTimestamps()\n ->addColumn('deleted_at', 'datetime')\n ->create();\n }\n }", "public function safeUp()\n {\n $this->insert('category',['name'=>'Uncategorized', 'slug'=>'uncategorized', 'description'=>'Default Category', 'created_at'=> new Expression('NOW()'),\n 'updated_at'=> new Expression('NOW()')]);\n $this->insert('user',['username'=>'Administrator', 'password_hash'=>'$2y$13$6yoLjvVORp/7EO1u8phYTuWYzhMSM4LVVsebZgcqEKj/EQLvo5nJK',\n 'email'=>'[email protected]',\n 'created_at'=> new Expression('NOW()'),\n 'updated_at'=> new Expression('NOW()'),\n 'status'=>1\n ]\n );\n }", "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 up()\n {\n Schema::table('categories', function(Blueprint $table)\n {\n $table->integer('parent_id', false, true)->nullable()->after('cat_order');\n });\n }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\n\t\t\t\t'application_id' => 'VARCHAR(32) NOT NULL DEFAULT \"\" COMMENT \"Ид приложения\"',\n\n\t\t\t\t'message' => 'TEXT NOT NULL DEFAULT \"\" COMMENT \"Оригинал\"',\n\t\t\t\t'category' => 'VARCHAR(32) NOT NULL DEFAULT \"\" COMMENT \"Категория\"',\n\t\t\t\t'language' => 'VARCHAR(5) NOT NULL DEFAULT \"\" COMMENT \"Язык\"',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function up()\n\t{\n\t\t//\n\t\tSchema::create('options',function($table){\n\t\t\t$table->increments('id');\n\t\t\t$table->boolean('activate_pn');\n\t\t\t$table->string('basic_name');\n\t\t\t$table->string('basic_pass');\n\t\t\t$table->timestamps();\n\t\t});\n\n\t\t$o = new Option;\n\t\t$o->activate_pn = 0;\n\t\t$o->save();\n\t}", "public function up() {\n\t\t$this->dbforge->add_field(array(\n\t\t\t'id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t\t'auto_increment' => TRUE\n\t\t\t),\n\t\t\t'name' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t),\n\t\t\t'path' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t)\n\t\t));\n\t\t$this->dbforge->add_key('id', TRUE);\n\t\t$this->dbforge->add_key('path');\n\t\t$this->dbforge->create_table('categories');\n\n\t\t// Table structure for table 'event_categories'\n\t\t$this->dbforge->add_field(array(\n\t\t\t'event_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t),\n\t\t\t'category_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t),\n\t\t));\n\t\t$this->dbforge->add_key('event_id', TRUE);\n\t\t$this->dbforge->add_key('category_id', TRUE);\n\t\t$this->dbforge->create_table('event_categories');\n\t}", "public function up()\n\t{\n Laravel\\Database\\Schema::create(\"orbs\", function($table){\n $table->increments(\"id\");\n $table->string(\"name\");\n $table->string(\"description\");\n $table->integer(\"coins\");\n $table->integer(\"points\");\n $table->integer(\"min_level\");\n $table->integer(\"max_level\");\n $table->integer(\"owner_character\");\n $table->integer(\"acquisition_time\");\n $table->integer(\"last_attacker\");\n $table->integer(\"last_attack_time\");\n $table->string(\"image\");\n });\n\t}" ]
[ "0.80062366", "0.79145443", "0.79145443", "0.79145443", "0.7572342", "0.756089", "0.75283176", "0.7498379", "0.7493237", "0.7453656", "0.74463314", "0.7433381", "0.74307704", "0.7427088", "0.741794", "0.73779047", "0.7374933", "0.7370453", "0.73637444", "0.73505706", "0.7329024", "0.7313519", "0.7298817", "0.72950184", "0.72917736", "0.7291469", "0.72913444", "0.72849613", "0.72839737", "0.7272078", "0.7271878", "0.72659117", "0.7262893", "0.7261672", "0.7256839", "0.72505474", "0.7249633", "0.72441125", "0.724062", "0.72376186", "0.7218244", "0.72177947", "0.72046006", "0.7203395", "0.7196059", "0.7191219", "0.7189963", "0.7177052", "0.71761394", "0.7167738", "0.7164105", "0.7164105", "0.7159096", "0.7147647", "0.7136521", "0.7129768", "0.7124664", "0.7123368", "0.71168584", "0.7104628", "0.7104628", "0.7104618", "0.7097006", "0.70931643", "0.70886755", "0.7087018", "0.7086326", "0.70830804", "0.70829463", "0.70780045", "0.70702124", "0.70690626", "0.7066111", "0.7062268", "0.7058938", "0.705882", "0.70556235", "0.70549136", "0.7054758", "0.70498437", "0.70483595", "0.7047308", "0.7045881", "0.70445794", "0.7043173", "0.703882", "0.7038126", "0.703674", "0.7033728", "0.7032356", "0.7031423", "0.70257956", "0.70142514", "0.70101255", "0.7006208", "0.6988486", "0.6984963", "0.69629973", "0.69612974", "0.69587934", "0.6957519" ]
0.0
-1
this down() migration is autogenerated, please modify it to your needs
public function down(Schema $schema) : void { $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); $this->addSql('ALTER TABLE grps_users DROP FOREIGN KEY FK_504D2FDC9D86650F'); $this->addSql('ALTER TABLE grps_users DROP FOREIGN KEY FK_504D2FDC98A86D6D'); $this->addSql('DROP TABLE user'); $this->addSql('DROP TABLE grps_users'); $this->addSql('DROP TABLE grp'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function down()\n {\n //add your migration here \n }", "public function down()\n {\n //add your migration here\n }", "public function down()\n\t{\n $this->dropColumn('producto','fecha');\n\n //add column fecha in producto\n $this->addColumn('calculo','fecha','date');\n\t}", "public function down()\n {\n \t\n \t$this->createTable('os', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n \t$this->insert('os', ['id' => 1, 'name' => 'Any']);\n \t$this->insert('os', ['id' => 2, 'name' => 'CentOS']);\n \t$this->insert('os', ['id' => 3, 'name' => 'RHEL']);\n \t$this->insert('os', ['id' => 4, 'name' => 'Fedora']);\n \t \n \t$this->createTable('os_bit', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n\n return false;\n }", "public function down()\n {\n //Schema::dropIfExists('c');//回滚时执行\n\n }", "public function down()\n {\n $this->dbforge->drop_column('user', 'created_at');\n }", "public function down()\n {\n $this->dropForeignKey(\n 'fk-video-blog_id',\n 'video'\n );\n\n\n echo \"m160820_150846_video_create reverted.\\n\";\n\n }", "public function down()\n\t{\nDB::query(\n\"drop table haal;\");\nDB::query(\n\"drop table kandidaat;\");\nDB::query(\n\"drop table haaletaja;\");\nDB::query(\n\"drop table partei;\");\nDB::query(\n\"drop table valimisringkond;\");\n\t}", "public function down()\n\t{\n\t\t// Remove data from committee_members\n\t\tDB::table('committee_members')->where('id', '<', 3)->delete();\t\n\t}", "public function down(){\n $this->dropTable('users');\n }", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `department_summary`\n\n CHANGE `positive_twitter_account` `twitter_account` TEXT NOT NULL,\n\n DROP `negative_twitter_account`;\n\nALTER TABLE `tweets`\n\n CHANGE `twitter_account` `positive_twitter_account` TEXT NOT NULL,\n\n ADD `negative_twitter_account` INTEGER NOT NULL AFTER `quality_tweet`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function down()\n {\n Schema::table('attachments', function(Blueprint $table) {\n\n $table->dropColumn('viewable_id');\n $table->dropColumn('viewable_type');\n\n\n });\n }", "public function down()\n\t{\n\t\t//Schema::drop('purchase_order_details');\n\t}", "public function getDownSQL()\r\n {\r\n return array (\n 'propel' => '\r\n# This is a fix for InnoDB in MySQL >= 4.1.x\r\n# It \"suspends judgement\" for fkey relationships until are tables are set.\r\nSET FOREIGN_KEY_CHECKS = 0;\r\n\r\nDROP TABLE IF EXISTS `movimiento`;\r\n\r\n# This restores the fkey checks, after having unset them earlier\r\nSET FOREIGN_KEY_CHECKS = 1;\r\n',\n);\r\n }", "public function down()\n\t{\n//\t\t$this->dbforge->drop_table('blog');\n\n//\t\t// Dropping a Column From a Table\n\t\t$this->dbforge->drop_column('categories', 'icon');\n\t}", "public function down()\n\t{\n\t\t// nothing to do here.\n\t}", "public function down(){\r\n $this->dbforge->drop_table('users'); //eliminacion de la tabla users\r\n }", "public function down()\n\t{\n\t\tSchema::drop('student');\n\t\t//\n\t}", "public function down()\n{\n\nSchema::drop('event_user');\nSchema::drop('events');\nSchema::drop('file');\nSchema::drop('file_ref');\nSchema::drop('groups');\nSchema::drop('project_user');\nSchema::drop('projects');\nSchema::drop('quicknote');\nSchema::drop('subtasks');\nSchema::drop('task_user');\nSchema::drop('tasks');\nSchema::drop('throttle');\nSchema::drop('timesheet');\nSchema::drop('todos');\nSchema::drop('user_profile');\nSchema::drop('users');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\n\n}", "public function down() \n {\n \n }", "public function down()\n\t{\n\t}", "public function down()\n\t{\n\t}", "public function down()\n {\n $this->table('contents')->drop()->save();\n }", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n\t{\n\t\tSchema::drop('education');\n\t}", "public function down()\n\t{\n\t\tSchema::drop('l_wardrobe_table');\n\t}", "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 safeDown()\n\t{\n $sql=\" ALTER TABLE `tbl_venta` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n //quitando la columna pto_venta de tbl_empleado\n $sql=\" ALTER TABLE `tbl_empleado` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n\t}", "public function down()\n {\n\tSchema::drop('quizzes');\n }", "public function down()\n {\n $this->output->writeln('Down migration is not available.');\n }", "public function down()\n {\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=0');\n\n $this->executeSQL('DROP TABLE link');\n $this->executeSQL('DROP TABLE link_category');\n\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=1');\n }", "public function down ()\n {\n }", "public function down()\n {\n // This migration was removed, but fails when uninstalling plugin\n }", "abstract public function down();", "abstract public function down();", "abstract public function down();", "public function down()\r\n {\r\n $this->dbforge->drop_table('users');\r\n }", "public function down() {\n\n\t}", "public function down()\n {\n $this->dbforge->drop_table('lecturer', true);\n }", "public function down()\n\t{\n\t\tSchema::drop('flows_steps');\n\t}", "public function down(Schema $schema) : void\n {\n $this->addSql('CREATE TABLE galaxiee (id INT AUTO_INCREMENT NOT NULL, idu_id INT NOT NULL, nom VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_8576D2AF376A6230 (idu_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE trou_noir (id INT AUTO_INCREMENT NOT NULL, id_g_id INT DEFAULT NULL, nom VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_AB27242D95951086 (id_g_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('ALTER TABLE galaxiee ADD CONSTRAINT FK_8576D2AF376A6230 FOREIGN KEY (idu_id) REFERENCES univers (id)');\n $this->addSql('ALTER TABLE trou_noir ADD CONSTRAINT FK_AB27242D95951086 FOREIGN KEY (id_g_id) REFERENCES galaxie (id)');\n $this->addSql('DROP TABLE trounoir');\n $this->addSql('ALTER TABLE galaxie DROP FOREIGN KEY FK_1C880711376A6230');\n $this->addSql('DROP INDEX IDX_1C880711376A6230 ON galaxie');\n $this->addSql('ALTER TABLE galaxie CHANGE idu_id id_u_id INT NOT NULL');\n $this->addSql('ALTER TABLE galaxie ADD CONSTRAINT FK_1C8807116F858F92 FOREIGN KEY (id_u_id) REFERENCES univers (id)');\n $this->addSql('CREATE INDEX IDX_1C8807116F858F92 ON galaxie (id_u_id)');\n $this->addSql('ALTER TABLE planete DROP FOREIGN KEY FK_490E3E5712013DEC');\n $this->addSql('DROP INDEX IDX_490E3E5712013DEC ON planete');\n $this->addSql('ALTER TABLE planete ADD id_s_id INT NOT NULL, ADD nb_sattelite INT NOT NULL, DROP ids_id, DROP nb_satelite');\n $this->addSql('ALTER TABLE planete ADD CONSTRAINT FK_490E3E574AEED04E FOREIGN KEY (id_s_id) REFERENCES systeme (id)');\n $this->addSql('CREATE INDEX IDX_490E3E574AEED04E ON planete (id_s_id)');\n $this->addSql('ALTER TABLE systeme DROP FOREIGN KEY FK_95796DE3CD7AFD24');\n $this->addSql('DROP INDEX IDX_95796DE3CD7AFD24 ON systeme');\n $this->addSql('ALTER TABLE systeme CHANGE idg_id id_g_id INT NOT NULL');\n $this->addSql('ALTER TABLE systeme ADD CONSTRAINT FK_95796DE395951086 FOREIGN KEY (id_g_id) REFERENCES galaxie (id)');\n $this->addSql('CREATE INDEX IDX_95796DE395951086 ON systeme (id_g_id)');\n }", "public function down() {\n $this->dbforge->drop_column('timesheets_items', 'orgID', TRUE);\n $this->dbforge->drop_column('timesheets_items', 'brandID', TRUE);\n $this->dbforge->drop_column('timesheets_items', 'reason_desc', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'orgID', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'brandID', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'reason_desc', TRUE);\n\n // change reason to note\n $fields = array(\n 'reason' => array(\n 'name' => 'note',\n 'type' => \"VARCHAR\",\n 'constraint' => 200,\n 'null' => TRUE\n )\n );\n $this->dbforge->modify_column('timesheets_items', $fields);\n $this->dbforge->modify_column('timesheets_expenses', $fields);\n }", "public function down(): void\n {\n // Remove your data\n }", "public function down()\n\t{\n\t\t//Schema::drop('purchase_orders');\n\t\t//Schema::drop('purchase_order_details');\n\t}", "public function down()\n {\n\tSchema::drop('activities');\n }", "public function down()\n {\n //return false;\n\t\t\n\t\t$TABLE_NAME = 'Haber';\n $this->dropTable($TABLE_NAME);\n\t\t\n\t\t$TABLE_NAME = 'HaberKategori';\n $this->dropTable($TABLE_NAME);\n }", "public function down(){\n $this->dbforge->drop_table('subcategories_news'); //eliminacion de la tabla subcategories_news\n }", "public function down()\n {\n }", "public function down()\n {\n }", "public function down()\n\t{\n\t\tDB::table('professor')->where('professor_id', '=', 1)->delete();\n\t\tDB::table('professor')->where('professor_id', '=', 2)->delete();\n\t\tDB::query('ALTER TABLE professor AUTO_INCREMENT = 1');\n\n\t\t//\n\t}", "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 getDownSQL()\r\n {\r\n return array (\n 'propel' => '\r\n# This is a fix for InnoDB in MySQL >= 4.1.x\r\n# It \"suspends judgement\" for fkey relationships until are tables are set.\r\nSET FOREIGN_KEY_CHECKS = 0;\r\n\r\nALTER TABLE `promocion` CHANGE `fecha_inicio` `fecha_inicio` DATE NOT NULL;\r\n\r\nALTER TABLE `promocion` CHANGE `fecha_fin` `fecha_fin` DATE NOT NULL;\r\n\r\nALTER TABLE `promocion` CHANGE `descuento` `descuento` DECIMAL;\r\n\r\nALTER TABLE `promocion`\r\n ADD `descripcion` VARCHAR(70) AFTER `id`,\r\n ADD `estado` VARCHAR(11) AFTER `fecha_fin`,\r\n ADD `promocion_global` TINYINT(1) NOT NULL AFTER `descuento`;\r\n\r\nALTER TABLE `promocion` DROP `activo`;\r\n\r\n# This restores the fkey checks, after having unset them earlier\r\nSET FOREIGN_KEY_CHECKS = 1;\r\n',\n);\r\n }", "public function down()\n\t{\n\t\t//return false;\n\t}", "public function down(): void\n {\n try {\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"DROP TABLE IF EXISTS prom2_pages\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }", "public function down()\n\t{\n\t\t//\n\t\tSchema::drop('options');\n\t}", "public function change()\n {\n $this->schema->table('recurring_expenses',function($table){\n $table->date('end_repeat')->nullable();\n $table->boolean('ended')->default(false);\n $table->enum('repeat',['0','1','7','14','30','365'])->nullable();\n });\n\n $this->schema->table('expenses',function($table){\n $table->dropColumn('end_repeat');\n $table->dropColumn('repeat');\n $table->integer('parent_id')->nullable();\n $table->foreign('parent_id')->references('id')->on('expenses')->onDelete('cascade');\n });\n }", "public function down()\n {\n Schema::table('users', function (Blueprint $table) {\n $table->dropForeign('users_id_turma_foreign');\n });\n\n Schema::table('contato', function (Blueprint $table) {\n $table->dropForeign('contato_id_usuario_foreign');\n });\n\n Schema::table('monitores', function (Blueprint $table) {\n $table->dropForeign('monitores_id_turma_foreign');\n $table->dropForeign('monitores_id_usuario_foreign');\n });\n\n Schema::table('galeria_portifolio', function (Blueprint $table) {\n $table->dropForeign('galeria_portifolio_id_portifolio_foreign');\n });\n\n Schema::table('portifolio_alunos', function (Blueprint $table) {\n $table->dropForeign('portifolio_alunos_id_portifolio_foreign');\n $table->dropForeign('portifolio_alunos_id_usuario_foreign');\n });\n\n Schema::table('cobranca', function (Blueprint $table) {\n $table->dropForeign('cobranca_id_aluno_foreign');\n });\n\n Schema::table('lista_de_presenca', function (Blueprint $table) {\n $table->dropForeign('lista_de_presenca_id_usuario_foreign');\n });\n\n Schema::table('forum_da_turma', function (Blueprint $table) {\n $table->dropForeign('forum_da_turma_id_usuario_foreign');\n });\n\n Schema::table('posts_do_site', function (Blueprint $table) {\n $table->dropForeign('posts_do_site_id_usuario_foreign');\n });\n\n Schema::table('posts_do_forum', function (Blueprint $table) {\n $table->dropForeign('posts_do_forum_id_topico_foreign');\n $table->dropForeign('posts_do_forum_id_usuario_foreign');\n });\n }", "public function down()\n\t{\n\t\t$this->dropForeignKey('FK_task_creator','tbl_task');\n\n\t\t$this->dropTable('tbl_task');\n\t}", "public function down()\n {\n $this->table('articles')->drop()->save();\n $this->table('categories')->drop()->save();\n $this->table('football_ragistrations')->drop()->save();\n $this->table('friends')->drop()->save();\n $this->table('menus')->drop()->save();\n $this->table('picnic_ragistrations')->drop()->save();\n $this->table('products')->drop()->save();\n $this->table('profiles')->drop()->save();\n $this->table('skills')->drop()->save();\n $this->table('spouses')->drop()->save();\n $this->table('students')->drop()->save();\n $this->table('submenus')->drop()->save();\n $this->table('users')->drop()->save();\n }", "public function down(){\n\t\tSchema::dropIfExists('cargo');\n\t}", "public function down()\n {\n $this->table('users')\n ->dropForeignKey(\n 'role_id'\n )->save();\n\n $this->table('users')\n ->removeIndexByName('FK_users_roles')\n ->update();\n\n $this->table('users')\n ->addColumn('can_edit', 'boolean', [\n 'after' => 'enabled',\n 'default' => '0',\n 'length' => null,\n 'null' => false,\n ])\n ->removeColumn('role_id')\n ->update();\n\n $this->table('stundenplan')\n ->changeColumn('note', 'string', [\n 'default' => null,\n 'length' => 255,\n 'null' => true,\n ])\n ->removeColumn('loggedInNote')\n ->update();\n\n $this->table('roles')->drop()->save();\n }", "public function down()\n\t{\n\t\t//\n\t\tDB::query('TRUNCATE TABLE app_user_apps_publishes CASCADE');\n\t\tDB::query('TRUNCATE TABLE app_apps_fbapps CASCADE');\n\t\tDB::query('TRUNCATE TABLE app_apps_applications CASCADE');\n\t}", "public function down()\n\t{\n\t\t// Drop Table\n\t\tSchema::drop('activities_types');\n\t}", "protected abstract function do_down();", "public function down(Schema $schema) : void\n {\n $this->addSql('CREATE TABLE encherir_acheteur (encherir_id INT NOT NULL, acheteur_id INT NOT NULL, INDEX IDX_41ABAAFBB0BA17BB (encherir_id), INDEX IDX_41ABAAFB96A7BB5F (acheteur_id), PRIMARY KEY(encherir_id, acheteur_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE encherir_lot (encherir_id INT NOT NULL, lot_id INT NOT NULL, INDEX IDX_3C56919BB0BA17BB (encherir_id), INDEX IDX_3C56919BA8CBA5F7 (lot_id), PRIMARY KEY(encherir_id, lot_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('ALTER TABLE encherir_acheteur ADD CONSTRAINT FK_41ABAAFB96A7BB5F FOREIGN KEY (acheteur_id) REFERENCES acheteur (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_acheteur ADD CONSTRAINT FK_41ABAAFBB0BA17BB FOREIGN KEY (encherir_id) REFERENCES encherir (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_lot ADD CONSTRAINT FK_3C56919BA8CBA5F7 FOREIGN KEY (lot_id) REFERENCES lot (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_lot ADD CONSTRAINT FK_3C56919BB0BA17BB FOREIGN KEY (encherir_id) REFERENCES encherir (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir DROP FOREIGN KEY FK_503B7C878EB576A8');\n $this->addSql('ALTER TABLE encherir DROP FOREIGN KEY FK_503B7C878EFC101A');\n $this->addSql('DROP INDEX IDX_503B7C878EB576A8 ON encherir');\n $this->addSql('DROP INDEX IDX_503B7C878EFC101A ON encherir');\n $this->addSql('ALTER TABLE encherir DROP id_acheteur_id, DROP id_lot_id');\n }", "public function down()\n {\n $this->table('accounting_entries')\n ->dropForeignKey(\n 'accounting_entry_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('associations_events')\n ->dropForeignKey(\n 'event_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('events')\n ->dropForeignKey(\n 'event_type_id'\n )->save();\n\n $this->table('members')\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics')\n ->dropForeignKey(\n 'statistics_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics_event')\n ->dropForeignKey(\n 'statistics_id'\n )\n ->dropForeignKey(\n 'event_id'\n )->save();\n\n $this->table('users')\n ->dropForeignKey(\n 'role_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('accounting_entries')->drop()->save();\n $this->table('accounting_entry_type')->drop()->save();\n $this->table('associations')->drop()->save();\n $this->table('associations_events')->drop()->save();\n $this->table('event_type')->drop()->save();\n $this->table('events')->drop()->save();\n $this->table('members')->drop()->save();\n $this->table('roles')->drop()->save();\n $this->table('statistics')->drop()->save();\n $this->table('statistics_event')->drop()->save();\n $this->table('statistics_type')->drop()->save();\n $this->table('users')->drop()->save();\n }", "public function down()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{user_block}}\")){\n\t\t\t$this->dropTable(\"{{user_block}}\");\n\t\t}\n\n\t}", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nDROP TABLE IF EXISTS `user_login`;\n\nALTER TABLE `user` DROP `user_mname`;\n\nALTER TABLE `user` DROP `user_user`;\n\nALTER TABLE `user` DROP `user_password`;\n\nALTER TABLE `user` DROP `user_date_lastlogin`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function down()\n\t{\n\t\tSchema::table('officers', function($t){\n\t\t\t$t->drop_column('role');\n\t\t});\n\t}", "public function safeDown()\n {\n $this->down();\n }", "public function safeDown()\n {\n $this->down();\n }", "public function down()\n\t{\n\t\tSchema::drop('refs');\n\t}", "public function down () {\n\t\treturn $this->rename_column ('headline', 'title', 'string', array ('limit' => 72));\n\t}", "public function down()\n\t{\n\t\tSchema::drop('appeals');\n\t}", "public function safeDown()\r\n {\r\n $this->down();\r\n }", "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n<<<<<<< HEAD\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCF082E755');\n $this->addSql('ALTER TABLE affaire DROP FOREIGN KEY FK_9C3F18EFED813170');\n=======\n<<<<<<< HEAD:src/Migrations/Version20200418121015.php\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCF082E755');\n $this->addSql('ALTER TABLE affaire DROP FOREIGN KEY FK_9C3F18EFED813170');\n=======\n $this->addSql('ALTER TABLE liste_affaire_affaire DROP FOREIGN KEY FK_CA81ADF3F082E755');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2463CD7C3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA25D493FF4');\n $this->addSql('ALTER TABLE correspondant_administratif DROP FOREIGN KEY FK_E1E7152EBF396750');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA246135043');\n>>>>>>> e1e13eb645b79ada7517f9d2be860dc1655c42db:src/Migrations/Version20200318150734.php\n>>>>>>> 0c1c04bb7c2bbee076bc5fdb1e2456d1af817866\n $this->addSql('ALTER TABLE enfant_sejour DROP FOREIGN KEY FK_159E7E65450D2529');\n $this->addSql('ALTER TABLE enfant_sejour DROP FOREIGN KEY FK_159E7E6584CF0CF');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2463CD7C3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA25D493FF4');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2FF631228');\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCE2687AC3');\n $this->addSql('ALTER TABLE sejour DROP FOREIGN KEY FK_96F52028E2687AC3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA246135043');\n $this->addSql('ALTER TABLE correspondant_administratif DROP FOREIGN KEY FK_E1E7152E46135043');\n $this->addSql('DROP TABLE affaire');\n<<<<<<< HEAD\n $this->addSql('DROP TABLE affaire_liste_affaire');\n $this->addSql('DROP TABLE type_affaire');\n=======\n<<<<<<< HEAD:src/Migrations/Version20200418121015.php\n $this->addSql('DROP TABLE affaire_liste_affaire');\n $this->addSql('DROP TABLE type_affaire');\n=======\n $this->addSql('DROP TABLE centre');\n $this->addSql('DROP TABLE correspondant_administratif');\n $this->addSql('DROP TABLE responsable_legal');\n>>>>>>> e1e13eb645b79ada7517f9d2be860dc1655c42db:src/Migrations/Version20200318150734.php\n>>>>>>> 0c1c04bb7c2bbee076bc5fdb1e2456d1af817866\n $this->addSql('DROP TABLE enfant');\n $this->addSql('DROP TABLE enfant_sejour');\n $this->addSql('DROP TABLE sejour');\n $this->addSql('DROP TABLE centre');\n $this->addSql('DROP TABLE correspondant_administratif');\n $this->addSql('DROP TABLE etablissement');\n $this->addSql('DROP TABLE liste_affaire');\n $this->addSql('DROP TABLE responsable_legal');\n $this->addSql('DROP TABLE user');\n }", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nDROP TABLE IF EXISTS `user`;\n\nDROP TABLE IF EXISTS `question`;\n\nDROP TABLE IF EXISTS `answer`;\n\nDROP TABLE IF EXISTS `image`;\n\nDROP TABLE IF EXISTS `vote`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\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 down()\n {\n $this->table('mail_contents')->drop()->save();\n }", "public function down()\n {\n Schema::dropIfExists('reunion');\n }", "public function down() {\n\t}", "public function down() {\n\t}", "public function down() {\n\t}", "public function down(): void\n {\n $this->table('services')\n ->dropForeignKey(\n ['currency_id','billing_period_id']\n )->save();\n $this->execute('DELETE FROM currencies');\n $this->execute('DELETE FROM billing_periods');\n $this->table('services')->drop()->save();\n $this->table('currencies')->drop()->save();\n $this->table('billing_periods')->drop()->save();\n }", "public function down()\n\t{\n\t\tSchema::drop('article_category');\n\t}", "public function down()\n {\n Schema::table('users', function (Blueprint $table) {\n $table->renameColumn('first_name', 'name');\n $table->dropIndex('users_first_name_index');\n $table->dropIndex('users_created_at_index');\n $table->dropIndex('users_updated_at_index');\n $table->dropColumn(\"last_name\");\n $table->dropColumn(\"username\");\n $table->dropColumn(\"provider\");\n $table->dropColumn(\"provider_id\");\n $table->dropColumn(\"api_token\");\n $table->dropColumn(\"code\");\n $table->dropColumn(\"remember_token\");\n $table->dropColumn(\"role_id\");\n $table->dropColumn(\"last_login\");\n $table->dropColumn(\"status\");\n $table->dropColumn(\"root\");\n $table->dropColumn('backend');\n $table->dropColumn(\"photo_id\");\n $table->dropColumn(\"lang\");\n $table->dropColumn(\"color\");\n $table->dropColumn(\"about\");\n $table->dropColumn(\"facebook\");\n $table->dropColumn(\"twitter\");\n $table->dropColumn(\"linked_in\");\n $table->dropColumn(\"google_plus\");\n });\n }", "public function down()\n\t{\n\t\tSchema::drop('entries');\n\t}", "public function down()\n\t{\n\t\tSchema::table('precios_aterrizajes_despegues', function(Blueprint $table)\n\t\t{\n\t\t\t//\n\t\t});\n\t}", "public function down()\n{\nSchema::drop('statustype');\nSchema::drop('area');\nSchema::drop('region');\nSchema::drop('territory');\nSchema::drop('trackedevent');\nSchema::drop('zip_territory');\nSchema::drop('messagetype');\nSchema::drop('optintype');\nSchema::drop('representative');\nSchema::drop('pediatrician');\nSchema::drop('application_messagestatus');\nSchema::drop('application_optin');\nSchema::drop('application_trackedevent');\nSchema::drop('application');\n}", "public function down()\n\t{\n\t\tSchema::drop(Config::get('sentry::sentry.table.users_metadata'));\n\t}", "public function down()\n\t{\n\t\tSchema::drop('stor_mem');\n\t}", "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 down(Schema $schema) : void\n {\n $this->addSql('ALTER TABLE classe_personne DROP FOREIGN KEY FK_350001418F5EA509');\n $this->addSql('ALTER TABLE matiere_classe DROP FOREIGN KEY FK_AF649A8B8F5EA509');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA148F5EA509');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0E8F5EA509');\n $this->addSql('ALTER TABLE cours DROP FOREIGN KEY FK_FDCA8C9CF46CD258');\n $this->addSql('ALTER TABLE matiere_classe DROP FOREIGN KEY FK_AF649A8BF46CD258');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA14F46CD258');\n $this->addSql('ALTER TABLE personne_matiere DROP FOREIGN KEY FK_4E9BB3B7F46CD258');\n $this->addSql('ALTER TABLE absence DROP FOREIGN KEY FK_765AE0C9A21BD112');\n $this->addSql('ALTER TABLE classe_personne DROP FOREIGN KEY FK_35000141A21BD112');\n $this->addSql('ALTER TABLE contacte DROP FOREIGN KEY FK_C794A022A21BD112');\n $this->addSql('ALTER TABLE demande DROP FOREIGN KEY FK_2694D7A5A21BD112');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA14A6CC7B2');\n $this->addSql('ALTER TABLE personne_matiere DROP FOREIGN KEY FK_4E9BB3B7A21BD112');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EE455FCC0');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EBDDFA3C9');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EDC304035');\n $this->addSql('ALTER TABLE absence DROP FOREIGN KEY FK_765AE0C9E3797A94');\n $this->addSql('ALTER TABLE personne DROP FOREIGN KEY FK_FCEC9EFA76ED395');\n $this->addSql('ALTER TABLE reset_password_request DROP FOREIGN KEY FK_7CE748AA76ED395');\n $this->addSql('DROP TABLE absence');\n $this->addSql('DROP TABLE classe');\n $this->addSql('DROP TABLE classe_personne');\n $this->addSql('DROP TABLE contacte');\n $this->addSql('DROP TABLE cours');\n $this->addSql('DROP TABLE demande');\n $this->addSql('DROP TABLE matiere');\n $this->addSql('DROP TABLE matiere_classe');\n $this->addSql('DROP TABLE news');\n $this->addSql('DROP TABLE note');\n $this->addSql('DROP TABLE personne');\n $this->addSql('DROP TABLE personne_matiere');\n $this->addSql('DROP TABLE reset_password_request');\n $this->addSql('DROP TABLE salle');\n $this->addSql('DROP TABLE seance');\n $this->addSql('DROP TABLE user');\n }", "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('ALTER TABLE booking DROP FOREIGN KEY FK_E00CEDDEA76ED395');\n $this->addSql('ALTER TABLE booking DROP FOREIGN KEY FK_E00CEDDE19FCD424');\n $this->addSql('DROP TABLE booking');\n $this->addSql('DROP TABLE product_image');\n $this->addSql('DROP TABLE family_page_container');\n $this->addSql('DROP TABLE user');\n $this->addSql('DROP TABLE time_line');\n $this->addSql('ALTER TABLE family DROP FOREIGN KEY FK_A5E6215B727ACA70');\n $this->addSql('DROP INDEX IDX_A5E6215B727ACA70 ON family');\n $this->addSql('ALTER TABLE family ADD page_content_id INT NOT NULL, DROP parent_id, DROP has_uniques_prices, DROP has_seasonal_products');\n $this->addSql('ALTER TABLE family ADD CONSTRAINT FK_A5E6215B8F409273 FOREIGN KEY (page_content_id) REFERENCES page_content (id)');\n $this->addSql('CREATE INDEX IDX_A5E6215B8F409273 ON family (page_content_id)');\n $this->addSql('ALTER TABLE link ADD page_container_id INT DEFAULT NULL, DROP url');\n $this->addSql('ALTER TABLE link ADD CONSTRAINT FK_36AC99F123D5B0C FOREIGN KEY (page_container_id) REFERENCES page_container (id)');\n $this->addSql('CREATE INDEX IDX_36AC99F123D5B0C ON link (page_container_id)');\n $this->addSql('ALTER TABLE product DROP content, DROP order_by, DROP is_generic, DROP type, CHANGE title label VARCHAR(50) NOT NULL COLLATE utf8mb4_unicode_ci');\n $this->addSql('ALTER TABLE unit DROP duration');\n }", "public function down(Schema $schema) : void\n {\n $this->addSql('ALTER TABLE `order` DROP FOREIGN KEY FK_F5299398F5B7AF75');\n $this->addSql('ALTER TABLE suppliers DROP FOREIGN KEY FK_AC28B95C8486F9AC');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D6498486F9AC');\n $this->addSql('ALTER TABLE stock DROP FOREIGN KEY FK_4B365660D629F605');\n $this->addSql('ALTER TABLE stock DROP FOREIGN KEY FK_4B365660E308AC6F');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F46CFFE9AD6');\n $this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04ADEE45BDBF');\n $this->addSql('ALTER TABLE suppliers DROP FOREIGN KEY FK_AC28B95CEE45BDBF');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649EE45BDBF');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F464584665A');\n $this->addSql('ALTER TABLE product_theme DROP FOREIGN KEY FK_36299C544584665A');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649D60322AC');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F46DCD6110');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F462ADD6D8C');\n $this->addSql('ALTER TABLE product_theme DROP FOREIGN KEY FK_36299C5459027487');\n $this->addSql('ALTER TABLE `order` DROP FOREIGN KEY FK_F5299398A76ED395');\n $this->addSql('DROP TABLE address');\n $this->addSql('DROP TABLE format');\n $this->addSql('DROP TABLE material');\n $this->addSql('DROP TABLE `order`');\n $this->addSql('DROP TABLE order_detail');\n $this->addSql('DROP TABLE picture');\n $this->addSql('DROP TABLE product');\n $this->addSql('DROP TABLE product_theme');\n $this->addSql('DROP TABLE role');\n $this->addSql('DROP TABLE stock');\n $this->addSql('DROP TABLE suppliers');\n $this->addSql('DROP TABLE theme');\n $this->addSql('DROP TABLE user');\n }", "public function down()\n {\n Schema::dropIfExists('data');\n }", "public function down()\n\t{\n\t\tSchema::create('jobs',function($table){$table->increments('id');});\n\t\tSchema::create('job_location',function($table){$table->increments('id');});\n\t\tSchema::create('job_skill',function($table){$table->increments('id');});\n\t\tSchema::create('locations',function($table){$table->increments('id');});\n\t\tSchema::create('location_program',function($table){$table->increments('id');});\n\t\tSchema::create('location_scholarship',function($table){$table->increments('id');});\n\t\tSchema::create('positions',function($table){$table->increments('id');});\n\t\tSchema::create('programs',function($table){$table->increments('id');});\n\t\tSchema::create('program_subject',function($table){$table->increments('id');});\n\t\tSchema::create('scholarships',function($table){$table->increments('id');});\n\t\tSchema::create('scholarship_subject',function($table){$table->increments('id');});\n\t\tSchema::create('skills',function($table){$table->increments('id');});\n\t\tSchema::create('subjects',function($table){$table->increments('id');});\n\t}" ]
[ "0.7950951", "0.7864321", "0.76065856", "0.749362", "0.73204786", "0.7246153", "0.7187384", "0.7153066", "0.7152508", "0.7141645", "0.713585", "0.71221447", "0.7115249", "0.71047515", "0.7098218", "0.70794773", "0.7077714", "0.7072182", "0.70686823", "0.706502", "0.7052322", "0.7052322", "0.7041697", "0.7041357", "0.7041357", "0.7041357", "0.7039625", "0.7028688", "0.7025408", "0.7020341", "0.6988188", "0.6986716", "0.69775844", "0.69707257", "0.6942904", "0.6942368", "0.6942368", "0.6942368", "0.6940762", "0.693841", "0.69345206", "0.69332004", "0.69269246", "0.6924737", "0.6923592", "0.6913238", "0.6902901", "0.689715", "0.68968755", "0.6896821", "0.6896821", "0.68872666", "0.6882266", "0.68733925", "0.68688774", "0.6862558", "0.6857968", "0.6854165", "0.6843505", "0.68418986", "0.68371135", "0.6836075", "0.68349284", "0.6830432", "0.68285096", "0.6827658", "0.68252283", "0.68237275", "0.6817196", "0.68104106", "0.68080825", "0.6804535", "0.6804535", "0.6789188", "0.677633", "0.6774294", "0.6763747", "0.675965", "0.67592376", "0.6755183", "0.6755183", "0.6755183", "0.6753348", "0.6752768", "0.6752449", "0.6752449", "0.6752449", "0.6745159", "0.6744161", "0.6739556", "0.6733963", "0.6732869", "0.6731408", "0.673094", "0.67265946", "0.6726582", "0.67264473", "0.6725827", "0.67163074", "0.6713529", "0.67123365" ]
0.0
-1
consulta en la base de datos para asignar las variables
function post($datos){ $this->id=$datos['id']; $this->titulo=$datos['tittle']; $this->texto=$datos['text']; $this->fecha=$datos['date']; $this->autor=$datos['author']; $this->idProducto=$datos['id_product']; $mysqli=Conectar::conexion(); $consulta="SELECT * FROM comentarios WHERE idPost='".$this->id."'"; $result=$mysqli->query($consulta); while($row=$result->fetch_array(MYSQLI_ASSOC)){ $this->comentarios[]=new Comentario($row); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function fillInfo()\n\t{\n\t\t$database = new db_Database();\n\n\t\t$database->query(\"select * from users where id=:id\");\n\t\t$database->bind(\":id\",$this->id);\n\t\t$set=$database->resultset();\n\t\t\n\t\t$this->password=$set[0]['pass'];\n\t\t$this->userName=$set[0]['userName'];\t\t\n\t\t$this->email=$set[0]['email'];\t\t\n\t\t$this->session=$set[0]['session'];\n\t\t$this->avatar=$set[0]['avatar'];\n\t\t\n\t}", "function asignar_valores(){\n\t\t$this->tabla=$_POST['tabla'];\n\t\t$this->pertenece=$_POST['pertenece'];\n\t\t$this->asunto=$_POST['asunto'];\n\t\t$this->descripcion=$_POST['contenido'];\n\t\t$this->fecha=$_POST['fecha'];\n\t\t$this->hora=$_POST['hora'];\n\t\t$this->fechamod=$_POST['fechamod'];\n\t}", "public function loadData(){\r\n\t\t\t $pseudo = addslashes($this -> getPseudo()) ;\r\n\r\n\t\t if(! empty($pseudo)){\r\n\t\t\t$q = \"select * from UserTab where User_pseudo='\".$pseudo.\"'\";\r\n\t\t\t$r = execute($q);\r\n\t\t\twhile( $l = mysql_fetch_assoc($r) ){\r\n\t\t\t\t$this -> setFields($l);//Affectation aux champs de l'objet UserTab \r\n\t\t\t}\r\n\t\t }\r\n\r\n\t }", "function usuarios_estados_datos()\n\t{\n\n\t\tparent::objeto();\n\n\t\t$this->tabla=\"usuarios_estados\";\n\t\t$this->campoClave=\"Id\";\n\t\t$this->id=null;\n\t\t\n\t\t\n$v=new Variable(2,$this->tabla,\"Id\",1);\n\t\t\t\n$v->clave=true;\n\t\t\t\n\t\t\t\n$v->autonumerica=true;\n\t\t\t\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Estado\",2);\n$this->agregarVariable2($v);\n\n\t}", "function asignar_valores(){\n\t\t//$this->ciudad=$_SESSION['ciudad_admin'];\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->apellido=$_POST['apellido'];\n\t\t$this->cantidad=$_POST['cantidad'];\n\t\t$this->cedula=$_POST['cedula'];\n\t\t$this->correo=$_POST['correo'];\n\t}", "function camposBD(){\n//\t\tSELECT idFactura, nombreTienda AS tienda, fecha, numfactura AS Factura FROM tblfacturas \n//\t\tINNER JOIN tbltiendas ON tbltiendas.idtblTienda = tblfacturas.idtblTienda\n\t\t$fields = array();\n\t\t$fields[] = 'idFactura';\t\n\t\t$fields[] = 'fecha';\t\n\t\t$fields[] = 'tienda';\t\n\t\t$fields[] = 'numFactura';\t\n\t\t/*$fields[] = 'opcion';\t*/\n\t\t/*$fields[] = 'comentario';*/\t\n\t\treturn $fields;\n\t}", "function ManejoBD(){\n\t\t$this->BaseDatos = \"instituto\"; # aignar valor a la propiedad $BaseDatos\n\t\t$this->Servidor = \"localhost\"; # aignar valor a la propiedad $Servidor\n\t\t$this->Usuario = \"root\"; # aignar valor a la propiedad $Usuario\n\t\t$this->Clave = \"123456\"; # aignar valor a la propiedad $Clave\n\t}", "function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF) return;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->id_admission->DbValue = $row['id_admission'];\n\t\t$this->nomr->DbValue = $row['nomr'];\n\t\t$this->ket_nama->DbValue = $row['ket_nama'];\n\t\t$this->ket_tgllahir->DbValue = $row['ket_tgllahir'];\n\t\t$this->ket_alamat->DbValue = $row['ket_alamat'];\n\t\t$this->ket_jeniskelamin->DbValue = $row['ket_jeniskelamin'];\n\t\t$this->ket_title->DbValue = $row['ket_title'];\n\t\t$this->dokterpengirim->DbValue = $row['dokterpengirim'];\n\t\t$this->statusbayar->DbValue = $row['statusbayar'];\n\t\t$this->kirimdari->DbValue = $row['kirimdari'];\n\t\t$this->keluargadekat->DbValue = $row['keluargadekat'];\n\t\t$this->panggungjawab->DbValue = $row['panggungjawab'];\n\t\t$this->masukrs->DbValue = $row['masukrs'];\n\t\t$this->noruang->DbValue = $row['noruang'];\n\t\t$this->tempat_tidur_id->DbValue = $row['tempat_tidur_id'];\n\t\t$this->nott->DbValue = $row['nott'];\n\t\t$this->NIP->DbValue = $row['NIP'];\n\t\t$this->dokter_penanggungjawab->DbValue = $row['dokter_penanggungjawab'];\n\t\t$this->KELASPERAWATAN_ID->DbValue = $row['KELASPERAWATAN_ID'];\n\t\t$this->NO_SKP->DbValue = $row['NO_SKP'];\n\t\t$this->sep_tglsep->DbValue = $row['sep_tglsep'];\n\t\t$this->sep_tglrujuk->DbValue = $row['sep_tglrujuk'];\n\t\t$this->sep_kodekelasrawat->DbValue = $row['sep_kodekelasrawat'];\n\t\t$this->sep_norujukan->DbValue = $row['sep_norujukan'];\n\t\t$this->sep_kodeppkasal->DbValue = $row['sep_kodeppkasal'];\n\t\t$this->sep_namappkasal->DbValue = $row['sep_namappkasal'];\n\t\t$this->sep_kodeppkpelayanan->DbValue = $row['sep_kodeppkpelayanan'];\n\t\t$this->sep_jenisperawatan->DbValue = $row['sep_jenisperawatan'];\n\t\t$this->sep_catatan->DbValue = $row['sep_catatan'];\n\t\t$this->sep_kodediagnosaawal->DbValue = $row['sep_kodediagnosaawal'];\n\t\t$this->sep_namadiagnosaawal->DbValue = $row['sep_namadiagnosaawal'];\n\t\t$this->sep_lakalantas->DbValue = $row['sep_lakalantas'];\n\t\t$this->sep_lokasilaka->DbValue = $row['sep_lokasilaka'];\n\t\t$this->sep_user->DbValue = $row['sep_user'];\n\t\t$this->sep_flag_cekpeserta->DbValue = $row['sep_flag_cekpeserta'];\n\t\t$this->sep_flag_generatesep->DbValue = $row['sep_flag_generatesep'];\n\t\t$this->sep_nik->DbValue = $row['sep_nik'];\n\t\t$this->sep_namapeserta->DbValue = $row['sep_namapeserta'];\n\t\t$this->sep_jeniskelamin->DbValue = $row['sep_jeniskelamin'];\n\t\t$this->sep_pisat->DbValue = $row['sep_pisat'];\n\t\t$this->sep_tgllahir->DbValue = $row['sep_tgllahir'];\n\t\t$this->sep_kodejeniskepesertaan->DbValue = $row['sep_kodejeniskepesertaan'];\n\t\t$this->sep_namajeniskepesertaan->DbValue = $row['sep_namajeniskepesertaan'];\n\t\t$this->sep_nokabpjs->DbValue = $row['sep_nokabpjs'];\n\t\t$this->sep_status_peserta->DbValue = $row['sep_status_peserta'];\n\t\t$this->sep_umur_pasien_sekarang->DbValue = $row['sep_umur_pasien_sekarang'];\n\t\t$this->statuskeluarranap_id->DbValue = $row['statuskeluarranap_id'];\n\t\t$this->keluarrs->DbValue = $row['keluarrs'];\n\t}", "function envios_datos()\n\t{\n\n\t\tparent::objeto();\n\n\t\t$this->tabla=\"envios\";\n\t\t$this->campoClave=\"IdEnvio\";\n\t\t$this->id=null;\n\t\t\n\t\t\n$v=new Variable(2,$this->tabla,\"IdEnvio\",1);\n\t\t\t\n$v->clave=true;\n\t\t\t\n\t\t\t\n$v->autonumerica=true;\n\t\t\t\n$this->agregarVariable2($v);\n$v=new Variable(2,$this->tabla,\"IdMail\",2);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Envio\",3);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Descripcion\",4);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"TablaDatosExtras\",5);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"CondicionDatosExtras\",6);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"FechaCreacion\",7);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"FechaModificacion\",8);\n$this->agregarVariable2($v);\n\n\t}", "function LoadDbValues(&$rs) {\r\n\t\tif (!$rs || !is_array($rs) && $rs->EOF) return;\r\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\r\n\t\t$this->Id_Pase->DbValue = $row['Id_Pase'];\r\n\t\t$this->Serie_Equipo->DbValue = $row['Serie_Equipo'];\r\n\t\t$this->Id_Hardware->DbValue = $row['Id_Hardware'];\r\n\t\t$this->SN->DbValue = $row['SN'];\r\n\t\t$this->Modelo_Net->DbValue = $row['Modelo_Net'];\r\n\t\t$this->Marca_Arranque->DbValue = $row['Marca_Arranque'];\r\n\t\t$this->Nombre_Titular->DbValue = $row['Nombre_Titular'];\r\n\t\t$this->Dni_Titular->DbValue = $row['Dni_Titular'];\r\n\t\t$this->Cuil_Titular->DbValue = $row['Cuil_Titular'];\r\n\t\t$this->Nombre_Tutor->DbValue = $row['Nombre_Tutor'];\r\n\t\t$this->DniTutor->DbValue = $row['DniTutor'];\r\n\t\t$this->Domicilio->DbValue = $row['Domicilio'];\r\n\t\t$this->Tel_Tutor->DbValue = $row['Tel_Tutor'];\r\n\t\t$this->CelTutor->DbValue = $row['CelTutor'];\r\n\t\t$this->Cue_Establecimiento_Alta->DbValue = $row['Cue_Establecimiento_Alta'];\r\n\t\t$this->Escuela_Alta->DbValue = $row['Escuela_Alta'];\r\n\t\t$this->Directivo_Alta->DbValue = $row['Directivo_Alta'];\r\n\t\t$this->Cuil_Directivo_Alta->DbValue = $row['Cuil_Directivo_Alta'];\r\n\t\t$this->Dpto_Esc_alta->DbValue = $row['Dpto_Esc_alta'];\r\n\t\t$this->Localidad_Esc_Alta->DbValue = $row['Localidad_Esc_Alta'];\r\n\t\t$this->Domicilio_Esc_Alta->DbValue = $row['Domicilio_Esc_Alta'];\r\n\t\t$this->Rte_Alta->DbValue = $row['Rte_Alta'];\r\n\t\t$this->Tel_Rte_Alta->DbValue = $row['Tel_Rte_Alta'];\r\n\t\t$this->Email_Rte_Alta->DbValue = $row['Email_Rte_Alta'];\r\n\t\t$this->Serie_Server_Alta->DbValue = $row['Serie_Server_Alta'];\r\n\t\t$this->Cue_Establecimiento_Baja->DbValue = $row['Cue_Establecimiento_Baja'];\r\n\t\t$this->Escuela_Baja->DbValue = $row['Escuela_Baja'];\r\n\t\t$this->Directivo_Baja->DbValue = $row['Directivo_Baja'];\r\n\t\t$this->Cuil_Directivo_Baja->DbValue = $row['Cuil_Directivo_Baja'];\r\n\t\t$this->Dpto_Esc_Baja->DbValue = $row['Dpto_Esc_Baja'];\r\n\t\t$this->Localidad_Esc_Baja->DbValue = $row['Localidad_Esc_Baja'];\r\n\t\t$this->Domicilio_Esc_Baja->DbValue = $row['Domicilio_Esc_Baja'];\r\n\t\t$this->Rte_Baja->DbValue = $row['Rte_Baja'];\r\n\t\t$this->Tel_Rte_Baja->DbValue = $row['Tel_Rte_Baja'];\r\n\t\t$this->Email_Rte_Baja->DbValue = $row['Email_Rte_Baja'];\r\n\t\t$this->Serie_Server_Baja->DbValue = $row['Serie_Server_Baja'];\r\n\t\t$this->Fecha_Pase->DbValue = $row['Fecha_Pase'];\r\n\t\t$this->Id_Estado_Pase->DbValue = $row['Id_Estado_Pase'];\r\n\t\t$this->Ruta_Archivo->Upload->DbValue = $row['Ruta_Archivo'];\r\n\t}", "function readReal(){ \n\t\t$query = \"SELECT * FROM \" . $this->table_name . \" WHERE id=1 LIMIT 0,1\";\n\n\t\t$stmt = $this->conn->prepare( $query );\n\t\t$stmt->bindParam(1, $this->id);\n\t\t$stmt->execute();\n\n\t\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n\t\t$this->id = $row['id'];\n\t\t$this->nmp = $row['nama_pondok'];\n\t\t$this->almt = $row['alamat_pondok'];\n\t\t$this->komp = $row['komputer_pondok'];\n\t\t$this->sms = $row['no_sms_gateway'];\n\t}", "public function examen(){\r\n\t\tparent::conectaBDMy();\t \r\n\t\t$this->idExamen=\"\";\t\t\r\n\t\t$this->tipoExamen=\"\";\t\r\n\t\t$this->descripcion=\"\";\r\n\t}", "function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF) return;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->id->DbValue = $row['id'];\n\t\t$this->id_admission->DbValue = $row['id_admission'];\n\t\t$this->nomr->DbValue = $row['nomr'];\n\t\t$this->statusbayar->DbValue = $row['statusbayar'];\n\t\t$this->kelas->DbValue = $row['kelas'];\n\t\t$this->tanggal->DbValue = $row['tanggal'];\n\t\t$this->kode_tindakan->DbValue = $row['kode_tindakan'];\n\t\t$this->qty->DbValue = $row['qty'];\n\t\t$this->tarif->DbValue = $row['tarif'];\n\t\t$this->bhp->DbValue = $row['bhp'];\n\t\t$this->user->DbValue = $row['user'];\n\t\t$this->nama_tindakan->DbValue = $row['nama_tindakan'];\n\t\t$this->kelompok_tindakan->DbValue = $row['kelompok_tindakan'];\n\t\t$this->kelompok1->DbValue = $row['kelompok1'];\n\t\t$this->kelompok2->DbValue = $row['kelompok2'];\n\t\t$this->kode_dokter->DbValue = $row['kode_dokter'];\n\t\t$this->no_ruang->DbValue = $row['no_ruang'];\n\t}", "public static function setData($datos){\r\n\t\t$consulta = \"Insert into Prueba (data) Values(?)\";\r\n\t\t\r\n\t\t$pdo = new PDO(\r\n 'mysql:dbname=' . DATABASE .\r\n ';host=' . HOSTNAME .\r\n ';port:63343;',\r\n USERNAME,\r\n PASSWORD,\r\n array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8\")\r\n );\r\n\t\t\r\n\t\t\r\n\t\t$cmd = $pdo->prepare($consulta);\r\n\t\t$cmd->execute(array($datos));\r\n\t\t\r\n\t\treturn $cmd;\r\n\t}", "function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF) return;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->id->DbValue = $row['id'];\n\t\t$this->name->DbValue = $row['name'];\n\t\t$this->_email->DbValue = $row['email'];\n\t\t$this->password->DbValue = $row['password'];\n\t\t$this->companyname->DbValue = $row['companyname'];\n\t\t$this->servicetime->DbValue = $row['servicetime'];\n\t\t$this->country->DbValue = $row['country'];\n\t\t$this->phone->DbValue = $row['phone'];\n\t\t$this->skype->DbValue = $row['skype'];\n\t\t$this->website->DbValue = $row['website'];\n\t\t$this->linkedin->DbValue = $row['linkedin'];\n\t\t$this->facebook->DbValue = $row['facebook'];\n\t\t$this->twitter->DbValue = $row['twitter'];\n\t\t$this->active_code->DbValue = $row['active_code'];\n\t\t$this->identification->DbValue = $row['identification'];\n\t\t$this->link_expired->DbValue = $row['link_expired'];\n\t\t$this->isactive->DbValue = $row['isactive'];\n\t\t$this->pio->DbValue = $row['pio'];\n\t\t$this->google->DbValue = $row['google'];\n\t\t$this->instagram->DbValue = $row['instagram'];\n\t\t$this->account_type->DbValue = $row['account_type'];\n\t\t$this->logo->DbValue = $row['logo'];\n\t\t$this->profilepic->DbValue = $row['profilepic'];\n\t\t$this->mailref->DbValue = $row['mailref'];\n\t\t$this->deleted->DbValue = $row['deleted'];\n\t\t$this->deletefeedback->DbValue = $row['deletefeedback'];\n\t\t$this->account_id->DbValue = $row['account_id'];\n\t\t$this->start_date->DbValue = $row['start_date'];\n\t\t$this->end_date->DbValue = $row['end_date'];\n\t\t$this->year_moth->DbValue = $row['year_moth'];\n\t\t$this->registerdate->DbValue = $row['registerdate'];\n\t\t$this->login_type->DbValue = $row['login_type'];\n\t\t$this->accountstatus->DbValue = $row['accountstatus'];\n\t\t$this->ispay->DbValue = $row['ispay'];\n\t\t$this->profilelink->DbValue = $row['profilelink'];\n\t\t$this->source->DbValue = $row['source'];\n\t\t$this->agree->DbValue = $row['agree'];\n\t\t$this->balance->DbValue = $row['balance'];\n\t\t$this->job_title->DbValue = $row['job_title'];\n\t\t$this->projects->DbValue = $row['projects'];\n\t\t$this->opportunities->DbValue = $row['opportunities'];\n\t\t$this->isconsaltant->DbValue = $row['isconsaltant'];\n\t\t$this->isagent->DbValue = $row['isagent'];\n\t\t$this->isinvestor->DbValue = $row['isinvestor'];\n\t\t$this->isbusinessman->DbValue = $row['isbusinessman'];\n\t\t$this->isprovider->DbValue = $row['isprovider'];\n\t\t$this->isproductowner->DbValue = $row['isproductowner'];\n\t\t$this->states->DbValue = $row['states'];\n\t\t$this->cities->DbValue = $row['cities'];\n\t\t$this->offers->DbValue = $row['offers'];\n\t}", "function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF) return;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->id->DbValue = $row['id'];\n\t\t$this->name->DbValue = $row['name'];\n\t\t$this->_email->DbValue = $row['email'];\n\t\t$this->password->DbValue = $row['password'];\n\t\t$this->companyname->DbValue = $row['companyname'];\n\t\t$this->servicetime->DbValue = $row['servicetime'];\n\t\t$this->country->DbValue = $row['country'];\n\t\t$this->phone->DbValue = $row['phone'];\n\t\t$this->skype->DbValue = $row['skype'];\n\t\t$this->website->DbValue = $row['website'];\n\t\t$this->linkedin->DbValue = $row['linkedin'];\n\t\t$this->facebook->DbValue = $row['facebook'];\n\t\t$this->twitter->DbValue = $row['twitter'];\n\t\t$this->active_code->DbValue = $row['active_code'];\n\t\t$this->identification->DbValue = $row['identification'];\n\t\t$this->link_expired->DbValue = $row['link_expired'];\n\t\t$this->isactive->DbValue = $row['isactive'];\n\t\t$this->pio->DbValue = $row['pio'];\n\t\t$this->google->DbValue = $row['google'];\n\t\t$this->instagram->DbValue = $row['instagram'];\n\t\t$this->account_type->DbValue = $row['account_type'];\n\t\t$this->logo->DbValue = $row['logo'];\n\t\t$this->profilepic->DbValue = $row['profilepic'];\n\t\t$this->mailref->DbValue = $row['mailref'];\n\t\t$this->deleted->DbValue = $row['deleted'];\n\t\t$this->deletefeedback->DbValue = $row['deletefeedback'];\n\t\t$this->account_id->DbValue = $row['account_id'];\n\t\t$this->start_date->DbValue = $row['start_date'];\n\t\t$this->end_date->DbValue = $row['end_date'];\n\t\t$this->year_moth->DbValue = $row['year_moth'];\n\t\t$this->registerdate->DbValue = $row['registerdate'];\n\t\t$this->login_type->DbValue = $row['login_type'];\n\t\t$this->accountstatus->DbValue = $row['accountstatus'];\n\t\t$this->ispay->DbValue = $row['ispay'];\n\t\t$this->profilelink->DbValue = $row['profilelink'];\n\t\t$this->source->DbValue = $row['source'];\n\t\t$this->agree->DbValue = $row['agree'];\n\t\t$this->balance->DbValue = $row['balance'];\n\t\t$this->job_title->DbValue = $row['job_title'];\n\t\t$this->projects->DbValue = $row['projects'];\n\t\t$this->opportunities->DbValue = $row['opportunities'];\n\t\t$this->isconsaltant->DbValue = $row['isconsaltant'];\n\t\t$this->isagent->DbValue = $row['isagent'];\n\t\t$this->isinvestor->DbValue = $row['isinvestor'];\n\t\t$this->isbusinessman->DbValue = $row['isbusinessman'];\n\t\t$this->isprovider->DbValue = $row['isprovider'];\n\t\t$this->isproductowner->DbValue = $row['isproductowner'];\n\t\t$this->states->DbValue = $row['states'];\n\t\t$this->cities->DbValue = $row['cities'];\n\t\t$this->offers->DbValue = $row['offers'];\n\t}", "function readQuery() {\n\t\t$this->FiscaalGroepID = $this->queryHelper(\"FiscaalGroepID\", 0);\n\t\t$this->FiscaalGroupType = $this->queryHelper(\"FiscaalGroupType\", 0);\n\t\t$this->GewijzigdDoor = $this->queryHelper(\"GewijzigdDoor\", 0);\n\t\t$this->GewijzigdOp = $this->queryHelper(\"GewijzigdOp\", \"\");\n\t}", "function asignar_valores(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->apellido=$_POST['apellido'];\n\t\t$this->telefono=$_POST['telefono'];\n\t\t$this->email=$_POST['email'];\n\t\t\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->ano=$_POST['ano'];\n\t\t$this->valor_vehiculo=$_POST['valor_vehiculo'];\n\t\t$this->saldo=$_POST['saldo'];\n\t\t$this->valor_inicial=$_POST['valor_inicial'];\n\t\t$this->comision=$_POST['comision'];\n\t\t$this->plazo=$_POST['plazo'];\n\t\t$this->cuotas=$_POST['cuotas'];\n\t\t$this->total=$_POST['total'];\n\t}", "function initQueries(){\n // create Prepared Statements\n $this->statementUpdate = $this->connection->prepare(\"UPDATE user SET e_id = ?,\n email = ?,\n password = ? WHERE u_id = ?\");\n $out = $this->statementUpdate->bind_param(\"sssi\",$this->data['e_id'], $this->data['email'], $this->data['password'], $this->data['u_id']);\n // print_r($out);\n $this->statementInsert = $this->connection->prepare(\"INSERT INTO user (\n `e_id`, `email`,\n `password`) VALUES (?, ?, ?)\");\n // one function to find them\n $this->statementRetrieve = $this->connection->prepare(\"SELECT * FROM user\n WHERE e_id = ?\");\n // In the Darkness Bind them\n $this->statementRetrieve->bind_param(\"s\",$this->data['e_id']);\n\n // $this->statementInsert->bind_param(\"sissssiis\", $this->data['e_id'], $this->data['dept_id'], $this->data['dob'], $this->data['doj'], $this->data['qualification'],$this->data['designation'], $this->data['age'], $this->data['pfno'], $this->data['superior_id']);\n }", "function RellenaDatos()\n{//buscamos todos los atributos de la tupla\n $sql = \"SELECT *\n\t\t\tFROM PROF_ESPACIO\n\t\t\tWHERE (\n\t\t\t\t(DNI = '$this->DNI' AND CODESPACIO = '\".$this->CODESPACIO.\"') \n\t\t\t)\";\n\n\t//si no se ejecuta con éxito devuelve mensaje de error\n\t\t\tif (!$resultado = $this->mysqli->query($sql))\n\t{\n\t\t\treturn 'Error de gestor de base de datos';//devuelve el mensaje\n\t} //si no se ejecuta con éxito \n\telse\n\t{\n\t\t$tupla = $resultado->fetch_array();//guardamos el resultado de la busqueda en la variable tupla\n\t}\n\treturn $tupla;//devolvemos la información de ese centro\n}", "function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF) return;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->empleado_id->DbValue = $row['empleado_id'];\n\t\t$this->codigo->DbValue = $row['codigo'];\n\t\t$this->cui->DbValue = $row['cui'];\n\t\t$this->nombre->DbValue = $row['nombre'];\n\t\t$this->apellido->DbValue = $row['apellido'];\n\t\t$this->direccion->DbValue = $row['direccion'];\n\t\t$this->departamento_origen_id->DbValue = $row['departamento_origen_id'];\n\t\t$this->municipio_id->DbValue = $row['municipio_id'];\n\t\t$this->telefono_residencia->DbValue = $row['telefono_residencia'];\n\t\t$this->telefono_celular->DbValue = $row['telefono_celular'];\n\t\t$this->fecha_nacimiento->DbValue = $row['fecha_nacimiento'];\n\t\t$this->nacionalidad->DbValue = $row['nacionalidad'];\n\t\t$this->estado_civil->DbValue = $row['estado_civil'];\n\t\t$this->sexo->DbValue = $row['sexo'];\n\t\t$this->igss->DbValue = $row['igss'];\n\t\t$this->nit->DbValue = $row['nit'];\n\t\t$this->licencia_conducir->DbValue = $row['licencia_conducir'];\n\t\t$this->area_id->DbValue = $row['area_id'];\n\t\t$this->departmento_id->DbValue = $row['departmento_id'];\n\t\t$this->seccion_id->DbValue = $row['seccion_id'];\n\t\t$this->puesto_id->DbValue = $row['puesto_id'];\n\t\t$this->observaciones->DbValue = $row['observaciones'];\n\t\t$this->tipo_sangre_id->DbValue = $row['tipo_sangre_id'];\n\t\t$this->estado->DbValue = $row['estado'];\n\t}", "public function load()\n {\n $pdo = $this->getDbConnection();\n $query = \"SELECT * FROM {$this->dbTable}\";\n $data = $pdo->query($query)->fetchAll(\\PDO::FETCH_ASSOC);\n\n foreach ($data as ['key' => $key, 'value' => $value]) {\n $this->setData($key, $value);\n }\n }", "function recuperar_datos() {\n\t\tglobal $nombre, $tipo ;\n\t\t\n\t\t\t$pers_id =(isset($_POST['id_marcas']) && !empty($_POST['id_marcas']))? $_POST['id_marcas']:\"\";\n\t\t\t$tipo =(isset($_POST['tipo']) && !empty($_POST['tipo']))? $_POST['tipo']:\"A\"; \t\n\n\t\t\t$nombre=(isset($_POST[\"nombre\"]) && !empty($_POST[\"nombre\"]))? $_POST[\"nombre\"]:\"\";\t\t\t\n\t\n\t\t}", "function dbSetVars() {\n\n foreach ($this->fields() as $f) {\n if ($this->$f === false) continue;\n $this->db->set($f,$this->$f);\n }\n\n }", "function leer(){\n \n // hace la consulta\n $query = \"SELECT Id, Nombre, Apellidos, Edad FROM Usuario\";\n \n // prepara la consulta\n $stmt = $this-> con->prepare($query);\n \n // execute query\n $stmt->execute();\n \n return $stmt;\n}", "function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF) return;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->idservicio_medico_prestado->DbValue = $row['idservicio_medico_prestado'];\n\t\t$this->idcuenta->DbValue = $row['idcuenta'];\n\t\t$this->fecha_inicio->DbValue = $row['fecha_inicio'];\n\t\t$this->fecha_final->DbValue = $row['fecha_final'];\n\t\t$this->estado->DbValue = $row['estado'];\n\t}", "function allinea_db(){\n\t\tif ($this->attributes['BYTB']!='' ) $this->fields_value_bytb($this->attributes['BYTB']);\n\t\tif ($this->attributes['TB']!='no'){\n\t\t\t$i=0;\n\t\t\tforeach ($this->values as $key => $val){\n\t\t\t\t$ret[$i]=\"{$key} NUMBER\";\n\t\t\t\t$i++;\n\t\t\t\t$ret[$i]=\"D_{$key} VARCHAR2(200 CHAR)\";\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\treturn $ret;\n\t\t}\n\t\telse return ;\n\t}", "public function get_datos_empresa($empresa){\n\t$conectar= parent::conexion();\n\tparent::set_names();\n\t$sql=\"select *from empresas where nombre=?\";\n\t$sql=$conectar->prepare($sql);\n\t$sql->bindValue(1,$empresa);\n\t$sql->execute();\n\treturn $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n}", "function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF)\n\t\t\treturn;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->replid->DbValue = $row['replid'];\n\t\t$this->nama->DbValue = $row['nama'];\n\t\t$this->besar->DbValue = $row['besar'];\n\t\t$this->idkategori->DbValue = $row['idkategori'];\n\t\t$this->rekkas->DbValue = $row['rekkas'];\n\t\t$this->rekpendapatan->DbValue = $row['rekpendapatan'];\n\t\t$this->rekpiutang->DbValue = $row['rekpiutang'];\n\t\t$this->aktif->DbValue = $row['aktif'];\n\t\t$this->keterangan->DbValue = $row['keterangan'];\n\t\t$this->departemen->DbValue = $row['departemen'];\n\t\t$this->info1->DbValue = $row['info1'];\n\t\t$this->info2->DbValue = $row['info2'];\n\t\t$this->info3->DbValue = $row['info3'];\n\t\t$this->ts->DbValue = $row['ts'];\n\t\t$this->token->DbValue = $row['token'];\n\t\t$this->issync->DbValue = $row['issync'];\n\t}", "function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF)\n\t\t\treturn;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->id->DbValue = $row['id'];\n\t\t$this->fecha_tamizaje->DbValue = $row['fecha_tamizaje'];\n\t\t$this->id_centro->DbValue = $row['id_centro'];\n\t\t$this->apellidopaterno->DbValue = $row['apellidopaterno'];\n\t\t$this->apellidomaterno->DbValue = $row['apellidomaterno'];\n\t\t$this->nombre->DbValue = $row['nombre'];\n\t\t$this->ci->DbValue = $row['ci'];\n\t\t$this->fecha_nacimiento->DbValue = $row['fecha_nacimiento'];\n\t\t$this->dias->DbValue = $row['dias'];\n\t\t$this->semanas->DbValue = $row['semanas'];\n\t\t$this->meses->DbValue = $row['meses'];\n\t\t$this->sexo->DbValue = $row['sexo'];\n\t\t$this->discapacidad->DbValue = $row['discapacidad'];\n\t\t$this->id_tipodiscapacidad->DbValue = $row['id_tipodiscapacidad'];\n\t\t$this->resultado->DbValue = $row['resultado'];\n\t\t$this->resultadotamizaje->DbValue = $row['resultadotamizaje'];\n\t\t$this->tapon->DbValue = $row['tapon'];\n\t\t$this->tipo->DbValue = $row['tipo'];\n\t\t$this->repetirprueba->DbValue = $row['repetirprueba'];\n\t\t$this->observaciones->DbValue = $row['observaciones'];\n\t\t$this->id_apoderado->DbValue = $row['id_apoderado'];\n\t\t$this->id_referencia->DbValue = $row['id_referencia'];\n\t}", "public function persist (){\n \n $this->query = \"INSERT INTO libros(titulo,autor,editorial) VALUES (:titulo, :autor, :editorial)\";\n\n // $this->parametros['id']=$user_data[\"id\"];\n $this->parametros['titulo']=$this->titulo;\n $this->parametros['autor']=$this->autor;\n $this->parametros['editorial']=$this->editorial;\n \n $this->get_results_from_query();\n\n\n $this->mensaje = \"Libro agregado exitosamente\";\n \n }", "function CParafiscalesData($db) {\r\n $this->db = $db;\r\n }", "function LoadDbValues(&$rs) {\r\n\t\tif (!$rs || !is_array($rs) && $rs->EOF) return;\r\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\r\n\t\t$this->Nro_Serie->DbValue = $row['Nro_Serie'];\r\n\t\t$this->SN->DbValue = $row['SN'];\r\n\t\t$this->Cant_Net_Asoc->DbValue = $row['Cant_Net_Asoc'];\r\n\t\t$this->Id_Marca->DbValue = $row['Id_Marca'];\r\n\t\t$this->Id_Modelo->DbValue = $row['Id_Modelo'];\r\n\t\t$this->Id_SO->DbValue = $row['Id_SO'];\r\n\t\t$this->Id_Estado->DbValue = $row['Id_Estado'];\r\n\t\t$this->User_Server->DbValue = $row['User_Server'];\r\n\t\t$this->Pass_Server->DbValue = $row['Pass_Server'];\r\n\t\t$this->User_TdServer->DbValue = $row['User_TdServer'];\r\n\t\t$this->Pass_TdServer->DbValue = $row['Pass_TdServer'];\r\n\t\t$this->Cue->DbValue = $row['Cue'];\r\n\t\t$this->Fecha_Actualizacion->DbValue = $row['Fecha_Actualizacion'];\r\n\t\t$this->Usuario->DbValue = $row['Usuario'];\r\n\t}", "function LoadRowValues(&$rs) {\n\t\tglobal $planilla;\n\t\t$planilla->idPlanilla->setDbValue($rs->fields('idPlanilla'));\n\t\t$planilla->Nombre->setDbValue($rs->fields('Nombre'));\n\t}", "function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF)\n\t\t\treturn;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->id->DbValue = $row['id'];\n\t\t$this->id_sector->DbValue = $row['id_sector'];\n\t\t$this->id_actividad->DbValue = $row['id_actividad'];\n\t\t$this->id_categoria->DbValue = $row['id_categoria'];\n\t\t$this->apellidopaterno->DbValue = $row['apellidopaterno'];\n\t\t$this->apellidomaterno->DbValue = $row['apellidomaterno'];\n\t\t$this->nombre->DbValue = $row['nombre'];\n\t\t$this->fecha_nacimiento->DbValue = $row['fecha_nacimiento'];\n\t\t$this->sexo->DbValue = $row['sexo'];\n\t\t$this->ci->DbValue = $row['ci'];\n\t\t$this->nrodiscapacidad->DbValue = $row['nrodiscapacidad'];\n\t\t$this->celular->DbValue = $row['celular'];\n\t\t$this->direcciondomicilio->DbValue = $row['direcciondomicilio'];\n\t\t$this->ocupacion->DbValue = $row['ocupacion'];\n\t\t$this->_email->DbValue = $row['email'];\n\t\t$this->cargo->DbValue = $row['cargo'];\n\t\t$this->nivelestudio->DbValue = $row['nivelestudio'];\n\t\t$this->id_institucion->DbValue = $row['id_institucion'];\n\t\t$this->observaciones->DbValue = $row['observaciones'];\n\t\t$this->id_centro->DbValue = $row['id_centro'];\n\t}", "function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF) return;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->id->DbValue = $row['id'];\n\t\t$this->period_id->DbValue = $row['period_id'];\n\t\t$this->person_id->DbValue = $row['person_id'];\n\t\t$this->tipejurnal_id->DbValue = $row['tipejurnal_id'];\n\t\t$this->nomer->DbValue = $row['nomer'];\n\t\t$this->createon->DbValue = $row['createon'];\n\t\t$this->keterangan->DbValue = $row['keterangan'];\n\t}", "function read() {\r\n // Creamos la consulta con los valores que tenemos actualmente\r\n /**\r\n * La consulta SQL es esta\r\n * INSERT INTO table_name (column1, column2, column3, ...) VALUES (value1, value2, value3, ...);\r\n */\r\n $query = \"INSERT INTO\" . $this->table_name . \"(idSession, idUser, token, expirateDate) VALUES (\".$this->idSession.\",\".$this->idUser.\",\".$this->token.\",\".$this->expireDate.\");\";\r\n echo \"LOG > Class Session > Method Create > esta es la consulta que estoy enviando al SQL --> \".$query;\r\n // declarar la query\r\n $stmt = $this->conn->prepare($query);\r\n\r\n // ejecutar consulta\r\n if ($stmt->execute()) {\r\n echo \"LOG > Class Session > Method execute > Consulta correcta\";\r\n return true;\r\n }else {\r\n echo \"LOG > Class Session > Method execute > Consulta correcta\";\r\n return false; \r\n }\r\n }", "public function setRegistro($user_data = array()){\n $this->query = \"\";\n $tblCol = '';\n $tblVal = ''; $err_img = '';\n $colExt = ''; $colName = '';\n $valExt = ''; $valName = '';\n //traemos la siguiente secuencia de la tabla segun los parametros de entrada\n if(isset($user_data['cod_' . str_replace('sys_','',$user_data['no_esq_tabla'])]) and empty($user_data['cod_' . str_replace('sys_','',$user_data['no_esq_tabla'])])){\n $user_data['cod_' . str_replace('sys_','',$user_data['no_esq_tabla'])] = ModeloSistema::setSigSecuencia($user_data['no_esq_tabla']);\n }\n //Llenamos el usuario de la transaccion si la tabla lo requiere y los asignamos al array de valores para el insert\n if (isset($user_data['cod_usuario']) and empty($user_data['cod_usuario'])){$user_data['cod_usuario'] = Session::get('cod');}\n /*obtengo el nombre de la tabla para futuras validaciones */\n $pos = strpos($user_data['no_esq_tabla'], '_');\n $nomTabla = substr($user_data['no_esq_tabla'],$pos+1,strlen($user_data['no_esq_tabla']));\n foreach($user_data as $col=>$dat){\n if(strpos($col,'no_') === false){\n $tblCol = $tblCol . $col . ',';\n $tblVal = $tblVal . \"'\" . $dat . \"'\" . ',';\n }\n }\n\n //Procesamos los archivos adjuntos que vienen con el post\n $icount = contarCoincidencias($user_data,\"tmp_img\");\n for($f=0;$f<$icount;$f++):\n $t=$f>0 ? $f : '';\n if (isset($user_data[\"no_tmp_img\".$t]) Or !empty($user_data[\"no_tmp_img\".$t])):\n $err_img = $err_img . uploadImg($user_data, SYS_DIR_ADJ, $valName, $colName,$t);\n endif;\n //completamos las columnas extras para la transaccion\n if (!empty($valName)) {\n $valExt .= \",'\" . $valName . \"'\";\n $colExt .= \",\" . $colName . \"\";\n $colExt .= $nomTabla;\n }\n endfor;\n\n $this->query = \" INSERT INTO \" . $user_data['no_esq_tabla'] . \"\n (\". substr($tblCol,0,(strlen($tblCol)-1)) .\"\" . $colExt .\")\n VALUES (\". substr($tblVal,0,(strlen($tblVal)-1)) . \"\" . $valExt . \")\";\n $this->execute_single_query();\n //Swicth para eventos posteriores al insert segund lo requiera cada proceso\n switch ($user_data['no_nom_tabla']){\n //Asignamos la configuracion al usuario\n case 'nuevaUsuario':\n for($i=0;$i<count($user_data['no_cod_menu']);$i++){\n $this->query = \" INSERT INTO \" . $user_data['no_esq_tabla'] . \"_menu\n (cod_usuario,cod_menu)\n VALUES ('\" .$user_data['cod_' . $nomTabla] . \"','\" .$user_data['no_cod_menu'][$i]. \"')\";\n $this->execute_single_query();\n }\n for($i=0;$i<count($user_data['no_menu_sub']);$i++){\n $this->query = \" INSERT INTO \" . $user_data['no_esq_tabla'] . \"_menu_sub\n (cod_usuario,cod_menu_sub)\n VALUES ('\" .$user_data['cod_' . $nomTabla] . \"','\" .$user_data['no_menu_sub'][$i]. \"')\";\n $this->execute_single_query();\n $this->query = \" call pbAsignaSubMenu(\" . $user_data['cod_' . $nomTabla] . \",\" . $user_data['no_menu_sub'][$i] . \")\";\n $this->execute_single_query();\n }\n for($i=0;$i<count($user_data['no_cod_empresa']);$i++){\n $this->query = \" INSERT INTO \" . $user_data['no_esq_tabla'] . \"_empresa\n (cod_usuario,cod_empresa)\n VALUES ('\" .$user_data['cod_' . $nomTabla] . \"','\" .$user_data['no_cod_empresa'][$i]. \"')\";\n $this->execute_single_query();\n }\n\n $this->query = \" INSERT INTO \" . $user_data['no_esq_tabla'] . \"_perfil\n (cod_usuario,cod_perfil)\n VALUES ('\" .$user_data['cod_' . $nomTabla] . \"','\" .$user_data['no_cod_perfil']. \"')\";\n $this->execute_single_query();\n $err_img = $err_img . \" La configuracion del sistema a sido asinada al usuario: \" . $user_data['nom_' . $nomTabla] ;\n break;\n case 'NuevaConfiguracionGeneral':\n if ($user_data['cod_estado'] == 'AAA') {\n $this->query = \" call pbActualizaConfig(2,\" . $user_data['cod_config'] . \")\";\n $this->execute_single_query();\n $err_img = $err_img . \" La configuracion ha sido definida como predeterminada\";\n }\n break;\n }\n $this->msj = \"La transaccion se registro correctamente. \" . $err_img;\n }", "public function setVariablesEntrada()\r\n\t{\r\n\t\t$request = $this->requestStack->getCurrentRequest();\r\n\t\t\r\n\t\t$this->tipo = $request->get('tipo');\r\n\t\t$this->apoyoTapas = $request->get('apoyoTapas');\r\n\t\t$this->prof = $request->get('prof');\r\n\t\t$this->anchoPanel = $request->get('ancho');\r\n\t\t$this->pisosManual = $request->get('pisosManual');\r\n\t\t$this->perfilIntermedio = $request->get('perfilIntermedio');\r\n\t\t$this->pisosManual7 = $request->get('pisosManual7');\t\t\r\n\t\t$this->chapaPisoAdicional = $request->get('chapaPiso');\r\n\t\t$this->cantChapaPisoAdicional = $request->get('cantAdicional');\r\n\t\t$this->maxAlt = $request->get('maxAlt');\r\n\t\t$this->cantPaneles = $request->get('cantPaneles');\r\n\t\t$this->abiertoCerrado = $request->get('aletaTipo');\r\n\t\t$this->aletaVenA = $request->get('aletaVenA');\r\n\t\t$this->aletaFluA = $request->get('aletaFluA');\r\n\t\t\r\n\t\treturn $this;\r\n\t}", "function LoadDbValues(&$rs) {\r\n\t\tif (!$rs || !is_array($rs) && $rs->EOF) return;\r\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\r\n\t\t$this->Dni_Tutor->DbValue = $row['Dni_Tutor'];\r\n\t\t$this->Apellidos_Nombres->DbValue = $row['Apellidos_Nombres'];\r\n\t\t$this->Edad->DbValue = $row['Edad'];\r\n\t\t$this->Domicilio->DbValue = $row['Domicilio'];\r\n\t\t$this->Tel_Contacto->DbValue = $row['Tel_Contacto'];\r\n\t\t$this->Fecha_Nac->DbValue = $row['Fecha_Nac'];\r\n\t\t$this->Cuil->DbValue = $row['Cuil'];\r\n\t\t$this->MasHijos->DbValue = $row['MasHijos'];\r\n\t\t$this->Id_Estado_Civil->DbValue = $row['Id_Estado_Civil'];\r\n\t\t$this->Id_Sexo->DbValue = $row['Id_Sexo'];\r\n\t\t$this->Id_Relacion->DbValue = $row['Id_Relacion'];\r\n\t\t$this->Id_Ocupacion->DbValue = $row['Id_Ocupacion'];\r\n\t\t$this->Lugar_Nacimiento->DbValue = $row['Lugar_Nacimiento'];\r\n\t\t$this->Id_Provincia->DbValue = $row['Id_Provincia'];\r\n\t\t$this->Id_Departamento->DbValue = $row['Id_Departamento'];\r\n\t\t$this->Id_Localidad->DbValue = $row['Id_Localidad'];\r\n\t\t$this->Fecha_Actualizacion->DbValue = $row['Fecha_Actualizacion'];\r\n\t\t$this->Usuario->DbValue = $row['Usuario'];\r\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 asignar_valores2(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->apellido=$_POST['apellido'];\n\t\t$this->telefono=$_POST['telefono'];\n\t\t$this->email=$_POST['email'];\n\t\t\n\t\t$this->marca=$_POST['marca'];\n\t\t$this->modelo=$_POST['modelo'];\n\t\t$this->ano=$_POST['ano'];\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t}", "function getEverythingFromDatabase($row) {\r\n\t\t//initilizing variables from row data\r\n\t\t$this->id = $row['id'];\r\n\t\t$this->email = $row['email'];\r\n\t\t$this->phone_number = $row['phoneNumber'];\r\n\t\t$this->name = $row['eventName'];\r\n\t\t$this->event_date_time = $row['eventDateTime'];\r\n\t\t$this->reminder_date_time = $row['reminderDateTime'];\r\n\t\t$this->notif_method = $row['method'];\r\n\t\t$this->time_before = $row['timeBefore'];\r\n\t\t$this->freq = $row['frequency'];\r\n\t}", "function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF) return;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->id->DbValue = $row['id'];\n\t\t$this->detail_jenis_spp->DbValue = $row['detail_jenis_spp'];\n\t\t$this->id_jenis_spp->DbValue = $row['id_jenis_spp'];\n\t\t$this->status_spp->DbValue = $row['status_spp'];\n\t\t$this->no_spp->DbValue = $row['no_spp'];\n\t\t$this->tgl_spp->DbValue = $row['tgl_spp'];\n\t\t$this->keterangan->DbValue = $row['keterangan'];\n\t\t$this->jumlah_up->DbValue = $row['jumlah_up'];\n\t\t$this->bendahara->DbValue = $row['bendahara'];\n\t\t$this->nama_pptk->DbValue = $row['nama_pptk'];\n\t\t$this->nip_pptk->DbValue = $row['nip_pptk'];\n\t\t$this->kode_program->DbValue = $row['kode_program'];\n\t\t$this->kode_kegiatan->DbValue = $row['kode_kegiatan'];\n\t\t$this->kode_sub_kegiatan->DbValue = $row['kode_sub_kegiatan'];\n\t\t$this->tahun_anggaran->DbValue = $row['tahun_anggaran'];\n\t\t$this->jumlah_spd->DbValue = $row['jumlah_spd'];\n\t\t$this->nomer_dasar_spd->DbValue = $row['nomer_dasar_spd'];\n\t\t$this->tanggal_spd->DbValue = $row['tanggal_spd'];\n\t\t$this->id_spd->DbValue = $row['id_spd'];\n\t\t$this->kode_rekening->DbValue = $row['kode_rekening'];\n\t\t$this->nama_bendahara->DbValue = $row['nama_bendahara'];\n\t\t$this->nip_bendahara->DbValue = $row['nip_bendahara'];\n\t\t$this->no_spm->DbValue = $row['no_spm'];\n\t\t$this->tgl_spm->DbValue = $row['tgl_spm'];\n\t\t$this->status_spm->DbValue = $row['status_spm'];\n\t\t$this->nama_bank->DbValue = $row['nama_bank'];\n\t\t$this->nomer_rekening_bank->DbValue = $row['nomer_rekening_bank'];\n\t\t$this->npwp->DbValue = $row['npwp'];\n\t\t$this->pimpinan_blud->DbValue = $row['pimpinan_blud'];\n\t\t$this->nip_pimpinan->DbValue = $row['nip_pimpinan'];\n\t\t$this->no_sptb->DbValue = $row['no_sptb'];\n\t\t$this->tgl_sptb->DbValue = $row['tgl_sptb'];\n\t}", "public function fill_db()\n {\n include('create_tables.php');\n\n $this->db->query($CLEAN);\n $this->db->query($APPTYPE);\n $this->db->query($BOOKINGS);\n $this->db->query($BUSINESSOWNER);\n $this->db->query($CUSTOMERS);\n $this->db->query($EMPLOYEES);\n $this->db->query($TIMESLOTS);\n $this->db->query($CANWORK);\n $this->db->query($HAVESKILL);\n $this->db->query($BUSINESS);\n $this->db->query($HOURS);\n }", "function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF)\n\t\t\treturn;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->id->DbValue = $row['id'];\n\t\t$this->nombre_contacto->DbValue = $row['nombre_contacto'];\n\t\t$this->name->DbValue = $row['name'];\n\t\t$this->lastname->DbValue = $row['lastname'];\n\t\t$this->_email->DbValue = $row['email'];\n\t\t$this->address->DbValue = $row['address'];\n\t\t$this->phone->DbValue = $row['phone'];\n\t\t$this->cell->DbValue = $row['cell'];\n\t\t$this->is_active->DbValue = $row['is_active'];\n\t\t$this->created_at->DbValue = $row['created_at'];\n\t\t$this->id_sucursal->DbValue = $row['id_sucursal'];\n\t\t$this->documentos->DbValue = $row['documentos'];\n\t\t$this->DateModified->DbValue = $row['DateModified'];\n\t\t$this->DateDeleted->DbValue = $row['DateDeleted'];\n\t\t$this->CreatedBy->DbValue = $row['CreatedBy'];\n\t\t$this->ModifiedBy->DbValue = $row['ModifiedBy'];\n\t\t$this->DeletedBy->DbValue = $row['DeletedBy'];\n\t\t$this->latitud->DbValue = $row['latitud'];\n\t\t$this->longitud->DbValue = $row['longitud'];\n\t\t$this->tipoinmueble->DbValue = $row['tipoinmueble'];\n\t\t$this->id_ciudad_inmueble->DbValue = $row['id_ciudad_inmueble'];\n\t\t$this->id_provincia_inmueble->DbValue = $row['id_provincia_inmueble'];\n\t\t$this->imagen_inmueble01->Upload->DbValue = $row['imagen_inmueble01'];\n\t\t$this->imagen_inmueble02->Upload->DbValue = $row['imagen_inmueble02'];\n\t\t$this->imagen_inmueble03->Upload->DbValue = $row['imagen_inmueble03'];\n\t\t$this->imagen_inmueble04->Upload->DbValue = $row['imagen_inmueble04'];\n\t\t$this->imagen_inmueble05->Upload->DbValue = $row['imagen_inmueble05'];\n\t\t$this->imagen_inmueble06->Upload->DbValue = $row['imagen_inmueble06'];\n\t\t$this->imagen_inmueble07->Upload->DbValue = $row['imagen_inmueble07'];\n\t\t$this->imagen_inmueble08->Upload->DbValue = $row['imagen_inmueble08'];\n\t\t$this->tipovehiculo->DbValue = $row['tipovehiculo'];\n\t\t$this->id_ciudad_vehiculo->DbValue = $row['id_ciudad_vehiculo'];\n\t\t$this->id_provincia_vehiculo->DbValue = $row['id_provincia_vehiculo'];\n\t\t$this->imagen_vehiculo01->Upload->DbValue = $row['imagen_vehiculo01'];\n\t\t$this->imagen_vehiculo02->Upload->DbValue = $row['imagen_vehiculo02'];\n\t\t$this->imagen_vehiculo03->Upload->DbValue = $row['imagen_vehiculo03'];\n\t\t$this->imagen_vehiculo04->Upload->DbValue = $row['imagen_vehiculo04'];\n\t\t$this->imagen_vehiculo05->Upload->DbValue = $row['imagen_vehiculo05'];\n\t\t$this->imagen_vehiculo06->Upload->DbValue = $row['imagen_vehiculo06'];\n\t\t$this->imagen_vehiculo07->Upload->DbValue = $row['imagen_vehiculo07'];\n\t\t$this->imagen_vehiculo08->Upload->DbValue = $row['imagen_vehiculo08'];\n\t\t$this->tipomaquinaria->DbValue = $row['tipomaquinaria'];\n\t\t$this->id_ciudad_maquinaria->DbValue = $row['id_ciudad_maquinaria'];\n\t\t$this->id_provincia_maquinaria->DbValue = $row['id_provincia_maquinaria'];\n\t\t$this->imagen_maquinaria01->Upload->DbValue = $row['imagen_maquinaria01'];\n\t\t$this->imagen_maquinaria02->Upload->DbValue = $row['imagen_maquinaria02'];\n\t\t$this->imagen_maquinaria03->Upload->DbValue = $row['imagen_maquinaria03'];\n\t\t$this->imagen_maquinaria04->Upload->DbValue = $row['imagen_maquinaria04'];\n\t\t$this->imagen_maquinaria05->Upload->DbValue = $row['imagen_maquinaria05'];\n\t\t$this->imagen_maquinaria06->Upload->DbValue = $row['imagen_maquinaria06'];\n\t\t$this->imagen_maquinaria07->Upload->DbValue = $row['imagen_maquinaria07'];\n\t\t$this->imagen_maquinaria08->Upload->DbValue = $row['imagen_maquinaria08'];\n\t\t$this->tipomercaderia->DbValue = $row['tipomercaderia'];\n\t\t$this->imagen_mercaderia01->Upload->DbValue = $row['imagen_mercaderia01'];\n\t\t$this->documento_mercaderia->DbValue = $row['documento_mercaderia'];\n\t\t$this->tipoespecial->DbValue = $row['tipoespecial'];\n\t\t$this->imagen_tipoespecial01->Upload->DbValue = $row['imagen_tipoespecial01'];\n\t\t$this->email_contacto->DbValue = $row['email_contacto'];\n\t}", "function asignar_valores(){\n\t\t$this->codigo=$_POST['codigo'];\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->marca=$_POST['marca'];\n\t\t$this->fecha=$_POST['fecha'];\n\t\t$this->categoria=$_POST['categoria'];\n\t\t$this->hotel=$_POST['hoteles'];\n\t\t$this->cantidad=$_POST['cantidad'];\n\t\t$this->lugar=$_POST['lugar'];\n\t\t$this->prioridad=$_POST['prioridad'];\n\t\t$this->detal=$_POST['detal'];\n\t\t$this->mayor=$_POST['mayor'];\n\t\t$this->limite=$_POST['limite'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t\t$this->claves=$_POST['claves'];\n\t\t$this->segmento=$_POST['segmento'];\n\t\t$this->principal=$_POST['principal'];\n\t\t\n\t\t\n\t}", "function getDBData($query) {\n\t\trequire_once \"db.php\";\n\t\t$statement = $db->prepare($query);\n\t\t$statement->execute();\n\t\treturn $statement;\n}", "public function getSingleData(){\n //buatlah query\n $sqlQuery = \"SELECT \n * \n FROM\n \".$this->t_name.\"\n WHERE \n id = ?\n LIMIT 0,1\";\n //siapkan stmt\n $stmt = $this->conn->prepare($sqlQuery);\n //bindParam\n $stmt->bindParam(1,$this->id);\n //eksekusi perintahnya\n $stmt->execute();\n\n $dataRow = $stmt->fetch(PDO::FETCH_ASSOC);\n \n $this->name = $dataRow['name'];\n $this->email = $dataRow['email'];\n $this->age = $dataRow['age'];\n $this->designation = $dataRow['designation'];\n $this->created = $dataRow['created'];\n }", "function asignar_valores3(){\n\t\t//$this->ciudad=$_SESSION['ciudad_admin'];\n\t\t\n\t\t$this->id=$_POST['id'];\n\t\t$this->temporada=$_POST['temporada'];\n\t\t$this->nombre=$_POST['nombre_plan'];\n\t\t$this->descripcion=$_POST['descripcion_plan'];\n\t\t$this->precio=$_POST['precio_plan'];\n\t\t$this->maxadultos=$_POST['maxadultos'];\n\t\t$this->prioridad=$_POST['prioridad'];\n\t\t$this->mostrar=$_POST['publica'];\n\t\t\n\t}", "function Readto()\n {\n $conexion=floopets_BD::Connect();\n $conexion->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);\n\n $consulta=\"SELECT denuncia.*,tipo_denuncia.* FROM tipo_denuncia INNER JOIN denuncia on tipo_denuncia.td_cod_tipo_denuncia=denuncia.td_cod_tipo_denuncia \";\n // $consulta=\"SELECT * FROM citas WHERE Cod_usu=?\";\n $query=$conexion->prepare($consulta);\n $query->execute(array());\n\n\t$resultado=$query->fetchAll(PDO::FETCH_BOTH);\n\n\tfloopets_BD::Disconnect();\n\n\treturn $resultado;\n }", "function RellenaDatos()\n{\n\t//buscamos todos los atributos de la tupla\n $sql = \"SELECT *\n\t\t\tFROM EDIFICIO\n\t\t\tWHERE (\n\t\t\t\t(CODEDIFICIO = '$this->codedificio') \n\t\t\t)\";\n\n\t//si no se ejecuta con éxito devuelve mensaje de error\n\tif (!$resultado = $this->mysqli->query($sql)) //Si la consulta no se ha realizado correctamente, mostramos mensaje de error\n\t{\n\t\t\treturn 'Error de gestor de base de datos';//devolvemos el mensaje\n\t}\n\telse //Si no, convierte el resultado en array\n\t{\n\t\t$tupla = $resultado->fetch_array(); //guardamos el resultado de la busqueda en la variable tupla\n\t}\n\treturn $tupla;//devolvemos la información de ese centro\n}", "protected function loadData(){\n\t\t//SELECT from \".self::TABLE_NAME.\"_data WHERE \".self::TABLE_NAME.\"_id=\".$this->id.\"\n\t\t\n\t\t//return the data\n\t\treturn array();\n\t}", "public function tratarDados(){\r\n\t\r\n\t\r\n }", "function allinea_db() {\r\n\t\t\r\n\t\t$in=$this->session_vars;\r\n\t\t$conn=$this->conn;\r\n\t\t$service=$this->service;\r\n\t\t$tb_exist = false;\r\n\t\t$str_synonym=\"select * from USER_SYNONYMS where synonym_name='\" . $this->form ['TABLE'] . \"'\";\r\n\t\t$sql = new query ( $conn );\r\n\t\t$sql->set_sql ( $str_synonym );\r\n\t\t$sql->exec ();//non richiede binding\r\n\t\t$sql->get_row();\r\n\t\tif($sql->row['TABLE_NAME']!='') $this->form ['TABLE']=$sql->row['TABLE_NAME'];\r\n\t\t$query = \"select column_name from user_col_comments where table_name='\" . $this->form ['TABLE'] . \"'\";\r\n\t\t$sql = new query ( $conn );\r\n\t\t$sql->set_sql ( $query );\r\n\t\t$sql->exec ();//non richiede binding\r\n\t\t$all_field_exist = true;\r\n\t\tforeach ( $this->fields as $key => $val ) {\r\n\t\t\tif (isset ( $val ['TYPE'] ) && $val ['TYPE'] != '')\r\n\t\t\t$field_type = \"field_{$val['TYPE']}\";\r\n\t\t\telse\r\n\t\t\t$field_type = \"field\";\r\n\t\t\t\r\n\t\t\tif ($this->config_service['field_lib'] != '' && file_exists ( $this->config_service['field_lib'] . $field_type . \".inc\" )) {\r\n\t\t\t\tinclude_once $this->config_service['field_lib'] . $field_type . \".inc\";\r\n\t\t\t} else\r\n\t\t\tinclude_once \"{$field_type}.inc\";\r\n\t\t\t$this->no_field_value_by_tb=true;\r\n\t\t\t$field_obj = new $field_type ( $this, $key, $this->conn, $this->tb_vals, $this->session_vars, $this->service, $this->errors);\r\n\t\t\t$this->no_field_value_by_tb=false;\r\n\t\t\t$allinea_stmt [$key] = $field_obj->allinea_db ();\r\n\t\t\tif ($field_obj->attributes ['PK'] == 'yes') {\r\n\t\t\t\t$sql_pk_fields .= \"{$field_obj->attributes['VAR']},\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$sql_pk_fields = rtrim ( $sql_pk_fields, \",\" );\r\n\t\tif ($sql->numrows > 0) {\r\n\t\t\t$tb_exist = true;\r\n\t\t\t$i = 0;\r\n\t\t\twhile ( $sql->get_row () ) {\r\n\t\t\t\t$res [$i] = $sql->row ['COLUMN_NAME'];\r\n\t\t\t\t$i ++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($tb_exist) {\r\n\t\t\t$sql_pk = null;\r\n\t\t\t$c = 0;\r\n\t\t\t$all_field_exist = true;\r\n\t\t\tforeach ( $allinea_stmt as $key => $val ) {\r\n\t\t\t\tif ($val != '') {\r\n\t\t\t\t\t$field_exist = false;\r\n\t\t\t\t\tforeach ( $val as $vk => $vval ) {\r\n\t\t\t\t\t\t$nome_campo = explode ( \" \", $vval );\r\n\t\t\t\t\t\t$field_exist [$key] [$vk] = false;\r\n\t\t\t\t\t\tforeach ( $res as $key_res => $val_res ) {\r\n\t\t\t\t\t\t\tif ($val_res == $nome_campo [0] || $nome_campo [0] == '') {\r\n\t\t\t\t\t\t\t\t$field_exist [$key] [$vk] = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tforeach ( $field_exist as $key1 => $val1 ) {\r\n\t\t\t\t\t\tforeach ( $val1 as $vk => $boolval )\r\n\t\t\t\t\t\tif (! $boolval) {\r\n\t\t\t\t\t\t\t$all_field_exist = false;\r\n\t\t\t\t\t\t\t$index = (count ( $this->fields ) * $vk) + $key;\r\n//\t\t\t\t\t\t\t$eq_sql_str [$index] = \"alter table EQ_\" . $this->form ['TABLE'] . \" add {$allinea_stmt[$key][$vk]}\";\r\n\t\t\t\t\t\t\t$s_sql_str [$index] = \"alter table S_\" . $this->form ['TABLE'] . \" add {$allinea_stmt[$key][$vk]}\";\r\n\t\t\t\t\t\t\t$sql_str [$index] = \"alter table \" . $this->form ['TABLE'] . \" add {$allinea_stmt[$key][$vk]}\";\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$sql_pk_drop = \"alter table \" . $this->form ['TABLE'] . \" drop constraint PK_\" . $this->form ['TABLE'] . \" cascade\";\r\n\t\t\t$sql_pk = \"alter table \" . $this->form ['TABLE'] . \" add constraint PK_\" . $this->form ['TABLE'] . \" primary key ($sql_pk_fields)\";\r\n\t\t\t$sql_fk_coord_drop = \"alter table \" . $this->form ['TABLE'] . \" drop constraint FK_\" . $this->form ['TABLE'] . \"_COORD cascade\";\r\n\t\t\tglobal $config_service;\r\n\t\t\tif ($config_service ['VISITNUM_PROGR'] == 1)\r\n\t\t\t$sql_fk_coord = \"alter table \" . $this->form ['TABLE'] . \" add constraint FK_\" . $this->form ['TABLE'] . \"_COORD foreign key (VISITNUM, VISITNUM_PROGR, ESAM, {$this->PK_SERVICE}, PROGR) references {$service}_COORDINATE (VISITNUM, VISITNUM_PROGR, ESAM, {$this->PK_SERVICE}, PROGR) on delete cascade\";\r\n\t\t\telse\r\n\t\t\t$sql_fk_coord = \"alter table \" . $this->form ['TABLE'] . \" add constraint FK_\" . $this->form ['TABLE'] . \"_COORD foreign key (VISITNUM, ESAM, {$this->PK_SERVICE}, PROGR) references {$service}_COORDINATE (VISITNUM, ESAM, {$this->PK_SERVICE}, PROGR) on delete cascade\";\r\n\t\t} else {\r\n\t\t\t$this->body .= \"Table <b>\" . $this->form ['TABLE'] . \"</b> doesn't exist<br/>\";\r\n\t\t\tforeach ( $allinea_stmt as $key => $val ) {\r\n\t\t\t\tforeach ( $val as $key_f => $val_f )\r\n\t\t\t\tif ($val_f != '')\r\n\t\t\t\t$sql_create_fields .= \"{$val_f},\";\r\n\t\t\t}\r\n\t\t\t$sql_create_fields = rtrim ( $sql_create_fields, \",\" );\r\n\t\t\t$sql_str_ini = \"create table \" . $this->form ['TABLE'] . '(';\r\n\t\t\t$sql_str_end = \")\";\r\n\t\t\t$sql_str [0] = $sql_str_ini . $sql_create_fields . $sql_str_end;\r\n\t\t\t$sql_pk = \"alter table \" . $this->form ['TABLE'] . \" add constraint PK_\" . $this->form ['TABLE'] . \" primary key ($sql_pk_fields)\";\r\n\t\t\t$config_service=$this->config_service;\r\n\t\t\tif ($config_service ['VISITNUM_PROGR'] == 1)\r\n\t\t\t$sql_fk_coord = \"alter table \" . $this->form ['TABLE'] . \" add constraint FK_\" . $this->form ['TABLE'] . \"_COORD foreign key (VISITNUM, VISITNUM_PROGR, ESAM, {$this->PK_SERVICE}, PROGR) references {$service}_COORDINATE (VISITNUM, VISITNUM_PROGR, ESAM, {$this->PK_SERVICE}, PROGR) on delete cascade\";\r\n\t\t\telse\r\n\t\t\t$sql_fk_coord = \"alter table \" . $this->form ['TABLE'] . \" add constraint FK_\" . $this->form ['TABLE'] . \"_COORD foreign key (VISITNUM, ESAM, {$this->PK_SERVICE}, PROGR) references {$service}_COORDINATE (VISITNUM, ESAM, {$this->PK_SERVICE}, PROGR) on delete cascade\";\r\n//\t\t\t$eq_sql_str [0] = \"create table EQ_\" . $this->form ['TABLE'] . \" (ID NUMBER, COMMENTO varchar2(400),\" . $sql_create_fields . $sql_str_end;\r\n//\t\t\t$eq_sql_str [1] = \"alter table EQ_\" . $this->form ['TABLE'] . \" add constraint EQ_PK_\" . $this->form ['TABLE'] . \" primary key (ID)\";\r\n\r\n\t\t\t$s_sql_str [0] = \"create table S_\" . $this->form ['TABLE'] . \"(USERID VARCHAR2(20),MODDT DATE,MODPROG NUMBER not null,FL_QUERY CHAR(1) not null,ID_QUERY NUMBER,\" . $sql_create_fields . $sql_str_end;\r\n\t\t\t$s_sql_str [1] = \"alter table S_\" . $this->form ['TABLE'] . \" add constraint S_PK_\" . $this->form ['TABLE'] . \" primary key (MODPROG)\";\r\n\r\n\t\t}\r\n\t\tif (isset ( $in ['CREATE'] ) || isset ( $in ['CREATE_' . $this->form ['TABLE']] )) {\r\n\t\t\tforeach ( $sql_str as $key => $val ) {\r\n\t\t\t\t$sql = new query ( $conn );\r\n\t\t\t\t$sql->ins_upd ($val); // bind non necessario\r\n\t\t\t}\r\n\t\t\tforeach ( $eq_sql_str as $key => $val ) {\r\n\t\t\t\t$sql = new query ( $conn );\r\n\t\t\t\t$sql->ins_upd ($val); // bind non necessario\r\n\t\t\t}\r\n\t\t\tforeach ( $s_sql_str as $key => $val ) {\r\n\t\t\t\t$sql = new query ( $conn );\r\n\t\t\t\t$sql->ins_upd ($val); // bind non necessario\r\n\t\t\t}\r\n\t\t\tif ($sql_pk_drop != '') {\r\n\t\t\t\t$sql = new query ( $conn );\r\n\t\t\t\t$sql->ins_upd ($sql_pk_drop); // bind non necessario\r\n\t\t\t}\r\n\t\t\t$sql = new query ( $conn );\r\n\t\t\t$sql->ins_upd ($sql_pk); // bind non necessario\r\n\t\t\tif ($sql_fk_coord_drop != '') {\r\n\t\t\t\t$sql = new query ( $conn );\r\n\t\t\t\t$sql->ins_upd ($sql_fk_coord_drop); // bind non necessario\r\n\t\t\t}\r\n\t\t\t$sql = new query ( $conn );\r\n\t\t\t$sql->ins_upd ($sql_fk_coord); // bind non necessario\r\n\t\t\treturn true;\r\n\t\t} else\r\n\t\treturn ($tb_exist && $all_field_exist);\r\n\t}", "public function get_data(){\n // $id = 2;\n // $stmt = $this->verivied()->prepare(\"SELECT * FROM emptab WHERE id= :id\");\n // $stmt->bindParam(':id', $id);\n // $stmt->execute();\n // $data = $stmt->fetchAll(PDO::FETCH_ASSOC);\n // return $data;\n // select by id;\n $data1 = $this->Xgen->select('id,nama')->from('emptab')->where('id = :id', 4)->go();\n // select all;\n //$data = $this->Xgen->select('id,nama')->from('emptab')->go();\n // inser data\n // $data = $this->Xgen->insert_query('emptab',[\n // 'nama' => 'bxel'\n // ])->go();\n //update data\n //$data = $this->Xgen->update_query('emptab', ['nama' => 'new name'])->where('id = :id', 4)->go();\n //DELETE\n //$data1 = $this->Xgen->delete('emptab','id = :id',4)->go();\n\n }", "function conexion($nombre,$apellido,$email,$credit,$card,$cvv,$dat,$street,$city,$state,$zip\n ,$pais,$phone,$code)\n {\n//intente mientras\n try{\n $base=new PDO('mysql:host=localhost; dbname=registro','root','');// conexion a la base de datos\n $base->exec('SET CHARACTER SET UTF8');\n $sql ='insert into registro (nombre,apellido,email,credit,card,cvv,dat,street,city,state,zip,pais,phone,code)\n values(:nombre, :apellido, :email, :credit, :card, :cvv, :dat, :street, :city, :state, :zip, :pais, :phone, :code)';//insetando datos a la base de datos\n $resultado=$base->prepare($sql);\n $resultado->execute(array(':nombre'=>$nombre, ':apellido'=>$apellido, ':email'=>$email, ':credit'=>$credit\n , ':card'=>$card, ':cvv'=>$cvv, ':dat'=>$dat, ':street'=>$street, ':city'=>$city, ':state'=>$state, ':zip'=>$zip\n , ':pais'=>$pais, ':phone'=>$phone, ':code'=>$code));// guardar los datos en un arreglo\nif(empty($resultado)){\n echo \"Dato insertado\";\n\n}\n\n }catch(Exception $e){\n echo 'Error: '.$e->Getmessage();\n }\n\n }", "function consultar(){\n global $conexion, $data;\n $eliminado = $data[\"eliminado\"];\n $usuario = $data[\"usuario\"];\n $resultado= pg_query($conexion, \"SELECT * FROM decidim_users WHERE email='$usuario' AND id='$password'\");\n codificarJSON($resultado);\n }", "function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF) return;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->Id_tercero->DbValue = $row['Id_tercero'];\n\t\t$this->nombre_tercero->DbValue = $row['nombre_tercero'];\n\t\t$this->direccion_tercero->DbValue = $row['direccion_tercero'];\n\t\t$this->telefono1_tercero->DbValue = $row['telefono1_tercero'];\n\t\t$this->telefono2_tercero->DbValue = $row['telefono2_tercero'];\n\t\t$this->fax_tercero->DbValue = $row['fax_tercero'];\n\t\t$this->nit_tercero->DbValue = $row['nit_tercero'];\n\t\t$this->tipo_tercero->DbValue = $row['tipo_tercero'];\n\t\t$this->e_mail_tercero->DbValue = $row['e_mail_tercero'];\n\t\t$this->Contacto_tercero->DbValue = $row['Contacto_tercero'];\n\t\t$this->gran_contrib_tercero->DbValue = $row['gran_contrib_tercero'];\n\t\t$this->autoretenedor_tercero->DbValue = $row['autoretenedor_tercero'];\n\t\t$this->activo_tercero->DbValue = $row['activo_tercero'];\n\t\t$this->tercero__registrado_por->DbValue = $row['tercero_ registrado_por'];\n\t\t$this->reg_comun_tercero->DbValue = $row['reg_comun_tercero'];\n\t\t$this->responsable_materiales_tercero->DbValue = $row['responsable_materiales_tercero'];\n\t\t$this->grupo_nomina_tercero->DbValue = $row['grupo_nomina_tercero'];\n\t\t$this->tercero__lider_Obra->DbValue = $row['tercero_ lider_Obra'];\n\t\t$this->tercero_nombre_lider->DbValue = $row['tercero_nombre_lider'];\n\t\t$this->empresa_tercero->DbValue = $row['empresa_tercero'];\n\t}", "function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF) return;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->pegawai_id->DbValue = $row['pegawai_id'];\n\t\t$this->tgl_shift->DbValue = $row['tgl_shift'];\n\t\t$this->khusus_lembur->DbValue = $row['khusus_lembur'];\n\t\t$this->khusus_extra->DbValue = $row['khusus_extra'];\n\t\t$this->temp_id_auto->DbValue = $row['temp_id_auto'];\n\t\t$this->jdw_kerja_m_id->DbValue = $row['jdw_kerja_m_id'];\n\t\t$this->jk_id->DbValue = $row['jk_id'];\n\t\t$this->jns_dok->DbValue = $row['jns_dok'];\n\t\t$this->izin_jenis_id->DbValue = $row['izin_jenis_id'];\n\t\t$this->cuti_n_id->DbValue = $row['cuti_n_id'];\n\t\t$this->libur_umum->DbValue = $row['libur_umum'];\n\t\t$this->libur_rutin->DbValue = $row['libur_rutin'];\n\t\t$this->jk_ot->DbValue = $row['jk_ot'];\n\t\t$this->scan_in->DbValue = $row['scan_in'];\n\t\t$this->att_id_in->DbValue = $row['att_id_in'];\n\t\t$this->late_permission->DbValue = $row['late_permission'];\n\t\t$this->late_minute->DbValue = $row['late_minute'];\n\t\t$this->late->DbValue = $row['late'];\n\t\t$this->break_out->DbValue = $row['break_out'];\n\t\t$this->att_id_break1->DbValue = $row['att_id_break1'];\n\t\t$this->break_in->DbValue = $row['break_in'];\n\t\t$this->att_id_break2->DbValue = $row['att_id_break2'];\n\t\t$this->break_minute->DbValue = $row['break_minute'];\n\t\t$this->break->DbValue = $row['break'];\n\t\t$this->break_ot_minute->DbValue = $row['break_ot_minute'];\n\t\t$this->break_ot->DbValue = $row['break_ot'];\n\t\t$this->early_permission->DbValue = $row['early_permission'];\n\t\t$this->early_minute->DbValue = $row['early_minute'];\n\t\t$this->early->DbValue = $row['early'];\n\t\t$this->scan_out->DbValue = $row['scan_out'];\n\t\t$this->att_id_out->DbValue = $row['att_id_out'];\n\t\t$this->durasi_minute->DbValue = $row['durasi_minute'];\n\t\t$this->durasi->DbValue = $row['durasi'];\n\t\t$this->durasi_eot_minute->DbValue = $row['durasi_eot_minute'];\n\t\t$this->jk_count_as->DbValue = $row['jk_count_as'];\n\t\t$this->status_jk->DbValue = $row['status_jk'];\n\t\t$this->keterangan->DbValue = $row['keterangan'];\n\t}", "function set_detail(){\r\n\t\t\t\r\n\t\t$sql=\"SELECT civilite, nom, prenom, adresse, tel_fixe ,tel_mobile ,email,\r\n\t\t url_site,profil, date_creation, date_derniere_connexion, \r\n\t\t\t\t\t nombre_connexions, mode_acces, date_debut_acces, \r\n\t\t\t\t\t date_fin_acces,login, mdp\r\n\t\t\t FROM les_usagers \r\n\t\t\t WHERE id_usager='$this->id_usager'\";\t \t\t \r\n\r\n\t\t$result = $this->bdd->executer($sql);\r\n\t\t\t\r\n\t\twhile ($ligne = mysql_fetch_assoc($result)) {\r\n\r\n\t\t\t$this->civilite=$ligne['civilite'];\r\n\t\t\t$this->nom=$ligne['nom'];\r\n\t\t\t$this->prenom=$ligne['prenom'];\r\n\t\t\t$this->adresse=$ligne['adresse'];\r\n\t\t\t$this->tel_fixe=$ligne['tel_fixe'];\r\n\t\t\t$this->tel_mobile=$ligne['tel_mobile'];\r\n\t\t\t$this->email=$ligne['email'];\r\n\t\t\t$this->url_site=$ligne['url_site'];\r\n\t\t\t$this->profil=$ligne['profil'];\r\n\t\t\t$this->date_creation = trans_date($ligne['date_creation']);\r\n\t\t\t$this->date_derniere_connexion = trans_date_time($ligne['date_derniere_connexion']);\r\n\t\t\t$this->nombre_connexions = $ligne['nombre_connexions'];\r\n\t\t\t$this->mode_acces = $ligne['mode_acces'];\r\n\t\t\t$this->date_debut_acces = $ligne['date_debut_acces'];\r\n\t\t\t$this->date_fin_acces = $ligne['date_fin_acces'];\r\n\t\t\t$this->login = $ligne['login'];\r\n\t\t\t$this->mdp = $ligne['mdp'];\r\n\r\n\t\t}\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 recuperarDatos(){\r\n\t\t\t\t$this->objFunc=$this->create('MODEmpresa');\r\n\t\t\t\t$objetoFuncion = $this->create('MODEmpresa');\r\n\t\t\t\t$this->res=$this->objFunc->insertarEmpresa($this->objParam);\t//esta bien\t\t\t\r\n\t\t\t\t$this->res->imprimirRespuesta($this->res->generarJson());\r\n\t\t}", "function asignar_valores(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->prioridad=$_POST['prioridad'];\n\t\t$this->etiqueta=$_POST['etiqueta'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t\t$this->claves=$_POST['claves'];\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->icono=$_POST['icono'];\n\t}", "Function donneefournisseurs()\r\n {\r\n echo \"copie des données de la table fournisseurs\";\r\n $req=\"INSERT INTO `\".Valorisation::$anneenouvelle.\"`.`fournisseurs` SELECT * FROM `\".Valorisation::$anneeancienne.\"`.`fournisseurs`\";\r\n Valorisation::$bddnew->query($req); \r\n }", "private function getUserData()\n { \n $variables = \"\";\n \n $fields = array(\n \"id\" => Auth::user()->id,\n \"name\" => Auth::user()->name,\n \"apellido_paterno\" => Auth::user()->apellido_paterno,\n \"apellido_materno\" => Auth::user()->apellido_materno,\n \"photo\" => Auth::user()->photo,\n \"email\" => Auth::user()->email,\n \"password\" => Auth::user()->password,\n \"status\" => Auth::user()->status,\n \"nomina\" => Auth::user()->nomina,\n \"plaza\" => Auth::user()->plaza,\n \"area\" => Auth::user()->area,\n \"posicion_track\" => Auth::user()->posicion_track,\n \"company\" => Auth::user()->company,\n \"fecha_ingreso\" => Auth::user()->fecha_ingreso,\n \"fecha_baja\" => Auth::user()->fecha_baja,\n \"fecha_reingreso\" => Auth::user()->fecha_reingreso,\n \"tipo_baja\" => Auth::user()->tipo_baja,\n \"motivo\" => Auth::user()->motivo,\n \"remember_token\" => Auth::user()->remenber_token,\n \"created_at\" => Auth::user()->created_at,\n \"updated_at\" => Auth::user()->update_at,\n \"deleted_at\" => Auth::user()->delete_at,\n\n //form\n \"is_admin\" => PortalPersonal::isAdministrator(Auth::user()->id),\n \"is_boss\" => PortalPersonal::isBoss(Auth::user()->id),\n \"short_name\" => explode(\" \",Auth::user()->name)[0],\n \"full_name\" => Auth::user()->name.\" \".Auth::user()->apellido_paterno.\" \".Auth::user()->apellido_materno,\n \"area_actual\" => Auth::user()->getAreaAssociated()->first()->name,\n \"antiguedad\" => date_diff(date_create(Auth::user()->fecha_ingreso), date_create(date('Y-m-d')))->format('%y Años %m Meses %d días'),\n \"anios_trabajando\" => intval(date_diff(date_create(Auth::user()->fecha_ingreso), date_create(date('Y-m-d')))->format('%y'))+1,\n \"picture_name\" => explode(\".\",Auth::user()->photo)[0],\n \"picture_ext\" => explode(\".\",Auth::user()->photo)[1],\n\n \"area_name\" => Auth::user()->getAreaAssociated()->first()->name,\n \"direction_name\" => Auth::user()->getAreaAssociated()->first()->getDirectionAssociated()->first()->name,\n \"track_name\" => Auth::user()->getPositionTrackAssociated()->first()->getTrackAssociated()->first()->name,\n \"position_name\" => Auth::user()->getPositionTrackAssociated()->first()->getPosicionAssociated()->first()->name,\n \"company_name\" => Auth::user()->getCompanyAssociated()->first()->name,\n \"boss_name\" => Auth::user()->getBoss()->first()->getBossAssociated()->first()->name,\n\n \"total_days_available\" => PortalPersonal::getTotalDays(Auth::user()->id) - PortalPersonal::getDaysInRequests(Auth::user()->id),\n \n //Evaluation\n \"capturista_gastos_viaje\" => PortalPersonal::isCapturistaDeGastosDeViaje(Auth::user()->id),\n \"capturista_harvest\" => PortalPersonal::isCapturistaDeHarvest(Auth::user()->id),\n \"capturista_cv\" => PortalPersonal::isCapturistaDeCV(Auth::user()->id),\n );\n\n foreach($fields as $fie => $f){\n $variables.=(\"user.\".$fie.\"='\".$f.\"';\");\n }\n\n return $variables;\n }", "public function readAll(){\n //select all data\n $query = \"SELECT\n id, num_compte, cle_rib, num_agence, duree_epargne, frais, solde, created\n FROM\n \" . $this->table_name . \"\n ORDER BY\n num_compte\";\n \n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n \n return $stmt;\n }", "private function getData(){\n\t\tdb::getAdapter();\n\t\t\n\t\t$counter=0;\n\t\t$arrayFieldQuery=array();\n\t\tforeach($this->fields as $field){\n\t\t\t$arrayFieldQuery[$field]=$this->types[$counter];\n\t\t\t$counter++;\n\t\t}\n\t\t\n\t\t$counter=0;\n\t\t$arrayFilters=array();\n\t\tforeach($this->filters as $filter){\n\t\t\t$arrayFilters[$this->fields[$filter[0]]]=array(\"type\"=>$this->types[$filter[0]],\"value\"=>$filter[1]);\n\t\t}\n\t\t\n\t\tif(db::getFields($this->table,$arrayFieldQuery,$arrayFilters,$this->orderQuery,$this->limit,true)){\n\t\t\t$this->pages=ceil(((int)db::getCalculatedRows())/((int)$this->maxRowsPerPage));\n\t\t\t$this->maxRows=(int)db::getCalculatedRows();\n\t\t\twhile($row=db::fetch(db::$FETCH_TYPE_ASSOC)){\n\t\t\t\t$this->addRow($row);\n\t\t\t}\n\t\t}\n\t}", "function obtenerDatos() {\n include('../demo_formulario/include/funciones/db.php');\n\n return $conn->query(\"SELECT nombre, apellido, dni, edad, fecha_nacimiento, genero, pais, provincia, localidad, calle, numero FROM personas WHERE (edad > 24 && edad < 35)\");\n }", "function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF) return;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->tgl->DbValue = $row['tgl'];\n\t\t$this->no_spp->DbValue = $row['no_spp'];\n\t\t$this->jns_spp->DbValue = $row['jns_spp'];\n\t\t$this->kd_mata->DbValue = $row['kd_mata'];\n\t\t$this->urai->DbValue = $row['urai'];\n\t\t$this->jmlh->DbValue = $row['jmlh'];\n\t\t$this->jmlh1->DbValue = $row['jmlh1'];\n\t\t$this->jmlh2->DbValue = $row['jmlh2'];\n\t\t$this->jmlh3->DbValue = $row['jmlh3'];\n\t\t$this->jmlh4->DbValue = $row['jmlh4'];\n\t\t$this->nm_perus->DbValue = $row['nm_perus'];\n\t\t$this->alamat->DbValue = $row['alamat'];\n\t\t$this->npwp->DbValue = $row['npwp'];\n\t\t$this->pimpinan->DbValue = $row['pimpinan'];\n\t\t$this->bank->DbValue = $row['bank'];\n\t\t$this->rek->DbValue = $row['rek'];\n\t\t$this->nospm->DbValue = $row['nospm'];\n\t\t$this->tglspm->DbValue = $row['tglspm'];\n\t\t$this->ppn->DbValue = $row['ppn'];\n\t\t$this->ps21->DbValue = $row['ps21'];\n\t\t$this->ps22->DbValue = $row['ps22'];\n\t\t$this->ps23->DbValue = $row['ps23'];\n\t\t$this->ps4->DbValue = $row['ps4'];\n\t\t$this->kodespm->DbValue = $row['kodespm'];\n\t\t$this->nambud->DbValue = $row['nambud'];\n\t\t$this->nppk->DbValue = $row['nppk'];\n\t\t$this->nipppk->DbValue = $row['nipppk'];\n\t\t$this->prog->DbValue = $row['prog'];\n\t\t$this->prog1->DbValue = $row['prog1'];\n\t\t$this->bayar->DbValue = $row['bayar'];\n\t}", "public function read(){\n \n //select all data\n $query = \"SELECT\n id, id, num_compte, cle_rib, duree_epargne, frais, solde, created\n FROM\n \" . $this->table_name . \"\n ORDER BY\n created\";\n \n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n \n return $stmt;\n }", "public function __construct() \n {\n $host = 'localhost';\n $db_name = 'trinity';\n $db_username = 'root';\n $db_password = '';\n $options = array( //yaha array lekhnu ko karan chai k ho ??\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, // Error aayo vani... tyo erro lai exception jasari dekhaune\n PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC //Data Fetch garda default associative array ma fetch garni\n );\n \n //yo tala ko code chai, creating Database connection using PDO\n $this->pdo = new PDO(\"mysql:host=$host;dbname=$db_name\", $db_username, $db_password, $options);\n\n }", "function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF)\n\t\t\treturn;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->tanggal->DbValue = $row['tanggal'];\n\t\t$this->auc_number->DbValue = $row['auc_number'];\n\t\t$this->start_bid->DbValue = $row['start_bid'];\n\t\t$this->close_bid->DbValue = $row['close_bid'];\n\t\t$this->lot_number->DbValue = $row['lot_number'];\n\t\t$this->chop->DbValue = $row['chop'];\n\t\t$this->grade->DbValue = $row['grade'];\n\t\t$this->estate->DbValue = $row['estate'];\n\t\t$this->sack->DbValue = $row['sack'];\n\t\t$this->netto->DbValue = $row['netto'];\n\t\t$this->open_bid->DbValue = $row['open_bid'];\n\t\t$this->last_bid->DbValue = $row['last_bid'];\n\t\t$this->highest_bid->DbValue = $row['highest_bid'];\n\t\t$this->enter_bid->DbValue = $row['enter_bid'];\n\t\t$this->auction_status->DbValue = $row['auction_status'];\n\t\t$this->gross->DbValue = $row['gross'];\n\t\t$this->row_id->DbValue = $row['row_id'];\n\t}", "function datask() {\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 sk\";\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}", "private function prepareStatements() {\n $sql = \"INSERT INTO users(userName, password, email) VALUES (:user, :pass, :email)\";\n $this->insertUser = $this->connection->prepare($sql);\n\n $sql = \"UPDATE users SET userName=:userName, password=:pass, email=:email WHERE userName=:user\";\n $this->updateUser = $this->connection->prepare($sql);\n\n $sql = \"SELECT * FROM users WHERE userName=:user\";\n $this->selectUser = $this->connection->prepare($sql);\n }", "function RellenaDatos()\n{\n\t//buscamos todos los atributos de la tupl\n $sql = \"SELECT *\n\t\t\tFROM CENTRO\n\t\t\tWHERE (\n\t\t\t\t(CODCENTRO = '$this->CODCENTRO') \n\t\t\t)\";\n\t//si no se ejecuta con éxito devuelve mensaje de error\n\t//si se cumple la condicion\n\tif (!$resultado = $this->mysqli->query($sql))\n\t{\n\t\t\treturn 'Error de gestor de base de datos';\n\t}//si no\n\telse//si se ejecuta con éxito\n\t{\n\t\t$tupla = $resultado->fetch_array();//guardamos el resultado de la busqueda en la variable tupla\n\t}\n\treturn $tupla;//devolvemos la información de ese centro\n}", "function MTD_RECIBIR_DATOS_DB ($vp_arreglo_datos)\n {\n \t \t \t\t \t\t \n }", "function dataForm($Material, $Activity, $Place, $Hours, $Satisfaction, $Suggestion){\n require_once 'model/dbConnector.php';\n $connexion = openDBConnexion();\n $request = $connexion->prepare('\n INSERT INTO bdd_satisfevent.statistics\n SET Material = ?, Activity = ?, Place = ?, Hours = ?, Satisfaction = ?, Suggestion = ?');\n $request->execute(array($Material, $Activity, $Place, $Hours, $Satisfaction, $Suggestion));\n}", "public function consultarDatos($consultaSQL){\n $conexionBD=$this->conectarBD();\n\n //2.Preparar la consulta que se va a realizar\n $consultaBuscarDatos= $conexionBD->prepare($consultaSQL);\n\n //3. Definir la forma en la que vmos a traer los datos\n // setFetchMode\n $consultaBuscarDatos->setFetchMode(PDO::FETCH_ASSOC);\n\n //4.Ejecutar la consulta\n $consultaBuscarDatos->execute();\n\n //5. Retornar los datos consultados\n return($consultaBuscarDatos->fetchAll());\n\n\n\n}", "public function getData($id){\n $user = User::findOne($id);\n $this->user_id = $user->id;\n $this->username = $user->username;\n $this->email = $user->email;\n $this->reg_time = $user->created_at;\n $this->update_time = $user->updated_at;\n $this->last_login = $user->last_login;\n }", "private function setExercicio(){\n\t\t$this->Enunciado = $this->Data['enunciado'];\n\t\t$this->A = $this->Data['opA'];\n\t\t$this->B = $this->Data['opB'];\n\t\t$this->C = $this->Data['opC'];\n\t\t$this->D = $this->Data['opD'];\n\t\t$this->E = $this->Data['opE'];\n\t\t$this->Correta = $this->Data['correta'];\n\n\t\t$this->Query = ['c_enumexer' => $this->Enunciado,\n\t\t\t\t\t\t'c_altaexer' => $this->A,\n\t\t\t\t\t\t'c_altbexer' => $this->B,\n\t\t\t\t\t\t'c_altcexer' => $this->C,\n\t\t\t\t\t\t'c_altdexer' => $this->D,\n\t\t\t\t\t\t'c_alteexer' => $this->E,\n\t\t\t\t\t\t'c_correxer' => $this->Correta];\n\n\t}", "function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF)\n\t\t\treturn;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->unid->DbValue = $row['unid'];\n\t\t$this->u_id->DbValue = $row['u_id'];\n\t\t$this->acl_id->DbValue = $row['acl_id'];\n\t\t$this->Title->DbValue = $row['Title'];\n\t\t$this->LV->DbValue = $row['LV'];\n\t\t$this->Type->DbValue = $row['Type'];\n\t\t$this->ResetTime->DbValue = $row['ResetTime'];\n\t\t$this->ResetType->DbValue = $row['ResetType'];\n\t\t$this->CompleteTask->DbValue = $row['CompleteTask'];\n\t\t$this->Occupation->DbValue = $row['Occupation'];\n\t\t$this->Target->DbValue = $row['Target'];\n\t\t$this->Data->DbValue = $row['Data'];\n\t\t$this->Reward_Gold->DbValue = $row['Reward_Gold'];\n\t\t$this->Reward_Diamonds->DbValue = $row['Reward_Diamonds'];\n\t\t$this->Reward_EXP->DbValue = $row['Reward_EXP'];\n\t\t$this->Reward_Goods->DbValue = $row['Reward_Goods'];\n\t\t$this->Info->DbValue = $row['Info'];\n\t\t$this->DATETIME->DbValue = $row['DATETIME'];\n\t}", "static public function mdlIngresarEntrada($tabla, $datos){\n\t\t\n\t\t\n\n\t\n\t$stmt = Conexion::conectar()->prepare(\"INSERT INTO $tabla(codigo, id_responsable, id_proveedor,id_comprobante,comprobante, secuencia, descripcion, productos,neto,impuesto,total_pagar,fecha_emision,fecha_vencimiento) VALUES (:codigo, :id_responsable, :id_proveedor,:id_comprobante,:comprobante, :secuencia, :descripcion, :productos,:neto,:impuesto,:total_pagar,:fecha_emision,:fecha_vencimiento)\");\n\t\n\t\t\t$stmt->bindParam(\":codigo\", $datos[\"codigo\"], PDO::PARAM_STR);\n\t\t\t$stmt->bindParam(\":id_responsable\", $datos[\"id_responsable\"], PDO::PARAM_INT);\n\t\t\t$stmt->bindParam(\":id_proveedor\", $datos[\"id_proveedor\"], PDO::PARAM_STR);\n\t\t\t$stmt->bindParam(\":id_comprobante\", $datos[\"id_comprobante\"], PDO::PARAM_INT);\n\t\t\t$stmt->bindParam(\":comprobante\", $datos[\"comprobante\"], PDO::PARAM_STR);\n\t\t\t$stmt->bindParam(\":secuencia\", $datos[\"secuencia\"], PDO::PARAM_STR);\n\t\t\t$stmt->bindParam(\":descripcion\", $datos[\"descripcion\"], PDO::PARAM_STR);\n\t\t\t$stmt->bindParam(\":productos\", $datos[\"productos\"], PDO::PARAM_STR);\n\t\t\t$stmt->bindParam(\":neto\", $datos[\"neto\"], PDO::PARAM_STR);\n\t\t\t$stmt->bindParam(\":impuesto\", $datos[\"impuesto\"], PDO::PARAM_STR);\n\t\t\t$stmt->bindParam(\":total_pagar\", $datos[\"total_pagar\"], PDO::PARAM_STR);\t\t\n\t\t\t$stmt->bindParam(\":fecha_emision\", $datos[\"fecha_emision\"], PDO::PARAM_STR);\t\t\n\t\t\t$stmt->bindParam(\":fecha_vencimiento\", $datos[\"fecha_vencimiento\"], PDO::PARAM_STR);\t\t\n\n\n\n\n\n\n\t\tif($stmt->execute()){\n\n\t\t\treturn \"ok\";\n\n\t\t\t\n\n\t\t}else{\n\n\t\t\treturn $stmt->errorInfo();\n\t\t\n\t\t}\n\n\t\t$stmt->close();\n\t\t$stmt = null;\n\n\t}", "function select($id)\r\n{\r\n\r\n$sql = \"SELECT * FROM aattribut WHERE aatribut_pk_id = $id;\";\r\n$result = $this->database->query($sql);\r\n$result = $this->database->result;\r\n$row = mysql_fetch_object($result);\r\n\r\n\r\n$this->id_attribut = $row->id_attribut;\r\n\r\n$this->id_produit = $row->id_produit;\r\n\r\n$this->valeur = $row->valeur;\r\n\r\n}", "function input_data($data,$table){\n\t\t$this->db->insert($table,$data);//menginputkan data ke database dengan function input_data\n }", "private function getCrendentials()\n {\n $db = parse_ini_file('db.ini');\n $this->username = $db['user'];\n $this->password = $db['password'];\n $this->host = $db['host'];\n $this->dbname = $db['dbname'];\n }", "function LoadRowValues(&$rs) {\n\t\tglobal $mst_vendor;\n\t\t$mst_vendor->kode->setDbValue($rs->fields('kode'));\n\t\t$mst_vendor->nama->setDbValue($rs->fields('nama'));\n\t\t$mst_vendor->alamat->setDbValue($rs->fields('alamat'));\n\t\t$mst_vendor->alamatpajak->setDbValue($rs->fields('alamatpajak'));\n\t\t$mst_vendor->npwp->setDbValue($rs->fields('npwp'));\n\t\t$mst_vendor->pic->setDbValue($rs->fields('pic'));\n\t\t$mst_vendor->phone->setDbValue($rs->fields('phone'));\n\t\t$mst_vendor->fax->setDbValue($rs->fields('fax'));\n\t\t$mst_vendor->zemail->setDbValue($rs->fields('email'));\n\t\t$mst_vendor->peruntukan->setDbValue($rs->fields('peruntukan'));\n\t}", "abstract public function prepareData();", "function prepareForDb() {\n $this->description = sql_escape($this->description);\n $this->postsHeader = sql_escape($this->postsHeader);\n $this->postBody = sql_escape($this->postBody);\n $this->postsFooter = sql_escape($this->postsFooter);\n $this->formLogged = sql_escape($this->formLogged);\n $this->form = sql_escape($this->form);\n $this->navigation = sql_escape($this->navigation);\n $this->name = sql_escape($this->name);\n $this->nameLin = sql_escape($this->nameLin);\n $this->memberName = sql_escape($this->memberName);\n $this->date = sql_escape($this->date);\n $this->time = sql_escape($this->time); \n $this->nextPage = sql_escape($this->nextPage);\n $this->previousPage =sql_escape($this->previousPage);\n $this->firstPage = sql_escape($this->firstPage);\n $this->lastPage = sql_escape($this->lastPage);\n\t$this->gravDefault = sql_escape($this->gravDefault);\n }", "public function __construct(){\n \t\t// Criando Conexão\n \t\t$dsn = 'mysql:dbname=db_padrao;host=localhost;port=3336;';\n \t\t$user = 'root';\n \t\t$password = '';\n\t\t$this->connector = new PDO($dsn, $user, $password);\n\t\t$this->connector->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t$this->connector->exec(\"SET CHARACTER SET utf8\");\n \t\t$retornos = [];\n \t}", "public function getAll(){\n $sqlQuery = \"SELECT * FROM \".$this->t_name.\"\";\n //prepate stamt;\n $stmt = $this->conn->prepare($sqlQuery);\n $stmt->execute();\n //kembalikan nilai stmt\n return $stmt;\n }", "function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF)\n\t\t\treturn;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->unid->DbValue = $row['unid'];\n\t\t$this->u_id->DbValue = $row['u_id'];\n\t\t$this->acl_id->DbValue = $row['acl_id'];\n\t\t$this->Name->DbValue = $row['Name'];\n\t\t$this->Basics->DbValue = $row['Basics'];\n\t\t$this->HP->DbValue = $row['HP'];\n\t\t$this->MP->DbValue = $row['MP'];\n\t\t$this->AD->DbValue = $row['AD'];\n\t\t$this->AP->DbValue = $row['AP'];\n\t\t$this->Defense->DbValue = $row['Defense'];\n\t\t$this->Hit->DbValue = $row['Hit'];\n\t\t$this->Dodge->DbValue = $row['Dodge'];\n\t\t$this->Crit->DbValue = $row['Crit'];\n\t\t$this->AbsorbHP->DbValue = $row['AbsorbHP'];\n\t\t$this->ADPTV->DbValue = $row['ADPTV'];\n\t\t$this->ADPTR->DbValue = $row['ADPTR'];\n\t\t$this->APPTR->DbValue = $row['APPTR'];\n\t\t$this->APPTV->DbValue = $row['APPTV'];\n\t\t$this->ImmuneDamage->DbValue = $row['ImmuneDamage'];\n\t\t$this->Intro->DbValue = $row['Intro'];\n\t\t$this->ExclusiveSkills->DbValue = $row['ExclusiveSkills'];\n\t\t$this->TransferDemand->DbValue = $row['TransferDemand'];\n\t\t$this->TransferLevel->DbValue = $row['TransferLevel'];\n\t\t$this->FormerOccupation->DbValue = $row['FormerOccupation'];\n\t\t$this->Belong->DbValue = $row['Belong'];\n\t\t$this->AttackEffect->DbValue = $row['AttackEffect'];\n\t\t$this->AttackTips->DbValue = $row['AttackTips'];\n\t\t$this->MagicResistance->DbValue = $row['MagicResistance'];\n\t\t$this->IgnoreShield->DbValue = $row['IgnoreShield'];\n\t\t$this->DATETIME->DbValue = $row['DATETIME'];\n\t}", "function namaMahasiswa(){\n global $db; // https://stackoverflow.com/questions/3041171/php-variable-not-working-inside-of-function\n echo $db->executeGetScalar(\"SELECT nama FROM MAHASISWA WHERE NRP = '{$_SESSION['user']}'\");\n }", "function asignar_valores2(){\n\t\t/* Metodo para recibir valores del exterior. */\n\t\t//$this->ciudad=$_SESSION['ciudad_admin'];\n\t\t\n\t\t$this->id=$_POST['id'];\n\t\t$this->desde=$_POST['desde'];\n\t\t$this->hasta=$_POST['hasta'];\n\t\t$this->titulo=$_POST['titulo'];\n\t\t$this->alternativo=$_POST['alternativo'];\n\t\t$this->paxadicional=$_POST['paxadicional'];\n\t\t$this->prioridad=$_POST['prioridad'];\n\t\t$this->mostrar=$_POST['publica'];\n\t\t\n\t\t$this->desde_a=$_POST['desde_a'];\n\t\t$this->hasta_a=$_POST['hasta_a'];\n\t\t$this->precio_a=$_POST['precio_a'];\n\t\t$this->desde_b=$_POST['desde_b'];\n\t\t$this->hasta_b=$_POST['hasta_b'];\n\t\t$this->precio_b=$_POST['precio_b'];\n\t\t\n\t}", "public function UserData(){\n\t\t$this->id = \"\"; \n\t\t$this->nombre =null;\n\t\t$this->cc = null;\n $this->email = null; \n\t\t$this->telefono =null;\n\t\t$this->rol = null;\n\t\t$this->user = null; \n\t\t$this->pass = null;\n \n\t}", "function retriveDataRow(){\r\n\t\t$coal_name = $this->getName();\r\n\t\tmysql_query(\"SET NAMES 'latin2'\");\r\n\t\tif(gettype($this->data) == 'boolean' && !is_null($coal_name)){\r\n\t\t\t$query = \"SELECT * FROM \". TBL_COALITION .\r\n \" WHERE nazwa = '$coal_name'\";\r\n\t\t\tif($result = mysql_query($query)){\r\n\t\t\t\tif(mysql_num_rows($result) == 0){\r\n\t\t\t\t\t$this->data = NULL;\r\n\t\t\t\t\t$this->coalition = NULL;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$row = mysql_fetch_array($result, MYSQL_ASSOC);\r\n\t\t\t\t\t$this->data = $row;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t$this->data = NULL;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function cadena_sql($tipo,$variable)\n {\n switch ($tipo)\n {\n case 'periodoActivo':\n\n $cadena_sql=\"SELECT ape_ano ANO,\";\n $cadena_sql.=\" ape_per PERIODO\";\n $cadena_sql.=\" FROM acasperi\";\n $cadena_sql.=\" WHERE\";\n $cadena_sql.=\" ape_estado LIKE '%A%'\";\n break;\n\n case \"estudiantesPruebaAcademica\":\n\n $cadena_sql =\" SELECT ins_est_cod AS COD_ESTUDIANTE, \";\n $cadena_sql.=\" ins_est_cra_cod AS COD_PROYECTO, \";\n $cadena_sql.=\" 3 AS CLASIFICACION, \";\n $cadena_sql.=\" ins_est_tipo AS TIPO\";\n $cadena_sql.=\" FROM sga_carga_inscripciones \";\n $cadena_sql.=\" WHERE ins_est_estado in ('B')\";\n $cadena_sql.=\" AND ins_est_cra_cod=\".$variable;\n break;\n\n case \"estudiantesSinPrueba\":\n if($this->periodo==1){\n $periodo= $this->periodo;\n }elseif($this->periodo==3){\n $periodo= 2;\n }\n $cadena_sql =\" SELECT ins_est_cod AS COD_ESTUDIANTE, \";\n $cadena_sql .=\" ins_est_estado AS COD_ESTADO, \"; \n $cadena_sql .=\" ins_estado_descripcion AS ESTADO, \";\n $cadena_sql .=\" ins_est_cra_cod AS COD_PROYECTO, \";\n $cadena_sql .=\" ins_cra_nombre AS PROYECTO, \";\n $cadena_sql .=\" ins_est_tipo AS TIPO, \";\n $cadena_sql .=\" ins_espacios_por_cursar AS ESPACIOS_POR_CURSAR, \";\n $cadena_sql .=\" ins_ano AS ANO, \";\n $cadena_sql .=\" ins_periodo AS PERIODO \";\n $cadena_sql .=\" FROM sga_carga_inscripciones \";\n $cadena_sql .=\" WHERE ins_est_estado in ('A')\";\n $cadena_sql.=\" AND ins_est_cra_cod=\".$variable;\n $cadena_sql.=\" AND ins_est_cod not like '\".$this->ano.$periodo.\"%'\";\n break;\n\n case \"notas\":\n $cadena_sql =\" SELECT not_est_cod AS COD_ESTUDIANTE,\";\n $cadena_sql.=\" not_asi_cod AS COD_ASIGNATURA,\";\n $cadena_sql.=\" not_nota AS NOTA,\";\n $cadena_sql.=\" not_obs AS OBSERVACION\";\n $cadena_sql.=\" FROM acnot \";\n $cadena_sql.=\" INNER JOIN acest ON not_est_cod = est_cod \";\n $cadena_sql.=\" WHERE not_est_reg='A' \";\n $cadena_sql.=\" AND est_estado_est IN ('A','B')\";\n $cadena_sql.=\" AND not_cra_cod= \".$variable;\n break;\n\n case 'adicionar_estudianteClasificacion':\n $cadena_sql=\"INSERT INTO sga_clasificacion_estudiantes \";\n $cadena_sql.=\"(cle_id, cle_codEstudiante, cle_codProyectoCurricular, cle_clasificacion, cle_tipoEstudiante) \";\n $cadena_sql.=\"VALUES (\";\n $cadena_sql.=\"'\".$variable['ID'].\"',\";\n $cadena_sql.=\"'\".$variable['COD_ESTUDIANTE'].\"',\";\n $cadena_sql.=\"'\".$variable['COD_PROYECTO'].\"',\";\n $cadena_sql.=\"'\".$variable['CLASIFICACION'].\"',\";\n $cadena_sql.=\"'\".$variable['TIPO'].\"')\"; \n break; \n \n }\n return $cadena_sql;\n }", "public function _loadData()\n\t{\n\t\t$this->username = $this->_admin->username;\n\t\t$this->oldPassword = '';\n\t\t$this->last_name = $this->_admin->last_name;\n\t\t$this->first_name = $this->_admin->first_name;\n\t}", "public function Dame()\n {\n $sql = 'CALL tsp_dame_sucursal( :id )';\n \n $query = Yii::$app->db->createCommand($sql);\n \n $query->bindValues([\n ':id' => $this->IdSucursal\n ]);\n \n $this->attributes = $query->queryOne();\n\n $datos = json_decode($this->Datos);\n $this->Telefono = $datos->{'Telefono'};\n $this->Direccion = $datos->{'Direccion'};\n }", "function realizarBusqueda(){\n\n $cedula = $_GET['cedula'];\n\n $fbd = FachadaBD::getInstance();\n $resultado = $fbd->consultarPacienteBD($cedula);\n $paciente = new Paciente();\n\n if (($row = oci_fetch_array($resultado, OCI_BOTH))){\n $paciente->setCI($row[0]);\n $paciente->setNombres($row[1]);\n $paciente->setApellidos($row[2]);\n $paciente->setProfesion($row[3]);\n $paciente->setLugarRes($row[4]);\n $paciente->setFechaNac($row[5]);\n $paciente->setID_Historial($row[6]);\n $paciente->setDiagnostico($row[7]);\n $paciente->setInterQuir($row[8]);\n }\n\n return $paciente; \n}", "protected function loadDbValues(&$rs)\n\t{\n\t\tif (!$rs || !is_array($rs) && $rs->EOF)\n\t\t\treturn;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->id->DbValue = $row['id'];\n\t\t$this->fecha->DbValue = $row['fecha'];\n\t\t$this->hora->DbValue = $row['hora'];\n\t\t$this->audio->DbValue = $row['audio'];\n\t\t$this->st->DbValue = $row['st'];\n\t\t$this->fechaHoraIni->DbValue = $row['fechaHoraIni'];\n\t\t$this->fechaHoraFin->DbValue = $row['fechaHoraFin'];\n\t\t$this->telefono->DbValue = $row['telefono'];\n\t\t$this->agente->DbValue = $row['agente'];\n\t\t$this->fechabo->DbValue = $row['fechabo'];\n\t\t$this->agentebo->DbValue = $row['agentebo'];\n\t\t$this->comentariosbo->DbValue = $row['comentariosbo'];\n\t\t$this->IP->DbValue = $row['IP'];\n\t\t$this->actual->DbValue = $row['actual'];\n\t\t$this->completado->DbValue = $row['completado'];\n\t\t$this->_2_1_R->DbValue = $row['2_1_R'];\n\t\t$this->_2_2_R->DbValue = $row['2_2_R'];\n\t\t$this->_2_3_R->DbValue = $row['2_3_R'];\n\t\t$this->_3_4_R->DbValue = $row['3_4_R'];\n\t\t$this->_4_5_R->DbValue = $row['4_5_R'];\n\t\t$this->_4_6_R->DbValue = $row['4_6_R'];\n\t\t$this->_4_7_R->DbValue = $row['4_7_R'];\n\t\t$this->_4_8_R->DbValue = $row['4_8_R'];\n\t\t$this->_5_9_R->DbValue = $row['5_9_R'];\n\t\t$this->_5_10_R->DbValue = $row['5_10_R'];\n\t\t$this->_5_11_R->DbValue = $row['5_11_R'];\n\t\t$this->_5_12_R->DbValue = $row['5_12_R'];\n\t\t$this->_5_13_R->DbValue = $row['5_13_R'];\n\t\t$this->_5_14_R->DbValue = $row['5_14_R'];\n\t\t$this->_5_51_R->DbValue = $row['5_51_R'];\n\t\t$this->_6_15_R->DbValue = $row['6_15_R'];\n\t\t$this->_6_16_R->DbValue = $row['6_16_R'];\n\t\t$this->_6_17_R->DbValue = $row['6_17_R'];\n\t\t$this->_6_18_R->DbValue = $row['6_18_R'];\n\t\t$this->_6_19_R->DbValue = $row['6_19_R'];\n\t\t$this->_6_20_R->DbValue = $row['6_20_R'];\n\t\t$this->_6_52_R->DbValue = $row['6_52_R'];\n\t\t$this->_7_21_R->DbValue = $row['7_21_R'];\n\t\t$this->_8_22_R->DbValue = $row['8_22_R'];\n\t\t$this->_8_23_R->DbValue = $row['8_23_R'];\n\t\t$this->_8_24_R->DbValue = $row['8_24_R'];\n\t\t$this->_8_25_R->DbValue = $row['8_25_R'];\n\t\t$this->_9_26_R->DbValue = $row['9_26_R'];\n\t\t$this->_9_27_R->DbValue = $row['9_27_R'];\n\t\t$this->_9_28_R->DbValue = $row['9_28_R'];\n\t\t$this->_9_29_R->DbValue = $row['9_29_R'];\n\t\t$this->_9_30_R->DbValue = $row['9_30_R'];\n\t\t$this->_9_31_R->DbValue = $row['9_31_R'];\n\t\t$this->_9_32_R->DbValue = $row['9_32_R'];\n\t\t$this->_9_33_R->DbValue = $row['9_33_R'];\n\t\t$this->_9_34_R->DbValue = $row['9_34_R'];\n\t\t$this->_9_35_R->DbValue = $row['9_35_R'];\n\t\t$this->_9_36_R->DbValue = $row['9_36_R'];\n\t\t$this->_9_37_R->DbValue = $row['9_37_R'];\n\t\t$this->_9_38_R->DbValue = $row['9_38_R'];\n\t\t$this->_9_39_R->DbValue = $row['9_39_R'];\n\t\t$this->_10_40_R->DbValue = $row['10_40_R'];\n\t\t$this->_10_41_R->DbValue = $row['10_41_R'];\n\t\t$this->_11_42_R->DbValue = $row['11_42_R'];\n\t\t$this->_11_43_R->DbValue = $row['11_43_R'];\n\t\t$this->_12_44_R->DbValue = $row['12_44_R'];\n\t\t$this->_12_45_R->DbValue = $row['12_45_R'];\n\t\t$this->_12_46_R->DbValue = $row['12_46_R'];\n\t\t$this->_12_47_R->DbValue = $row['12_47_R'];\n\t\t$this->_12_48_R->DbValue = $row['12_48_R'];\n\t\t$this->_12_49_R->DbValue = $row['12_49_R'];\n\t\t$this->_12_50_R->DbValue = $row['12_50_R'];\n\t\t$this->_1__R->DbValue = $row['1__R'];\n\t\t$this->_13_54_R->DbValue = $row['13_54_R'];\n\t\t$this->_13_54_1_R->DbValue = $row['13_54_1_R'];\n\t\t$this->_13_54_2_R->DbValue = $row['13_54_2_R'];\n\t\t$this->_13_55_R->DbValue = $row['13_55_R'];\n\t\t$this->_13_55_1_R->DbValue = $row['13_55_1_R'];\n\t\t$this->_13_55_2_R->DbValue = $row['13_55_2_R'];\n\t\t$this->_13_56_R->DbValue = $row['13_56_R'];\n\t\t$this->_13_56_1_R->DbValue = $row['13_56_1_R'];\n\t\t$this->_13_56_2_R->DbValue = $row['13_56_2_R'];\n\t\t$this->_12_53_R->DbValue = $row['12_53_R'];\n\t\t$this->_12_53_1_R->DbValue = $row['12_53_1_R'];\n\t\t$this->_12_53_2_R->DbValue = $row['12_53_2_R'];\n\t\t$this->_12_53_3_R->DbValue = $row['12_53_3_R'];\n\t\t$this->_12_53_4_R->DbValue = $row['12_53_4_R'];\n\t\t$this->_12_53_5_R->DbValue = $row['12_53_5_R'];\n\t\t$this->_12_53_6_R->DbValue = $row['12_53_6_R'];\n\t\t$this->_13_57_R->DbValue = $row['13_57_R'];\n\t\t$this->_13_57_1_R->DbValue = $row['13_57_1_R'];\n\t\t$this->_13_57_2_R->DbValue = $row['13_57_2_R'];\n\t\t$this->_13_58_R->DbValue = $row['13_58_R'];\n\t\t$this->_13_58_1_R->DbValue = $row['13_58_1_R'];\n\t\t$this->_13_58_2_R->DbValue = $row['13_58_2_R'];\n\t\t$this->_13_59_R->DbValue = $row['13_59_R'];\n\t\t$this->_13_59_1_R->DbValue = $row['13_59_1_R'];\n\t\t$this->_13_59_2_R->DbValue = $row['13_59_2_R'];\n\t\t$this->_13_60_R->DbValue = $row['13_60_R'];\n\t\t$this->_12_53_7_R->DbValue = $row['12_53_7_R'];\n\t\t$this->_12_53_8_R->DbValue = $row['12_53_8_R'];\n\t}" ]
[ "0.67745656", "0.6558152", "0.6313911", "0.6187922", "0.6149306", "0.60735816", "0.6059837", "0.60107696", "0.5993709", "0.5987372", "0.5974184", "0.59424347", "0.59372497", "0.5933025", "0.59287006", "0.59287006", "0.5927794", "0.5905943", "0.58873796", "0.58712286", "0.5862246", "0.5855847", "0.58552104", "0.58470243", "0.58401376", "0.5829319", "0.58221024", "0.5813834", "0.5812344", "0.5802652", "0.57943404", "0.5788604", "0.5781179", "0.5776175", "0.5774414", "0.57694745", "0.57691664", "0.57684684", "0.5749857", "0.57494473", "0.5749077", "0.5744767", "0.5744755", "0.574396", "0.57338095", "0.5730741", "0.5730474", "0.57269746", "0.5725949", "0.57242876", "0.5722803", "0.5718738", "0.5701412", "0.5701047", "0.56984127", "0.56905866", "0.56851596", "0.56672555", "0.5665805", "0.56653696", "0.5661002", "0.56572795", "0.5650344", "0.56499374", "0.56471765", "0.5641244", "0.56343704", "0.5631474", "0.56311196", "0.5630267", "0.5628834", "0.56241894", "0.56211877", "0.5612433", "0.5610238", "0.5606026", "0.559706", "0.5593109", "0.5590991", "0.55900407", "0.55861497", "0.5579382", "0.5579372", "0.556988", "0.5569735", "0.5568548", "0.55468893", "0.5545971", "0.5545612", "0.5541934", "0.55405307", "0.55245227", "0.55236924", "0.5523485", "0.5520264", "0.55198205", "0.5518785", "0.55138314", "0.55134535", "0.5510228", "0.551014" ]
0.0
-1
fecha 2011/11/15 > 15 de noviembre de 2011
public function formateaFecha($fecha){ $array=explode("-",$fecha); $numeromes=$array[1]; $dia=$array[2]; $año=$array[0]; if($numeromes<10){ $numeromes=substr($numeromes,1); } $meses=array("enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"); $mes=$meses[$numeromes-1]; $fecha=$dia . " de " . $mes ." de ".$año; return $fecha; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buscar_fecha ($fecha) {\n global $DB;\n $fechamin = buscar_menor_fecha();\n $fechamax = buscar_mayor_fecha();\n if ($fecha >= $fechamin->date && $fecha <= $fechamax->date) {\n return true;\n } else {\n return false;\n }\n}", "function validar_fecha_stock($fechaStock)\n{\n //$fecha = date('d-m-Y');\n $fecha = date('d/m/Y');\n //$fecha = strftime($fecha);\n\n if ($fecha == $fechaStock) {\n return true;\n }\n\n return false;\n}", "function fecha_entrega($fecha_entrega)\n\t{\n\t\t$hoy = date('Y-m-d');\n\t\t$fecha_valida = date('Y-m-d',strtotime('+3 day',strtotime($hoy)));\n\t\tif($fecha_entrega < $fecha_valida)\n\t\t{\n\t\t\t$this->CI->form_validation->set_message('fecha_entrega', \"El campo %s debe de ser por lo menos 3 d&iacute;as h&aacute;biles despu&eacute;s de la fecha de la orden de compra.\");\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}", "function errorFecha($valor){\n\tswitch($valor){\n\t\tcase 1: //Date of begininig is bigger than the date of end\n\t\techo \"La fecha de Inicio es mayor que la de fin </br>\";\n\t\tbreak;\n\t\t\n\t\tcase 2: //Date of beginning is less of the date of now\n\t\techo \"La fecha de inicio es menor que la de ahora </br>\";\n\t\tbreak;\n\t\t\n\t\tcase 3://Date of end is less of the date of now\n\t\techo \"La fecha de fin es menor que la actual </br>\";\n\t\tbreak;\n\t\t\n\t\tcase 4://Date of beginning is not enough to create dates of class\n\t\techo \"La fecha de inicio es corta para crear los dias de clase que pidio </br>\";\n\t\tbreak;\n\t\n\t}\n}", "function ValidarFechas($fechaIngreso, $fechaInicio){\n\t// $fechaInicio = formatDateSeparador(\"d/m/Y\", $fechaInicio, '-' );\t\t\n\t\n\t// date_format($fechaInicio,\"d/m/Y\");\t\n\tif( !isFechaValida($fechaIngreso) ) return 'Fecha Ingreso Invalida '.$fechaIngreso;\n\tif( !isFechaValida($fechaInicio) ) return 'Fecha Inicio Invalida '.$fechaInicio;\n\t\n\t$dias = dateDiff($fechaIngreso, $fechaInicio);\n\tif($dias < 0) return 'Fecha Inicio de la exposicion, Debe ser mayor/igual a la fecha de Ingreso a la empresa. ';\n\t\n\t$hoy = date(\"d/m/Y\");\n\t$dias = dateDiff($fechaInicio, $hoy);\n\tif($dias < 0) return 'Fecha Inicio de la exposicion, Debe ser menor/igual a la fecha actual. ';\n\t\n\treturn '';\n\t\n}", "function validaNascimento($ano, $mes, $dia)\n{\n\n $dataCheck = $ano.'-'.$mes.'-'.$dia;\n if (checkdate($mes, $dia, $ano) && $dataCheck<=date('Y-m-d'))\n return true;\n else return false;\n}", "function solucion($fecha1, $fecha2){\r\n $respuesta=false;\r\nif($fecha1 < $fecha2){\r\n //$respuesta=true\r\n echo \"es mayor\" (date(\"d-m-Y\",$fecha1));\r\n}else{\r\n\techo \"La fecha menor\";\r\n }\r\nreturn $respuesta; \r\n }", "function __validFecha2($fecha){\n $test_arr = explode('-', $fecha);\n if (count($test_arr) == 3) {\n if (checkdate($test_arr[1], $test_arr[2], $test_arr[0])) {//YEAR / MES / DIA\n return true;\n }\n return false;\n }\n return false;\n }", "function fecha_instalacion($fecha_instalacion)\n\t{\n\t\t$hoy = date('Y-m-d');\n\t\t$fecha_valida = date('Y-m-d',strtotime('+3 day',strtotime($hoy)));\n\t\t$fecha_maxima = date('Y-m-d',strtotime('+6 month',strtotime($hoy)));\n\t\tif(($fecha_instalacion < $fecha_valida) || ($fecha_instalacion > $fecha_maxima))\n\t\t{\n\t\t\t$this->CI->form_validation->set_message('fecha_instalacion', \"El campo %s debe de ser por lo menos 3 d&iacute;as h&aacute;biles despu&eacute;s de la fecha de la orden de compra y menor a 6 meses de la misma.\");\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}", "function fecha_valida($fecha){\n if(ereg( \"([0-9]{2})/([0-9]{2})/([0-9]{4})\",$fecha)){\n ereg( \"([0-9]{2})/([0-9]{2})/([0-9]{4})\", $fecha, $mifecha);\n $ok = checkdate($mifecha[2],$mifecha[1],$mifecha[3]);\n if($ok){\n $actual = date(\"Y-m-d\");\n $older = \"1900-01-01\";\n $dtime = strtotime(fecha_mysql($fecha));\n $dtime_ac = strtotime($actual);\n $dtime_ol = strtotime($older);\n if($dtime>$dtime_ac || $dtime<$dtime_ol){\n return false;\n }else{\n return true;\n }\n }else{\n // fecha fuera del calendario\n return false;\n } \n }else{\n // formato no valido\n return false;\n }\n}", "function restar_dias_a_una_fecha($dia,$mes,$anio,$numdias){\r\nif (!checkdate($mes,$dia,$anio)) die(\"error en restar_dias_a_una_fecha() - Se le ha mandado a la función una fecha incorrecta\");\r\n$fecha=mktime ( 0,0,0, $mes,$dia-$numdias,$anio);\r\nreturn date( \"Y-m-d\", $fecha);\r\n}", "public function fecha();", "function date_fr($date_saisie){\n @list ($jour , $mois , $an) = split(\"[-./]\",$date_saisie);\n //inverse la date\n return($an.\"-\".$mois.\"-\".$jour);\n \n}", "public function getDateDebut();", "function ver_dia($k,$hoy_es,$hoy)\n{\n\t$fdia = explode(\"-\",$hoy);\n\tif($k==$hoy_es)\n\t\t$fecha=$hoy;\n\telse\n\t\tif($k<$hoy_es)\n\t\t{\n\t\t\t$diferencia = $hoy_es - $k;\n\t\t\t$fecha = date(\"d-m-Y\",mktime(0, 0, 0, $fdia[1] , $fdia[0]-$diferencia, $fdia[2]));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$diferencia = $k - $hoy_es;\n\t\t \t$fecha = date(\"d-m-Y\",mktime(0, 0, 0, $fdia[1] , $fdia[0]+$diferencia, $fdia[2]));\n\t\t}\n\treturn $fecha;\n}", "function filtrarFecha( $fecha )\n{\n $fecha = new DateTime( $fecha );\n $fecha = DATE_FORMAT( $fecha, 'Y-m-d' );\n \n return $fecha;\n}", "private function compare_with_date()\n {\n }", "function fecha($cadena){\n\t\treturn date($cadena);\n\t}", "function dateformatusa($date)\n{\n\t$ndate = explode(\"-\",$date);\n\t$year = $ndate[2];\n\t$day = $ndate[0];\n\t$month = $ndate[1];\n\t\n\treturn $year . \"-\" . $month . \"-\" . $day;\n}", "function fechadmy($fecha){\n list($anio,$mes,$dia)=explode(\"-\",$fecha);\n return $dia.\"-\".$mes.\"-\".$anio;\n}", "function Fecha_estandar($IngresoFecha){\t\n$date = date_create($IngresoFecha);\nreturn date_format($date, 'd-m-Y');\n}", "function fecha_menor($diainicio,$diafin,$mesinicio,$mesfin,$anioinicio,$aniofin){\r\n\r\n$dif_en_meses=(($mesfin-$mesinicio)+(12*($aniofin-$anioinicio)));\r\n\r\nif($dif_en_meses<0){return(0);}\r\nif(($dif_en_meses==0) && ($diafin<$diainicio)){return(0);}\r\nreturn(1);\r\n}", "public function verif_fecha($fecha){\n $fecha = $fecha;\n $valores = explode('/', $fecha);\n\n if(count($valores)==3){\n if(checkdate($valores[1],$valores[0],$valores[2])){\n return 'true';\n }\n else{\n return 'false';\n }\n }\n else{\n return 'false';\n }\n }", "function is_fecha1_menor($fecha1,$fecha2){\n $dtime1 = strtotime(fecha_mysql($fecha1));\n $dtime2 = strtotime(fecha_mysql($fecha2));\n if($dtime1<$dtime2){\n return true;\n }{\n return false;\n }\n}", "function dataCarnaval($ano=false, $form=\"d/m/Y\") {\n\t$ano=$ano?$ano:date(\"Y\");\n\t$a=explode(\"/\", dataPascoa($ano));\n\treturn date($form, mktime(0,0,0,$a[1],$a[0]-47,$a[2]));\n}", "function comparar_fechas($fecha_inicio, $fecha_fin){\n\t\t$inicio = array();\n\t\t$inicio['anno'] = substr($fecha_inicio, 0, 4);\n\t\t$inicio['mes'] = substr($fecha_inicio, 5, 2);\n\t\t$inicio['dia'] = substr($fecha_inicio, 8, 2);\n\t\t$inicio['hora'] = substr($fecha_inicio, 11, 2);\n\t\t$inicio['min'] = substr($fecha_inicio, 14, 2);\n\t\t$inicio['sec'] = substr($fecha_inicio, 17, 2);\n\t\t\n\t\t$fin = array();\n\t\t$fin['anno'] = substr($fecha_fin, 0, 4);\n\t\t$fin['mes'] = substr($fecha_fin, 5, 2);\n\t\t$fin['dia'] = substr($fecha_fin, 8, 2);\n\t\t$fin['hora'] = substr($fecha_fin, 11, 2);\n\t\t$fin['min'] = substr($fecha_fin, 14, 2);\n\t\t$fin['sec'] = substr($fecha_fin, 17, 2);\n\t\t\n\t\t$diferencia = array();\n\t\t$diferencia['anno'] = $fin['anno'] - $inicio['anno'];\n\t\t$diferencia['mes'] = $fin['mes'] - $inicio['mes'];\n\t\t$diferencia['dia'] = $fin['dia'] - $inicio['dia'];\n\t\t$diferencia['hora'] = $fin['hora'] - $inicio['hora'];\n\t\t$diferencia['min'] = $fin['min'] - $inicio['min'];\n\t\t$diferencia['sec'] = $fin['sec'] - $inicio['sec'];\n\t\t\n\t\tif($diferencia['mes'] < 0){\n\t\t\t$diferencia['mes'] = 12 + $diferencia['mes'];\n\t\t\t$diferencia['anno'] = $diferencia['anno'] - 1;\n\t\t}\n\t\tif($diferencia['dia'] < 0){\n\t\t\t$diferencia['dia'] = 30 + $diferencia['dia'];\n\t\t\t$diferencia['mes'] = $diferencia['mes'] - 1;\n\t\t}\n\t\tif($diferencia['hora'] < 0){\n\t\t\t$diferencia['hora'] = 24 + $diferencia['hora'];\n\t\t\t$diferencia['dia'] = $diferencia['dia'] - 1;\n\t\t}\n\t\tif($diferencia['min'] < 0){\n\t\t\t$diferencia['min'] = 60 + $diferencia['min'];\n\t\t\t$diferencia['hora'] = $diferencia['hora'] - 1;\n\t\t}\n\t\tif($diferencia['sec'] < 0){\n\t\t\t$diferencia['sec'] = 60 + $diferencia['sec'];\n\t\t\t$diferencia['min'] = $diferencia['min'] - 1;\n\t\t}\n\t\t\n\t\tif($diferencia['anno'] > 0){\n\t\t\tif($diferencia['anno'] > 1){\n\t\t\t\t$resultado = $diferencia['anno'].\" años\";\n\t\t\t}else{\n\t\t\t\t$resultado = $diferencia['anno'].\" año\";\n\t\t\t}\n\t\t}\n\t\telse if($diferencia['mes'] > 0){\n\t\t\tif($diferencia['mes'] > 1){\n\t\t\t\t$resultado = $diferencia['mes'].\" meses\";\n\t\t\t}else{\n\t\t\t\t$resultado = $diferencia['mes'].\" mes\";\n\t\t\t}\n\t\t}\n\t\telse if($diferencia['dia'] > 0){\n\t\t\tif($diferencia['dia'] > 1){\n\t\t\t\t$resultado = $diferencia['dia'].\" dias\";\n\t\t\t}else{\n\t\t\t\t$resultado = $diferencia['dia'].\" dia\";\n\t\t\t}\n\t\t}\n\t\telse if($diferencia['hora'] > 0){\n\t\t\tif($diferencia['hora'] > 1){\n\t\t\t\t$resultado = $diferencia['hora'].\" horas\";\n\t\t\t}else{\n\t\t\t\t$resultado = $diferencia['hora'].\" hora\";\n\t\t\t}\n\t\t}\n\t\telse if($diferencia['min'] > 0){\n\t\t\tif($diferencia['min'] > 1){\n\t\t\t\t$resultado = $diferencia['min'].\" mins\";\n\t\t\t}else{\n\t\t\t\t$resultado = $diferencia['min'].\" min\";\n\t\t\t}\n\t\t}\n\t\telse if($diferencia['sec'] > 0){\n\t\t\tif($diferencia['sec'] > 1){\n\t\t\t\t$resultado = $diferencia['sec'].\" secs\";\n\t\t\t}else{\n\t\t\t\t$resultado = $diferencia['sec'].\" sec\";\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$resultado = \"Justo ahora\";\n\t\t}\n\t\t\n\t\treturn $resultado;\n\t}", "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 validacion_fecha($fec){\n \n self::set_fecha($fec); // asignar la fecha\n $partes= explode(\"-\", self::get_fecha()); \n echo \"<br><br>\";\n echo \"Fecha Ingresada <br><br>\";\n print_r($partes);\n $actual = array(date(\"Y\"),date(\"m\"),date(\"d\"));\n echo \"<br><br>\";\n echo \"Fecha actual <br><br>\";\n print_r($actual);\n \n if(self::escritura_valida($partes) && self::fecha_mayor_actual($actual, $partes)) // si es valida la escritura y la fecha es mayor a la actual es correcta la fecha\n {\n return true;\n }\n else{\n return false;\n }\n }", "function FormatDate2($fecha)\n {\n if($fecha!=NULL || $fecha!=\"\"){\n $meses = [\"\", \"Enero\", \"Febrero\", \"Marzo\", \"Abril\", \"Mayo\", \"Junio\", \"Julio\", \"Agosto\", \"Septiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"];\n $dias = [\"\", \"Lunes\", \"Martes\", \"Miercoles\", \"Jueves\", \"Viernes\", \"Sabado\", \"Domingo\"];\n return date(\"j\", strtotime($fecha)) . \" de \" . $meses[date(\"n\", strtotime($fecha))] . \", \" . date(\"Y\", strtotime($fecha));}\n else\n return \"\";\n }", "public function fechaVigencia() // funcion que suma fecha usada para años biciestos\n\t{\n\n\t\t$fecha = $_GET['fecha'];\n\t\t$nuevafecha = strtotime('+365 day', strtotime($fecha));\n\t\t$nuevafecha = date('Y-m-d', $nuevafecha);\n\t\treturn $nuevafecha;\n\t}", "function diasTranscurridos($fecha_inicial, $fecha_final)\n{\n\n $dias = strtotime($fecha_inicial) < strtotime($fecha_final);\n\n return $dias;\n}", "function diffdate($unite, $operateur, $valeur) {\n //$unite : month year day\n // $operateur : + ou -\n // $valeur : nombre\n $datej = date(\"d\", strtotime($operateur . '' . $valeur . ' ' . $unite));\n $datem = date(\"m\", strtotime($operateur . '' . $valeur . ' ' . $unite));\n $datey = date(\"Y\", strtotime($operateur . '' . $valeur . ' ' . $unite));\n return \"$datey-$datem-$datej\";\n}", "function fecha_no_paso($dia,$mes,$anio){\r\n$dia_hoy=date(\"d\");\r\n$mes_hoy=date(\"m\");\r\n$anio_hoy=date(\"Y\");\r\n\r\n$dif_en_meses=(($mes-$mes_hoy)+(12*($anio-$anio_hoy)));\r\n\r\nif($dif_en_meses<0){return(0);}\r\nif(($dif_en_meses==0) && ($dia<$dia_hoy)){return(0);}\r\nreturn(1);\r\n}", "function __validFecha($fecha){\n $test_arr = explode('/', $fecha);\n if (count($test_arr) == 3) {\n if (checkdate($test_arr[1], $test_arr[0], $test_arr[2])) {//MES / DIA / YEAR\n return true;\n }\n return false;\n }\n return false;\n }", "public function dias_del_mes(){\n \n $fecha= date('Y-m-d');\n return; date('t',strtotime($fecha));\n \n}", "function fecha($fecha){\n $timestamp = strtotime($fecha);\n $meses = ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'];\n\n $dia = date('d', $timestamp);\n $mes = date('m', $timestamp) - 1;\n $year = date('Y', $timestamp);\n\n $fecha = \"$dia de \" . $meses[$mes] . \" del $year\";\n return $fecha; \n}", "function comparedate( ) {\n\t$check_in_date = \"2013-12-25\";\n\t$check_out_date = \"2013-12-26\";\n\n\n\t\tif ( $check_in_date > $check_out_date ) {\n\t\t\techo \" check in date is first than check out date\";\n\t\t}else{ \n\t\t\techo \"na bali and check in may na ulahi\";\n\t\t}\n\t}", "public function _fechaRegexEuropeo($fecha) {\n\t\tif (preg_match('/(^(((0[1-9]|1[0-9]|2[0-8])[\\/](0[1-9]|1[012]))|((29|30|31)[\\/](0[13578]|1[02]))|((29|30)[\\/](0[4,6,9]|11)))[\\/](19|[2-9][0-9])\\d\\d$)|(^29[\\/]02[\\/](19|[2-9][0-9])(00|04|08|12|16|20|24|28|32|36|40|44|48|52|56|60|64|68|72|76|80|84|88|92|96)$)\n\t\t\t\t/', $fecha ) )\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function valida_dates($enter_date, $obsolescense_date)\n{\n $day1 = substr($enter_date, 0, 2);\n $month1 = substr($enter_date, 3, 2);\n $year1 = substr($enter_date, 6, 4);\n $day2 = substr($obsolescense_date, 0, 2);\n $month2 = substr($obsolescense_date, 3, 2);\n $year2 = substr($obsolescense_date, 6, 4);\n\n if ($enter_date <= $obsolescense_date) {\n return true;\n }\n\n return false;\n}", "function validar_Fecha()\n {\n $this->resource = 'Actividades';\n $fecha_menor = strtotime(\"2021-01-01 00:00:00\");\n $fecha_mayor = strtotime(\"2050-01-01 00:00:00\");\n $fecha_entrada = strtotime($this->fecha);\n\n if ($this->no_vacio($this->fecha) === false) {\n $this->code = '70027';\n $this->ok = false;\n $this->construct_response();\n return $this->feedback;\n } else if ($this->formato_fecha($this->fecha) === false) {\n $this->code = '70028';\n $this->ok = false;\n $this->construct_response();\n return $this->feedback;\n } else if ($fecha_entrada > $fecha_mayor) {\n $this->code = '70029';\n $this->ok = false;\n $this->construct_response();\n return $this->feedback;\n } else if ($fecha_entrada < $fecha_menor) {\n $this->code = '70030';\n $this->ok = false;\n $this->construct_response();\n return $this->feedback;\n }\n }", "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 restarfechas($inicio, $fin){\n\n $fechauno = strtotime($inicio);\n $fechados = strtotime($fin);\n return $resultado = $fechados - $fechauno;\n\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 fecha_mysql($fecha){\n // toma el primer par de números separados por una barra, deben ser entre 1 y 2\n // después busca el siguiente par de números separados por una barra, pueden ser 1 o 2\n // por ultimo toma los ultimos 4 números, pueden ser 2 o 4\n //ereg( \"([0-9]{1,2})/([0-9]{1,2})/([0-9]{2,4})\", $fecha, $mifecha);\n ereg( \"([0-9]{2})/([0-9]{2})/([0-9]{4})\", $fecha, $mifecha);\n $lafecha=$mifecha[3].\"-\".$mifecha[2].\"-\".$mifecha[1];\n return $lafecha;\n}", "public function validarFecha($texto){\n $valores = explode('-', $texto);\n if(count($valores) == 3 && checkdate($valores[1], $valores[2], $valores[0])){\n return true;\n }\n return false;\n }", "function verifVadsTransDate($dateData) {\n if ( $dateData == \"ERRORDATE\") {\n return '<p style=\"margin-top:1px;\">Erreur verifVadsTransDate()</p>';\n } else {\n return strftime('%d/%m/%Y',strtotime($dateData)); //convert date Us YYYYMMJJ to Fr JJ/MM/YYYY\n }\n }", "function edad($fecha,$char){\n\tlist($Y,$m,$d)=explode($char,$fecha);\n\treturn(date('md')<$m.$d?date('Y')-$Y-1:date('Y')-$Y);\n}", "function edad($fecha,$char){\n\tlist($Y,$m,$d)=explode($char,$fecha);\n\treturn(date('md')<$m.$d?date('Y')-$Y-1:date('Y')-$Y);\n}", "function NUMERO_DE_HIJOS_MAYORES_ESTUDIANDO($_ARGS) {\r\n\t$_PARAMETROS = PARAMETROS();\r\n\t\r\n\tlist($a, $m)=SPLIT( '[/.-]', $_ARGS[\"PERIODO\"]); \r\n\r\n $anio = $a - 18;\r\n\t$fecha18 = \"$anio-$m-01\";\r\n\t\r\n\t $anio = $a - 25;\r\n\t$fecha25 = \"$anio-$m-01\";\r\n\r\n\t$sql = \"SELECT\r\n\t\t\t\t*\r\n\t\t\tFROM\r\n\t\t\t\trh_cargafamiliar\r\n\t\t\tWHERE\r\n\t\t\t\tCodPersona = '\".$_ARGS['TRABAJADOR'].\"' AND\r\n\t\t\t\tParentesco = 'HI' \r\n\t\t\t\tAND\tFechaNacimiento <= '\".$fecha18.\"'\r\n\t\t\t\tAND\tFechaNacimiento >= '\".$fecha25.\"'\r\n\t\t\t\tAND rh_cargafamiliar.Parentesco = 'HI' \r\n\t\t\t\tAND rh_cargafamiliar.FlagEstudia = 'S'\t\r\n\t\t\t\t\";\r\n\t$query = mysql_query($sql) or die ($sql.mysql_error());\r\n\treturn intval(mysql_num_rows($query));\r\n}", "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 faireDate($pDate)\n\t\t\t{\n\t\t\t\t$jour = substr($pDate,8);\n\t\t\t\t$mois = substr($pDate,5);\n\t\t\t\t$annee = substr($pDate,0,4);\n\t\t\t\t$tabMois = array('Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre');\n\t\t\t\t$nvlDate = $jour.\" \".$tabMois[$mois-1].\" \".$annee;\n\t\t\t\treturn $nvlDate;\n\t\t\t}", "function _validarFecha($valor) {\n if (! ($tiempo = strtotime($valor))) return false; \n $d = date('Y-m-d H:i:s', $tiempo);\n $datetime = explode(' ', $d);\n if ('00:00:00' == $datetime[1]){\n return $datetime[0];\n } else {\n return $d;\n }\n }", "function dataCorpusChristi($ano=false, $form=\"d/m/Y\") {\n\t$ano=$ano?$ano:date(\"Y\");\n\t$a=explode(\"/\", dataPascoa($ano));\n\treturn date($form, mktime(0,0,0,$a[1],$a[0]+60,$a[2]));\n}", "function converfecha($fechao){\n\t$cuenta = 0;\n\t$año=substr($fechao,-4,4);\n\t$mes=substr($fechao,-7,2);\n\t$dia=substr($fechao,0,2);\n\t//checa si la fecha recibida es valida\n\t\tif(is_numeric($año)&&is_numeric($mes)&&is_numeric($dia)){$fechac=$año.\"-\".$mes.\"-\".$dia;}else{$fechac=$fechao;}\n\treturn $fechac;\n}", "function toekomst($datum) {\n $vandaagdatum = date(\"Y-m-d\");\n $vandaag = strtotime($vandaagdatum);\n $anderedatum = strtotime($datum);\n return ($vandaag <= $anderedatum);\n}", "function comprobar_fecha_inicio($fecha_entrada,$fecha_salida){\r\n // echo $fecha_salida;\r\n //echo $fecha_actual = strtotime(date(\"d-m-Y H:i:00\",time()));\r\n if( (empty($fecha_entrada))){\r\n return 'Las fechas no pueden estar vacias';\r\n }\r\n}", "function vDate( $date )\r\n\t\t{\r\n\t\t\treturn preg_match('#^([0-9]?[0-9]?[0-9]{2}[- /.](0?[1-9]|1[012])[- /.](0?[1-9]|[12][0-9]|3[01]))*$#', $date);\r\n\t\t\t\r\n\t\t}", "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}", "function fechaInvalida($fecha){\n $valores = explode('-', $fecha);\n if(count($valores) == 3 && checkdate($valores[1], $valores[2], $valores[0])){\n return false;\n }\n return true;\n }", "function fechaPrestacionXLimite($fprestacion, $fprest_limite) {\r\n $pr = ((strtotime($fprest_limite) - strtotime($fprestacion)) / 86400); //limite de la prestacion - fecha prestacion\r\n $ctrl_fechapresta['debito'] = false;\r\n if ($pr < 0) {\r\n\r\n $ctrl_fechapresta['debito'] = true;\r\n $ctrl_fechapresta['id_error'] = 71;\r\n $ctrl_fechapresta['msj_error'] = 'Fecha de Prestacion supera el limite para el periodo liquidado';\r\n }\r\n return $ctrl_fechapresta;\r\n}", "function 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}", "function 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}", "function 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}", "function agenda_date_a_venir($date_test, $date_ref = null) {\n\tif (is_null($date_ref)) {\n\t\t$date_ref = $_SERVER['REQUEST_TIME'];\n\t} else {\n\t\t$date_ref = strtotime($date_ref);\n\t}\n\n\treturn (strtotime($date_test)>$date_ref)?' ':'';\n}", "function fecha_normal($fecha){\n // toma los primeros 4 números separados por un guion, deben ser entre 2 y 4\n // después busca el siguiente par de números separados por un guion, pueden ser 1 o 2\n // por ultimo toma el ultimo par de números, pueden ser 1 o 2\n //ereg( \"([0-9]{2,4})-([0-9]{1,2})-([0-9]{1,2})\", $fecha, $mifecha);\n ereg( \"([0-9]{4})-([0-9]{2})-([0-9]{2})\", $fecha, $mifecha);\n $lafecha=$mifecha[3].\"/\".$mifecha[2].\"/\".$mifecha[1];\n return $lafecha;\n}", "private function _format_date_mysql($fecha) {\n if ($fecha != \"\") {\n $date = explode('-', $fecha);\n if (count($date) === 3) {//valida que vengan los 3 datos separados por / array.length = 3\n if (checkdate($date[1], $date[2], $date[0])) {//mm/d/a\n //int $month , int $day , int $year\n //09/20/2018\n return $date[0] . '-' . $date[1] . '-' . $date[2]; //aa-mm-d\n } else {\n return FALSE;\n }\n } else {\n return FALSE;\n }\n } else {\n return FALSE;\n }\n }", "static function date($value){\n\n\t\t// Verifica se nao veio com a hora junto\n\t\t$arr_value = explode(\" \", $value);\n\t\tif(count($arr_value) === 2){\n\t\t\t$value = $arr_value[0];\n\t\t}\n\n\t\t// Retorna o dia de uma data\n\t\t$date_day = function($date){\n\t\t\t$day = null;\n\t\t\tfor($i = 0; $i < strlen($date); $i++){\n\t\t\t\tif(is_numeric(substr($date, $i, 1))){\n\t\t\t\t\t$day .= substr($date, $i, 1);\n\t\t\t\t}else{\n\t\t\t\t\treturn $day;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $day;\n\t\t};\n\n\t\t// Retorna o mes de uma data\n\t\t$date_month = function($date){\n\t\t\t$month = null;\n\t\t\t$cont = 0;\n\t\t\tfor($i = 0; $i < strlen($date); $i++){\n\t\t\t\tif(is_numeric(substr($date, $i, 1))){\n\t\t\t\t\tif($cont == 1){\n\t\t\t\t\t\t$month .= substr($date, $i, 1);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif($cont > 0){\n\t\t\t\t\t\treturn $month;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$cont++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $month;\n\t\t};\n\n\t\t// Retorna o ano de uma data\n\t\t$date_year = function($date){\n\t\t\t$year = null;\n\t\t\t$cont = 0;\n\t\t\tfor($i = 0; $i < strlen($date); $i++){\n\t\t\t\tif(is_numeric(substr($date, $i, 1))){\n\t\t\t\t\tif($cont == 2){\n\t\t\t\t\t\t$year .= substr($date, $i, 1);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif($cont > 1){\n\t\t\t\t\t\treturn $year;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$cont++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $year;\n\t\t};\n\n\t\t// Verifica se a data informada eh valida\n\t\t$valid_date = function($date) use ($date_day, $date_month, $date_year){\n\t\t\t$day = $date_day($date);\n\t\t\t$month = $date_month($date);\n\t\t\t$year = $date_year($date);\n\t\t\tif(!is_numeric($day) || !is_numeric($month) || !is_numeric($year)){\n\t\t\t\treturn false;\n\t\t\t}elseif($month < 1 || $month > 12){\n\t\t\t\treturn false;\n\t\t\t}elseif(($day < 1) || ($day > 30 && ($month == 4 || $month == 6 || $month == 9 || $month == 11 )) || ($day > 31)){\n\t\t\t\treturn false;\n\t\t\t}elseif($month == 2 && ($day > 29 || ($day > 28 && (floor($year / 4) != $year / 4)))){\n\t\t\t\treturn false;\n\t\t\t}else{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\n\t\tif(substr($value, 4, 1) == \"-\" && substr($value, 7, 1) == \"-\" && strlen($value) == 10){\n\t\t\t$value = implode(\"/\", array_reverse(explode(\"-\", $value)));\n\t\t}\n\t\tif($valid_date($value)){\n\t\t\treturn $date_year($value).\"-\".$date_month($value).\"-\".$date_day($value);\n\t\t}else{\n\t\t\treturn null;\n\t\t}\n\t}", "function validar_datos ($hora_inicio, $hora_fin, $fecha_inicio=null, $fecha_fin=null){\n \n if(!isset($fecha_inicio)){\n return ($hora_inicio < $hora_fin);\n }\n else{\n return (($hora_inicio < $hora_fin) && ($fecha_inicio < $fecha_fin));\n }\n }", "function compareDate($from_date, $to_date) {\r\n $from_date = trim($from_date);\r\n $to_date = trim($to_date);\r\n\r\n if ($from_date == $to_date){\r\n return 3;\r\n }\r\n\r\n $waktu_awal = explode(\"-\",$from_date);\r\n $waktu_akhir = explode(\"-\",$to_date);\r\n if ($waktu_awal[0] > $waktu_akhir[0]){\r\n return 2;\r\n }else if ($waktu_awal[0] == $waktu_akhir[0]){\r\n if ($waktu_awal[1] > $waktu_akhir[1]){\r\n return 2;\r\n }else if ($waktu_awal[1] == $waktu_akhir[1]){\r\n if ($waktu_awal[2] > $waktu_akhir[2]){\r\n return 2;\r\n }\r\n }\r\n }\r\n return 1;\r\n}", "function fecha2largo($fecha) {\n $fecha = split(\"-\", $fecha);\n $dia = $fecha[2];\n $mes = $fecha[1];\n $anyo = $fecha[0];\n return \"$dia de \".strmes($mes).\" de $anyo\";\n}", "function the_date($format = '', $before = '', $after = '', $display = \\true)\n {\n }", "function primer_dia_periodo() {\n\n $sql=\"select fecha_inicio from mocovi_periodo_presupuestario where actual=true\";\n $resul=toba::db('designa')->consultar($sql);\n return $resul[0]['fecha_inicio'];\n \n }", "function explose_date_fr($date)\n\t{\n\t\t$dh = explode(\" \", $date);\n\n\t\t$d = explode(\"-\", $dh[0]);\n\t\t$da['jour'] \t= $d[0];\n\t\t$da['mois'] \t\t= $d[1];\n\t\t$da['annee']\t= $d[2];\n\n\t\tif(isset($dh[1]))\n\t\t{\n\t\t\t$time = explode(\":\", $dh[1]);\n\t\t\t$da['h'] = $time[0];\n\t\t\t$da['m'] = $time[1];\n\t\t\t$da['s'] = $time[2];\n\t\t}\n\t\t\n\t\treturn $da;\n\t}", "function getFecha(){\n\t\t$anio = date(\"Y\");\n\t\t$dia = date(\"j\");\n\t\t$mes = date(\"m\");\n\t\t$fechactual = $anio.\"-\".$mes.\"-\".$dia;\n\t\treturn $fechactual;\n\t}", "private function _consolideDate(){\n\t\t$this->_mktime();\n\t\t$this->_setDate();\n\t}", "function agenda_date_passee($date_test, $date_ref = null) {\n\tif (is_null($date_ref)) {\n\t\t$date_ref = $_SERVER['REQUEST_TIME'];\n\t} else {\n\t\t$date_ref = strtotime($date_ref);\n\t}\n\n\treturn (strtotime($date_test) < $date_ref) ? ' ' : '';\n}", "public function datevs($date) {\n\t\n\t\n\t\n\t\treturn $date;\n\t\n\t}", "function fecha_imp($date, $case){\n\tif($date!='0000-00-00'){\n\t\t$fecha=substr($date, 1, strpos($date, ' ')-1);\n\t\t$hora=substr($date, strpos($date, ' '), strlen($date));\n\t\t$new = explode(\"-\",$fecha);\n\t\t$a=array ($new[2], $new[1], \"2\".$new[0]);\n\t\tif ($case==1){\n\t\t\treturn $n_date=implode(\"-\", $a) . \" Hora: \".$hora;\n\t\t} else {\n\t\t\treturn $n_date=implode(\"-\", $a);\n\t\t}\n\t} else {\n\t\treturn \"Sin fecha\";\n\t}\n}", "function valid_date($sup,$inf='') {\n\tif (!isset($inf) or $inf == 0) {\n\t\t$inf = date('Y-m-d');\n\t}\n\n\t$defaultTimeZone=\"Europe/Paris\";\n\tif (date_default_timezone_get()!=$defaultTimeZone) date_default_timezone_set($defaultTimeZone);\n\t\n\t// DECOUPE DE LA DATE INF\n\t// VERIFIE date complete yyyy-mm-jj hh:mm:ss\n\tif (strpos($inf, \" \")===false) {\n\t\t$tinf = explode (\"-\", $inf);\n\t\t$tinfheure = array(date(\"H\"),date(\"i\"),date(\"s\"));\n\t}else {\n\t\t$z = explode(\" \",$inf);\n\t\t$tinf = explode (\"-\", $z[0]);\n\t\t$tinfheure = explode (\":\", $z[1]);\n\t}\n\n\t// DECOUPE DE LA DATE SUP\n\t// VERIFIE date complete yyyy-mm-jj hh:mm:ss\n\tif (strpos($sup, \" \")===false) {\n\t\t$tsup = explode (\"-\", $sup);\n\t\t$tsupheure = array(date(\"H\"),date(\"i\"),date(\"s\"));\n\t}else {\n\t\t$z = explode(\" \",$sup);\n\t\t$tsup = explode (\"-\", $z[0]);\n\t\t$tsupheure = explode (\":\", $z[1]);\n\t}\n\n\t$nowt = mktime($tinfheure[0],$tinfheure[1],$tinfheure[2], $tinf[1], $tinf[2], $tinf[0]);\n\t$supt = mktime($tsupheure[0],$tsupheure[1],$tsupheure[2], $tsup[1], $tsup[2], $tsup[0]);\n\tif ($supt >= $nowt) {\n\t\treturn 1;\n\t} else {\n\t\treturn 0;\n\t}\t\n}", "public function sanitizarFecha($fecha)\n{\n $date = date_create($fecha);\n return date_format($date,'Y-m-d');\n}", "public function sanitizarFecha($fecha)\n{\n $date = date_create($fecha);\n return date_format($date,'Y-m-d');\n}", "public function sanitizarFecha($fecha)\n{\n $date = date_create($fecha);\n return date_format($date,'Y-m-d');\n}", "public function sanitizarFecha($fecha)\n{\n $date = date_create($fecha);\n return date_format($date,'Y-m-d');\n}", "public function sanitizarFecha($fecha)\n{\n $date = date_create($fecha);\n return date_format($date,'Y-m-d');\n}", "function cambiaf_a_mysql($fecha){ \n\t \tereg( \"([0-9]{1,2})/([0-9]{1,2})/([0-9]{2,4})\", $fecha, $mifecha); \n\t \t$lafecha=$mifecha[3].\"-\".$mifecha[2].\"-\".$mifecha[1]; \n\t \treturn $lafecha; \n\t}", "function fechaES($fecha){\r\n\t\t\t\t $mes = array(\r\n\t\t\t\t 'January' => 'Enero',\r\n\t\t\t\t 'February' => 'Febrero',\r\n\t\t\t\t 'March' => 'Marzo',\r\n\t\t\t\t 'April' => 'Abril',\r\n\t\t\t\t 'May' => 'Mayo',\r\n\t\t\t\t 'June' => 'Junio',\r\n\t\t\t\t 'July' => 'Julio',\r\n\t\t\t\t 'August' => 'Agosto',\r\n\t\t\t\t 'September' => 'Septiembre',\r\n\t\t\t\t 'October' => 'Octubre',\r\n\t\t\t\t 'November' => 'Noviembre',\r\n\t\t\t\t 'December' => 'Diciembre'\r\n\t\t\t\t );\r\n\r\n\t\t\t\t return strtr($fecha, $mes);\r\n\t\t\t\t}", "function orderfecha_bd($fecha){\n\t$dia = substr($fecha,0,2);\n\t$mes = substr($fecha,3,2);\n\t$año = substr($fecha,6,4);\n\t$fecha = $año.'-'.$mes.'-'.$dia;\n\treturn $fecha;\n\t}", "function calculaEdad($fechanacimiento) {\n list($anio, $mes, $dia) = explode(\"-\", $fechanacimiento);\n $anioDiferencia = date(\"Y\") - $anio;\n $mesDiferencia = date(\"m\") - $mes;\n $diaDiferencia = date(\"d\") - $dia;\n\n if ($diaDiferencia < 0 || $mesDiferencia < 0)\n $anioDiferencia--;\n\n return $anioDiferencia;\n }", "function date_modif_manuelle_autoriser() {\n}", "function cambiaf_a_normal($fecha){ \n\t \tereg( \"([0-9]{2,4})-([0-9]{1,2})-([0-9]{1,2})\", $fecha, $mifecha); \n\t \t$lafecha=$mifecha[3].\"/\".$mifecha[2].\"/\".$mifecha[1]; \n\t \treturn $lafecha; \n\t}", "function age($naiss){\n list($y,$m,$d) = explode('-',$naiss);// list créer un tableau\n $diff = date('m') - $m;\n if( $diff < 0 ){\n //le mois de naissance de la personne n'est pas encore le bon, par rapport au mois en cours, donc elle \"perd\" 1an (y++)\n $y++;\n }elseif($diff == 0 && (date('d') - $d < 0)){\n $y++;\n }\n return date('Y') - $y;\n }", "public function testDirecteurValeurDateEmbauche() {\n $directeurATester = new Directeur();\n $dateTemoin = DateTime::createFromFormat(\"d/m/Y\",$this->dateTemoin);\n $directeurATester->setDateEmbauche($this->dateTemoin);\n $this->assertEquals($dateTemoin,$directeurATester->getDateEmbauche());\n }", "public function sanitizarFecha($fecha)\n{\n $date =New DateTime();\n return $fechaPedidoDesde= date_format($date->createFromFormat('d/m/Y',$fecha), 'd/m/Y');\n}", "function cambioFecha($fechax, $departamento){\n\n\t$fecha = substr($fechax,0,10);\n\t$fecha = explode(\"-\", $fecha);\n\t$fecha = $fecha[0].$fecha[1].$fecha[2];\n\t$tieneCeroDiaMes = substr($fecha,6,1);\n\t\n\tif ($tieneCeroDiaMes == 0) {\n\t $diaMes = substr($fecha,7,1);\n\t} else {\n\t $diaMes = substr($fecha,6,2);\n\t}\n\t\n\t$Mes = substr($fecha,4,2);\n\t$Mes = str_replace(\"01\",\"Enero\",$Mes);\n\t$Mes = str_replace(\"02\",\"Febrero\",$Mes);\n\t$Mes = str_replace(\"03\",\"Marzo\",$Mes);\n\t$Mes = str_replace(\"04\",\"Abril\",$Mes);\n\t$Mes = str_replace(\"05\",\"Mayo\",$Mes);\n\t$Mes = str_replace(\"06\",\"Junio\",$Mes);\n\t$Mes = str_replace(\"07\",\"Julio\",$Mes);\n\t$Mes = str_replace(\"08\",\"Agosto\",$Mes);\n\t$Mes = str_replace(\"09\",\"Septiembre\",$Mes);\n\t$Mes = str_replace(\"10\",\"Octubre\",$Mes);\n\t$Mes = str_replace(\"11\",\"Noviembre\",$Mes);\n\t$Mes = str_replace(\"12\",\"Diciembre\",$Mes);\n\t\n\t$Anio = substr($fecha,0,4);\n\t\n\treturn $departamento.\", \".$diaMes.\" de \".$Mes.\" de \".$Anio.\"\";\n}", "function dia_en_entero($anio,$i,$mes){\t\n\t\t\n\t\t\t$fecha= \"$anio/$mes/$i\";\n\t\t\t$l = strtotime($fecha);\n\t\t\t$validar=jddayofweek(cal_to_jd(CAL_GREGORIAN, date(\"m\",$l),date(\"d\",$l), date(\"Y\",$l)) , 0 );\n\t\t\t\t\t\t\t\n\t\t\treturn $validar;\n\t\t}", "function check_report_date(&$liste_option) {\n\tif ($liste_option->verifie_option_existe ( \"ordre_de_sortie[@ajoute_date='oui']\", true ) !== false) {\n\t\t$sortie_date = true;\n\t} else {\n\t\t$sortie_date = false;\n\t}\n\t\n\treturn $sortie_date;\n}", "public function get_between_january_may() {\n $query = \"SELECT nomor, DATE(created_at) AS created_at FROM bpp_history where nomor REGEXP '/(01|02|03|04|05)/2021?' order by substring(nomor, 9, 2) asc\";\n $result = $this->db->query($query);\n return $result;\n }", "function date_compare($a, $b) {\n\t\t $t1 = strtotime($a['debut']);\n\t\t $t2 = strtotime($b['debut']);\n\t\t return $t1 - $t2;\n\t\t}", "public function sanitizarFechaF($fecha)\n{\n $date =New DateTime();\n return $fechaPedidoDesde= date_format($date->createFromFormat('d/m/Y',$fecha), 'd/m/Y');\n \n}", "function fecha_imp($date, $case){\n\t\tif($date!='0000-00-00'){\n\t\t\t$fecha=substr($date, 1, strpos($date, ' ')-1);\n\t\t\t$hora=substr($date, strpos($date, ' '), strlen($date));\n\t\t\t$new = explode(\"-\",$fecha);\n\t\t\t$a=array ($new[2], $new[1], \"2\".$new[0]);\n\t\t\tif ($case==1){\n\t\t\t\treturn $n_date=implode(\"-\", $a) . \" Hora: \".$hora;\n\t\t\t} else {\n\t\t\t\treturn $n_date=implode(\"-\", $a);\n\t\t\t}\n\t\t} else {\n\t\t\treturn \"Sin fecha\";\n\t\t}\n\t}" ]
[ "0.6864199", "0.6661839", "0.6651957", "0.65215904", "0.64997655", "0.6469526", "0.64584357", "0.64488643", "0.64139926", "0.6316203", "0.6313122", "0.6311606", "0.631111", "0.62935126", "0.628975", "0.62737405", "0.62468064", "0.62410116", "0.6230888", "0.6224867", "0.6179941", "0.61720467", "0.6165356", "0.61595905", "0.6125984", "0.6122079", "0.6116802", "0.6115391", "0.61132455", "0.61006373", "0.609654", "0.60727555", "0.6065136", "0.605559", "0.6055298", "0.60426354", "0.6035328", "0.6013699", "0.60042226", "0.5997995", "0.59856164", "0.5983881", "0.59770525", "0.59413373", "0.5935877", "0.59222215", "0.5919347", "0.5919347", "0.5914384", "0.5911905", "0.59026074", "0.5887901", "0.58843076", "0.588189", "0.58760005", "0.58758706", "0.58639413", "0.5858088", "0.58535165", "0.58372706", "0.5829288", "0.5829288", "0.5829288", "0.5825869", "0.58209777", "0.58203036", "0.58188", "0.580772", "0.58055747", "0.58052206", "0.5802226", "0.5788882", "0.5787989", "0.57846713", "0.5782931", "0.5781894", "0.5758744", "0.57407033", "0.5733329", "0.57291055", "0.57291055", "0.57291055", "0.57291055", "0.57291055", "0.57271445", "0.5722926", "0.5722876", "0.5716123", "0.5706832", "0.5702864", "0.57000166", "0.5692214", "0.5691528", "0.5689658", "0.5686487", "0.56833297", "0.56800514", "0.5679096", "0.5678968", "0.56779057" ]
0.58211017
64
This method will serve the properties index page of the admin dashboard it will list all the properties
public function index() { if(Auth::user()->is_admin) { $property = Property::all(); } else { $property = Property::where("user_id", Auth::id())->latest()->get(); } return view("admin.property.index", ["properties" => $property]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n $user_id = Auth::id();\n $properties = Property::where(\"user_id\", $user_id)->get();\n return view(\"admin.properties.index\", compact(\"properties\"));\n }", "public function index() {\n $properties = Property::orderBy('created_at','desc')->orderBy('priority','asc')->where('published', 0)->paginate(9);\n return view('app.properties.index',compact('properties'));\n }", "public function index()\n {\n $properties = Property::orderBy('id', 'DESC')->get();\n return view('admin.properties.index', [\n 'properties' => $properties\n ]);\n }", "public function index()\n {\n $allProperties = Property::getAllActiveProperties([\n 'sellerId' => Auth::id(),\n ]);\n\n return view('property.index', compact(\n 'allProperties'\n ));\n }", "public function index()\n\t{\n\t\t$properties = Property::paginate(10);\n \t\t$this->layout->content = View::make('properties.index',array('properties'=>$properties));\n\t}", "public function index()\n {\n return view('admindashboard.property.index');\n }", "public function index()\n {\n $properties = Property::searchProperties(\\Input::all(),$this->getLimit());\n return $this->respond([\n 'data'=>$this->propertyTransformer->transformCollection($properties->all())\n ]);\n }", "public function index() {\n $properties = Property::all()\n ->sortByDesc('property')\n ->where('deletion_status', 0)\n ->toArray();\n return view('administrator.setting.property.manage_properties', compact('properties'));\n }", "public function index()\n {\n $many_property = Property::orderBy('id', 'asc')->paginate(9);\n return view('dashboard.pages.Property.index')->with(array('many_property' => $many_property));\n }", "public function index()\n {\n $properties = Property::get();\n return view('properties.index', compact('properties'));\n }", "public function index()\n {\n $properties = Property::all();\n return view('properties.index', ['properties' => $properties]);\n }", "public function index()\n {\n\n return Property::paginate(15);\n }", "public function index()\n {\n $properties = Property::orderBy('created_at', 'desc')->paginate(25);\n return new PropertyCollection($properties);\n }", "public function index() {\n\t\t$propertydata = Property::with('Propertystate','Propertycity')->get();\n\t\t$title = $this->generaltitle;\n\t\t//dd($propertydata);\n\t\treturn view('admin.property.propertylisting')->with(compact('propertydata','title',''));\n }", "public function index()\n {\n $data['property'] = Property::getProperty();\n\n return view('property.index')->with($data);\n }", "public function index()\n {\n\n // activity(\"auth\")->log('log_In ' . Auth::user()->name);\n\n // return view('home', compact('properties', 'areas', 'stypes', 'ptypes', 'select_area', 'select_minsize', 'select_maxsize', 'select_ptype', 'select_stype', 'search'));\n return view('manage-properties');\n }", "public function index()\n {\n $propertyList = Http::get('http://ec2-52-14-234-54.us-east-2.compute.amazonaws.com/api/v1/property/getAllApprovedProperty?distance=300&latlng=36.1797013,-115.2306538');\n dd($propertyList);\n return view('client.properties.index');//,compact('propertyList')\n }", "public function index()\n {\n $properties = Property::with('category')->orderBy('order', 'ASC')->paginate(50);\n\n return response()->json([\n 'properties' => $properties\n ]);\n }", "public function index()\n {\n $properties = Property::where('status_id',4)\n ->whereIn('user_id',[1, auth()->user() ? auth()->user()->id : 0])\n ->orderBy('user_id', \"desc\")->get();\n\n return view('front.index', compact('properties'));\n }", "public function index()\n\t{\n\t\t$properties = Property::with('photos')->orderBy('id', 'desc')->paginate(10);\n\n\t\treturn Response::json($properties);\n\t}", "public function properties()\n {\n $properties = Property::where('status_id',1)\n ->whereIn('user_id',[1, auth()->user() ? auth()->user()->id : 0])\n ->orderBy('user_id', \"desc\")->get();\n return view('front.properties', compact('properties'));\n }", "public function index()\n {\n $elementProperties = $this->elementPropertyRepository->paginate(10);\n\n return view('elementProperties.index')\n ->with('elementProperties', $elementProperties);\n }", "public function index()\n {\n if(Gate::denies('view')) {\n return abort('401');\n } \n\n $properties = Property::query();\n\n if(request()->filled('s')){\n $searchTerm = request()->s;\n $properties->where('property_name', 'LIKE', \"%{$searchTerm}%\") \n ->orWhere('property_address', 'LIKE', \"%{$searchTerm}%\")\n ->orWhere('city', 'LIKE', \"%{$searchTerm}%\")\n ->orWhere('state', 'LIKE', \"%{$searchTerm}%\")\n ->orWhere('country', 'LIKE', \"%{$searchTerm}%\")\n ->orWhere('zip_code', 'LIKE', \"%{$searchTerm}%\")\n ->orWhere('notes', 'LIKE', \"%{$searchTerm}%\");\n } \n\n if(request()->filled('p')){\n $p = request()->p;\n $properties->whereHas('proprty_type', function($q) use ($p){\n $q->where('slug', $p);\n });\n } \n \n $propertyTypes = ProprtyType::all(); \n\n $properties = $properties->paginate((new Property())->perPage);\n\n return view('properties.index',compact('properties','propertyTypes'));\n }", "public function properties() : Response\n {\n\n $properties = $this->getDoctrine()\n ->getRepository(Property::class)\n ->findAll();\n\n\n if (!$properties) {\n throw $this->createNotFoundException(\n 'No property has been found'\n );\n }\n\n return $this->render('property/properties.html.twig', [\n 'properties' => $properties\n ]);\n }", "public function index()\n {\n return $this->proponente->paginate($this->limit);\n }", "public function index()\n {\n $propimg = Images::all();\n return view('properties.display',compact('propimg'));\n }", "public function viewproperties() {\n $properties = Properties::all();\n \n return view('Properties.view-properties', compact('properties'));\n }", "public function index()\n {\n return view('administrator.PropertyStatusView.index')->with('propertyStatus',PropertyStatus::all());\n }", "public function index($properties)\n {\n $properties = (array) $properties;\n\n foreach ($properties as $property) {\n $this->addCommand('index', ['property' => $property]);\n }\n }", "public function index()\n {\n $properties = Property::where('id', '!=', 0)->get();\n \n if (count($properties) > 0)\n {\n foreach ($properties as $property)\n {\n if ($property->boss_id > 0) \n {\n $property['boss'] = User::where('id', $property->boss_id)->first();\n }\n }\n }\n \n $tempProperties = TempProperty::where('id', '!=', 0)->get();\n \n if (count($tempProperties) > 0)\n {\n foreach ($tempProperties as $tempProperty)\n {\n if ($tempProperty->temp_user_id > 0) \n {\n $tempProperty['owner'] = TempUser::where('id', $tempProperty->temp_user_id)->first();\n }\n }\n }\n \n return view('property.index')->with([\n 'properties' => $properties,\n 'tempProperties' => $tempProperties\n ]);\n }", "public function index(Request $request)\n {\n \n $properties = Property::paginate(100);\n\n return view('properties.index',[\n 'properties' => $properties,\n ]);\n }", "public function index(Properties $properties)\n {\n return response()->json([\n 'data' => (new PropertyTransformer)->transformCollection($properties->all()->toArray())\n ]);\n }", "public function index()\n {\n if (! Gate::allows('properties_facturas_access')) {\n return abort(401);\n }\n\n if (request('show_deleted') == 1) {\n if (! Gate::allows('properties_facturas_delete')) {\n return abort(401);\n }\n $facturas = PropertiesFacturas::onlyTrashed()->get();\n } else {\n $facturas = PropertiesFacturas::all();\n }\n\n return view('admin.properties_facturas.index', compact('facturas'));\n }", "function admin_index() \r\n {\r\n \t// setting the layout for admin\r\n \t$this->layout = 'admin';\r\n \t$this->Product->recursive = 0;\r\n \t$this->set('products', $this->paginate());\r\n }", "public function index()\n {\n $uid = auth()->user();\n $properties = Property::all()->where('user_id', $uid->id);\n if($uid->role_id == 1)\n {\n $c_property = Property::where('user_id', $uid->id)->first();\n if ($c_property != null)\n {\n $no_t = User::all()->where('linked_property', $c_property->id)->count();\n }\n }\n if($uid->role_id == 2)\n {\n $l_properties = Property::all()->where('property_key', $uid->property_key);\n }\n return view('home', compact('properties', 'l_properties', 'no_t'));\n }", "public function show()\n {\n //\n $user_id = Auth::user()->id;\n $properties = DB::table('properties')->get()->where('user_id',$user_id);\n return view('user.property.allproperties', ['properties' => $properties]);\n }", "public function admin_index()\n {\n $this->Redirect->urlToNamed();\n\n // Sets Search Parameters\n $conditions = $this->getSearchConditions(array(\n array('model' => $this->modelClass, 'field' => \"name\", 'type' => 'string', 'view_field' => 'name'),\n ));\n \n $this->paginate[\"limit\"] = 20;\n $records = $this->paginate($this->modelClass, $conditions);\n \n //setting variables\n $this->set(compact('records')); \n }", "public function index()\n {\n $propertyCategory=DB::table('property_categories')\n ->join('property_types','property_categories.propertytype_id','property_types.id')\n ->select('property_categories.id','property_categories.property_category','property_types.property_name','property_categories.status')\n ->get();\n $propertytype=DB::table('property_types')->where(['status'=>1])->get();\n return view('admin.property_category',compact('propertyCategory','propertytype'));\n }", "public function index() {\r\n $this->logger->info(\"Action Index \");\r\n $this->template->display('listsettings');\r\n }", "public function index()\n {\n $properties = Property::with('propertytype','owner')->paginate(25);\n $sale_properties = Property::with('propertytype')->with('images')->where('catagery', 'for sale')->orderBy('updated_at', 'desc')->count();\n $rent_properties = Property::with('propertytype')->with('images')->where('catagery', 'for let')->orderBy('updated_at', 'desc')->count();\n $sold_properties = Property::with('propertytype')->with('images')->where('catagery', 'for sale')->where('is_sold', 1)->orderBy('updated_at', 'desc')->count();\n $let_properties = Property::with('propertytype')->with('images')->where('catagery', 'for let')->where('is_let', 1)->orderBy('updated_at', 'desc')->count();\n $shared_properties = Property::with('propertytype')->with('images')->where('catagery', 'for shared')->where('is_let', 1)->orderBy('updated_at', 'desc')->count();\n\n $let_properties = $let_properties + $shared_properties;\n //dd($sale_properties);\n return view('properties.index', compact('properties', 'sale_properties', 'rent_properties', 'sold_properties', 'let_properties'));\n }", "public function list()\n {\n $properties = Properties::all();\n\n foreach ($properties as $key => $property) {\n $property->connection_error = true;\n\n $heartbeat = new DateTime($property->device->heartbeat);\n $interval = $heartbeat->diff(new DateTime());\n $totalSeconds = ($interval->format('%h') * 60 + $interval->format('%i'));\n\n if ($totalSeconds < $property->device->sleep) {\n $property->connection_error = false;\n }\n\n $property->connection_ago = Carbon::parse($heartbeat, 'Europe/Prague')->diffForHumans();\n }\n\n return view('properties.list', [\"properties\" => $properties]);\n }", "public function index(Request $request) {\n $order = $request->order;\n return QueryBuilder::for(Property::class)\n ->select(\"properties.*\")\n ->orderBy('owner_email', $order)\n ->paginate(15);\n }", "public function index()\n {\n $settings = Setting::orderBy('name')->paginate(8);\n return Inertia::render('Settings/Index', [\n 'settings' => $settings,\n ]);\n }", "public function index()\n {\n return ProdutoResource::collection(Produto::paginate(25));\n }", "public function get_index()\n\t{\n\t\t// Get available languages\n\t\t$languages = array();\n\n\t\t$language = new Language();\n\t\t$cur = $language->find();\n\t\t\n\t\tif($cur->hasNext() === true)\n\t\t{\n\t\t\tforeach($cur as $obj)\n\t\t\t{\n\t\t\t\t$languages[] = $obj;\n\t\t\t}\n\t\t}\n\n\t\t// Get all settings\n\t\t$setting = new Setting();\n\t\t$settings = array();\n\t\t$cur = $setting->find();\n\t\tif($cur->hasNext() === true)\n\t\t{\n\t\t\tforeach($cur as $obj)\n\t\t\t{\n\t\t\t\t$settings[$obj['_id']] = $obj['value'];\n\t\t\t}\n\t\t}\n\n\t\t$this->layout->nest('content', 'admin.setting', array(\n\t\t\t'languages' => $languages,\n\t\t\t'settings' => $settings\n\t\t));\n\t}", "public function index()\n {\n\n if (request('show_deleted') == 1) {\n if (! Gate::allows('property_delete')) {\n return abort(401);\n }\n $tenants = User::whereIn('property_id', Property::where('user_id', auth()->user()->id)->pluck('id'))->onlyTrashed()->get();\n } else {\n\n $tenants = User::whereIn('property_id', Property::where('user_id', auth()->user()->id)->pluck('id'))->get();\n }\n\n return view('admin.tenants.index', compact('tenants'));\n }", "public function index(int $page = 1)\n {\n $client = new \\GuzzleHttp\\Client();\n $client->setDefaultOption('verify', false);\n $response = $client->get(env('MTC_API_URL') . \"properties?api_key=\" . env('MTC_API_KEY'));\n\n if($response->getStatusCode() !== 200){\n throw new \\Exception('Api request error');\n }\n\n $properties = $response->getBody();\n\n return view('properties.index', compact('properties'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "function index($propertyid=false)\n\t{\n\t\t\n\t\tif(!empty($propertyid))\n\t\t\t{\n\t\t\t\t$this->data['countdata']=0;\n\t\t\t\t$this->data['propertyid']=$propertyid;\n\t\t\t\t$filter=array('propertyID'=>$propertyid);\n\t\t\t\t$propertytabledetails=$this->AddProperty_model->Shownpreview($propertyid);\n\t\t\t\t\n\t\t\t\tif(!empty($propertytabledetails))\n\t\t\t\t{\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyPurpose))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['purpose']=$propertytabledetails[0]->propertyPurpose;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->projectID))\n\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->data['under']=\"1\";\n\t\t\t\t\t\t\t\t$this->data['projectid']=$propertytabledetails[0]->projectID;\n\t\t\t\t\t}else\n\t\t\t\t\t{ \n\t\t\t\t\t\t\t\t$this->data['under']=\"2\"; \n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyTypeID))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertytypeid']=$propertytabledetails[0]->propertyTypeID;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyName))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertyname']=$propertytabledetails[0]->propertyName;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyStatus))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertystatus']=$propertytabledetails[0]->propertyStatus;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyAddedDate))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertydate']=$propertytabledetails[0]->propertyAddedDate;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->userID))\n\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->data['userID']=$userID=$propertytabledetails[0]->userID;\n\t\t\t\t\t\t\t\t$userdetails=$this->AddProperty_model->getuserforpreview($userID);\n\t\t\t\t\t\t\t\tif(!empty($userdetails)){\n\t\t\t\t\t\t\t\t$this->data['usertypeid']=$usertypeid=$userdetails[0]->userTypeID;\n\t\t\t\t\t\t\t\t$usertypedetails=$this->AddProperty_model->get_user_type(\" and rp_user_types.userTypeID=$usertypeid\");\n\t\t\t\t\t\t\t\t$this->data['useremail']=$userdetails[0]->userEmail;\n\t\t\t\t\t\t\t\t$this->data['usertype']=$usertypedetails[0]->userTypeName;}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$getpropertyprice=$this->AddProperty_model->Getotherdata('rp_property_price',$filter);\n\t\t\t\t\tif(!empty($getpropertyprice[0]->propertyPrice))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertyprice']=$getpropertyprice[0]->propertyPrice;}else{$propertyprice=\"Not Mentioned\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->isNegotiable))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['isNegotiable']=$propertytabledetails[0]->isNegotiable;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyStatus))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertyStatus']=$propertytabledetails[0]->propertyStatus;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyDescription))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertyDescription']=$propertytabledetails[0]->propertyDescription;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyLatitude))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertyLatitude']=$propertytabledetails[0]->propertyLatitude;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyLongitude))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertyLongitude']=$propertytabledetails[0]->propertyLongitude;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyZipCode))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertyZipCode']=$propertytabledetails[0]->propertyZipCode;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyLocality))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertyLocality']=$propertytabledetails[0]->propertyLocality;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyAddress1))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertyAddress1']=$propertytabledetails[0]->propertyAddress1;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyAddress2))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertyAddress2']=$propertytabledetails[0]->propertyAddress2;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyMetaTitle))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertyMetaTitle']=$propertytabledetails[0]->propertyMetaTitle;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyMetaKeyword))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertyMetaKeyword']=$propertytabledetails[0]->propertyMetaKeyword;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyMetaDescription))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertyMetaDescription']=$propertytabledetails[0]->propertyMetaDescription;\n\t\t\t\t\t}\n\t\t\t\t\tif(!empty($propertytabledetails[0]->countryID)){$filter=array('countryID'=>$propertytabledetails[0]->countryID,'languageID'=>'1');$key='countryName';$countryname=$this->AddProperty_model->getcountryname('rp_country_details',$filter,$key);$this->data['countryname']=$countryname[0]->countryName;}\n\t\t\t\t\tif(!empty($propertytabledetails[0]->stateID)){ $filter1=array('stateID'=>$propertytabledetails[0]->stateID,'languageID'=>'1');$key='stateName';$statename=$this->AddProperty_model->getcountryname('rp_state_details',$filter1,$key); $this->data['statename']=$statename[0]->stateName;}\n\t\t\t\t\tif(!empty($propertytabledetails[0]->cityID)){ $filter2=array('cityID'=>$propertytabledetails[0]->cityID,'languageID'=>'1');$key='cityName';$cityname=$this->AddProperty_model->getcountryname('rp_city_details',$filter2,$key); $this->data['cityname']=$cityname[0]->cityName;}\n\t\t\t\t\t\n\t\t\t\t\t$this->data['propertyimages']=$this->AddProperty_model->Getpropertyimages($propertyid);\n\t\t\t\t\t\n\t\t\t\t\t$this->data['coveredarea']=$this->AddProperty_model->Shownoofbedrooms('rp_property_attribute_values',array('propertyID'=>$propertyid,'attributeID'=>94));\n\t\t\t\t\t$this->data['plotarea']=$this->AddProperty_model->Shownoofbedrooms('rp_property_attribute_values',array('propertyID'=>$propertyid,'attributeID'=>2));\n\t\t\t\t\t$this->data['carpetarea']=$this->AddProperty_model->Shownoofbedrooms('rp_property_attribute_values',array('propertyID'=>$propertyid,'attributeID'=>67));\n \n // print_r($this->data['propertyimages']);die;\n\t\t\t\t\t\n\t\t\t\t\t/*$getamenities=$this->AddProperty_model->Getotherdata('rp_property_attribute_values',array('propertyID'=>$this->input->post('propertyid'),'attributeID'=>6,'attrOptionID'=>$Attributeoptions->attrOptionID));\n \n\t\t\t\t\tif(!empty($getamenities)){echo\"<p>YES </p>\";}else{echo\"<p>NO</p>\";}\n \n /* $getroomdetails=$this->AddProperty_model->Getotherdatafromnewdb('rp_dbho_bed_room',array('propertyID'=>$this->input->post('propertyid')));\n \n\t\t\t\t\t\t if(in_array(\"AC\", $bedothers)){ $ac=\"YES\";}else{$ac=\"NO\";}*/\n \n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t}\n\n\t\n\t\t$this->data['projects']=$this->AddProperty_model->get_project();\n\t\t$this->data['propertytype']=$this->AddProperty_model->getPropertyType();\n\t\t$this->data['user_type']=$this->AddProperty_model->get_user_type();\n\t\t$this->parser->parse('header',$this->data);\n\t\t$this->load->view('addproperty',$this->data);\n\t\t$this->parser->parse('footer',$this->data);\n\t\t\n\t}", "public function index()\n {\n $admins = Admin::paginate(5);\n return AdminResourceCollection::collection($admins);\n }", "public function actionIndex()\n {\n //$properties = Product::findOne($id)->getProperties();\n $catalogId = Yii::$app->request->get('catalogId');\n $catalog = $this->findCatalog($catalogId);\n $dataProvider = new ActiveDataProvider([\n 'query' => $catalog->getElementsFind()->orderBy('title'),\n ]);\n return $this->render('index', [\n 'catalogId' => $catalogId,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function admin_index()\n\t{\n\t\t$this->paginate['Role']['order'] = 'Role.id Desc';\n\t\t$this->set('roles', $this->paginate('Role'));\n\t}", "public function getProperties($index);", "function admin_index() {\n\n\t\t$this->Subdomain->recursive = 0;\n\n\t\t/**\n\t\t * Put all subdomains in \"subdomains\".\n\t\t * $subdomains will be available in the view.\n\t\t */\n\t\t$this->set('subdomains', $this->paginate());\n\n\t}", "public function action_index($results = FALSE)\n\t{\n\t\t$page = (isset($_GET['page'])) ? (int) $_GET['page'] : 1;\n\t\t$sort = (isset($_GET['s'])) ? $_GET['s'] : FALSE;\n\t\t$order = (isset($_GET['o'])) ? $_GET['o'] : FALSE;\n\t\t$user_id = (isset($_GET['u'])) ? (int) $_GET['u'] : FALSE;\n\t\t($user_id > 0) or $user_id = FALSE;\n\n\t\t// make sure agents see only their properties\n\t\tif ( ! in_array('admin', Session::instance()->get('user_roles')))\n\t\t{\n\t\t\t$user_id = Auth::instance()->get_user()->id;\n\t\t}\n\n\t\t// get search values from querystring\n\t\t$post = $_GET;\n\t\t$post['type_id'] = (isset($_GET['t']) AND ! empty($_GET['t'])) ? (int) $_GET['t'] : FALSE;\n\t\t$post['city_id'] = (isset($_GET['c']) AND ! empty($_GET['c'])) ? (int) $_GET['c'] : FALSE;\n\t\t$post['pmin'] = (isset($_GET['pmin']) AND ! empty($_GET['pmin'])) ? (int) $_GET['pmin'] : FALSE;\n\t\t$post['pmax'] = (isset($_GET['pmax']) AND ! empty($_GET['pmax'])) ? (int) $_GET['pmax'] : FALSE;\n\n\t\tif ( ! $results) {\n\t\t\t$content = &$this->template->content;\n\t\t\t$content = new View('admin/property/read');\n\t\t\t$content->title = 'Property management';\n\t\t} else {\n\t\t\t$this->template->content->post = $post;\n\t\t\t$content = &$this->template->content->results;\n\t\t}\n\t\t$content->data = Model_Property::get_list(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray('properties.created_by_id', '=', $user_id),\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray('type_id', '=', $post['type_id']),\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray('city_id', '=', $post['city_id']),\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray('price1', '>=', $post['pmin']),\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray('price1', '<=', $post['pmax']),\n\t\t\t\t\t\t\t\t\t\t\t\t), $page, $sort, $order);\n\t}", "function admin_index()\n {\n $perPage = 100;\n $this->lordModel('Post');\n $condition = array('type' => 'post');\n $d['posts'] = $this->Post->find(array(\n 'condition' => $condition,\n 'limit' => ($perPage * ($this->request->page - 1)) . ',' . $perPage\n ));\n $d['total'] = $this->Post->findCount($condition);\n $d['nbrPage'] = ceil($d['total'] / $perPage);\n //print_r($d);\n $this->setvars($d);\n //$this->setvars('phrase', 'bienvenue sur ma page');\n //$this->render('view');\n }", "public function index()\n\t{\n\t $properties = Propiedad::all();\t \n\t\treturn Response::json($properties->toArray(), 200);\t\t\t\n\t}", "public function index()\n {\n $this->View->render('admin/index', array(\n 'users' => UserModel::getPublicProfilesOfAllUsers())\n );\n }", "function adminIndex(){\r\n\t\t$data = $this->paginate('AdminBooking');\r\n\t\t$this->set(compact('data'));\r\n\t}", "public function index() {\n\n\t\t//return $this->_listAll();\n\t\t// sets 'productions' to whatever the _listAll() method returns\n\t\t$this->set('productions', $this->_fetchAll());\n\n\t}", "public function index()\n {\n //\n return ProductoResource::collection(Producto::paginate(15));\n }", "public function admin_index() {\n\t\t$this->Paginator->settings = array(\n\t\t\t'contain' => array(\n\t\t\t\t'User',\n\t\t\t\t'ShopShippingMethod',\n\t\t\t\t'ShopPaymentMethod',\n\t\t\t)\n\t\t);\n\n\t\t$shopLists = $this->Paginator->paginate(null, $this->Filter->filter);\n\n\t\t$filterOptions = $this->Filter->filterOptions;\n\t\t$filterOptions['fields'] = array(\n\t\t\t'name',\n\t\t);\n\n\t\t$this->set(compact('shopLists', 'filterOptions'));\n\t}", "public function index()\n {\n $admin = Admin::simplePaginate(25);\n \n return new AdminResourceCollection($admin);\n }", "public function index($id)\n\t{\n\t\t//id de la propiedad\n\t\t$property = $id;\n\n\t\t//usuario\n\t\t$user_id = Auth::user()->id;\n\t\t$user_role = User::findOrfail($user_id);\n\n\t\t//amenities\n\t\t$amenities = Amenity::where('property_id', '=', $property)\n\t\t\t->paginate(5);\n\t\treturn view('admin.properties.characteristics.index',compact('user_role','property', 'amenities'));\n\t}", "function admin_index(){\r\n\t $this->__requireRole(ROLE_TUTOR);\r\n//\t $this->Scenariosetup->bindModel(array('hasOne' => array('Player')));\r\n\t $this->set('scenariosetups', $this->Scenariosetup->findAll());\r\n\t $this->set('usedParametersets', $this->UsedParameterset->findAll());\r\n\t $this->render();\r\n\t}", "public function index() {\n\n\t\t$this->Crud->addListener('SettingsSubSection', 'SettingsSubSection');\n\n\t\t$this->set('title_for_layout', __('Visualisation Settings'));\n\t\t$this->set('subtitle_for_layout', __('Use visualisations to control what is displayed to the logged user. By default they are enabled, meaning users will only see items that relate to them.'));\n\t\t\n\t\t$this->Crud->on('beforePaginate', array($this, '_beforePaginate'));\n\t\t$this->Crud->execute();\n\t}", "function admin_index(){\n\n\t\t\tif(!isset($this->params['named']['page'])){\n\t\t\t\t$this->Session->delete('AdminSearch');\n\t\t\t}\n\n\t\t\t$filters = array(); \n\t\t\tif(!empty($this->data)){\n\n\t\t\t\t$this->Session->delete('AdminSearch');\n\t\t\t\tif(!empty($this->data['EmailTemplate']['name'])){\n\t\t\t\t\tApp::import('Sanitize');\n\t\t\t\t\t$keyword = Sanitize::escape($this->data['EmailTemplate']['name']);\n\t\t\t\t\t$this->Session->write('AdminSearch', $keyword);\t\t\t\t\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\n\t\t\tif($this->Session->check('AdminSearch')){\t\t\n\t\t\t\t$filters[] = array('EmailTemplate.name LIKE'=>\"%\".$this->Session->read('AdminSearch').\"%\");\t\t\t\t\t\n\t\t\t}\n\n\t\t\t$this->paginate['EmailTemplate'] = array(\n\t\t\t\t\t'limit'=>Configure::read('App.AdminPageLimit'), \n\t\t\t\t\t'order'=>array('EmailTemplate.created'=>'ASC'),\n\t\t\t\t\t'conditions'=>$filters\n\t\t\t\t);\n\n\t\t\t$data = $this->paginate('EmailTemplate'); \t\t\n\t\t\t$this->set(compact('data'));\t \n\t\t\t$this->set('title_for_layout', __('Email Template', true));\t\n\t\t}", "public function getIndex()\n {\n $attributes = $this->attribute->findAll();\n\n $this->view('admin.attribute.list', compact('attributes'));\n }", "public function index(Request $request)\n {\n if(!\\Auth::user()->can('property.view')) {\n return view('backend.partial.no-permission', ['title' => 'No-permission']);\n }\n\n $limit = $request->get('limit', 10);\n $properties = [];\n $districts = [];\n $communes = [];\n\n $staffs = Staff::whereIn('type', [3,1,4])->get();\n\n if(!\\Auth::user()->hasRole('administrator') && \\Auth::user()->isOffice()) {\n $staffObj = \\Auth::user()->staff;\n /*\n * Get properties in office\n */\n if (!empty($staffObj->office)) {\n if($staffObj->office->properties()->count()) {\n $properties = $staffObj->office->properties();//->orderBy(\"id\", \"desc\")->paginate($limit);\n }\n\n /*\n * Get properties in staff\n */\n } \n elseif (!empty($staffObj->properties) && count($staffObj->properties) > 0) {\n $properties = $staffObj->properties();//->orderBy(\"id\", \"desc\")->paginate($limit);\n }\n }\n\n /*\n * Get all properties\n */\n if(\\Auth::user()->isAdministrator()) {\n $properties = $this->propertyRepo->model();//->orderBy(\"id\", \"desc\")->paginate($limit);\n }\n\n /*\n * Get properties for user role type cellector [Statue pending]\n */\n if (!\\Auth::user()->hasRole('administrator') && \\Auth::user()->isCollector()) {\n $properties = $properties->where('status', 0);//->orderBy(\"id\", \"desc\")->paginate($limit);\n }\n\n $search_txt = $request->q;\n if(!empty($search_txt)) {\n $properties = $properties->where(function ($query) use($search_txt) {\n return $query->orWhere(\"code\", \"LIKE\", \"%{$search_txt}%\");\n });\n }\n\n // dd($request->all());\n if($request->province != null) {\n $properties = $properties->where('province_id', $request->province);\n $districts = $this->districtRepo->lists()->where('province_id', $request->province)->pluck('title', 'id')->toArray();\n }\n if($request->district != null) {\n $properties = $properties->where('district_id', $request->district);\n\n $communes = $this->communeRepo->lists()->where('district_id', $request->district)->pluck('title', 'id')->toArray();\n }\n if($request->commune != null) {\n $properties = $properties->where('commune_id', $request->commune);\n }\n if($request->type != null) {\n $properties = $properties->where('listing_type', $request->type);\n }\n if($request->property_type != null) {\n $properties = $properties->where('property_type_id', $request->property_type);\n }\n if($request->status != null) {\n $properties = $properties->where('status', $request->status);\n }\n $properties = $properties->orderBy(\"id\", \"desc\")->paginate($limit);\n\n $agents = Staff::where(\"type\", \\Constants::ROLE_KEY_AGENT)\n ->with(\"user\", \"property_link\")\n ->orderBy(\"id\", \"DESC\")\n ->get();\n $agents = json_decode($agents);\n $provinces = $this->provinceRepo->lists()->pluck('title', 'id')->toArray();\n $property_types = PropertyType::get();\n\n $status = [ \"Pending\", \"Submitted\", \"Reviewed\", \"Published\", \"Solved\", \"Deposit\", \"Unpublished\" ];\n $colors = [ \"#fd397a\", \"#17a2b8\", \"#5867dd\", \"#0abb87\", \"#545b62\", \"#fd397a\", \"#5867dd\" ];\n $propertiesCount = Property::groupBy('status')->get(['status', DB::raw(\"COUNT(id) AS total\")])->map(function($property) use($status, $colors) {\n return [\n 'label' => __($status[$property->status]),\n 'value' => $property->total,\n 'color' => $colors[$property->status]\n ];\n });\n\n $total_properties = [\n 'data' => $propertiesCount,\n 'total' => $propertiesCount->sum('value'),\n ];\n\n $requestQuery = collect($request)->map(function($items) {\n $items = ($items==null) ? '' : $items;\n return $items;\n })->all();\n\n return view('backend.property.index', compact('properties', \"agents\", \"property_types\", \"provinces\", \"districts\", \"communes\", \"total_properties\", \"requestQuery\", \"staffs\"));\n }", "public function index(Request $request)\n\t{\n\t\t$query = $request->get('q');\n\t\t// check if query is not empty\n\t\tif($query){\n\t\t\t$properties = Property::where('title', 'LIKE', \"%$query%\")->get();\n\t\t}\n\t\t// Otherwise, get all available properties\n\t\telse{\n\t\t\t$properties = Property::orderBy('created_at', 'desc')->where('available', '1')->get();\n\t\t}\n\t\treturn view('pages.index')->with(['properties' => $properties]);\n\t\t// return view('bootstrap4.pages.index')->with(['properties' => $properties]);\n\t}", "public function index()\n {\n $number_of_items = $this->calculate->getTotalOfItemsAdmin();\n if (null != $this->request->ifParameter(\"id\")) {\n $items_current_page = $this->request->getParameter(\"id\");\n } else {\n $items_current_page = 1;\n }\n $items = $this->item->getItemsForAdmin($items_current_page);\n $page_previous_items = $items_current_page - 1;\n $page_next_items = $items_current_page + 1;\n $number_of_items_pages = $this->calculate->getNumberOfPagesOfExtAdmin();\n $this->generateadminView(array(\n 'items' => $items,\n 'number_of_items' => $number_of_items,\n 'items_current_page' => $items_current_page,\n 'page_previous_items' => $page_previous_items,\n 'page_next_items' => $page_next_items,\n 'number_of_items_pages' => $number_of_items_pages\n ));\n }", "public function index()\n {\n $data = [\n 'property' => [\n 'template' => 'extracurricular',\n 'title' => 'Ekstrakurikuler',\n 'menu' => $this->menu->read(),\n ],\n 'data' => $this->extracurricular->read(),\n ];\n\n $this->load->view('template', $data);\n }", "public function index()\n {\n $users = DB::table('users')->count();\n $tables = DB::table('rest_tables_conts')->count();\n $requests = DB::table('rest_requests')->count();\n $adminSettings = DB::table('settings')->get();\n\n return view('adminpanel::admin.index')->with([\n 'settings' => $adminSettings,\n 'users' => $users,\n 'requests' => $requests,\n 'tables' => $tables,\n ]);\n }", "public function index()\n {\n $this->isAdmin();\n\n if (Session::get('admin-success')) {\n\n $this->data['success'] = Session::get('admin-success');\n Session::delete('admin-success');\n }\n\n if (Session::get('admin-warning')) {\n\n $this->data['warning'] = Session::get('admin-warning');\n Session::delete('admin-warning');\n }\n\n $productModel = new ProductModel();\n\n $products = $productModel->getEntityByDate();\n\n $this->data['productsInfo'] = $products;\n\n $this->adminRender('index');\n }", "public function adminIndex()\n {\n $config['list'] = VRPages::get()->toArray();\n $config['pageTitle'] = trans('app.pages');\n $config['route'] = route('app.pages.create');\n\n $config['edit'] = 'app.pages.edit';\n $config['delete'] = 'app.pages.delete';\n//dd($config);\n return view('admin.list', $config);\n }", "public function admin_index() {\r\n\t\t$this->data = $this->{$this->modelClass}->find('all');\r\n }", "public function admin_index() {\n\t\t$this->layout=\"admindefault\";\n\t\t$this->adminsessionchecked();\n\t\t$this->User->recursive = 0;\n\t\t$this->Paginator->settings=array(\n\t\t\t'conditions'=>array(\n\t\t\t\t'User.is_deleted'=>'0'\n\t\t\t)\n\t\t);\n\t\t$this->set('users', $this->Paginator->paginate());\n\t\t//$this->set('allowedimage',$this->allowedimageType);\n\t}", "public function admin_index() {\n $this->paginate = array(\n 'limit' => 10,\n 'order' => array(\n 'User.username' => 'asc',\n ) ,\n 'conditions' => array(\n 'User.status' => 1,\n ),\n );\n $users = $this->paginate('User');\n $this->set(compact('users'));\n }", "public function admin_index() {\r\n \r\n $sucursales = $this->Sucursal->find(\"all\");\r\n $this->set(compact('sucursales'));\r\n \r\n }", "public function index()\n {\n $adminmenulist = AdminMenu::with('adminMenuTitleName')->orderBy('adminMenuId','desc')->paginate(20);\n return ['adminmenulist' => $adminmenulist];\n }", "public function index()\n {\n\n $properties = Property::whereIn('properties.id', function($query)\n {\n $query->select('users_favourites.prop_id')\n ->from('users_favourites')\n ->whereRaw('users_favourites.user_id = ' . Sentry::getUser()->id);\n })->get();\n\n return View::make('property.favourites.index', compact('properties'));\n \n }", "public function index()\n {\n return ProductResource::collection(Product::paginate(15));\n }", "public function index() {\n\t\t//Get Products\n\t\t$data['products'] = $this->Product_model->get_products();\n\t\t\n\t\t//Get Categories\n\t\t$data['categories'] = $this->Settings_model->get_categories();\n\t\t\n\t\t//Get Contact\n\t\t$data['contact'] = $this->Settings_model->get_contact_data('id', 'ASC', 10);\n\t\t\n\t\t//Get Admins\n\t\t$data['admins'] = $this->Settings_model->get_admins('id', 'DESC', 10);\n\t\t\n\t\t//Get Home\n\t\t$data['home'] = $this->Settings_model->get_home('id', 'DESC', 10);\n\t\t\n\t\t//Get About\n\t\t$data['about'] = $this->Settings_model->get_about('id', 'DESC', 10);\n\t\t\n\t\t//Load View\n\t\t$data['main_content'] = 'admin/dashboard/index';\n\t\t$this->load->view('admin/layouts/main', $data);\n\t}", "public function index()\n {\n if (Auth::guest() || (!Auth::guest() && Auth::user()->role != 0)) {\n $categories = Category::all();\n $types = PropertyType::all();\n $properties = Property::where('accepted', '=', 1)->orderBy('updated_at')->take(6)->get();\n /*$properties = Property::all();where('accepted', '=', 1);*/\n /*\n $properties->images = PropertyImage::all()->where('propertyId' , $properties->id)->take(1);\n */\n foreach ($properties as $property) {\n $property->images = PropertyImage::all()->where('propertyId', $property->id)->take(1);\n }\n\n\n return view('welcome')->with('properties', $properties)->with('categories', $categories)->with('types', $types);\n\n } else {\n if (!Auth::guest()) {\n if (Auth::user()->role == 0) {\n $allProperties = Property::all();\n $allCommercials = commercial::all();\n $allUsers = User::all();\n $allPayments = Payment::where('status', '!=', 'pending')->get();\n $allEarnings = $allPayments->where('created_at', '>=', new DateTime('today'));\n $notAcceptedProperties = Property::where('accepted', '=', 0)->get();\n $recentUsers = User::where('created_at', '>=', new DateTime('today'))->get();\n $notAcceptedCommercials = commercial::where('accepted', '=', 0)->get();\n\n return view(\"welcome\", compact('notAcceptedProperties', 'recentUsers', 'notAcceptedCommercials', 'allProperties', 'allCommercials', 'allUsers', 'allPayments', 'allEarnings'));\n }\n }\n }\n return view('welcome');\n }", "public function show(Property $property)\n {\n //\n }", "public function show(Property $property)\n {\n //\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function adminIndexAction()\r\n {\r\n $pages=$this->getDoctrine()->getRepository(\"AppBundle:Page\")->findAll();\r\n $view=array('pages' => $pages,\r\n );\r\n return $this->render('page/adminIndex.html.twig', $view);\r\n }", "public function index() {\n\n\n if (request('show_deleted') == 1) {\n if (!Gate::allows('testimonials_delete')) {\n return abort(401);\n }\n $testimonials = Testimonials::onlyTrashed()->get();\n } else {\n $testimonials = DB::table('testimonials')->get();\n }\n\n return view('admin.settings.index', compact('settings'));\n }", "public function index()\n {\n $result = admin::paginate(10);\n return response()->json($result);\n }", "public function it_returns_list_of_properties()\n {\n $this->properties->setBaseUrl($this->url);\n\n $this->properties->login();\n\n $this->assertJson($this->properties->get());\n }", "public function adminIndex ()\n {\n $config = [\n 'title' => trans('Rivile::rivile_payments.page_title'),\n 'listURL' => route('admin.api.routes.rivile.payments'),\n 'newFormUrl' => route('admin.api.form-manager', ['rivile-payments-new']),\n 'editFormUrl' => route('admin.api.form-manager', ['rivile-payments-edit']),\n 'imagesUrl' => route('resource.get', ['/']),\n 'headers' => $this->getAdminListHeader(),\n ];\n\n $config['actions'][] = 'search';\n $config['filters'] = $this->getFilters();\n\n return hcview('HCCoreUI::admin.content.list', ['config' => $config]);\n }", "public function index()\r\n {\r\n $this->page_list_grid();\r\n }", "public function index()\n {\n //\n return DetalleProporcionPaciente::all();\n }", "public function index()\n\t{\n /**\n /* Controller for Index\n */\n $rows = \\App\\Settings::where(\"id\",23)->paginate(20);\n return view(\"settings/index\",compact(\"rows\"));\n\t}", "public function index() {\n return $this->view->render(\n 'admin/main.html.twig', [\n 'options' => $this->manager->all()\n ]\n );\n }", "public function admin_index() {\n\n\t\t\t/*get all data from table \"modules\"*/\n\t\t\t$modules=$this->Module->find(\"all\");\n\n\t\t\t/*set variables of page*/\n\t\t\t$this->set(\"title\", \"Gestion\");\n\t\t\t$this->set(\"legend\", \"Modules manager\");\n\t\t\t$this->set(\"modules\", $modules);\n\t\t\t}", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function indexAction() {\n\t\t$redirector = Zend_Controller_Action_HelperBroker::getStaticHelper ( 'redirector' );\n\t\t$redirector->gotoUrl ( '/admin/productsattributes/list' );\n\t}", "public function index()\n {\n $configuration = Configuration::all();\n return Inertia::render('Configuration/Index', [\n 'configuration' => $configuration,\n ]);\n return ;\n }" ]
[ "0.8065521", "0.794593", "0.7908514", "0.78448224", "0.7841635", "0.78043926", "0.7773657", "0.77700764", "0.7711758", "0.7691722", "0.76515454", "0.7501011", "0.7486978", "0.73916197", "0.73829234", "0.7368688", "0.7355758", "0.7336918", "0.72659457", "0.7212003", "0.7170919", "0.7145093", "0.70354056", "0.70335627", "0.7014165", "0.69880044", "0.6975968", "0.69369394", "0.68292284", "0.6798973", "0.67521125", "0.6725757", "0.67032063", "0.6684295", "0.66829854", "0.6594946", "0.65939444", "0.65866756", "0.65793324", "0.6555943", "0.65511835", "0.6549431", "0.6528425", "0.65075296", "0.65030783", "0.6494736", "0.6486755", "0.6429157", "0.64094055", "0.63952804", "0.6383141", "0.636844", "0.6363377", "0.6345483", "0.63422936", "0.63277906", "0.63194764", "0.6316268", "0.6306454", "0.6305409", "0.6305372", "0.63021934", "0.6291231", "0.62907255", "0.62774", "0.6267689", "0.6264847", "0.6264427", "0.62630594", "0.6259811", "0.6253145", "0.6243839", "0.62301224", "0.6222433", "0.6221461", "0.6201271", "0.6196141", "0.6188008", "0.6171667", "0.61632806", "0.6161999", "0.6159239", "0.61585206", "0.6152848", "0.6152848", "0.6152135", "0.6150364", "0.6143384", "0.6141375", "0.6138592", "0.61352384", "0.61335516", "0.61323166", "0.6125563", "0.611121", "0.6110516", "0.610887", "0.61085236", "0.61065096", "0.6098059" ]
0.7955247
1
this method will be called to add a new property afresh. it will only add basic details, location info, and pricing info on success, it will redirect the user back to the edit page of the created property where the user can now add photos and property features.
public function add(Request $request) { if($request->isMethod("GET")) { return view("admin.property.add", [ "types" => PropertyType::all(), "states" => PropertyState::all(), "currencies" => Currency::all() ]); } else if($request->isMethod("POST")) { $this->validate($request, [ "title" => "required|max:240", "description" => "required", "type_id" => "required", "state_id" => "required", "bedroom_count" => "required", "bathroom_count" => "required", "garage_count" => "required", "plot_area" => "required", "construction_area" => "required", "area_unit" => "required", "currency_id" => "required", "street_address" => "required", "street_number" => "required", "city" => "required", "region" => "required", "country" => "required", "postal_code" => "required", ]); $property = new Property(); $property->title = $request->title; $property->description = $request->description; $property->type_id = $request->type_id; $property->state_id = $request->state_id; $property->bedroom_count = $request->bedroom_count; $property->bathroom_count = $request->bathroom_count; $property->garage_count = $request->garage_count; $property->plot_area = $request->plot_area; $property->construction_area = $request->construction_area; $property->area_unit = $request->area_unit; $property->is_featured = !is_null($request->is_featured) ? true : false; $property->is_public = !is_null($request->is_public) ? true : false; $property->sale = !is_null($request->sale) ? true : false; $property->rental = !is_null($request->rental) ? true : false; $property->current_selling_price = $request->current_selling_price; $property->current_rental_price = $request->current_rental_price; $property->original_selling_price = $request->original_selling_price; $property->original_rental_price = $request->original_rental_price; $property->currency_id = $request->currency_id; $property->user_id = Auth::id(); $property->reference_no = str_random(5); $property->street_address = $request->street_address; $property->street_number = $request->street_number; $property->city = $request->city; $property->region = $request->region; $property->country = $request->country; $property->postal_code = $request->postal_code; $property = Property::create($property->toArray()); return redirect()->route("admin.property.edit", ["id" => $property->id])->with("success", "Property Created Successfully, Use the tab to add photos, features and change other settings."); } return redirect()->back()->with("error", "Invalid Request"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store()\n\t{\n\t\t$validator = Validator::make(Input::all(), Property::$rules);\n\t\t//dd($validator) ;\n\t if ($validator->passes()) {\n\t\t $property = new Property;\n\t\t $property->name = Input::get('name');\n\t\t $property->key = Input::get('key');\n\t\t $property->value = Input::get('value');\n\t\t $property->remarks = Input::get('remarks');\n\t\t $property->save();\n\t\t return Redirect::to('properties/create')->withInput()->with('message', 'New property is added successfully!');\n\t\t} else {\n\t\t return Redirect::to('properties/create')->withInput()->with('message', 'The following errors occurred')->withErrors($validator)->withInput();\n\t\t}\n\t}", "public function store()\n {\n\n //$data = $request->all();\n // dd($data);\n //$data = $this->requestValidate();\n //dd($data);\n //$data['user_id'] = auth()->user()->id;\n // $data['slug'] = strtolower(preg_replace('/\\s+/', '-', $request->title));\n // $property = Property::create($data);\n //dd($data);\n\n if(! request()->cover_image){\n request()->cover_image = 'property/defaultproperty.png';\n }\n\n try {\n $property = auth()->user()->properties()->create($this->requestValidate() + ['slug' => strtolower(preg_replace('/\\s+/', '-', request()->title)),'cover_image' => request()->cover_image]);\n $this->storeImage($property,'property');\n $property->tags()->sync(request()->get('tag_list'));\n\n //Mail::to(request()->user()->email)\n // ->send(new Propertylist($property));\n\n //request()->user()->notify(new PaymentReceived($property));\n\n event(new PropertyAdded($property)); //broadcast a new property created event\n\n return redirect(\"property\")->with([\n 'status' => 'success',\n 'flash_message' => $property->title.' listing was published successfully',\n ]);\n\n } catch (Exception $e) {\n return redirect()->route('property.index')->with([\n 'status' => 'danger',\n 'flash_message' => $e->getMessage(),\n ]);\n }\n }", "public function create() {\n\n $property = new Property;\n $locs = Location::pluck('area','id');\n $tags = Tag::pluck('property','id');\n\n if($_SERVER['REQUEST_URI'] == '/createproperty'){\n return view('members.dashboard.property.create', compact('property','tags','locs'));\n }\n\n return view('app.properties.create', compact('property','tags','locs'));\n\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'title'=>'required',\n 'type'=>'required',\n 'price'=>'required',\n 'bedrooms'=>'required',\n 'bathrooms'=>'required',\n 'floor_area'=>'required',\n 'min_lot_area'=>'required',\n 'status'=>'required',\n 'photos'=>'required|image|mimes:jpeg,png,jpg|max:2048',\n 'location'=>'required',\n 'address'=>'required',\n 'barangay'=>'required',\n 'city_prov'=>'required',\n 'country'=>'required',\n 'zip'=>'required',\n 'description'=>'required',\n ]);\n\n\n $property = new Property();\n $property->title = $request->title;\n $property->type = $request->type;\n $property->price = $request->price;\n $property->bedrooms = $request->bedrooms;\n $property->bathrooms = $request->bathrooms;\n $property->floor_area = $request->floor_area;\n $property->min_lot_area = $request->min_lot_area;\n $property->status = $request->status;\n $property = $request->file('photos');\n $photoname = time().'.'.$request->image->getClientOriginalExtension();\n $property->move(public_path('img/listing'), $photoname);\n $property->photos = $request->photos;\n $property->location = $request->location;\n $property->address = $request->address;\n $property->barangay = $request->barangay;\n $property->city_prov = $request->name;\n $property->country = $request->country;\n $property->zip = $request->zip;\n $property->description = $request->description;\n $property->save();\n\n Session::flash('success', 'Successfully created the new '. $property->title . ' role in the database.');\n return redirect()->route('property.show', $property->id);\n }", "function editProperties()\n\t{\n\t\tglobal $ilAccess;\n\t\tglobal $tpl, $ilTabs;\n\n\t\t$ilTabs->activateTab(\"properties\");\n\t\t\n\t\t$save = ((strcmp($this->ctrl->getCmd(), \"saveProperties\") == 0)) ? true : false;\n\n\t\tinclude_once(\"./Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$form = new ilPropertyFormGUI();\n\t\t$form->setFormAction($this->ctrl->getFormAction($this, 'properties'));\n\t\t$form->setTitle($this->lng->txt(\"properties\"));\n\t\t$form->setMultipart(false);\n\t\t$form->setId(\"properties\");\n\n\t\t// online\n\t\t$online = new ilCheckboxInputGUI($this->txt(\"mpl_online_property\"), \"online\");\n\t\tif(ilObjMatchMemoPool::_lookupPairCount($this->object->getId()) < ilObjMatchMemoPool::MIN_PAIRS_NUM)\n\t\t{\n\t\t\t$online->setInfo(implode('<br />', array(\n\t\t\t\t$this->txt(\"mpl_online_property_description\"),\n\t\t\t\t'<span style=\"color:red\">' . $this->txt(\"cannot_set_online_not_enough_pairs\") . '</span>'\n\t\t\t)));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$online->setInfo($this->txt(\"mpl_online_property_description\"));\n\t\t}\n\t\t$online->setChecked($this->object->online);\n\t\t$form->addItem($online);\n\n\t\t// add entry to navigation history\n\t\tif ($ilAccess->checkAccess(\"write\", \"\", $_GET[\"ref_id\"])) $form->addCommandButton(\"saveProperties\", $this->lng->txt(\"save\"));\n\n\t\tif ($save)\n\t\t{\n\t\t\t$form->checkInput();\n\t\t}\n\t\t$this->tpl->setVariable(\"ADM_CONTENT\", $form->getHTML());\n\t}", "public function create()\n\t{\n\t\t$properties = Property::all();\n\t\t$this->layout->content = View::make('properties.create',array('properties'=>$properties));\n\t}", "public function store(Request $request) {\n \n \n $property = new Property;\n $property->property_name = $request->property_name;\n $property->property_identification = $request->property_identification;\n $property->property_description = $request->property_description;\n $property->employee_id = $request->employee_id;\n $property->created_by = auth()->user()->id;\n $property->save();\n\n \n $inserted_id = $property->id;\n\n if (!empty($inserted_id)) {\n return redirect('/setting/properties')->with('message', 'Add successfully.');\n }\n return redirect('/setting/properties/create')->with('exception', 'Operation failed !');\n }", "public function store(PropertyRequest $request)\n {\n $property=Property::create([\n 'cost'=>$request->cost,\n 'type_id'=>$request->type,\n 'reference'=>$request->reference,\n 'room'=>$request->room,\n 'bathroom'=>$request->bathroom,\n 'map'=>$request->map,\n 'user_id'=>Auth::user()->id,\n 'region_id'=>$request->region,\n 'area'=>$request->area,\n 'type'=>$request->display\n ]);\n $propertyId=$property->id;\n PropertyDescription::create([\n 'name'=>$request->descEn,\n 'lang'=>'en',\n 'property_id'=>$propertyId\n ]);\n PropertyDescription::create([\n 'name'=>$request->descAr,\n 'lang'=>'ar',\n 'property_id'=>$propertyId\n ]);\n PropertyHeader::create([\n 'name'=>$request->headerEn,\n 'lang'=>'en',\n 'property_id'=>$propertyId\n ]);\n PropertyHeader::create([\n 'name'=>$request->headerAr,\n 'lang'=>'ar',\n 'property_id'=>$propertyId\n ]);\n PropertyLabel::create([\n 'name'=>$request->labelEn,\n 'lang'=>'en',\n 'property_id'=>$propertyId\n ]);\n PropertyLabel::create([\n 'name'=>$request->labelAr,\n 'lang'=>'ar',\n 'property_id'=>$propertyId\n ]);\n $packages=Input::get('feature');\n $property->feature()->attach($packages);\n $destinationPath=\"uploads/\";\n if($files=$request->file('Images'))\n {\n \tforeach($files as $file)\n {\n \t $name=$file->getClientOriginalName();\n \t $file->move($destinationPath,$file->getClientOriginalName());\n \t $img=new PropertyImage;\n \t $img->property_id=$propertyId;\n \t $img->path=$destinationPath.$file->getClientOriginalName();\n \t $img->save();\n \t}\n }\n\n return redirect()->route('property.index');\n }", "public function update(Property $property)\n {\n //$this->authorize('update-property', $property);\n if(Gate::denies('update-property',$property)) {\n return redirect(\"property\")->with([\n 'status' => 'success',\n 'flash_message' => 'You are not authorized to update this property',\n ]);\n }\n // dd($request);\n //$input = $this->requestValidate();\n //dd($input);\n //$input['user_id'] = auth()->user()->id;\n //$input['slug'] = strtolower(preg_replace('/\\s+/', '-', $request->title));\n //$property = auth()->user()->create($input);\n //$property->tags()->attach($request->input('tag_list'));\n // //$property->location()->attach($request->input('plocation'));\n // if(! request()->cover_image){\n // request()->cover_image = 'property/defaultproperty.png';\n // }\n try {\n $property->update($this->requestValidate() + ['slug' => strtolower(preg_replace('/\\s+/', '-', request()->title)),'cover_image' => request()->cover_image]);\n $this->updateImage($property,'property');\n $property->tags()->sync(request()->get('tag_list'));\n\n return redirect(\"property\")->with([\n 'status' => 'success',\n 'flash_message' => $property->title.' was published successfully',\n ]);\n } catch (Exception $e) {\n return redirect()->route('property.index')->with([\n 'status' => 'danger',\n 'flash_message' => $e->getMessage(),\n ]);\n }\n }", "public function run()\n {\n if (isset(Yii::app()->session['property_id'])) {\n\n $model = Property::model()->findByPk(Yii::app()->session['property_id']);\n\n if (isset($model)) {\n\n if (isset($_POST['Property'])) {\n $model->attributes = $_POST['Property'];\n\n if ($model->save(false)){\n $this->getController()->redirect(Yii::app()->baseUrl . '/property/addproperty_step3');\n } else{\n print_r($model->getErrors());\n Yii::app()->user->setFlash('error', 'Error Saving Record');\n }\n\n }\n\n } else {\n Yii::app()->user->setFlash('error', 'Invalid Property Request');\n $this->getController()->redirect(Yii::app()->baseUrl);\n }\n\n } else{\n Yii::app()->user->setFlash('error', 'Invalid Page Request');\n $this->getController()->redirect(Yii::app()->baseUrl);\n }\n\n $this->getController()->render('addproperty_step2', array('model'=>$model));\n }", "public function store()\n {\n $rules = array(\n 'name' => 'required',\n 'street' => 'required',\n 'city' => 'required'\n );\n $validator = Validator::make(Input::all(), $rules);\n\n if ($validator->fails()) {\n return Redirect::to('property/create')\n ->withErrors($validator);\n } else {\n \n $bossId = null;\n \n if (Input::get('user') !== 0)\n {\n $boss = User::where([\n 'id' => Input::get('user'),\n 'isAdmin' => null,\n 'isEmployee' => null,\n 'isBoss' => 1,\n 'boss_id' => null\n ])->first();\n \n if ($boss !== null)\n {\n $bossId = $boss->id;\n }\n }\n \n $property = new Property();\n $property->name = Input::get('name');\n $property->slug = str_slug(Input::get('name'));\n $property->description = Input::get('description');\n $property->street = Input::get('street');\n $property->street_number = Input::get('street_number');\n $property->house_number = Input::get('house_number');\n $property->city = Input::get('city');\n $property->boss_id = $bossId !== null ? $bossId : auth()->user()->id; \n $property->save();\n\n return redirect('/property/index')->with('success', 'Property successfully created!');\n }\n }", "public function add_property_owner() \r\n\t{\r\n\t\t//form validation rules\r\n\t\t$this->form_validation->set_rules('property_owner_email', 'Email', 'required|xss_clean|is_unique[property_owners.property_owner_email]|valid_email');\r\n\t\t$this->form_validation->set_rules('property_owner_name', 'Owner Name', 'required|xss_clean');\r\n\t\t$this->form_validation->set_rules('property_owner_phone', '', 'required|xss_clean');\r\n\t\t$this->form_validation->set_rules('property_owner_username', 'Username', 'xss_clean');\r\n\t\t\r\n\t\t//if form has been submitted\r\n\t\tif ($this->form_validation->run())\r\n\t\t{\r\n\t\t\t//check if property_owner has valid login credentials\r\n\t\t\tif($this->property_owners_model->add_property_owner())\r\n\t\t\t{\r\n\t\t\t\tredirect('real-estate-administration/property-owners');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$data['error'] = 'Unable to add property owner. Please try again';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//open the add new property_owner page\r\n\r\n\t\t$data['title'] = 'Add administrator';\r\n\t\t$v_data['title'] = $data['title'];\r\n\t\t$data['content'] = $this->load->view('property_owners/add_property_owner', $v_data, TRUE);\r\n\t\t$this->load->view('admin/templates/general_page', $data);\r\n\t}", "public function store(PropertyRequest $request)\n {\n $facilities = Facility::all();\n $createProperty = Property::create($request->all());\n\n $createProperty->setSlug();\n\n $arrayNewFacilities = array();\n\n foreach($facilities as $fac) {\n if(array_key_exists($fac->description, $request->all())) {\n $arrayNewFacilities[] = $fac->id;\n }\n }\n\n $createProperty->facilities()->attach($arrayNewFacilities);\n\n $validator = Validator::make($request->only('files'), ['files.*' => 'image']);\n\n if($validator->fails() === true) {\n return redirect()->back()->withInput()->with(['color' => 'orange', 'message' => 'Todas as imagens devem ser do tipo jpg, jpeg ou png']);\n }\n\n if($request->allFiles()) {\n foreach($request->allFiles()['files'] as $image) {\n $propertyImage = new PropertyImage();\n $propertyImage->property = $createProperty->id;\n $propertyImage->path = $image->storeAs('properties/' . $createProperty->id, str_slug($request->title) . '-' . str_replace('.', '', microtime(true)) . '.' . $image->extension());\n $propertyImage->save();\n unset($propertyImage);\n }\n }\n\n return redirect()->route('admin.properties.edit', [\n 'property' => $createProperty->id\n ])->with([\n 'color' => 'green',\n 'message' => 'Imóvel cadastrado com sucesso!'\n ]);\n }", "function actionAddUser($templateVars) {\n\n\t$property = propertiesNewModel();\n\n\tif(!empty($_POST) && isset($_POST['newPropertyForm'])) {\n\n\t\t$validForm = true;\n\n\t\t$property['name'] = $_POST['name'];\n\t\tif(empty($property['name'])) {\n\t\t\t$templateVars['nameError'] = 'Please enter a name for this property';\n\t\t\t$validForm = false;\n\t\t}\n\n\t\tif(empty($_FILES['logo']['name'])) {\n\t\t\t$templateVars['logoError'] = 'Please include a logo for for this property';\n\t\t\t$validForm = false;\n\t\t}\n\t\telse {\n\t\t\t$newLogo = $_FILES['logo']['name'];\n\t\t\t$newLogoTemp = $_FILES['logo']['tmp_name'];\n\t\t\t$newLogoType = $_FILES['logo']['type'];\n\t\t\tif(!in_array($newLogoType, $siteConfig['validLogoTypes'])) {\n\t\t\t\t$templateVars['logoError'] = 'Supported logo types are JPEG, GIF or PNG';\n\t\t\t\t$validForm = false;\n\t\t\t}\n\t\t}\n\n\t\tif($validForm == true) {\n\t\t\tpropertiesAddRecord($property);\n\t\t\t$property['id'] = dbLastId();\n\t\t\t$property['logo'] = generateLogoFilename($property['id'], $newLogo);\n\t\t\t//move_uploaded_file($newLogoTemp, APPLICATION_DIR.'/images/logos/'.$property['logo']);\n\t\t\tpropertiesUpdateRecord($property);\n\t\t\tredirectToPage('settings/properties/listing');\n\t\t}\n\n\t}\n\n\t$templateVars['property'] = $property;\n\n\treturn $templateVars;\n}", "public function add_post(Request $request)\n {\n\n $propertylists = new PropertyList;\n $propertylists->user_id = 1; \n $propertylists->name =$request->property_title; \n $propertylists->category_id =$request->property_category; \n $propertylists->type_id =$request->property_type; \n $propertylists->prize =$request->property_prize; \n $propertylists->building_area =$request->building_area;\n $propertylists->building_unit_id=$request->building_unit; \n $propertylists->land_area =$request->land_area; \n $propertylists->land_unit_id=$request->land_unit; \n $propertylists->bedroom =$request->bedroom; \n $propertylists->bathroom =$request->bathroom; \n $propertylists->location =$request->location; \n $propertylists->status =1;\n $tableStatus = DB::select(\"SHOW TABLE STATUS LIKE '\".DB::getTablePrefix().\"propertys'\");\n if (empty($tableStatus)) {\n throw new \\Exception(\"Table not found\");\n }else\n {\n $nextId = $tableStatus[0]->Auto_increment; \n $propertylists->uid=(10000+$nextId);\n\n try{\n $propertylists->save();\n $id = $propertylists->id;\n if($request->input('amenities')){\n $propertylists->amineties()->attach($request->input('amenities'));\n }\n if($request->input('neighbourhood') && $request->input('km')){\n $kmvalue=array_filter($request->input('km'));\n $kmvalue=array_values($kmvalue);\n foreach (array_combine($request->input('neighbourhood') , $kmvalue) as $neighbourhood => $km){\n $propertylists->neighbourhoods()->attach($neighbourhood, ['kilometer' => $km]);\n } \n }\n if(Session::get('country_id')){\n // foreach (array_combine($request->hidlang , $request->description) as $language => $description){\n // $propertylists->countrylangs()->attach($language, ['country_id' => $request->countries,'description' => $description]);\n // }\n }\n if($request->file('images')){\n foreach ($request->file('images') as $gimage) {\n $extension = $gimage->getClientOriginalExtension();\n $imagename = time().'_' . rand(100, 999) .'.'.$extension;\n $destinationPath = public_path() . \"/images/properties/\";\n $gimage->move($destinationPath, $imagename);\n $propertylists->images4property()->attach($imagename, ['is_featured' => 0]);\n }\n }\n\n $request->session()->flash('val', 1);\n $request->session()->flash('msg', \"Property created successfully !\");\n return response()->json(['status'=>true,'url'=>URL('/property/post/'),'csrf' => csrf_token()]);\n }\n\n\n catch (Exception $ex) {\n $request->session()->flash('val', 0);\n $request->session()->flash('msg', \"Property not created successfully.\".$e->getMessage()); \n return response()->json(['status'=>false,'csrf' => csrf_token()]);\n }\n\n }\n \n \n\n }", "public function store(Request $request)\n {\n if(!\\Auth::user()->can('property.create'))\n return view('backend.partial.no-permission', ['title' => 'No-permission']);\n\n $request->validate([\n 'title_en' => 'required',\n 'code' => 'required|max:255|unique:properties,code',\n 'cost' => 'required',\n 'price' => 'required',\n 'owner_contact' => 'required',\n 'property_type' => 'required'\n ]);\n\n $propertyData = $this->requestData($request);\n\n $item = $this->propertyRepo->create($propertyData);\n if($item) {\n $collectors = $request->get(\"collector\");\n if(!empty($collectors)) {\n foreach ($collectors as $collector) {\n PropertyHasStaff::create([\n \"property_id\" => $item->id,\n \"staff_id\" => $collector,\n \"type\" => 1\n ]);\n }\n }\n\n $tags = $request->tags;\n if(!empty($tags)) {\n foreach($tags as $tag) {\n PropertyTag::create([\n 'property_id' => $item->id,\n 'tag_id' => $tag,\n 'type' => 1\n ]);\n }\n }\n\n return redirect(route(\"administrator.property-view\", $item->id).\"?action=gallery\")->with('successful', 'Save Successfully, please add image gallery.');\n }\n\n return redirect()->back()->with(\"error\", __(\"error-message\"))->withInput($request->all());\n }", "public function store(Request $request)\n {\n try {\n \n $data = $this->getData($request);\n \n Property::create($data);\n\n return redirect()->route('properties.property.index')\n ->with('success_message', 'Property was successfully added.');\n } catch (Exception $exception) {\n\n return back()->withInput()\n ->withErrors(['unexpected_error' => 'Unexpected error occurred while trying to process your request.']);\n }\n }", "public function store(Request $request)\n {\n $data = $request->validate([\n 'address' => ['required', 'string'],\n 'type' => ['required', 'string'],\n 'bedrooms' => ['required', 'integer'],\n 'bathrooms' => ['required', 'integer'],\n 'half_bathrooms' => ['required', 'integer'],\n 'space' => ['required', 'integer', 'min:10', 'max:1000'],\n 'description' => ['min:10', 'max:500'],\n 'pets_allowed' => ['required', 'Boolean'],\n 'available_at' => ['required', 'Date', 'after:today'],\n 'rental_period_in_months' => ['required', 'min:1', 'max:60'],\n 'monthly_rent' => ['required', 'integer', 'min:50', 'max:500000'],\n 'features' => ['required', 'array'],\n 'features.*' => [Rule::exists('features', 'id')]\n ]);\n\n\n $property = auth()->user()->properties()->create(\n Arr::except($data, ['features'])\n );\n\n\n $property->attachImages($request->images);\n\n $property->features()->attach($request->features);\n\n return redirect(route('my-properties.index'), 201);\n }", "public function store(Request $request){\n\t\t//dd($request->all());\n\t\t$validator = Validator::make($request->all(), [ \n\t\t\t'property_name' => 'required',\n\t\t\t'property_location' => 'required',\n\t\t\t'property_desc' => 'required',\n\t\t\t'property_state' => 'required',\n\t\t\t'property_city' => 'required',\n\t\t\t'property_seourl' => 'required|unique:property',\n\t\t\t'property_email' => 'required|email',\n\t\t\t'property_mainimage' => 'required|image',\n\t\t\t'property_logoimage' => 'required|image',\n ],$this->messages);\n\t\t\n if ($validator->fails()) {\n\t\t\t//dd($validator);\n $this->throwValidationException(\n $request, $validator\n );\n\t\t}\n\t\t\t\n\t\t$input = $request->all();\n\t\t$input['property_city'] = trim($input['property_city'],'number:');\n\t\t$imageName = 'mainimage.'.$request->property_mainimage->getClientOriginalExtension();\n\t\t$input['property_mainimage'] = trim($imageName);\n\t\t$logoimageName = 'logoimage.'.$request->property_logoimage->getClientOriginalExtension();\n\t\t$input['property_logoimage'] = trim($logoimageName);\n\t\t$input['product_uniquekey'] = date('YmdHis');\n\t\t//dd($input);\n\t\t\n\t\tif($property = Property::create($input))\n\t\t{\n\t\t\t$path = public_path().'/images/property/'.$property->property_id;\n\t\t\tFile::makeDirectory($path, $mode = 0777, true, true);\n\t\t\t$request->property_mainimage->move($path, $imageName);\n\t\t\t$request->property_logoimage->move($path, $logoimageName);\n\t\t\t$request->session()->flash('alert-success', 'Property created successfully. Please fill other information');\n\t\t}\n\t\treturn redirect('/admin/property/'.$property->property_id.'/edit') ;\n }", "public function create()\n {\n $extras = Extra::all();\n return view(\"admin.properties.create\", compact(\"extras\"));\n }", "function add_endpoint_properties() {\n $dn = Get_User_Principle();\n $user = \\Factory::getUserService()->getUserByPrinciple($dn);\n\n //Check the portal is not in read only mode, returns exception if it is and user is not an admin\n checkPortalIsNotReadOnlyOrUserIsAdmin($user);\n\n\n\n\n if($_POST) { \t// If we receive a POST request it's for new properties\n\n //COMMENT\n $preventOverwrite = true;\n\n //Get the parent service we want to add properties to.\n //I'm trying to use \"parent\" rather than \"service\" wherever possible to make this code more generic.\n $endpoint = \\Factory::getServiceService()->getEndpoint($_REQUEST['PARENT']);\n //this is a little awkward, as we have to handle 3 cases here. Submitting a single property,\n //submitting a .property text file/block, or submitting the parsed and confirmed properties.\n\n //Figure out where the request has come from and format the inputs accordingly.\n //throw new \\Exception(var_dump($_REQUEST));\n\n //if the request is for a multi property input, parse the file and generate the array of properties\n //this will go to confirm()\n if(isset($_REQUEST['PROPERTIES'])) {\n $propertyArray = parse_properties($_REQUEST['PROPERTIES']);\n //throw new \\Exception(var_dump($propertyArray));\n }\n //if the request is from the multi property confirmation page\n //reconstruct the indexed array of kvps\n //this will go to submit()\n elseif (isset($_REQUEST['selectedProps'])){\n $propertyArray = array();\n foreach ($_REQUEST['selectedProps'] as $i=>$propKey){\n $propertyArray[] = array($propKey, $_REQUEST['selectedPropsVal'][$i]);\n }\n }\n //if the request is for a single property, skip the confirmation view and submit the request directly\n //this will go to submit()\n elseif (isset($_REQUEST['KEYPAIRNAME']) && isset($_REQUEST['KEYPAIRVALUE'])) {\n $propertyArray = array(\n array(\n $_REQUEST['KEYPAIRNAME'], $_REQUEST['KEYPAIRVALUE']\n )\n );\n //will go straight to submit()\n $_REQUEST['UserConfirmed'] = \"true\";\n //since the user is only adding a single property, warn them if it already exists\n $preventOverwrite = true;\n } else {\n //you really shouldn't end up here unless you are mangling your post requests\n throw new Exception(\"Properties could not be parsed\");\n }\n\n if(isset($_REQUEST['PREVENTOVERWRITE'])){\n $preventOverwrite = false;\n }\n\n //quick sanity check, are we actually adding any properties?\n if(empty($propertyArray)){\n show_view('error.php', \"At least one property name and value must be provided.\");\n die();\n }\n\n //Now we have our $propertyArray, either send it to the confirmation page or actually submit the props\n if(isset($_REQUEST['UserConfirmed'])) {\n submit($endpoint, $user, $propertyArray, $preventOverwrite);\n }\n else {\n confirm($propertyArray, $endpoint, $user);\n }\n } else { \t\t\t// If there is no post data, draw the new properties form\n draw($user);\n }\n}", "public function add()\n {\n $data = [\n 'property' => [\n 'template' => 'extracurricular_add',\n 'title' => 'Tambah Ekstrakurikuler',\n 'menu' => $this->menu->read(),\n ],\n 'data' => [],\n ];\n\n $this->load->view('template', $data);\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'name' => 'required|string|min:4',\n 'description' => 'required|string|min:4',\n 'price' => 'required|min:3',\n 'size' => 'required|min:2',\n 'rooms_no' => 'required',\n 'floors_no' => 'required',\n 'pathroom_no' => 'required',\n 'image' => 'required|image',\n 'phone' => 'required|min:11|max:15'\n\n ]);\n\n $property = new Property();\n $property->user_id = auth()->user()->id;\n //$property->areas_id = $request->area_name;\n $property->name = $request->name;\n $property->price = $request->price;\n $property->size = $request->size;\n $property->description = $request->description;\n $property->rooms_no = $request->rooms_no;\n $property->floors_no = $request->floors_no;\n $property->pathroom_no = $request->pathroom_no;\n\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n //dd($images);\n\n // dd($image);\n $name = time() . '.' . $image->getClientOriginalExtension();\n\n $destinationPath = public_path('/images');\n $image->move($destinationPath, $name);\n\n $property->image = $name;\n }\n $property->phone= $request->phone;\n $area_name = $request->area_name;\n\n $row = Area::where('name' , $area_name)->first();\n\n $property->areas_id = $row->id;\n //dd($area_name);\n\n $property->save();\n session()->flash('success', 'Property Added Successfully');\n return redirect('Property');\n }", "public function store(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|array',\n 'title.*' => 'required|string',\n 'category_id' => 'required|exists:categories,id',\n ]);\n\n if ($validator->fails()) {\n return back()->withErrors($validator)->withInput();\n }\n\n $property = new Property();\n $property->fill($request->except('title'));\n foreach ($request->title as $key => $value)\n {\n $property->setTranslation('title', $key, $value);\n }\n $property->save();\n\n //Save new property values\n if ($request->new_values && count($request->new_values) > 0) {\n foreach ($request->new_values as $new_value) {\n $property_value = new PropertyValue();\n foreach ($new_value as $key => $value) {\n $property_value->setTranslation('value', $key, $value);\n }\n $property_value->property_id = $property->id;\n $property_value->save();\n }\n }\n\n \\Session::flash('success', 'Property Created Successfully');\n return redirect('property/'.$request->parent_id);\n }", "public function store(Request $request)\n {\n $data = $request->all();\n // dd($data);\n //validation\n $request->validate([\n \"title\" => \"required|max:255\",\n \"street\" => \"required\",\n \"metropolis\" => \"required\",\n \"country\" => \"required\",\n \"zip_code\" => \"required|max:10\",\n \"description\" => \"max:400\",\n \"rooms_number\" => \"required|integer\",\n \"beds_number\" => \"required|integer\",\n \"bathrooms_number\" => \"required|integer\",\n \"flat_image\" => \"required|image\",\n \"square_meters\" => \"required|integer\",\n \"latitude\" => \"required|between:-90,90\",\n \"longitude\" => \"required|between:-180,180\",\n \"active\" => \"boolean\"\n ]);\n\n //indirizzo di salvataggio dell'immagine e creo cartella \"images\" dove salvo le immagini uploadate\n $path = Storage::disk(\"public\")->put(\"images\", $data[\"flat_image\"]);\n\n //creo nuovo oggetto di tipo Proprietà\n $newProperty = new Property;\n\n $newProperty->user_id = Auth::id();\n $newProperty->title = $data[\"title\"];\n $newProperty->street = $data[\"street\"];\n $newProperty->metropolis = $data[\"metropolis\"];\n $newProperty->country = $data[\"country\"];\n $newProperty->description = $data[\"description\"];\n $newProperty->rooms_number = $data[\"rooms_number\"];\n $newProperty->beds_number = $data[\"beds_number\"];\n $newProperty->bathrooms_number = $data[\"bathrooms_number\"];\n $newProperty->flat_image = $path;\n $newProperty->square_meters = $data[\"square_meters\"];\n $newProperty->latitude = $data[\"latitude\"];\n $newProperty->longitude = $data[\"longitude\"];\n if(isset($data[\"active\"])){\n $newProperty->active = $data[\"active\"];\n };\n\n //salvataggio\n $newProperty->save();\n\n if (isset($data[\"extras\"])) {\n $newProperty->extras()->sync($data[\"extras\"]);\n }\n\n //redirect verso nuova pagina (show)\n return redirect()->route(\"admin.properties.show\", $newProperty);\n }", "public function create()\n {\n $seller = User::find(Auth::id())->seller;\n\n if (null === $seller) {\n unset($seller);\n\n return view('property.info');\n } else {\n $propertyTypes = MMFormHelper::getPropertyTypes();\n $apartmentTypes = MMFormHelper::getApartmentTypes();\n $propertyMeasurements = MMFormHelper::getPropertyMeasurements();\n\n return view('property.create', compact(\n 'propertyTypes', 'apartmentTypes', 'propertyMeasurements'\n ));\n }\n\n }", "public function store(ValidateProperty $request)\n {\n $seller = User::find(Auth::id())->seller;\n $property = new Property;\n\n $property->seller_id = $seller->id;\n $property->is_private = $request->input('is_private');\n $property->property_type = $request->input('property_type');\n $property->apartment_type = $request->input('apartment_type');\n $property->measurement = $request->input('measurement');\n $property->measurement_type = $request->input('measurement_type');\n $property->maintenance_charges = $request->input('maintenance_charges');\n $property->ownership = $request->input('ownership');\n $property->joint_owners_name = $request->input('joint_owners_name');\n $property->sale_price = $request->input('sale_price');\n $property->min_expected_price = $request->input('min_expected_price');\n $property->address = $request->input('address');\n $property->homeloan_details = $request->input('homeloan_details');\n $property->amenities = $request->input('amenities');\n $property->locality_features = $request->input('locality_features');\n $property->is_active = Property::ACTIVE; // May be Admin should verify and then approve it.\n\n if (1 === (int) $request->input('is_private')) {\n $dtObj = new \\DateTime();\n $property->is_private_ts = $dtObj->format('Y-m-d H:i:s');\n unset($dtObj);\n }\n\n $property->save();\n\n unset($property, $seller);\n\n return redirect('/property')->with(\n 'status', Lang::get('site.SUCCESS_MESSAGES.APARTMENT_STORED'\n ));\n }", "public function store(Request $request)\n {\n $this->validate($request,[\n 'building_name'=> 'required|string|max:191',\n 'price' => 'required|numeric',\n 'full_price' => 'required|numeric',\n 'site_area' => 'required|numeric',\n 'building_area' => 'required|numeric',\n 'architecture' => 'required',\n 'prefecture' => 'required',\n 'city' => 'required|string|max:191',\n 'address' => 'required|string|max:191',\n 'station' => 'required|string|max:191',\n 'on_foot' => 'required|numeric|max:191',\n ]);\n \n $property = new Property;\n \n $property->building_name = $request->building_name;\n $property->price = $request->price;\n $property->full_price = $request->full_price;\n $property->site_area = $request->site_area;\n $property->building_area = $request->building_area;\n $property->architecture = $request->architecture;\n $property->prefecture = $request->prefecture;\n $property->city = $request->city;\n $property->address = $request->address;\n $property->station = $request->station;\n $property->on_foot = $request->on_foot;\n $property->save();\n \n return redirect('/');\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'service_id' => 'required',\n 'property_id' => 'required'\n ]);\n\n try {\n $propertyService = new PropertyService;\n $propertyService->service_id = $request->service_id;\n $propertyService->property_id = $request->property_id;\n $propertyService->is_required = $request->is_required;\n $propertyService->field_size = $request->field_size;\n $propertyService->property_options = str_replace('\\r', '', json_encode(explode(PHP_EOL, $request->property_options), JSON_FORCE_OBJECT));\n\n $propertyService->save();\n $property = Property::find($request->property_id)->property_name;\n $service = Service::find($request->service_id)->service_description;\n Session::flash('success', 'Property '.$property.' successfull assigned with the service '.$service);\n return redirect()->action('PropertyServiceController@index');\n } catch (\\Exception $e) {\n Session::flash('error', 'Oops, have one error...'.$e->getMessage());\n return redirect()->back(Input::all());\n }\n }", "public function updateBasicDetails(Request $request) {\n\n //validate\n $validator = Validator::make($request->all(), [\n 'property_id' => \"required\",\n 'title' => 'required',\n 'description' => \"required\",\n 'type_id' => \"required\",\n \"state_id\" => \"required\",\n \"bedroom_count\" => \"required\",\n \"bathroom_count\" => \"required\",\n \"garage_count\" => \"required\",\n \"plot_area\" => \"required\",\n \"construction_area\" => \"required\",\n \"area_unit\" => \"required\"\n ], \n [\n \"property_id.required\" => \"Invalid Request, Incomplete Parameter\"\n ])->validate(); \n\n $property = Property::find($request->property_id);\n \n if(is_null($property)) {\n return redirect()->back()->with(\"error\", \"Property Not Found\");\n } \n\n $property->title = $request->title;\n $property->description = $request->description;\n $property->type_id = $request->type_id;\n $property->state_id = $request->state_id;\n $property->bedroom_count = $request->bedroom_count;\n $property->bathroom_count = $request->bathroom_count;\n $property->garage_count = $request->garage_count;\n $property->plot_area = $request->plot_area;\n $property->construction_area = $request->construction_area;\n $property->area_unit = $request->area_unit;\n $property->save();\n\n return redirect()->back()->with(\"success\", \"Property Basic Details Updated Successfully\");\n\n }", "public function store(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'alias' => 'required',\n 'description' => '',\n 'address' => 'required',\n 'postal_code' => 'required|numeric',\n 'price' => 'required|numeric',\n 'maintenance_cost' => 'required|numeric',\n 'capacity' => 'required|numeric',\n 'contract_id' => 'required|numeric',\n 'type_id' => 'required|numeric',\n 'lessor_id' => 'required|numeric']);\n\n if ($validator->passes() and Auth::id() === intval($request->get('lessor_id'))) {\n $property = Property::create($request->all());\n\n return redirect()->route('properties.index');\n } else {\n return redirect()->route('properties.create')\n ->withErrors($validator)->withInput();\n }\n }", "public function add()\n\t{\n\t\tif (!parent::add())\n\t\t{\n\t\t\t// Redirect to the return page.\n\t\t\t$this->setRedirect($this->getReturnPage());\n\t\t}\n\t}", "public function add()\n\t{\n\t\tif (!parent::add())\n\t\t{\n\t\t\t// Redirect to the return page.\n\t\t\t$this->setRedirect($this->getReturnPage());\n\t\t}\n\t}", "public function create()\n {\n if(!\\Auth::user()->can('property.create')) {\n return view('backend.partial.no-permission', ['title' => 'No-permission']);\n }\n\n $provinces = $this->provinceRepo->lists()->pluck('title', 'id')->toArray();\n $property_types = PropertyType::orderBy(\"id\", \"desc\")->get();\n //$owners = Owner::orderBy(\"id\", \"desc\")->get();\n $owners = [];\n $front_refer_to = $this->getFrontReferTo();\n $action = route(\"administrator.property-store\");\n $collectors = Staff::where(function($query) {\n $query->orWhereIn('type', [2,4]);\n $query->orWhereHas(\"user\", function ($query) {\n $query->whereHas(\"user_has_role\", function ($query) {\n $query->whereHas(\"role\", function ($query) {\n $query->where(\"role_type\", \\Constants::ROLE_TYPE_COLLECTOR);\n });\n });\n });\n })->with(\"user\")->orderBy(\"id\", \"DESC\")->get();\n\n $projects = Project::orderBy(\"id\", \"DESC\")->get();\n\n return view('backend.property.form', compact('provinces', 'front_refer_to', 'property_types', \"owners\", \"action\", \"collectors\", \"projects\"));\n }", "public function add() {\n\t\tRouter::redirect('/users/profile');\t\n\t}", "public function store(Request $request)\n {\n $now = Carbon::now('Africa/Nairobi')->toDateTimeString();\n\n /** Get property data from create property form **/\n $p_name = ucwords($request->input('p_name'));\n $p_category = $request->input('p_category_id');\n $p_location = ucwords($request->input('p_location'));\n $c_name = ucwords($request->input('c_name'));\n $c_phone = $request->input('c_phone');\n $variation_template_id = $request->input('variation_template_id');\n\n $new_c_phone = str_replace('(', '', $c_phone);\n $new_c_phone = str_replace(')', '', $new_c_phone);\n $new_c_phone = str_replace('-', '', $new_c_phone);\n $new_c_phone = str_replace(' ', '', $new_c_phone);\n\n /** Save property data in the properties table */\n $property = new Property();\n $property->prop_name = $p_name;\n $property->category_id = $p_category;\n $property->location = $p_location;\n $property->c_name = $c_name;\n $property->c_phone = $new_c_phone;\n\n $property->save();\n\n /** Get id of the above saved property */\n $just_saved_property_id = $property->id;\n\n /** Save property variation data */\n\n $var_value_id = $request->input('var_value_id');\n $v_name = $request->input('v_name');\n $rooms = $request->input('rooms');\n $rent = $request->input('rent');\n\n /** Save room variations in room_variations table */\n $prop_variations = array(\n 'variation_temp_id' => $variation_template_id,\n 'property_id' => $just_saved_property_id\n );\n $save_prop_variations = DB::table('property_variations')->insertGetId($prop_variations);\n\n /** Save property variations in the variations table */\n\n if (count($rooms) > count($rent))\n $count = count($rent);\n else $count = count($rooms);\n\n for ($i = 0; $i < $count; $i++) {\n\n $data = array(\n 'property_id' => $just_saved_property_id,\n 'property_variation_id' => $save_prop_variations,\n 'variation_value_id' => $var_value_id[$i],\n 'var_name' => $v_name[$i],\n 'tot_rooms' => $rooms[$i],\n 'vacant_rooms' => $rooms[$i],\n 'booked_rooms' => 0,\n 'monthly_rent' => $rent[$i]\n );\n\n /** Skip when total rooms is 0 */\n if ($data['tot_rooms'] == 0 || $data['monthly_rent'] == 0) {\n continue;\n }\n $insertData[] = $data;\n }\n\n Variation::insert($insertData);\n\n for ($i = 0; $i < $count; $i++) {\n $room_adjustments = array(\n 'var_val_id' => $var_value_id[$i],\n 'adjustment_qty' => 0,\n 'init_tot_rooms' => $rooms[$i],\n 'new_tot_rooms' => $rooms[$i],\n 'init_vac_rooms' => $rooms[$i],\n 'new_vac_rooms' => $rooms[$i],\n 'init_ren_rooms' => 0,\n 'new_ren_rooms' => 0,\n 'created_by' => Auth::id()\n );\n /** Skip when total rooms is 0 */\n if ($room_adjustments['init_tot_rooms'] == 0) {\n continue;\n }\n $insertRoomAdjustments[] = $room_adjustments;\n }\n\n RoomAdjustment::insert($insertRoomAdjustments);\n\n /** Log the action in the logs file */\n Log::info('Property of ID ' . $just_saved_property_id . ' created by user of ID: ' . Auth::id() .\n ' at ' . $now);\n Toastr::success('Property created successfully');\n\n return back();\n }", "public function create()\n {\n return view('admindashboard.property.create');\n }", "public function create()\n {\n $property = new Property;\n \n \n return view('properties.create',[\n 'property' => $property,\n ]);\n }", "public function store(Request $request, Property $property)\n {\n //dd(request()->input('comment'));\n //dd([request()->body, 'property_id' => $property->id]);\n $property->propertycomments()->create(['user_id' => Auth::id(),'property_id' => $property->id ,'comment' => request()->input('comment'),$request->all()]);\n return redirect()->back();\n }", "public function store(Request $request)\n {\n\n// dd($request);\n $this->validate($request, [\n 'latitude' => 'required',\n 'locationDescription' => 'required',\n 'price' => 'required',\n 'description' => 'required',\n 'type' => 'required',\n 'longitude' => 'required',\n\n ]);\n $property = new Property();\n $property->price = $request->price;\n $property->description = $request->description;\n $property->longitude = $request->longitude;\n $property->latitude = $request->latitude;\n $property->locationDescription = $request->locationDescription;\n\n if (isset($request->showPrice)) $property->showPrice = $request->showPrice; else $property->showPrice = 0;\n\n if ($request->bedroomsNumber != -1) {\n $property->bedroomsNumber = $request->bedroomsNumber;\n }\n if ($request->bathroomsNumber != -1) {\n $property->bathroomsNumber = $request->bathroomsNumber;\n }\n if ($request->parkingNumber != -1) {\n $property->parkingNumber = $request->parkingNumber;\n }\n $property->accepted = 0;\n $property->userId = Auth::user()->id;\n $property->categoryId = $request->category;\n $property->packageId = $request->packageId;\n $property->typeId = $request->type;\n\n $property->save();\n // Handle File Upload\n if ($request->hasFile('images')) {\n foreach ($request->images as $image) {\n if ($image->getClientOriginalExtension() == 'mp4') {\n // Get filename with the extension\n $filenameWithExt = $image->getClientOriginalName();\n // Get just filename\n $filename = pathinfo($filenameWithExt, PATHINFO_FILENAME);\n // Get just ext\n $extension = $image->getClientOriginalExtension();\n // Filename to store\n $fileNameToStore = $filename . '_' . time() . '.' . $extension;\n // Upload Image\n $path = $image->storeAs('public/properties_images', $fileNameToStore);\n\n $image = new PropertyImage;\n $image->propertyId = $property->id;\n $image->url = $fileNameToStore;\n $image->save();\n\n } else {\n $Name = time() . '.' . $image->getClientOriginalExtension();\n\n $destinationPath = public_path('storage/properties_images/');\n $img = Image::make($image->getRealPath());\n $img->resize(650, 650, function ($constraint) {\n $constraint->aspectRatio();\n })->save($destinationPath . '/' . time() . $image->getClientOriginalName());\n\n /*$user->profileImg = time().$image->getClientOriginalName();*/\n $fileNameToStore = time() . $image->getClientOriginalName();\n $image = new PropertyImage;\n $image->propertyId = $property->id;\n $image->url = $fileNameToStore;\n $image->save();\n\n\n $destinationPath = public_path('/storage/images');\n //$image->move($destinationPath, $Name);\n }\n\n\n }\n }\n\n $history = new History;\n $history->propertyId = $property->id;\n $history->post_description = $property->description;\n $history->post_price = $property->price;\n $history->post_roomsNumber = $property->roomsNumber;\n $history->post_bathroomsNumber = $property->bathroomsNumber;\n $history->post_parkingNumber = $property->parkingNumber;\n $history->post_bedroomsNumber = $property->bedroomsNumber;\n $history->post_accepted = $property->accepted;\n $history->post_userId = $property->userId;\n $history->post_category = Category::findOrFail($property->categoryId)->title;\n $history->post_type = PropertyType::findOrFail($property->typeId)->title;\n $history->post_locationDescription = $property->locationDescription;\n $history->post_contactInfo = $property->contactInfo;\n $history->post_longitude = $property->longitude;\n $history->post_latitude = $property->latitude;\n $history->isCreated = 1;\n $history->isUpdated = 0;\n $history->isDeleted = 0;\n $history->save();\n\n\n $package = Packages::findOrFail($request->packageId);\n $payment = Payment::all()->where('user_id', '=', Auth::user()->id)->where('package', '=', $package->title)->where('used', '=', 0)->first();\n $payment->used = 1;\n $payment->save();\n\n\n $mail = Auth::user()->email;\n Mail::to('[email protected]')->send(new NewPropertyMail());\n Mail::to($mail)->send(new PropertyCreated());\n\n return redirect('/properties/myProperties')->with('message', 'Property Created Successfully!');\n }", "public function Registrar(Property $data)\n\t{\n\t\ttry \n\t\t{\n\t\t$sql = \"INSERT INTO properties (id,direccion,city,telephone,code_postal,type,price) \n\t\t VALUES (?,?, ?, ?, ?, ?, ?)\";\n\n\t\t$this->pdo->prepare($sql)\n\t\t ->execute(\n\t\t\t\tarray(\n\t\t\t\t\t$data->id,\n $data->direccion,\n $data->city, \n $data->telephone,\n $data->code_postal,\n $data->type,\n $data->price\n )\n\t\t\t);\n\t\t} catch (Exception $e) \n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t}\n\t}", "public function add() {\r\n if(isset($this->data) && isset($this->data['Product'])) {\r\n $product = $this->Product->save($this->data);\r\n $this->set('response', array('Products' => $this->Product->findByProductid($product['Product']['ProductID'])));\r\n $this->Links['self'] = Router::url(array('controller' => $this->name, 'action' => 'view', $product['Product']['ProductID']), true);\r\n } else {\r\n $this->Links['self'] = Router::url(array('controller' => $this->name, 'action' => 'index'), true);\r\n }\r\n }", "public function action_edit($id = null)\n\t{\n\t\tarray_push($this->template->head->scripts, 'media/js/property.js', 'media/js/swfobject.js', 'media/js/jquery.uploadify.js');\n\t\tarray_push($this->template->head->styles, 'media/css/uploadify.css');\n\n\t\t// Setup view\t\t\n\t\t$this->template->content = View::factory('admin/property/form')\n\t\t\t->bind('post', $post)\n\t\t\t->bind('errors', $errors)\n\t\t\t->bind('types', $types)\n\t\t\t->bind('cities', $cities);\n\n\t\t$this->template->content->title = 'Property management > '.($id ? \"Property Edit ($id)\" : 'Property new');\n\n\t\t// get all cities and add first option as blank\n\t\t$cities = ORM::factory('city')->find_all()->as_array('id', 'name');\n\t\tarr::unshift($cities, NULL, '-- Select --');\n\n\t\t// get all types and add first option as blank\n\t\t$types = ORM::factory('type')->find_all()->as_array('id', 'name');\n\t\tarr::unshift($types, NULL, '-- Select --');\n\n\t\t// get item to be edited, or an empty object if creating new item\n\t\t$property = ORM::factory('property', (int) $id);\n\n\t\t// make sure agents can only edit their own property\n\t\tif ($id AND ! in_array('admin', Session::instance()->get('user_roles')))\n\t\t{\n\t\t\t// if authenticate user id doesn't match the property created by id, redirect\n\t\t\tif (Auth::instance()->get_user()->id != $property->created_by_id) {\n\t\t\t\t$this->request->redirect(Route::get('admin')->uri(array('action' => 'notowner')));\n\t\t\t}\n\t\t}\n\n\t\tif ( ! empty($_POST))\n\t\t{\n\t\t\t// get post values, load into object and check validation\n\t\t\t$post = $_POST; \n\t\t\t$property->values($post);\n\t\t\tif ($property->check())\n\t\t\t{\n\t\t\t\t//cookie::set('message', 'Updated city '.$city->name);\n\t\t\t\t// save and redirect to index\n\t\t\t\tif ($property->save()) {\n\t\t\t\t\t$this->request->redirect(Route::get('admin')->uri(array('controller' => 'properties')));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// get errors to show in form\n\t\t\t\t$errors = $property->validate()->errors('admin_errors'); \n\t\t\t}\n\t\t}\n\t\t// shuffle up values for form\n\t\t$post = $property->as_array('type_id', 'city_id', 'name', 'body', 'bedrooms', 'bathrooms', 'sqft', 'image');\n\t}", "function PropertyAction($action=false,$propertyid=false)\n\t{\t\n\t\t\t$idproperty=$this->input->post('propertyID');\n\t\t\tif(!empty($idproperty)){\n\t\t\t\t$propertyid=$idproperty;\n\t\t\t}\n\t\t\t\n\t\t\tif(!empty($action) && !empty($propertyid))\n\t\t\t{\n\t\t\t\t$filter=array('propertyID'=>$propertyid);\n\t\t\t\t\n\t\t\t\t$propertyoldstatus='';\n\t\t\t\t$userid='';\n\t\t\t\t$propertykey='';\n\t\t\t\t$propertydetails=$this->AddProperty_model->Getotherdata('rp_properties',$filter);\n\t\t\t\t\n\t\t\t\tif(!empty($propertydetails)){\n\t\t\t\t\t\n\t\t\t\t\t$propertyoldstatus=$propertydetails[0]->propertyStatus;\n\t\t\t\t\t$userid=$propertydetails[0]->userID;\n\t\t\t\t\t$propertykey=$propertydetails[0]->propertyKey;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($action==\"propertystatus\")\n\t\t\t\t{\n\t\t\t\t\t$statusproperty=$this->input->post('propertystatus');\n\t\t\t\t\t$idproperty=$this->input->post('propertyID');\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($statusproperty) && !empty($propertyid)){\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($statusproperty=='Active'){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($propertyoldstatus=='Active'){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->session->set_flashdata('message_type', 'success');\n\t\t\t\t\t\t\t\t$this->session->set_flashdata('message', $this->config->item(\"PropertyListing\").\"Property $propertykey Updated successfully\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($this->checkandconsumuedplan($propertyid,'AddProperty/PropertyListing','property',$userid,'Active')==true){\t\n\t\t\t\t\t\t\t$data=array('propertyStatus'=>'Active','propertyUpdateDate'=>date(\"Y-m-d h:i:s\"));\n\t\t\t\t\t\t\t$this->AddProperty_model->InsertProperty('rp_properties',$data,$filter);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$propertyfilter=array('objectID'=>$propertyid,'objectType'=>'property');\n\t\t\t\t\t\t\t$expirydate=strtotime(\"60 day\",strtotime(date(\"Y-m-d\")));\n\t\t\t\t\t\t\t$propertyexpirydate=array('property_expiry_date'=>date(\"Y-m-d\",$expirydate));\n\t\t\t\t\t\t\t$propertydetails=$this->AddProperty_model->InsertProperty('rp_dbho_plan_mapping',$propertyexpirydate,$propertyfilter);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$planmappingdata=array('propertyStatus'=>'Active');\n\t\t\t\t\t\t\t$this->AddProperty_model->InsertProperty('rp_properties',$planmappingdata,$filter);\n\t\t\t\t\t\t\t$logdata=array('propertyID'=>$propertyid,'userName'=>$this->userinfo['adminUserFirstName'],'userID'=>$this->userinfo['adminUserID'],'createdBy'=>$this->userinfo['adminUserFirstName'],'actionType'=>'Active','userAccessType'=>'Admin');\n\t\t\t\t\t\t\t$this->AddProperty_model->Insert_data('rp_dbho_property_log',$logdata);\n\t\t\t\t\t\t\t$this->session->set_flashdata('message_type', 'success');\n\t\t\t\t\t\t\t$this->session->set_flashdata('message', $this->config->item(\"PropertyListing\").\"Property $propertykey Activated successfully\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($statusproperty=='Draft'){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($propertyoldstatus=='Draft'){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->session->set_flashdata('message_type', 'success');\n\t\t\t\t\t\t\t\t$this->session->set_flashdata('message', $this->config->item(\"PropertyListing\").\"Property $propertykey Updated successfully\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$data=array('propertyStatus'=>'Draft');\n\t\t\t\t\t\t\t$this->AddProperty_model->InsertProperty('rp_properties',$data,$filter);\n\t\t\t\t\t\t\t$logdata=array('propertyID'=>$propertyid,'userName'=>$this->userinfo['adminUserFirstName'],'userID'=>$this->userinfo['adminUserID'],'createdBy'=>$this->userinfo['adminUserFirstName'],'actionType'=>'Draft','userAccessType'=>'Admin');\n\t\t\t\t\t\t\t$this->AddProperty_model->Insert_data('rp_dbho_property_log',$logdata);\n\t\t\t\t\t\t\t$this->session->set_flashdata('message_type', 'success');\n\t\t\t\t\t\t\t$this->session->set_flashdata('message', $this->config->item(\"PropertyListing\").\"Property $propertykey Added To Draft Successfully\");\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t$this->session->set_flashdata('message_type', 'error');\n\t\t\t\t\t\t\t$this->session->set_flashdata('message', $this->config->item(\"PropertyListing\").'This Action Is Not Apply.Please Try Again!!!');\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\t$this->session->set_flashdata('message_type', 'error');\n\t\t\t\t\t\t$this->session->set_flashdata('message', $this->config->item(\"PropertyListing\").'This Action Is Not Apply.Please Try Again!!!');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif($action==\"Active\"){\n\t\t\t\t\t\n\t\t\t\t\t\tif($propertyoldstatus=='Active'){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->session->set_flashdata('message_type', 'success');\n\t\t\t\t\t\t\t\t$this->session->set_flashdata('message', $this->config->item(\"PropertyListing\").\"Property $propertykey Updated successfully\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($this->checkandconsumuedplan($propertyid,'AddProperty/PropertyListing','property',$userid,'Active')==true){\t\n\t\t\t\t\t\t\t$data=array('propertyStatus'=>'Active','propertyUpdateDate'=>date(\"Y-m-d h:i:s\"));\n\t\t\t\t\t\t\t$this->AddProperty_model->InsertProperty('rp_properties',$data,$filter);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$propertyfilter=array('objectID'=>$propertyid,'objectType'=>'property');\n\t\t\t\t\t\t\t$expirydate=strtotime(\"60 day\",strtotime(date(\"Y-m-d\")));\n\t\t\t\t\t\t\t$propertyexpirydate=array('property_expiry_date'=>date(\"Y-m-d\",$expirydate));\n\t\t\t\t\t\t\t$this->AddProperty_model->InsertProperty('rp_dbho_plan_mapping',$propertyexpirydate,$propertyfilter);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$logdata=array('propertyID'=>$propertyid,'userName'=>$this->userinfo['adminUserFirstName'],'userID'=>$this->userinfo['adminUserID'],'createdBy'=>$this->userinfo['adminUserFirstName'],'actionType'=>'Active','userAccessType'=>'Admin');\n\t\t\t\t\t\t\t$this->AddProperty_model->Insert_data('rp_dbho_property_log',$logdata);\n\t\t\t\t\t\t\t$this->session->set_flashdata('message_type', 'success');\n\t\t\t\t\t\t\t$this->session->set_flashdata('message', $this->config->item(\"PropertyListing\").\"Property $propertykey Activated successfully\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\telseif($action==\"Draft\"){\n\t\t\t\t\t\n\t\t\t\t\t\tif($propertyoldstatus=='Draft'){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->session->set_flashdata('message_type', 'success');\n\t\t\t\t\t\t\t\t$this->session->set_flashdata('message', $this->config->item(\"PropertyListing\").\"This Property $propertykey Is Already In Draft !!\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\t\t\t$data=array('propertyStatus'=>'Draft');\n\t\t\t\t\t\t\t$this->AddProperty_model->InsertProperty('rp_properties',$data,$filter);\n\t\t\t\t\t\t\t$logdata=array('propertyID'=>$propertyid,'userName'=>$this->userinfo['adminUserFirstName'],'userID'=>$this->userinfo['adminUserID'],'createdBy'=>$this->userinfo['adminUserFirstName'],'actionType'=>'Draft','userAccessType'=>'Admin');\n\t\t\t\t\t\t\t$this->AddProperty_model->Insert_data('rp_dbho_property_log',$logdata);\n\t\t\t\t\t\t\t$this->session->set_flashdata('message_type', 'success');\n\t\t\t\t\t\t\t$this->session->set_flashdata('message', $this->config->item(\"PropertyListing\").\"Property $propertykey Inactivated Successfully\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\telseif($action==\"Refresh\"){\n\t\t\t\t\t\n\t\t\t\t\t\t$withoutplan =$this->input->post('withplan');\n\t\t\t\t\t\t$planid =$this->input->post('userplanID');\n\t\t\t\t\t\tif($withoutplan=='Yes'){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$data=array('propertyUpdateDate'=>date(\"Y-m-d h:i:s\"));\n\t\t\t\t\t\t\t$this->AddProperty_model->InsertProperty('rp_properties',$data,$filter);\n\t\t\t\t\t\t\t$propertyfilter=array('objectID'=>$propertyid,'objectType'=>'property');\n\t\t\t\t\t\t\t$expirydate=strtotime(\"60 day\",strtotime(date(\"Y-m-d\")));\n\t\t\t\t\t\t\t$propertyexpirydate=array('property_expiry_date'=>date(\"Y-m-d\",$expirydate));\n\t\t\t\t\t\t\t$propertydetails=$this->AddProperty_model->InsertProperty('rp_dbho_plan_mapping',$propertyexpirydate,$propertyfilter);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$logdata=array('propertyID'=>$propertyid,'userName'=>$this->userinfo['adminUserFirstName'],'userID'=>$this->userinfo['adminUserID'],'createdBy'=>$this->userinfo['adminUserFirstName'],'actionType'=>'Admin Refresh','userAccessType'=>'Admin');\n\t\t\t\t\t\t\t$this->AddProperty_model->Insert_data('rp_dbho_property_log',$logdata);\n\t\t\t\t\t\t\t$this->session->set_flashdata('message_type', 'success');\n\t\t\t\t\t\t\t$this->session->set_flashdata('message', $this->config->item(\"PropertyListing\").\"Property $propertykey Refresh successfully Without Plan!!\");\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\telse{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($this->checkandconsumuedplan($propertyid,'AddProperty/PropertyListing','property',$userid,'Refresh',$planid)==true){\t\n\t\t\t\t\t\t\t$data=array('propertyUpdateDate'=>date(\"Y-m-d h:i:s\"));\n\t\t\t\t\t\t\t$this->AddProperty_model->InsertProperty('rp_properties',$data,$filter);\n\t\t\t\t\t\t\t$propertyfilter=array('objectID'=>$propertyid,'objectType'=>'property');\n\t\t\t\t\t\t\t$expirydate=strtotime(\"60 day\",strtotime(date(\"Y-m-d\")));\n\t\t\t\t\t\t\t$propertyexpirydate=array('property_expiry_date'=>date(\"Y-m-d\",$expirydate),'planID'=>$planid);\n\t\t\t\t\t\t\t$propertydetails=$this->AddProperty_model->InsertProperty('rp_dbho_plan_mapping',$propertyexpirydate,$propertyfilter);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$logdata=array('propertyID'=>$propertyid,'userName'=>$this->userinfo['adminUserFirstName'],'userID'=>$this->userinfo['adminUserID'],'createdBy'=>$this->userinfo['adminUserFirstName'],'actionType'=>'Refresh','userAccessType'=>'Admin');\n\t\t\t\t\t\t\t$this->AddProperty_model->Insert_data('rp_dbho_property_log',$logdata);\n\t\t\t\t\t\t\t$this->session->set_flashdata('message_type', 'success');\n\t\t\t\t\t\t\t$this->session->set_flashdata('message', $this->config->item(\"PropertyListing\").\"Property $propertykey Refresh successfully\");\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\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telseif($action==\"Delete\"){\n\t\t\t\t\t$data=array('propertyStatus'=>'Deleted');\n\t\t\t\t\t$this->AddProperty_model->InsertProperty('rp_properties',$data,$filter);\n\t\t\t\t\t$logdata=array('propertyID'=>$propertyid,'userName'=>$this->userinfo['adminUserFirstName'],'userID'=>$this->userinfo['adminUserID'],'createdBy'=>$this->userinfo['adminUserFirstName'],'actionType'=>'Deleted','userAccessType'=>'Admin');\n\t\t\t\t\t$this->AddProperty_model->Insert_data('rp_dbho_property_log',$logdata);\n\t\t\t\t\t$this->session->set_flashdata('message_type', 'success');\n\t\t\t\t\t$this->session->set_flashdata('message', $this->config->item(\"PropertyListing\").\"Property $propertykey Deleted successfully\");\n\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\t$this->session->set_flashdata('message_type', 'error');\n\t\t\t\t\t$this->session->set_flashdata('message', $this->config->item(\"PropertyListing\").'This Action Is Not Apply.Please Try Again!!!');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\t$this->session->set_flashdata('message_type', 'error');\n\t\t\t\t\t$this->session->set_flashdata('message', $this->config->item(\"PropertyListing\").'Invalid Data Post.Please Try Again!!!');\n\t\t\t}\n\t\tredirect('AddProperty/PropertyListing');\n\t}", "public function create()\n {\n $types=Type::all();\n $regions=Region::all();\n $feature=Feature::all();\n return view('admin.property.create',compact('types','regions','feature'));\n }", "public function create()\n {\n $property = null;\n $categorys = Category::whereNull('parent_id')->get();\n $property_values = null;\n $languages = Language::all();\n return view('property.form',compact('categorys','property','languages', 'property_values'));\n }", "public function create()\n {\n $propertytypes = PropartyType::pluck('type_name','type_id')->all();\n $owners = Owner::pluck('name','id')->all();\n \n return view('properties.create', compact('propertytypes','owners'));\n }", "public function store()\n\t{\n $data \t\t= $this->inputAll();\n $rules = $this->events->getRules();\n\n\n $properties = array();\n unset($data['storage_events_id']);\n if(isset($data['properties_id']) && count($data['properties_id']))\n {\n $properties = (is_array($data['properties_id'])) ? $data['properties_id'] : [];\n unset($data['properties_id']);\n }\n\n $data['is_arifmetic'] = (isset($data['is_arifmetic'])) ? $data['is_arifmetic'] : 0;\n\n $validator \t= $this->validator->make($data, $rules);\n if ($validator->fails())\n {\n return $this->redirect->back()->withErrors($validator)->withInput();\n }\n\n $eventCreated = $this->events->create($data);\n if($eventCreated)\n {\n if(count($properties))\n foreach($properties as $num => $id)\n StorageEventsHasEventsProperties::create(array(\"storage_events_id\" => $eventCreated->id, \"event_prop_id\" => $id));\n }\n\n return $this->redirect('events.index');\n\t}", "public function create() {\n $employees = User::all();\n return view('administrator.setting.property.add_property', compact('employees'));\n }", "public function create()\n {\n $property_types = PropertyType::all();\n $contract_types = ContractType::all();\n $user = Auth::user();\n return view('properties.create', ['property' => new Property,\n 'property_types' => $property_types, 'contract' => new Property,\n 'contract_types' => $contract_types,\n 'user' => $user]);\n }", "public function postPropertyToFacebook($property, $isNew)\n {\n $configClass = self::loadConfig();\n if (($configClass['add_fb'] == 1) and ($configClass['facebook_api'] != \"\") and ($configClass['application_secret'] != \"\")) {\n require JPATH_ROOT . '/components/com_osproperty/helpers/fb/facebook.php';\n $facebook = new Facebook(array('appId' => $configClass['facebook_api'], 'secret' => $configClass['application_secret'], 'cookie' => true));\n\n $url = JRoute::_(\"index.php?option=com_osproperty&task=property_details&id=$property->id\");\n $url = JUri::getInstance()->toString(array('scheme', 'user', 'pass', 'host')) . $url;\n\n switch ($isNew) {\n case 1:\n $message = JText::_('OS_FBLISTING_FB_NEW_TEXT');\n break;\n default:\n $message = JText::_('OS_FBLISTING_FB_UPDATE_TEXT');\n break;\n }\n $message .= '@ ' . $url;\n\n //find thumb\n $db = JFactory::getDbo();\n $db->setQuery(\"Select * from #__osrs_photos where pro_id = '$property->id'\");\n $photos = $db->loadObjectList();\n if (count($photos) > 0) {\n $photo = $photos[0];\n $image = $photo->image;\n if (file_exists(JPATH_ROOT . 'images/osproperty/properties/' . $property->id . '/thumb/' . $image)) {\n $picture = JURI::root() . 'images/osproperty/properties/' . $property->id . '/thumb/' . $image;\n } else {\n $picture = JUri::root() . 'media/com_osproperty/assets/images/nopropertyphoto.png';\n }\n } else {\n $picture = JUri::root() . 'media/com_osproperty/assets/images/nopropertyphoto.png';\n }\n $fbpost = array(\n 'message' => $message,\n 'name' => $property->sef . \", \" . self::getLanguageFieldValue($property, 'pro_name'),\n 'caption' => JText::_('OS_FBLISTING_LINK_CAPTION'),\n 'link' => $url,\n 'picture' => $picture\n );\n\n $result = $facebook->api('/me/feed/', 'post', $fbpost);\n\n return true;\n }\n }", "public function store(Request $request)\n {\n $validatedData = $request->validate([\n \"title_name\" => \"required\",\n \"description\" => \"required\",\n \"price\" => \"required\",\n \"Location\" => \"required\",\n \"address\" => \"required\",\n \"status\" => \"required\",\n ]);\n\n $data = array(\n 'title'=>$title_name,\n 'description'=>$description,\n 'price'=>$price,\n 'location'[\"description\"]=>$location,\n // 'photos'=>@/Users/hello/Downloads/property6.jpg',\n // 'photos'=>@/Users/hello/Downloads/property2.jpg',\n 'location[\"address\"]'=>$address,\n 'location[\"coordinates\"]'=>array(\n [0]=>$lat,\n [1]=>$long\n )\n );\n\n $token = \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVmNTBjN2E3NTUxYWQ4MGJhMjI2MzYyNSIsImlhdCI6MTU5OTEyOTcxMSwiZXhwIjoxNjA2OTA1NzExfQ.p8iG1eorMOMSCKdIyyBaHFlmJTmvdUa7KHINWPtfNTg\";\n $url = 'http://ec2-52-14-234-54.us-east-2.compute.amazonaws.com/api/v1/property/createProperty';\n $ch = curl_init($url);\n $header=array(\n 'Content-Type:application/json',\n 'Authorization: Bearer '.$token\n );\n\n curl_setopt($ch,CURLOPT_HTTPHEADER, $header);\n curl_setopt($ch,CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);\n\n $result = curl_exec($ch);\n curl_close($ch);\n $propertyList = json_decode($result);\n\n session()->flash('message', 'New Property Created Successfully !');\n session()->flash('class', '1');\n return redirect()->route('property');\n }", "public function create()\n {\n return view('properties.create');\n }", "public function create()\n {\n return view('properties.create');\n }", "public function create()\n {\n $model_detail = new PropertyDetail();\n $property = Property::get(['id', 'name']);\n $property_detail = PropertyDetail::get(['id', 'name', 'property_id']);\n return view('product.create', compact('property', 'property_detail', 'model_detail'));\n }", "public function create(){\n\t\t$title = $this->generaltitle;\n\t\t$arrStatedata = State::where('state_status','=','1')->orderBy('state_name', 'asc')->get();\n\t\tforeach($arrStatedata as $state)\n\t\t{\n\t\t\t$statedata[$state->state_id] = $state->state_name;\n\t\t}\n\t\treturn view('admin.property.addproperty')->with(compact('title','statedata'));\n }", "public function store(Request $request)\n {\n\n if (isset($request->property_id) && $request->property_id != 0) {\n $property = Property::where('id', $request->property_id)->first();\n } else {\n $property = Property::where('property', $request->property)->first();\n } \n if (Property::where('property', $request->property)->count() == 0) {\n $property = Property::create($request->all());\n }\n\n echo json_encode($property);\n }", "function inspiry_property_submit_redirect( $updated = false ) {\n\n\t\t// Do not redirect if user is not logged in and guest property submission is enabled\n\t\tif ( ! is_user_logged_in() && inspiry_guest_submission_enabled() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$redirect_url = '';\n\n\t\t$redirect_page_id = get_option( 'inspiry_property_submit_redirect_page' ); // Custom page to redirect to\n\t\tif ( ! empty( $redirect_page_id ) ) {\n\t\t\t$redirect_page_url = get_permalink( $redirect_page_id );\n\t\t} else {\n\t\t\t$redirect_page_url = realhomes_get_dashboard_page_url( 'properties' ); // Default page to redirect\n\t\t}\n\n\t\tif ( ! empty( $redirect_page_url ) ) {\n\t\t\t$key = 'property-added';\n\t\t\tif ( $updated ) {\n\t\t\t\t$key = 'property-updated';\n\t\t\t}\n\t\t\t$redirect_url = add_query_arg( $key, 'true', $redirect_page_url );\n\t\t}\n\n\t\tif ( ! empty( $redirect_url ) ) {\n\t\t\twp_safe_redirect( $redirect_url );\n\t\t\texit;\n\t\t}\n\n\t\treturn false;\n\t}", "public function view_post()\n {\n\n $property_categories = PropertyCategory::select('id','name')->where(array('status'=>1,'language_id'=>1))->get();\n $property_types = PropertyType::select('id','name')->where(array('status'=>1,'language_id'=>1))->get();\n $building_units = BuildingUnits::select('id','unit')->where(array('status'=>1,'language_id'=>1))->get();\n $land_units = LandUnits::select('id','land_unit')->where(array('status'=>1,'language_id'=>1))->get();\n $amenities = Amenities::select('id','name','icon')->where(array('status'=>1,'language_id'=>1))->get();\n $neighbourhoods = Neighbourhood::select('id','name')->where(array('status'=>1,'language_id'=>1))->get();\n \n return view('website::web.property.add_property',compact('property_categories','property_types','building_units','land_units','amenities','neighbourhoods','userCountry','defaultlanguageId'));\n \n }", "public function edit(Property $property)\n {\n //\n }", "public function edit(Property $property)\n {\n //\n }", "public function store(CreateElementPropertyRequest $request)\n {\n $input = $request->all();\n\n $elementProperty = $this->elementPropertyRepository->create($input);\n\n Flash::success('ElementProperty saved successfully.');\n\n return redirect(route('elementProperties.index'));\n }", "public function store()\n\t{\n\t\t// Remove empty and boolean false inputs;\n\t\t\n\t\t$input = array_filter(Input::all());\n\t\t//return $input;\n\t\tif (isset($input['pets_allowed'])) $input['pets_allowed'] = 1;\n\n\t\tif (isset($input['smoking_allowed'])) $input['smoking_allowed'] = 1;\n\t\t\n\t\tif (isset($input['available_at'])) {\n\t\t\t$input['available_at'] = Carbon::parse($input['available_at']);\n\t\t}\n\n\t\t$property = Property::create($input);\n\n\t\tfor ($i=0; $i< rand ( 1 , 5 ); $i++) {\n\t\t\tPhoto::create(['property_id' => $property->id, 'name' => rand (1, 15)]);\n\t\t}\n\n\t\treturn Response::json(array('success' => true));\n\t}", "public function store()\r\n { \r\n \r\n listing::create(Request::all());\r\n\r\n return redirect('listing')->with('success', 'Details has been added successfully');\r\n\r\n\r\n /**\r\n $request->validate([\r\n 'property_name' => 'required',\r\n 'name_owner'=> 'required',\r\n \r\n 'phone_number',\r\n 'email'=> 'required|',\r\n 'location',\r\n 'Ratings'=> 'required|numeric',\r\n 'number_conference_hall'=> 'required|numeric',\r\n 'capacity',\r\n 'price_per_person'=> 'required|numeric',\r\n 'price_per_metre'=> 'required|numeric',\r\n 'price_per_hall'=> 'required|numeric',\r\n 'Description',\r\n 'image',\r\n 'checkbox',\r\n\r\n ]); \r\n \r\n $listing = new listing();\r\n $listing->propert_name=$request->get('property_name');\r\n $listing->name_owner=$request->get('name_owner');\r\n $listing->phone_number=$request->get('name_owner');\r\n $listing->email=$request->get('email');\r\n $listing->location=$request->get('location');\r\n $listing->Ratings=$request->get('Ratings');\r\n $listing->number_conference_hall=$request->get('number_conference_hall');\r\n $listing->capacity=$request->get('capacity');\r\n $listing->price_per_person=$request->get('price_per_person');\r\n $listing->price_per_metre=$request->get('price_per_metre');\r\n $listing->price_per_hall=$request->get('price_per_hall');\r\n $listing->image=$request->get('image');\r\n $checkbox = implode(\",\", $request->get('boxes'));\r\n //$form->dropdown=$request->get('dropdown');\r\n //$form->radio=$request->get('radio');\r\n $listing->checkbox = $checkbox; \r\n $listing->save();\r\n return redirect('listing')->with('success', 'Details has been added successfully');\r\n\r\n if($request->hasFile('file')){ \r\n $request->file('file');\r\n return Storage::putFile('public',$request->file('image'));\r\n //return $name = time().$file->getClientOriginalName();\r\n //return $file->store('storage/app/public', $name);\r\n //return 'yes';\r\n //$file = array_merge(['photo' => \"storage/app/public/{$name}\"], $request->all());\r\n\r\n //Listing::create($file);\r\n\r\n return 'Done';\r\n }else{\r\n return'no file uploaded';\r\n }\r\n\r\n return $request->all();**/\r\n}", "public function addform()\n {\n \n //$this->session_manager->validateFashion(__METHOD__);\n \n $data['cate'] = $this->promo->promoSliderOptionCuisine($by_id=null,$platform=1);\n $data['promo_duration'] = $this->promo->promoDurationOption();\n $data['admin_info'] = $this->promo->adminInfo();\n \n $data['title_type']= 'New Promo Form';\n $data ['content_file']= 'promo_new';\n $data['pageheader'] = \"Add Promo\";\n $data['breadCrumbs'] = '<li class=\"breadcrumb-item\"><a href=\"'.site_url(\"jollofadmin/promos\").'\">Promos</a></li> <li class=\"breadcrumb-item active\">Add Promo</li>';\n $data['mainmenu'] = \"promos\";\n $this->load->view('jollof_admin/layout', $data);\n }", "public function store(PropertyAsigmentRequest $request)\n {\n $property_assignment = Property_assigment::create($request);\n\n flash('Elemento guardado');\n return redirect('/admin/seguimiento-asesores');\n }", "public function save(Request $request) {\n $saveTarget = $request->get('save');\n $closed = false;\n\n if (! $saveTarget) {\n $closed = true;\n }\n\n $id = null;\n\n if ($request->get('_edit')) {\n $id = $request->get('id');\n $redirect = 'admin/property/edit/' . $request->get('id');\n }\n\n /** Form request */\n $this->validations = Validator::make($request->all(), Property::validationRule($id), Property::validationMessage());\n\n if ($this->validations->fails()) {\n return redirect($redirect)->withErrors($this->validations->errors())->withInput();\n }\n\n if ($id) {\n $this->model = Property::findOrFail($request->get('id'));\n }\n\n $lat = $request->get('lat');\n $lng = $request->get('lng');\n\n $this->model->name = $request->get('name');\n $this->model->description = $request->get('description');\n $this->model->property_type_id = $request->get('property_type_id');\n\n if ($lat && $lat) {\n $this->model->gps = $lat . ',' . $lng;\n }\n\n $this->model->save();\n\n $redirect = 'admin/property';\n $redirect = $closed ? $redirect : $redirect . '/new';\n\n return redirect($redirect)->with('success', trans('validation.success'));\n }", "public function store(PropertyClassesFormRequest $request)\n {\n $propertyclasses = new \\App\\PropertyClasses();\n $propertyclasses->title = $request->get('title');\n $propertyclasses->is_active = $request->has('is_active') ? 1 : 0;\n $propertyclasses->save();\n @$message .= 'Property type added.<br/>';\n $fileprefix = 'property-type-';\n $filepath = 'pictures/';\n $filename = str_replace('tmp/', '', $request->input('tmp_img_path_main'));\n if (is_file('tmp/' . $filename)) {\n \\File::move('tmp/' . $filename, $filepath . $fileprefix . $filename);\n $propertyclasses->image = $filepath . $fileprefix . $filename;\n $propertyclasses->save();\n @$message .= 'Picture saved.<br/>';\n } //is_file('tmp/' . $filename)\n return redirect('admin/property-classes/edit/' . $propertyclasses->id)->withMessage($message);\n }", "public function addProperty(Entities\\Devices\\Properties\\Property $property): void\n\t{\n\t\tif (!$this->properties->contains($property)) {\n\t\t\t// ...and assign it to collection\n\t\t\t$this->properties->add($property);\n\t\t}\n\t}", "public function store(CreatePropertyRequest $request)\n {\n $property = Property::create(request()->all());\n $property->category()->sync(request('cat_ids'));\n\n return response()->json([\n 'property' => $property\n ]);\n }", "public function edit_property_owner_details($property_owner_id) \r\n\t{\r\n\t\t // var_dump($property_owner_id); die();\r\n\t\t//form validation rules\r\n\t\t$this->form_validation->set_rules('property_owner_email', 'Email', 'required|xss_clean|exists[property_owners.property_owner_email]|valid_email');\r\n\t\t$this->form_validation->set_rules('property_owner_name', 'Owner Name', 'required|xss_clean');\r\n\t\t$this->form_validation->set_rules('property_owner_phone', '', 'required|xss_clean');\r\n\t\t$this->form_validation->set_rules('property_owner_username', 'Username', 'xss_clean');\r\n\t\t\r\n\t\t//if form has been submitted\r\n\t\tif ($this->form_validation->run())\r\n\t\t{\r\n\t\t\t//check if property_owner has valid login credentials\r\n\t\t\tif($this->property_owners_model->edit_property_owner($property_owner_id))\r\n\t\t\t{\r\n\t\t\t\t$this->session->set_userdata('success_message', 'property_owner edited successfully');\r\n\t\t\t\t$pwd_update = $this->input->post('admin_property_owner');\r\n\t\t\t\tif(!empty($pwd_update))\r\n\t\t\t\t{\r\n\t\t\t\t\tredirect('admin-profile/'.$property_owner_id);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tredirect('real-estate-administration/property-owners');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$data['error'] = 'Unable to add property_owner. Please try again';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//open the add new property_owner page\r\n\t\t$data['title'] = 'Edit administrator';\r\n\t\t$v_data['title'] = $data['title'];\r\n\t\t\r\n\t\t//select the property_owner from the database\r\n\t\t$query = $this->property_owners_model->get_property_owner($property_owner_id);\r\n\t\tif ($query->num_rows() > 0)\r\n\t\t{\r\n\t\t\t$v_data['query'] = $query;\r\n\t\t\t$data['content'] = $this->load->view('property_owners/edit_property_owner', $v_data, true);\r\n\t\t}\r\n\t\t\r\n\t\telse\r\n\t\t{\r\n\t\t\t$data['content'] = 'property_owner does not exist';\r\n\t\t}\r\n\t\t\r\n\t\t$this->load->view('admin/templates/general_page', $data);\r\n\t}", "public function updateLocation(Request $request) {\n\n // Log::info($request->all());\n\n //validate\n $validator = Validator::make($request->all(), [\n 'property_id' => \"required\",\n 'street_address' => 'required',\n 'street_number' => 'required',\n 'city' => 'required',\n 'region' => 'required',\n \"country\" => \"required\",\n \"postal_code\" => \"required\"\n ], \n [\n \"property_id.required\" => \"Invalid Request, Incomplete Parameter\"\n ])->validate(); \n\n $property = Property::find($request->property_id);\n \n if(is_null($property)) {\n return redirect()->back()->with(\"error\", \"Property Not Found\");\n } \n\n $property->street_address = $request->street_address;\n $property->street_number = $request->street_number;\n $property->city = $request->city;\n $property->region = $request->region;\n $property->country = $request->country;\n $property->postal_code = $request->postal_code;\n $property->save();\n\n return redirect()->back()->with(\"success\", \"Property Location Updated Successfully\"); \n\n }", "function add()\n\t{\n\t\t// Initialize variables.\n\t\t$app = & JFactory::getApplication();\n\n\t\t// Clear the link id from the session.\n\t\t$app->setUserState('redirect.edit.link.id', null);\n\n\t\t// Redirect to the edit screen.\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_redirect&view=link&layout=edit&hidemainmenu=1', false));\n\t}", "function doAction() {\n\n\t\t$i18n = new I18n($this->context->config->UI_LANG);\n\n\t\tif (isset($this->session->errorCode)) {\n\t\t\t$listItemProperty = unserialize($this->session->formData);\n\t\t\t$applicationId = $listItemProperty->applicationDefinitionId;\n\t\t} else {\n\t\t\t$listItemPropertyId = Request::get(\n\t\t\t\t\"list_item_property_id\", Request::TYPE_INTEGER, 0);\n\t\t\tif ($listItemPropertyId) {\n\t\t\t\t$listItemProperty = ListItemPropertyDefinition::fetch(\n\t\t\t\t\t$this->context, $listItemPropertyId);\n\t\t\t\t$applicationId = $listItemProperty->applicationDefinitionId;\n\t\t\t} else {\n\t\t\t\t$listItemProperty =\n\t\t\t\t\tnew ListItemPropertyDefinition($this->context);\n\t\t\t\t$applicationId = Request::get(\n\t\t\t\t\t\"application_definition_id\", Request::TYPE_INTEGER, 0);\n\t\t\t}\n\t\t}\n\n\t\t$title = $listItemProperty->id\n\t\t\t? $i18n[\"Edit list item property\"]\n\t\t\t: $i18n[\"Create new list item property\"];\n\n\t\t$helpTexts = array(\n\n\t\tListItemPropertyDefinition::TYPE_INPUT =>\n\t\t$i18n[\"\\nWIDTH\".\n\t\t\t\"\\tWidth of the input box in pixels, number\".\n\t\t\t\"\\tWIDTH=100\".\n\t\t\t\"\\nMAXLENGTH\".\n\t\t\t\"\\tMaximum number of characters that will be accepted\".\n\t\t\t\"\\tMAXLENGTH=50\".\n\t\t\t\"\\n\"],\n\t\t/*$i18n[\"\\nWIDTH\".\n\t\t\t\"\\tBreedte in pixels van de input box, getal\".\n\t\t\t\"\\tWIDTH=100\".\n\t\t\t\"\\nMAXLENGTH\".\n\t\t\t\"\\tMaximaal aantal karkaters dat wordt geaccepteerd\".\n\t\t\t\"\\tMAXLENGTH=50\".\n\t\t\t\"\\n\"],*/\n\n\t\tListItemPropertyDefinition::TYPE_INFO =>\n\t\t$i18n[\"\\nThe info property provides you with a possibility to add \".\n\t\t\t\"informative texts in the dialog window. Just enter the text in \".\n\t\t\t\"the \\\"type data\\\" field. The text can contain HTML.\"],\n\t\t/*$i18n[\"\\nHet info data type is een mogelijkheid om eigen tekst in \".\n\t\t \"het dialoogvenster te zetten. Alleen het \\\"type data\\\" veld hoeft \".\n\t\t \"hier ingevuld te worden. Het veld kan HTML bevatten.\"],*/\n\n\t\tListItemPropertyDefinition::TYPE_HTML_TEXT =>\n\t\t$i18n[\"\\nHEIGHT\".\n\t\t\t\"\\tHeight if the text field in pixels\".\n\t\t\t\"\\tHEIGHT=100\".\n\t\t\t\"\\n\"],\n\t\t/*$i18n[\"\\nHEIGHT\".\n\t\t\t\"\\tHoogte van het textvak in pixels\".\n\t\t\t\"\\tHEIGHT=100\".\n\t\t\t\"\\n\"],*/\n\n\t\tListItemPropertyDefinition::TYPE_TEXT =>\n\t\t$i18n[\"\\nROWS\".\n\t\t\t\"\\tHeight if the text field in rows\".\n\t\t\t\"\\tROWS=5\".\n\t\t\t\"\\n\"],\n\t\t/*$i18n[\"\\nROWS\".\n\t\t\t\"\\tHoogte van het textvak in regels\".\n\t\t\t\"\\tROWS=5\".\n\t\t\t\"\\n\"],*/\n\n\t\tListItemPropertyDefinition::TYPE_IMAGE =>\n\t\t$i18n[\"\\nWIDTH\".\n\t\t\t\"\\tWidth in pixels of the image in the CMS dialog window, number\".\n\t\t\t\"\\tWIDTH=100\".\n\t\t\t\"\\nHEIGHT\".\n\t\t\t\"\\tHeight in pixels of the image in the CMS dialog window, number\".\n\t\t\t\"\\nTEMPLATE_WIDTH\".\n\t\t\t\"\\tSuggested width in pixels when cropping the image, number\".\n\t\t\t\"\\nTEMPLATE_HEIGHT\".\n\t\t\t\"\\tSuggested height in pixels when cropping the image, number\".\n\t\t\t\"\\n\"],\n\t\t/*$i18n[\n\t\t\t\"\\nWIDTH\".\n\t\t\t\"\\tBreedte in pixels van het plaatje in cms dialoogvenster, getal\".\n\t\t\t\"\\tWIDTH=100\".\n\t\t\t\"\\nHEIGHT\".\n\t\t\t\"\\tHoogte in pixels van het plaatje in cms dialoogvenster, getal\".\n\t\t\t\"\\nTEMPLATE_WIDTH\".\n\t\t\t\"\\tVoorgestelde breedte voor het croppen van de afbeelding, getal\".\n\t\t\t\"\\nTEMPLATE_HEIGHT\".\n\t\t\t\"\\tVoorgestelde hoogte voor het croppen van de afbeelding, getal\".\n\t\t\t\"\\n\"],*/\n\n\t\tListItemPropertyDefinition::TYPE_DATE_TIME =>\n\t\t$i18n[\"\\nDEFAULT_VALUE\".\n\t\t\t\"\\tThe 'default' DEFAULT_VALUE is the current date. You can enter \".\n\t\t\t\"NULL if you don't want a default date set. Else you can enter \".\n\t\t\t\"any by PHP:strtotime parseble value as DEFAULT_VALUE.\".\n\t\t\t\"\\tDEFAULT_VALUE=NULL\".\n\t\t\t\"\\tDEFAULT_VALUE=-2 days\".\n\t\t\t\"\\n\"],\n\t\t/*$i18n[\n\t\t\t\"\\nDEFAULT_VALUE\".\n\t\t\t\"\\tDe 'default' DEFAULT_VALUE is de huidige datum. NULL kan je \".\n\t\t\t\"opgeven als je geen default geen waarde ingevuld wilt. Daarnaast \".\n\t\t\t\"kan je elke door PHP:strtotime parsebare waarde als \".\n\t\t\t\"DEFAULT_VALUE opgeven.\".\n\t\t\t\"\\tDEFAULT_VALUE=NULL\".\n\t\t\t\"\\tDEFAULT_VALUE=-2 days\".\n\t\t\t\"\\n\"],*/\n\n\t\tListItemPropertyDefinition::TYPE_SELECT =>\n\t\t$i18n[\"\\nDATA\".\n\t\t\t\"\\tList with items to display in the select list. These are \".\n\t\t\t\"value/text pairs separated by a semicolon. Each value/text pair \".\n\t\t\t\"is on its turn separated by a colon.\".\n\t\t\t\"\\tDATA=M:male;F:Female\".\n\t\t\t\"\\nTYPE\".\n\t\t\t\"\\tSelect list type\".\n\t\t\t\"\\tTYPE=MULTIPLE\".\n\t\t\t\"\\nSIZE\".\n\t\t\t\"\\tSize of the (multiple) select list in rows\".\n\t\t\t\"\\tSIZE=4\".\n\t\t\t\"\\n\"],\n\t\t/*$i18n[\n\t\t\t\"\\nDATA\".\n\t\t\t\"\\tLijst met items die worden getoond in de select list. \".\n\t\t\t\"Waarde-tekst paren gescheiden door een punt-komma. Elk \".\n\t\t\t\"waarde-tekst paar is weer gescheiden door een dubbele punt.\".\n\t\t\t\"\\tDATA=M:male;F:Female\".\n\t\t\t\"\\nTYPE\".\n\t\t\t\"\\tType van de select list\".\n\t\t\t\"\\tTYPE=MULTIPLE\".\n\t\t\t\"\\nSIZE\".\n\t\t\t\"\\tGrootte van de (multiple) select list\".\n\t\t\t\"\\tSIZE=4\".\n\t\t\t\"\\n\"],*/\n\n\t\t\"col\" =>\n\t\t$i18n[\"Settings for the property in column layout\".\n\t\t\t\"\\nCOL_WIDTH\".\n\t\t\t\"\\tcolumn width, number (defaults to 100)\".\n\t\t\t\"\\tCOL_WIDTH=125\".\n\t\t\t\"\\nCOL_ALIGN\".\n\t\t\t\"\\tAlingment of the column. left-center-right (defaults to 'left')\".\n\t\t\t\"\\tCOL_ALIGN=center\".\n\t\t\t\"\\nCOL_IS_NUMERIC\".\n\t\t\t\"\\tTo indicate that column contains a numerical value so that \".\n\t\t\t\"these columns will be sorted correctly, true-false (defaults \".\n\t\t\t\"to false)\".\n\t\t\t\"\\tCOL_IS_NUMERIC=true\".\n\t\t\t\"\\n\"],\n\t\t/*$i18n[\"Instellingen voor velden in kolom lay out\".\n\t\t\t\"\\nCOL_WIDTH\".\n\t\t\t\"\\tkolombreedte, getal (default waarde is 100)\".\n\t\t\t\"\\tCOL_WIDTH=125\".\n\t\t\t\"\\nCOL_ALIGN\".\n\t\t\t\"\\tUitlijning van de kolom. left-center-right (default waarde \".\n\t\t\t\"is 'left')\".\n\t\t\t\"\\tCOL_ALIGN=center\".\n\t\t\t\"\\nCOL_IS_NUMERIC\".\n\t\t\t\"\\tGeef aan dat de waarde nummeriek is, zodat kolommen met \".\n\t\t\t\"getallen goed worden gesorteerd, true-false (default waarde \"\n\t\t\t\"is false)\".\n\t\t\t\"\\tCOL_IS_NUMERIC=true\".\n\t\t\t\"\\n\"],*/\n\t\t);\n\n\t\t$tr = \"../ScrivoUi/Config/Templates\";\n\t\tinclude \"{$tr}/common.tpl.php\";\n\t\tinclude \"{$tr}/Forms/list_item_property_form.tpl.php\";\n\t\t$this->useLayout(\"{$tr}/master.tpl.php\");\n\n\t\t$this->setResult(self::SUCCESS);\n\n\t}", "public function addProduct()\n {\n if (!isset($_POST['newProd'])) {\n \n $this->reqView('AddProduct');\n\n } else {\n \n // instantiate admin model\n $this->initModel('NewProduct_model');\n \n // call addProduct method in model and check if the model successfuly added a new product to database\n if($this->modelObj->addProduct() || $_POST['newProdStatus'] == 'success')\n {\n\n // require the add product view\n $this->reqView('AddProduct');\n \n } else {\n\n echo 'Error, contact site administrator';\n }\n }\n \n // check if user selected the add variant option(pushed button)\n if(isset($_POST['addVariant']['status']) && $_POST['addVariant']['status'] == 'true')\n {\n //call model to handle new variant input\n $this->initModel('AddVariant_model');\n }\n }", "public function updatePropertyToFacebook($property,$isNew){\n require JPATH_ROOT.'/components/com_osproperty/helpers/inc/facebook.php';\n require_once JPATH_ROOT.'/components/com_osproperty/helpers/route.php';\n $configClass = self::loadConfig();\n $needs = array();\n $needs[] = \"property_details\";\n $needs[] = $property->id;\n $itemid = OSPRoute::getItemid($needs);\n $url = JURI::root().\"index.php?option=com_osproperty&task=property_details&id=$property->id&Itemid=\".$itemid;\n $url = self::get_tiny_url($url);\n switch ($isNew){\n case \"1\":\n $message = JText::_('OS_NEW_PROPERTY_POSTED');\n break;\n default:\n $message = JText::_('OS_PROPERTY_UPDATED');\n break;\n }\n $appid = $configClass['fb_app_id'];\n $appkey = $configClass['fb_app_secret'];\n\n if(!$facebook = new Facebook(array( 'appId' => $appid, 'secret' => $appkey, 'cookie' => true ))) return false;\n\n $access_token = $configClass['access_token'];\n if($access_token == \"\") {return false;}\n $facebook->setAccessToken($access_token);\n\n $message .= '@ '.$url;\n\n $db = JFactory::getDbo();\n $db->setQuery(\"Select image from #__osrs_photos where pro_id = '$property->id'\");\n $image = $db->loadResult();\n $thumb = \"\";\n if(($image != \"\") and (file_exists(JPATH_ROOT.'/images/osproperty/properties/'.$property->id.'/medium/'.$image))){\n $thumb = JUri::root().'images/osproperty/properties/'.$property->id.'/medium/'.$image;\n }\n\t\tif(OSPHelper::getLanguageFieldValue($property,'price_text') != \"\"){\n\t\t\t$message .= \" - \".OSPHelper::getLanguageFieldValue($property,'price_text');\n\t\t}elseif(($property->price_call == 0) and ($property->price > 0)){\n $message .= \" - \".HelperOspropertyCommon::showPrice($property->price).\" \".self::loadCurrencyCode($property->curr);\n if($property->rent_time != \"\"){\n $message .= \" \".JText::_($property->rent_time);\n }\n }\n\t\tif((int)$configClass['facebook_version'] == 0){\n\t\t\t$fbpost = array(\n\t\t\t\t'message' => $message,\n\t\t\t\t'link' => $url\n\t\t\t);\n\t\t}else{\n\t\t\t$fbpost = array(\n\t\t\t\t'message' => $message,\n\t\t\t\t'name' => $property->pro_name,\n\t\t\t\t'caption' => $property->pro_name,\n\t\t\t\t'link' => $url,\n\t\t\t\t'picture' => $thumb\n\t\t\t);\n\t\t}\n $fb_target = $configClass['fb_target'];\n if($fb_target == \"\"){\n $post_url = \"/me/feed/\";\n }else{\n $post_url = \"/\".$fb_target.\"/feed/\";\n }\n $result = $facebook->api($post_url, 'post', $fbpost);\n return $result;\n }", "public function testItCanSaveANewProperty(): void\n {\n $this->browse(function (Browser $browser){\n $browser->pause(100);\n\n $property_type = factory(TipoPropiedad::class)->create(['estatus' => 1]);\n $lessor = factory(Lessor::class)->create(['estatus' => true]);\n $browser->loginAs(factory(User::class)->create())\n ->visit(route('finca.create'))\n ->on(new CreatePropertyPage())\n ->assertSee('Nuevo Inmueble');\n\n $browser->pause(50);\n\n $browser->type('name', $this->faker->name);\n $browser->type('geolocation', $this->faker->name);\n $browser->pause(50);\n $browser->selectLessor($lessor->id);\n $browser->pause(100);\n $browser->radio('recibo', Property::RECIBO_STRING_NO_FISCAL_VALUE);\n\n $browser->select('property_type_id', (string) $property_type->id_tipo_propiedad);\n\n// $browser->click('#search_lessor');\n// $browser->pause(400);\n// $browser->waitFor('#modal-arrendador', 10);\n// $browser->click('.item');\n// $browser->waitFor('input[name=address]', 10);\n// $browser->pause(5500);\n\n $browser->type('address', $this->faker->streetName);\n $browser->typeSlowly('maintenance', $this->faker->numerify('####'));\n $browser->typeSlowly('water_fee', $this->faker->numerify('####'));\n $browser->typeSlowly('energy_fee', $this->faker->numerify('####'));\n $browser->typeSlowly('water_account_number', $this->faker->numerify('####'));\n $browser->typeSlowly('predial', $this->faker->numerify('##################'));\n\n $browser->scrollTo('button[type=submit]');\n $browser->click('button[type=submit]');\n\n $browser->assertUrlIs(route('finca.index'));\n });\n }", "public static function claimPropertyAction() {\n $token = self::getPropertyClaimToken();\n if(empty($token)){\n $referer = wp_get_referer();\n if (empty($referer)) {\n $referer = 'index.php';\n }\n $query = parse_url($referer, PHP_URL_QUERY);\n // Returns a string if the URL has parameters or NULL if not\n if (!empty($query)) {\n $referer .= '&claim_property_error=1';\n } else {\n $referer .= '?claim_property_error=1';\n }\n wp_redirect($referer);\n return;\n }\n // If the token is received though, redirect to signup with the intent to claim-property\n wp_redirect('https://getadmiral.com/a/signup?i=claim-property&t=' . $token . '&d=' . get_site_url() . '&p=' . self::getPropertyID() . '&aid=' . self::$clientID);\n }", "public function storeSucceed()\r\n {\r\n return redirect()->to(handles('antares::install/components'));\r\n }", "public function add() {\r\n if ($this->input->server('REQUEST_METHOD') === 'POST') {\r\n //form validation\r\n $this->form_validation->set_rules('opportunity_title', 'Title', 'trim|required|xss_clean');\r\n $this->form_validation->set_rules('opportunity_location', 'Location', 'trim|required|xss_clean');\r\n\r\n //if the form has passed through the validation\r\n if ($this->form_validation->run()) {\r\n $data_to_store = array(\r\n 'opportunity_title' => $this->input->post('opportunity_title'),\r\n 'opportunity_location' => $this->input->post('opportunity_location'),\r\n 'opportunity_sub_location' => $this->input->post('opportunity_sub_location'),\r\n 'opportunity_description' => $this->input->post('opportunity_description')\r\n );\r\n\r\n //if the insert has returned true then we show the flash message\r\n if ($this->Opportunity_model->insert($data_to_store)) {\r\n $this->session->set_flashdata('flash_message', TRUE);\r\n redirect(current_url());\r\n } else {\r\n $this->session->set_flashdata('flash_message', FALSE);\r\n }\r\n } else {\r\n $this->session->set_flashdata('flash_message', FALSE);\r\n }\r\n }\r\n //load the view\r\n $data['content'] = 'admin/opportunities/add';\r\n $this->load->view('includes/admin_template', $data);\r\n }", "protected function instantAdd() {\r\n\t\t$this->redirect(array('action' => 'edit', 'id' => $this->{$this->modelClass}->bsAdd()));\r\n }", "protected static function addOrEditPropertiesToDB($properties)\n {\n\n if (is_array($properties) && !empty($properties)) {\n foreach ($properties['properties'] as $property) {\n $checkExistence = DB::select(\n \"SELECT `property_id` FROM `apimo_properties` WHERE property_id = ?\",\n [$property['id']]\n );\n if (empty($checkExistence)) {\n DB::insert(\n 'INSERT INTO `apimo_properties` ( `property_id`, `agency`, `reference`, `status`, `user`, `step`, `parent`, `category`, `subcategory`, `name`, `type`, `subtype`, `agreement`, `block_name`, `address`, `address_more`, `publish_address`, `country`, `city`, `district`, `longitude`, `latitude`, `radius`, `area_unit`, `area_surface`, `rooms`, `bedrooms`, `sleeps`, `price`, `price_max`, `price_period`, `price_currency`, `residence`, `view`, `landscape`, `floor`, `heating`, `water`, `condition`, `standing`, `style`, `construction_year`, `renovation_year`, `available_at`, `delivered_at`, `activities`, `orientations`, `services`, `proximities`, `tags`, `tags_customized`, `pictures`, `areas`, `regulations`, `created_at`, `updated_at`)\n VALUES ( :property_id, :agency, :reference, :status, :user, :step, :parent, :category, :subcategory, :name, :type, :subtype, :agreement, :block_name, :address, :address_more, :publish_address, :country, :city, :district, :longitude, :latitude, :radius, :area_unit, :area_surface, :rooms, :bedrooms, :sleeps, :price, :price_max, :price_period, :price_currency, :residence, :view, :landscape, :floor, :heating, :water, :condition, :standing, :style, :construction_year, :renovation_year, :available_at, :delivered_at, :activities, :orientations, :services, :proximities, :tags, :tags_customized, :pictures, :areas, :regulations, :created_at, :updated_at)',\n [\n 'property_id' => $property['id'],\n 'agency' => $property['user']['agency'],\n 'reference' => $property['reference'],\n 'status' => $property['status'],\n 'user' => $property['user']['id'],\n 'step' => $property['step'],\n 'parent' => $property['parent'],\n 'category' => $property['category'],\n 'subcategory' => $property['subcategory'],\n 'name' => $property['name'],\n 'type' => $property['type'],\n 'subtype' => $property['subtype'],\n 'agreement' => $property['agreement']['type'],\n 'block_name' => $property['block_name'],\n 'address' => $property['address'],\n 'address_more' => $property['address_more'],\n 'publish_address' => $property['publish_address'],\n 'country' => $property['country'],\n 'city' => self::addOrUpdateCity($property['city']),\n 'district' => self::addOrUpdateDistrict($property['district']),\n 'longitude' => $property['longitude'],\n 'latitude' => $property['latitude'],\n 'radius' => $property['radius'],\n 'area_unit' => $property['area']['unit'],\n 'area_surface' => ((!empty($property['area']['value']) || !empty($property['area']['total'])) ? (($property['area']['value'] < $property['area']['total']) ? $property['area']['total'] : $property['area']['value']) : 0),\n 'rooms' => $property['rooms'],\n 'bedrooms' => $property['bedrooms'],\n 'sleeps' => $property['sleeps'],\n 'price' => ((isset($property['price']['value']) && !empty($property['price']['value'])) ? $property['price']['value'] : 0),\n 'price_max' => ((isset($property['price']['max']) && !empty($property['price']['max'])) ? $property['price']['max'] : 0),\n 'price_period' => ((isset($property['price']['period']) && !empty($property['price']['period'])) ? $property['price']['period'] : ''),\n 'price_currency' => ((isset($property['price']['currency'])) ? $property['price']['currency'] : ''),\n 'residence' => self::addOrUpdateResidence($property['residence']),\n 'view' => self::addOrUpdateView($property['view'], $property['id']),\n 'landscape' => (!empty($property['view']['landscape']) ? implode(',', $property['view']['landscape']) : ''),\n 'floor' => self::addOrUpdateFloor($property['floor'], $property['id']),\n 'heating' => self::addOrUpdateHeating($property['heating'], $property['id']),\n 'water' => self::addOrUpdateWater($property['water'], $property['id']),\n 'condition' => $property['condition'],\n 'standing' => $property['standing'],\n 'style' => $property['style']['name'],\n 'construction_year' => $property['construction_year'],\n 'renovation_year' => $property['renovation_year'],\n 'available_at' => $property['available_at'],\n 'delivered_at' => $property['delivered_at'],\n 'activities' => (!empty($property['activities']) ? implode(\n ',',\n $property['activities']\n ) : ''),\n 'orientations' => (!empty($property['orientations']) ? implode(\n ',',\n $property['orientations']\n ) : ''),\n 'services' => (!empty($property['services']) ? implode(',', $property['services']) : ''),\n 'proximities' => (!is_null($property['proximities']) ? implode(\n ',',\n $property['proximities']\n ) : ''),\n 'tags' => (!empty($property['tags']) ? implode(',', $property['tags']) : ''),\n 'tags_customized' => (!empty($property['tags_customized']) ? implode(\n ',',\n $property['tags_customized']\n ) : ''),\n 'pictures' => self::addOrUpdatePictures($property['pictures']),\n 'areas' => self::addOrUpdateAreas($property['areas'], $property['id']),\n 'regulations' => self::addOrUpdateRegulations($property['regulations'], $property['id']),\n 'created_at' => $property['created_at'],\n 'updated_at' => $property['updated_at'],\n ]\n );\n self::addOrUpdateUser($property['user']);\n self::addOrUpdateComments($property['comments'], $property['id']);\n self::setPropertyHash($property);\n } else {\n if (self::checkPropertyUpdateByHash($property)) {\n DB::update(\n 'UPDATE `apimo_properties` SET \n `agency`= :agency, \n `reference`= :reference, \n `status`= :status, \n `user` = :user, \n `step` = :step, \n `parent` = :parent, \n `category` = :category, \n `subcategory` = :subcategory, \n `name` = :name, \n `type` = :type, \n `subtype` = :subtype,\n `agreement` = :agreement, \n `block_name` = :block_name, \n `address` = :address, \n `address_more` = :address_more, \n `publish_address` = :publish_address, \n `country` = :country, \n `city` = :city, \n `district` = :district, \n `longitude` = :longitude, \n `latitude` = :latitude, \n `radius` = :radius, \n `area_unit` = :area_unit, \n `area_surface` = :area_surface, \n `rooms` = :rooms, \n `bedrooms` = :bedrooms, \n `sleeps` = :sleeps, \n `price` = :price, \n `price_max` = :price_max, \n `price_period` = :price_period, \n `price_currency` = :price_currency, \n `residence` = :residence, \n `view` = :view, \n `landscape = :landscape, \n `floor` = :floor, \n `heating` = :heating, \n `water` = :water, \n `condition` = :condition, \n `standing` = :standing, \n `style` = :style, \n `construction_year` = :construction_year, \n `renovation_year` = :renovation_year, \n `available_at` = :available_at, \n `delivered_at` = :delivered_at, \n `activities` = :activities, \n `orientations` = :orientations, \n `services` = :services, \n `proximities` = :proximities, \n `tags` = :tags, \n `tags_customized` = :tags_customized, \n `pictures` = :pictures, \n `areas` = :areas, \n `regulations` =:regulations,\n `created_at` = :created_at, \n `updated_at` = :updated_at \n WHERE property_id = :property_id',\n [\n 'property_id' => $property['id'],\n 'agency' => $property['user']['agency'],\n 'reference' => $property['reference'],\n 'status' => $property['status'],\n 'user' => $property['user']['id'],\n 'step' => $property['step'],\n 'parent' => $property['parent'],\n 'category' => $property['category'],\n 'subcategory' => $property['subcategory'],\n 'name' => $property['name'],\n 'type' => $property['type'],\n 'subtype' => $property['subtype'],\n 'agreement' => $property['agreement']['type'],\n 'block_name' => $property['block_name'],\n 'address' => $property['address'],\n 'address_more' => $property['address_more'],\n 'publish_address' => $property['publish_address'],\n 'country' => $property['country'],\n 'city' => self::addOrUpdateCity($property['city']),\n 'district' => self::addOrUpdateDistrict($property['district']),\n 'longitude' => $property['longitude'],\n 'latitude' => $property['latitude'],\n 'radius' => $property['radius'],\n 'area_unit' => $property['area']['unit'],\n 'area_surface' => ((!empty($property['area']['value']) || !empty($property['area']['total'])) ? (($property['area']['value'] < $property['area']['total']) ? $property['area']['total'] : $property['area']['value']) : 0),\n 'rooms' => $property['rooms'],\n 'bedrooms' => $property['bedrooms'],\n 'sleeps' => $property['sleeps'],\n 'price' => ((isset($property['price']['value']) && !empty($property['price']['value'])) ? $property['price']['value'] : 0),\n 'price_max' => ((isset($property['price']['max']) && !empty($property['price']['max'])) ? $property['price']['max'] : 0),\n 'price_period' => ((isset($property['price']['period']) && !empty($property['price']['period'])) ? $property['price']['period'] : ''),\n 'price_currency' => ((isset($property['price']['currency'])) ? $property['price']['currency'] : ''),\n 'residence' => self::addOrUpdateResidence($property['residence']),\n 'view' => self::addOrUpdateView($property['view'], $property['id']),\n 'landscape' => (!empty($property['view']['landscape']) ? implode(',', $property['view']['landscape']) : ''),\n 'floor' => self::addOrUpdateFloor($property['floor'], $property['id']),\n 'heating' => self::addOrUpdateHeating($property['heating'], $property['id']),\n 'water' => self::addOrUpdateWater($property['water'], $property['id']),\n 'condition' => $property['condition'],\n 'standing' => $property['standing'],\n 'style' => $property['style']['name'],\n 'construction_year' => $property['construction_year'],\n 'renovation_year' => $property['renovation_year'],\n 'available_at' => $property['available_at'],\n 'delivered_at' => $property['delivered_at'],\n 'activities' => (!empty($property['activities']) ? implode(\n ',',\n $property['activities']\n ) : ''),\n 'orientations' => (!empty($property['orientations']) ? implode(\n ',',\n $property['orientations']\n ) : ''),\n 'services' => (!empty($property['services']) ? implode(\n ',',\n $property['services']\n ) : ''),\n 'proximities' => (!is_null($property['proximities']) ? implode(\n ',',\n $property['proximities']\n ) : ''),\n 'tags' => (!empty($property['tags']) ? implode(\n ',',\n $property['tags']\n ) : ''),\n 'tags_customized' => (!empty($property['tags_customized']) ? implode(\n ',',\n $property['tags_customized']\n ) : ''),\n 'pictures' => self::addOrUpdatePictures($property['pictures']),\n 'areas' => self::addOrUpdateAreas($property['areas'], $property['id']),\n 'regulations' => self::addOrUpdateRegulations($property['regulations'], $property['id']),\n 'created_at' => $property['created_at'],\n 'updated_at' => $property['updated_at'],\n ]\n );\n self::addOrUpdateUser($property['user']);\n self::addOrUpdateComments($property['comments'], $property['id']);\n }\n }\n }\n }\n self::setSyncLastTime();\n }", "function add()\n\t{\n\t\t// hien thi form them san pham\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/add');\n\t}", "public function addOneAction()\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['productName']),\n\t\t\t'description' => trim($_POST['description']),\n\t\t\t'imagePath' => (!empty($_POST['imagePath']))? trim($_POST['imagePath']) : null,\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];\n\n\t\t//mémorisation pour ré-afficher les données entrées en cas d'erreur\n\t\t$_SESSION['forms']['adminAddProduct']['fieldsContent'] = $enteredData;\n\t\t$requiredFields = ['name', 'description', 'imagePath', 'priceHT', 'VATRate', 'idCategory'];\n\t\t$requiredFieldsNumber = count($requiredFields);\n\n\t\tfor ($i=0; $i < $requiredFieldsNumber; $i++) { \n\t\t\tif(!array_key_exists($requiredFields[$i], $enteredData))\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($enteredData[$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//ajout dans la BDD\n\t\t$requiredData = $enteredData;\n\t\t$productsManager = new ProductsManager();\n\t\t$productAdded = $productsManager -> addOne($requiredData);\n\n\t\tif($productAdded)\n\t\t{\n\t\t\t$_SESSION['alertMessages']['success'][] = 'Le produit a bien été ajouté !';\n\t\t\tunset($_SESSION['forms']['adminAddProduct']['fieldsContent']);\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'][] = 'L\\'ajout du produit a échoué !';\n\t\t\theader('Location:'.CLIENT_ROOT.'products/manageForm');\n\t\t\texit();\n\t\t}\n\t}", "function InsertProperty($formid=false)\n\t{\t\n\t\t$data=$_POST;\n\t\t\n\t\t$date=date(\"Y-m-d h:i:s\");\n\t\t\n\t\tif(!empty($formid))\n\t\t{\n\t\t\t$formname=\"form-\";\n\t\t\t$formname.=$formid;\n\t\t}\n\t\t\n\t\tif(!empty($data) || $formname==\"form-2\")\n\t\t\t{\n\t\t\t\t$data1=array();\n\t\t\t\t$data2=array();\n\t\t\t\t$mappingtabledata=array();\n\t\t\t\t$mappingtableplanid='';\n\t\t\t\t\n\t\t\t\tif($formname==\"form-1\")\n\t\t\t\t{\n\t\t\t\t\t$propertyprice=array();\n\t\t\t\t\t$selectattribute=array();\n\t\t\t\t\t$selectattributeval=array();\n\t\t\t\t\t$textattribute=array();\n\t\t\t\t\t$multiattribute=array();\n\t\t\t\t\t$amenitiesdata=array();\n\t\t\t\t\t$amenitiesvalue=array();\n\t\t\t\t\t$newpassiondate='';\n\t\t\t\t\t$noofbedroom='';$propertytypename='';$coveredarea='';$projectname='';$propertypurpose='';$sublocality='';$locality='';\n\t\t\t\t\tforeach($data as $key=> $datas)\n\t\t\t\t\t{\n\t\t\t\t\t\t$datas=preg_replace('/\\s\\s+/', ' ',$datas);\n\t\t\t\t\t\tif($key==\"userID\"){\n\t\t\t\t\t\t $data1['userID']=$datas;\n\t\t\t\t\t\t \n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($key==\"propertyTypeID\"){\n\t\t\t\t\t\t $data1['propertyTypeID']= $datas;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($key==\"propertyPurpose\"){\n\t\t\t\t\t\t $data1['propertyPurpose']=$propertypurpose= $datas;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($key==\"propertyStatus\"){\n\t\t\t\t\t\t $data1['propertyStatus']= $datas;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($key==\"projectID\"){\n\t\t\t\t\t\t $data1['projectID']= $datas;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($key==\"type\"){\n\t\t\t\t\t\t $data1['type']= $datas;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($key==\"isNegotiable\"){\n\t\t\t\t\t\t $data1['isNegotiable']= $datas;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($key==\"propertyName\") //Data 2 start..................................................\n\t\t\t\t\t\t{\n\t\t\t\t\t\t $data2['propertyName']= $datas;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($key==\"propertyDescription\"){\n\t\t\t\t\t\t $data2['propertyDescription']= $datas;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($key==\"showpriceas\"){\n\t\t\t\t\t\t $data1['isNegotiable']= $datas;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($key==\"lat\"){\n\t\t\t\t\t\t $data1['propertyLatitude']= $datas;\n\t\t\t\t\t\t \n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($key==\"lng\"){\n\t\t\t\t\t\t $data1['propertyLongitude']= $datas;\n\t\t\t\t\t\t \n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($key==\"postal_code\"){\n\t\t\t\t\t\t $data1['propertyZipCode']= $datas;\n\t\t\t\t\t\t \n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($key==\"sublocality\"){\n\t\t\t\t\t\t $data2['propertyLocality']= $datas;\n\t\t\t\t\t\t \n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($key==\"propertyAddress2\"){\n\t\t\t\t\t\t $data2['propertyAddress2']= $datas;\n\t\t\t\t\t\t \n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($key==\"propertyAddress1\"){\n\t\t\t\t\t\t $data2['propertyAddress1']= $datas;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($key==\"propertyPrice\"){\n\t\t\t\t\t\t $propertyprice['propertyPrice']= $datas;\n\t\t\t\t\t\t} \n\t\t\t\t\t\telseif($key==\"currentstatus\"){\n\t\t\t\t\t\t $data1['propertyCurrentStatus']= $datas;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($key==\"year\"){\n\t\t\t\t\t\t $year= $datas;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($key==\"month\"){\n\t\t\t\t\t\t $month= $datas;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($key==\"day\"){\n\t\t\t\t\t\t $day= $datas;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($key==\"propertyAddress\"){\n\t\t\t\t\t\t $add3= $datas;\n\t\t\t\t\t\t \n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n/********************************Code for city,state,county,citylocality Get ID For insert start**********************************/\n\t\t\t\t\t/* if(!empty($add3))\n\t\t\t\t\t{ */\n\t\t\t\t\t\tif($key==\"country\"){\n\t\t\t\t\t\t $addarray['country']= $datas;\n\t\t\t\t\t\t \n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($key==\"administrative_area_level_1\"){\n\t\t\t\t\t\t $addarray['administrative_area_level_1']= $datas;\n\t\t\t\t\t\t \n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($key==\"locality\"){\n\t\t\t\t\t\t $addarray['locality']=$locality= $datas;\n\t\t\t\t\t\t \n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($key==\"sublocality\"){\n\t\t\t\t\t\t $addarray['sublocality']=$sublocality= $datas;\n\t\t\t\t\t\t \n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($key==\"lat\"){\n\t\t\t\t\t\t $addarray['propertyLatitude']= $datas;\n\t\t\t\t\t\t \n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($key==\"lng\"){\n\t\t\t\t\t\t $addarray['propertyLongitude']= $datas;\n\t\t\t\t\t\t \n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$data1['propertyFeatured']= 'OFF';\n\t\t\t\t\t\n\t\t\t\t\t//}\n/*******************************Code for city,state,county,citylocality Get ID For insert END*************************************/\t\t\t\t\t\n\t\t\t\t\t\t\n/*************************************paln id mapping with property***************************************************************/\n\t\t\t\t\t\tif($key==\"planid\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$mappingtableplanid= $datas;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n/************************************paln id mapping with property*****************************************************************/\n\t\n/***************************************Amenities Start***************************************************************************/\n\t\t\t\t\t\telseif($key==\"Amenities\"){\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$string1 = '';\n\t\t\t\t\t\t\t$string2 = '';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(!empty($datas)){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tforeach($datas as $amenities){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$amenitiesarr=explode(\"#\",$amenities);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$string1.= rtrim($amenitiesarr[1]).'#|#';\n\t\t\t\t\t\t\t\t\t$string2.= rtrim($amenitiesarr[2]).'#|#';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$amenitiesdata[]=array('attributeID'=>$amenitiesarr[0],'attrOptionID'=>substr($string1,0,-3));\n\t\t\t\t\t\t\t\t$amenitiesvalue[]=array('attrDetValue'=>substr($string2,0,-3));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\t\t\t\t\t\t\t\t\t\t\t\n/****************************************Attributes strat************************************************************************/\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(!empty($key)){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$typeofattribute=explode(\"-\",$key);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(count($typeofattribute)>1){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif($typeofattribute[0]==\"select\"){\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif(!empty($datas)){\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t$optionidselect=explode(\"#\",$datas);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($typeofattribute[1]==1){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$noofbedroom=$optionidselect[1];\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t$selectattribute[]=array('attributeID'=>$typeofattribute[1],'attrOptionID'=>$optionidselect[0]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$selectattributeval[]=array('attrDetValue'=>$optionidselect[1]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telseif($typeofattribute[0]==\"text\"){\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t if(!empty($datas)){\n\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t\t $size='';\n\t\t\t\t\t\t\t\t\t\t\t\t if($typeofattribute[1]==4){\n\t\t\t\t\t\t\t\t\t\t\t\t\t $coveredarea=$datas;\n\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\t$selectattribute[]=array('attributeID'=>$typeofattribute[1],'attrOptionID'=>0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t$selectattributeval[]=array('attrDetValue'=>\"$datas \");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telseif($typeofattribute[0]==\"multi\"){\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t$stringmulti1 = '';\n\t\t\t\t\t\t\t\t\t\t\t$stringmulti2 = '';\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif(!empty($datas)){\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tforeach($datas as $attributemulti){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t$multiarr=explode(\"#\",$attributemulti);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t$stringmulti1.= rtrim($multiarr[0]).'#|#';\n\t\t\t\t\t\t\t\t\t\t\t\t\t$stringmulti2.= rtrim($multiarr[1]).'#|#';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t$selectattribute[]=array('attributeID'=>$typeofattribute[1],'attrOptionID'=>substr($stringmulti1,0,-3));\n\t\t\t\t\t\t\t\t\t\t\t\t\t$selectattributeval[]=array('attrDetValue'=>substr($stringmulti2,0,-3));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n/*******************************************************Passession Date************************************************************/\n\t\t\t\t\tif(!empty($month)){\n\t\t\t\t\t\t$newpassiondate.=$month;\n\t\t\t\t\t}\n\t\t\t\t\tif(!empty($year)){ \n\t\t\t\t\t\t$newpassiondate.=',';$newpassiondate.=$year;\n\t\t\t\t\t}\n\t\t\t\t\tif(!empty($day)){\n\t\t\t\t\t\t$newpassiondate.=',';$newpassiondate.=$day;\n\t\t\t\t\t}\n\t\t\t\t\tif(!empty($newpassiondate)){\n\t\t\t\t\t\t\t$data1['possessionDate']= $newpassiondate;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($addarray))\n\t\t\t\t\t{\n\t\t\t\t\t\t$addressids=$this->AddProperty_model->Getaddressids($addarray);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!empty($addressids)){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t $data1['countryID']= $addressids['countryID'];\n\t\t\t\t\t\t $data1['stateID']= $addressids['stateID'];\n\t\t\t\t\t\t $data1['cityID']= $addressids['cityID'];\n\t\t\t\t\t\t $data1['cityLocID']= $addressids['cityLocID'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t $data1['countryID']= '99';\n\t\t\t\t\t\t\t $data1['stateID']= '1';\n\t\t\t\t\t\t\t $data1['cityID']= '1';\n\t\t\t\t\t\t\t $data1['cityLocID']= '';\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\t\n\t\t\t\t\t\t\t \n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($data['propertyID'])){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$filter1=array('propertyID'=>$data['propertyID']);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!empty($data1['projectID']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$projectid=$data1['projectID'];\n\t\t\t\t\t\t\t$projectnames=$this->AddProperty_model->get_project(\" and rp_projects.projectID=$projectid\");\n\t\t\t\t\t\t\tif(!empty($projectnames)){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif($projectnames[0]->cityID){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$cityinfo=$this->AddProperty_model->Getotherdata('rp_city_details',array('cityID'=>$projectnames[0]->cityID,'languageID'=>1));\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$citylocinfo=$this->AddProperty_model->Getotherdata('rp_city_locations',array('cityLocID'=>$projectnames[0]->cityLocID));\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(!empty($cityinfo)){\n\t\t\t\t\t\t\t\t\t\t$locality=$cityinfo[0]->cityName;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(!empty($citylocinfo)){\n\t\t\t\t\t\t\t\t\t\t$sublocality=$citylocinfo[0]->googleLocName;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$projectname=$projectnames[0]->projectName;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$data1['propertyLatitude']= $projectnames[0]->projectLatitude;\n\t\t\t\t\t\t\t\t$data1['propertyLongitude']= $projectnames[0]->projectLongitude;\n\t\t\t\t\t\t\t\t$data1['propertyZipCode']= \t $projectnames[0]->projectZipCode;\n\t\t\t\t\t\t\t\t$data2['propertyLocality']= $sublocality;\n\t\t\t\t\t\t\t\t$data2['propertyAddress2']= $projectnames[0]->projectAddress2;\n\t\t\t\t\t\t\t\t$data2['propertyAddress1']= $projectnames[0]->projectAddress1;\n\t\t\t\t\t\t\t\t$data1['countryID']= $projectnames[0]->countryID;\n\t\t\t\t\t\t\t\t$data1['stateID']= $projectnames[0]->stateID;\n\t\t\t\t\t\t\t\t$data1['cityID']= $projectnames[0]->cityID;\n\t\t\t\t\t\t\t\t$data1['cityLocID']= $projectnames[0]->cityLocID;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->AddProperty_model->InsertProperty('rp_properties',$data1,$filter1);\n\t\t\t\t\t\t\n/**************************************Meta Details autogenerate start********************************************************/\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!empty($data1['propertyTypeID'])){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$propertytypeid=$data1['propertyTypeID'];\n\t\t\t\t\t\t\t$propertytypenames=$this->AddProperty_model->getPropertyType(\" AND t2.propertyTypeID=$propertytypeid\");\n\t\t\t\t\t\t\t$propertytypename=$propertytypenames[0]->propertyTypeName;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$propertyMetaTitle=\"$noofbedroom BHK $propertytypename $coveredarea sqft for $propertypurpose in $projectname $sublocality $locality | Homeonline\";\n\t\t\t\t\t\t$propertyMetaKeyword=\"$noofbedroom BHK $propertytypename for $propertypurpose in $projectname $locality,\n\t\t\t\t\t\t$noofbedroom BHK $propertytypename in $locality for $propertypurpose, $noofbedroom BHK $propertytypename\n\t\t\t\t\t\tfor $propertypurpose in $projectname $sublocality $locality, $noofbedroom BHK $propertytypename for $propertypurpose in $sublocality $locality, $noofbedroom BHK $propertytypename in $projectname, $noofbedroom BHK $propertytypename $coveredarea sqft for $propertypurpose in $projectname $locality, $propertytypename for $propertypurpose in $locality.\";\n\t\t\t\t\t\t$propertyMetaDescription=\"$noofbedroom BHK $propertytypename $coveredarea sqft for $propertypurpose in $projectname $sublocality $locality with all modern amenities. Browse $noofbedroom BHK $propertytypename for $propertypurpose in $locality and get best deals from real estate agents at homeonline.com\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t$data2['propertyMetaTitle']= preg_replace('/\\s\\s+/', ' ',$propertyMetaTitle);\n\t\t\t\t\t\t$data2['propertyMetaKeyword']= preg_replace('/\\s\\s+/', ' ',$propertyMetaKeyword);\n\t\t\t\t\t\t$data2['propertyMetaDescription']= preg_replace('/\\s\\s+/', ' ',$propertyMetaDescription);\n/**************************************Meta Details autogenerate END********************************************************/\n\t\t\t\t\t\t\n\t\t\t\t\t\tforeach($this->languages as $language){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$filter2=array('languageID'=>$language->languageID,'propertyID'=>$data['propertyID']);\n\t\t\t\t\t\t\t$this->AddProperty_model->InsertProperty('rp_property_details',$data2,$filter2);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$localityid=$data1['cityLocID'];$lat=$data1['propertyLatitude'];$long=$data1['propertyLongitude'];\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(empty($data1['projectID'])){\n\t\t\t\t\t\t$this->AddProperty_model->Insertareacode($localityid,$lat,$long,$data['propertyID']);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*****************************Insert rp_dbho_plan_mapping Data start*************************************/\n\t\t\t\t\t\n\t\t\t\t\t\t$mappingdatafilter=array('objectID'=>$data['propertyID'],'objectType'=>'property');\n\t\t\t\t\t\t$oldplancheck=$this->AddProperty_model->Getotherdata('rp_dbho_plan_mapping',$mappingdatafilter);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!empty($oldplancheck)){\n\t\t\t\t\t\t\t$oldplanID=$oldplancheck[0]->planID;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($oldplanID==$mappingtableplanid){\n\t\t\t\t\t\t\t\t$logdata=array('propertyID'=>$data['propertyID'],'userName'=>$this->userinfo['adminUserFirstName'],'userID'=>$this->userinfo['adminUserID'],'createdBy'=>$this->userinfo['adminUserFirstName'],'actionType'=>'Edit','userAccessType'=>'Admin');\n\t\t\t\t\t\t\t\t$this->AddProperty_model->Insert_data('rp_dbho_property_log',$logdata);\n\t\t\t\t\t\t\t}elseif($oldplanID !='' && $mappingtableplanid==''){\n\t\t\t\t\t\t\t\t$logdata=array('propertyID'=>$data['propertyID'],'userName'=>$this->userinfo['adminUserFirstName'],'userID'=>$this->userinfo['adminUserID'],'createdBy'=>$this->userinfo['adminUserFirstName'],'actionType'=>'Edit','userAccessType'=>'Admin');\n\t\t\t\t\t\t\t\t$this->AddProperty_model->Insert_data('rp_dbho_property_log',$logdata);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$this->AddProperty_model->InsertProperty('rp_properties',array('propertyStatus'=>'Draft'),array('propertyID'=>$data['propertyID']));\n\t\t\t\t\t\t\t\t$mappingtablefinaldata['planID']=$mappingtableplanid;\n\t\t\t\t\t\t\t\t$this->AddProperty_model->InsertProperty('rp_dbho_plan_mapping',$mappingtablefinaldata,$mappingdatafilter);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$logdata=array('propertyID'=>$data['propertyID'],'userName'=>$this->userinfo['adminUserFirstName'],'userID'=>$this->userinfo['adminUserID'],'createdBy'=>$this->userinfo['adminUserFirstName'],'actionType'=>'Update Plan And Status Draft','userAccessType'=>'Admin');\n\t\t\t\t\t\t\t\t$this->AddProperty_model->Insert_data('rp_dbho_property_log',$logdata);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$mappingtablefinaldata['planID']=$mappingtableplanid;\n\t\t\t\t\t\t\t$this->AddProperty_model->InsertProperty('rp_dbho_plan_mapping',$mappingtablefinaldata,$mappingdatafilter);\n\t\t\t\t\t\t\t$logdata=array('propertyID'=>$data['propertyID'],'userName'=>$this->userinfo['adminUserFirstName'],'userID'=>$this->userinfo['adminUserID'],'createdBy'=>$this->userinfo['adminUserFirstName'],'actionType'=>'Update Plan','userAccessType'=>'Admin');\n\t\t\t\t\t\t\t$this->AddProperty_model->Insert_data('rp_dbho_property_log',$logdata);\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*****************************Insert rp_dbho_plan_mapping Data END*************************************/\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!empty($propertyprice))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tforeach($this->currencies as $currency){\n\t\t\t\t\t\t\t$filter3=array('currencyID'=>$currency->currencyID,'propertyID'=>$data['propertyID']);\n\t\t\t\t\t\t\t$this->AddProperty_model->InsertProperty('rp_property_price',$propertyprice,$filter3);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$in=\"178,179,180,181,182,183,197\";\n\t\t\t\t\t\t$this->AddProperty_model->deleteattributesandvalues($data['propertyID'],$in);\n\t\t\t\t\t\tif(!empty($amenitiesdata) && !empty($amenitiesvalue))\n\t\t\t\t\t\t{\t$i=0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tforeach($amenitiesdata as $amenitiesdatainsert)\n\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\t$amenitiesdatainsert['propertyID']=$data['propertyID'];\n\t\t\t\t\t\t\t\t$attributevalueId=$this->AddProperty_model->InsertProperty('rp_property_attribute_values',$amenitiesdatainsert);\n\t\t\t\t\t\t\t\t$amenitiesvalue[$i]['attrValueID']=$attributevalueId;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tforeach($this->languages as $language){\n\t\t\t\t\t\t\t\t$amenitiesvalue[$i]['languageID']=$language->languageID;\n\t\t\t\t\t\t\t\t$this->AddProperty_model->InsertProperty('rp_property_attribute_value_details',$amenitiesvalue[$i]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!empty($selectattribute) && !empty($selectattributeval))\n\t\t\t\t\t\t{\t$j=0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tforeach($selectattribute as $selectattributeinsert)\n\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\t$selectattributeinsert['propertyID']=$data['propertyID'];\n\t\t\t\t\t\t\t\t$attributevalueId=$this->AddProperty_model->InsertProperty('rp_property_attribute_values',$selectattributeinsert);\n\t\t\t\t\t\t\t\t$selectattributeval[$j]['attrValueID']=$attributevalueId;\n\t\t\t\t\t\t\t\tforeach($this->languages as $language){\n\t\t\t\t\t\t\t\t$selectattributeval[$j]['languageID']=$language->languageID;\n\t\t\t\t\t\t\t\t$this->AddProperty_model->InsertProperty('rp_property_attribute_value_details',$selectattributeval[$j]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$j++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\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$propertykey=strtoupper(bin2hex(mcrypt_create_iv(4, MCRYPT_DEV_RANDOM)));\n\t\t\t\t\t\n\t\t\t\t\t\t$data1['propertyKey']= $propertykey;\n\t\t\t\t\t\t$data1['propertyAddedDate']= $date;\n\t\t\t\t\t\t$data1['propertyStatus']= 'Draft';\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!empty($data1['projectID']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$projectid=$data1['projectID'];\n\t\t\t\t\t\t\t$projectnames=$this->AddProperty_model->get_project(\" and rp_projects.projectID=$projectid\");\n\t\t\t\t\t\t\tif(!empty($projectnames)){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif($projectnames[0]->cityID){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$cityinfo=$this->AddProperty_model->Getotherdata('rp_city_details',array('cityID'=>$projectnames[0]->cityID,'languageID'=>1));\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$citylocinfo=$this->AddProperty_model->Getotherdata('rp_city_locations',array('cityLocID'=>$projectnames[0]->cityLocID));\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(!empty($cityinfo)){\n\t\t\t\t\t\t\t\t\t\t$locality=$cityinfo[0]->cityName;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(!empty($citylocinfo)){\n\t\t\t\t\t\t\t\t\t\t$sublocality=$citylocinfo[0]->googleLocName;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$projectname=$projectnames[0]->projectName;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$data1['propertyLatitude']= $projectnames[0]->projectLatitude;\n\t\t\t\t\t\t\t\t$data1['propertyLongitude']= $projectnames[0]->projectLongitude;\n\t\t\t\t\t\t\t\t$data1['propertyZipCode']= \t $projectnames[0]->projectZipCode;\n\t\t\t\t\t\t\t\t$data2['propertyLocality']= $sublocality;\n\t\t\t\t\t\t\t\t$data2['propertyAddress2']= $projectnames[0]->projectAddress2;\n\t\t\t\t\t\t\t\t$data2['propertyAddress1']= $projectnames[0]->projectAddress1;\n\t\t\t\t\t\t\t\t$data1['countryID']= $projectnames[0]->countryID;\n\t\t\t\t\t\t\t\t$data1['stateID']= $projectnames[0]->stateID;\n\t\t\t\t\t\t\t\t$data1['cityID']= $projectnames[0]->cityID;\n\t\t\t\t\t\t\t\t$data1['cityLocID']= $projectnames[0]->cityLocID;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$propertyid=$this->AddProperty_model->InsertProperty('rp_properties',$data1);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$data2['propertyID']= $propertyid;\n/**************************************Meta Details autogenerate start********************************************************/\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!empty($data1['propertyTypeID'])){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$propertytypeid=$data1['propertyTypeID'];\n\t\t\t\t\t\t\t$propertytypenames=$this->AddProperty_model->getPropertyType(\" AND t2.propertyTypeID=$propertytypeid\");\n\t\t\t\t\t\t\t$propertytypename=$propertytypenames[0]->propertyTypeName;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$propertyMetaTitle=\"$noofbedroom BHK $propertytypename $coveredarea sqft for $propertypurpose in $projectname $sublocality $locality | Homeonline\";\n\t\t\t\t\t\t$propertyMetaKeyword=\"$noofbedroom BHK $propertytypename for $propertypurpose in $projectname $locality,\n\t\t\t\t\t\t$noofbedroom BHK $propertytypename in $locality for $propertypurpose, $noofbedroom BHK $propertytypename\n\t\t\t\t\t\tfor $propertypurpose in $projectname $sublocality $locality, $noofbedroom BHK $propertytypename for $propertypurpose in $sublocality $locality, $noofbedroom BHK $propertytypename in $projectname, $noofbedroom BHK $propertytypename $coveredarea sqft for $propertypurpose in $projectname $locality, $propertytypename for $propertypurpose in $locality.\";\n\t\t\t\t\t\t$propertyMetaDescription=\"$noofbedroom BHK $propertytypename $coveredarea sqft for $propertypurpose in $projectname $sublocality $locality with all modern amenities. Browse $noofbedroom BHK $propertytypename for $propertypurpose in $locality and get best deals from real estate agents at homeonline.com\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t$data2['propertyMetaTitle']= preg_replace('/\\s\\s+/', ' ',$propertyMetaTitle);\n\t\t\t\t\t\t$data2['propertyMetaKeyword']= preg_replace('/\\s\\s+/', ' ',$propertyMetaKeyword);\n\t\t\t\t\t\t$data2['propertyMetaDescription']= preg_replace('/\\s\\s+/', ' ',$propertyMetaDescription);\n/**************************************Meta Details autogenerate END********************************************************/\t\t\t\t\t\t\t\n\t\t\t\t\t\tforeach($this->languages as $language){\n\t\t\t\t\t\t\t$data2['languageID']= $language->languageID;\n\t\t\t\t\t\t$this->AddProperty_model->InsertProperty('rp_property_details',$data2);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t if(empty($data1['projectID']))\n\t\t\t\t\t\t{ \n\t\t\t\t\t\t$localityid=$data1['cityLocID'];$lat=$data1['propertyLatitude'];$long=$data1['propertyLongitude'];\n\t\t\t\t\t\t$this->AddProperty_model->Insertareacode($localityid,$lat,$long,$propertyid);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*****************************Insert rp_dbho_plan_mapping Data start*************************************/\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!empty($mappingtableplanid))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$mappingtablefinaldata['planID']=$mappingtableplanid;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t$mappingtablefinaldata['planID']='';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$mappingtablefinaldata['objectType']='property';\n\t\t\t\t\t\t$mappingtablefinaldata['objectID']= $propertyid;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->AddProperty_model->InsertProperty('rp_dbho_plan_mapping',$mappingtablefinaldata);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$logdata=array('propertyID'=>$propertyid,'userName'=>$this->userinfo['adminUserFirstName'],'userID'=>$this->userinfo['adminUserID'],'createdBy'=>$this->userinfo['adminUserFirstName'],'actionType'=>'Add','userAccessType'=>'Admin');\n\t\t\t\t\t\t$this->AddProperty_model->Insert_data('rp_dbho_property_log',$logdata);\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*****************************Insert rp_dbho_plan_mapping Data END*************************************/\n\t\t\t\t\t\tif(!empty($propertyprice))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$propertyprice['propertyID']= $propertyid;\n\t\t\t\t\t\t\tforeach($this->currencies as $currency){\n\t\t\t\t\t\t\t$propertyprice['currencyID']=$currency->currencyID;\n\t\t\t\t\t\t\t$this->AddProperty_model->InsertProperty('rp_property_price',$propertyprice);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->AddProperty_model->deleteallattributesandvalues($propertyid);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!empty($amenitiesdata) && !empty($amenitiesvalue)){\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$i=0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tforeach($amenitiesdata as $amenitiesdatainsert)\n\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\t$amenitiesdatainsert['propertyID']=$propertyid;\n\t\t\t\t\t\t\t\t$attributevalueId=$this->AddProperty_model->InsertProperty('rp_property_attribute_values',$amenitiesdatainsert);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$amenitiesvalue[$i]['attrValueID']=$attributevalueId;\n\t\t\t\t\t\t\t\tforeach($this->languages as $language){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$amenitiesvalue[$i]['languageID']=$language->languageID;\n\t\t\t\t\t\t\t\t$this->AddProperty_model->InsertProperty('rp_property_attribute_value_details',$amenitiesvalue[$i]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!empty($selectattribute) && !empty($selectattributeval)){\n\n\t\t\t\t\t\t\t$j=0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tforeach($selectattribute as $selectattributeinsert)\n\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\t$selectattributeinsert['propertyID']=$propertyid;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$attributevalueId=$this->AddProperty_model->InsertProperty('rp_property_attribute_values',$selectattributeinsert);\n\t\t\t\t\t\t\t\t$selectattributeval[$j]['attrValueID']=$attributevalueId;\n\t\t\t\t\t\t\t\tforeach($this->languages as $language){\n\t\t\t\t\t\t\t\t$selectattributeval[$j]['languageID']=$language->languageID;\n\t\t\t\t\t\t\t\t$this->AddProperty_model->InsertProperty('rp_property_attribute_value_details',$selectattributeval[$j]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$j++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\tif(!empty($propertyid) && !empty($data1['propertyLatitude']) && !empty($data1['propertyLongitude']))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->googleLocalPropertyInfoAction($propertyid,$data1['propertyLatitude'], $data1['propertyLongitude']);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telseif($formname==\"form-2\"){\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($data['propertyID'])){\n\t\t\t\t\t\t\n\t\t\t\t\t\tforeach($data as $key=> $datas)\n\t\t\t\t\t{\n\t\t\t\t\t\tif($key==\"propertyMetaTitle\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t $data1['propertyMetaTitle']=$datas;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($key==\"propertyMetaKeyword\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t $data1['propertyMetaKeyword']= $datas;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($key==\"propertyMetaDescription\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t $data1['propertyMetaDescription']= $datas;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\t///$filter1=array('propertyID'=>$data['propertyID']);\n\t\t\t\t\t\t/* foreach($this->languages as $language){\n\t\t\t\t\t\t$filter1=array('propertyID'=>$data['propertyID'],'languageID'=>$language->languageID);\n\t\t\t\t\t\t$this->AddProperty_model->InsertProperty('rp_property_details',$data1,$filter1);\n\t\t\t\t\t\t} */\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telseif($formname==\"form-3\"){\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($data['propertyID']))\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t//..................................................................Bed Room\n\t\t\t\t\t\t\tif(!empty($data['flooringTypebedroom'])){\n\t\t\t\t\t\t\t$bedi=1;\n\t\t\t\t\t\t\t$this->AddProperty_model->deletestep3data('rp_dbho_bed_room',array('propertyID'=>$data['propertyID']));\n\t\t\t\t\t\t\tforeach($data['flooringTypebedroom'] as $flooringTypebedroom)\n\t\t\t\t\t\t\t{\t$bedroom=array();\n\t\t\t\t\t\t\t\t$bedroom['bedroomKey']=\"BedRoom$bedi\";\n\t\t\t\t\t\t\t\tif(!empty($flooringTypebedroom))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$bedroom['flooringType']=$flooringTypebedroom;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(!empty($data[\"$bedi-othersbedroom\"]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$otherscomaseparated=implode(\",\",$data[\"$bedi-othersbedroom\"]);\n\t\t\t\t\t\t\t\t\t\t$bedroom['others']=$otherscomaseparated;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(!empty($bedroom))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$bedroom['propertyID']=$data['propertyID'];\n\t\t\t\t\t\t\t\t\t$this->AddProperty_model->Insertotherinfo('rp_dbho_bed_room',$bedroom);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$bedi++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//.......................................................................Living Room\n\t\t\t\t\t\t\tif(!empty($data['flooringTypelivingroom'])){\n\t\t\t\t\t\t\t$livingi=1;\n\t\t\t\t\t\t\t$this->AddProperty_model->deletestep3data('rp_dbho_living_room',array('propertyID'=>$data['propertyID']));\n\t\t\t\t\t\t\tforeach($data['flooringTypelivingroom'] as $flooringTypelivingroom)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$livingroom=array();\n\t\t\t\t\t\t\t\tif(!empty($flooringTypelivingroom))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$livingroom['flooringType']=$flooringTypelivingroom;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(!empty($data[\"$livingi-otherslivingroom\"]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$otherscomaseparated=implode(\",\",$data[\"$livingi-otherslivingroom\"]);\n\t\t\t\t\t\t\t\t\t\t$livingroom['others']=$otherscomaseparated;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(!empty($livingroom))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$livingroom['propertyID']=$data['propertyID'];\n\t\t\t\t\t\t\t\t\t$this->AddProperty_model->Insertotherinfo('rp_dbho_living_room',$livingroom);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$livingi++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//.......................................................................................Bath Room\n\t\t\t\t\t\t\tif(!empty($data['flooringTypebathroom'])){\n\t\t\t\t\t\t\t$bathi=1;\n\t\t\t\t\t\t\t$this->AddProperty_model->deletestep3data('rp_dbho_bath_room',array('propertyID'=>$data['propertyID']));\n\t\t\t\t\t\t\tforeach($data['flooringTypebathroom'] as $flooringTypebathroom)\n\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\t$bathroom=array();$kitchen=array();\n\t\t\t\t\t\t\t\t$bathroom['bathroomKey']=\"Toilet$bathi\";\n\t\t\t\t\t\t\t\tif(!empty($flooringTypebathroom))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$bathroom['flooringType']=$flooringTypebathroom;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(!empty($data['hotwatersupply'][$bathi-1]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$bathroom['hotwatersupply']=$data['hotwatersupply'][$bathi-1];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(!empty($data[\"toilet$bathi\"]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$bathroom['toilet']=$data[\"toilet$bathi\"];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(!empty($data[\"$bathi-othersbathroom\"]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$otherscomaseparated=implode(\",\",$data[\"$bathi-othersbathroom\"]);\n\t\t\t\t\t\t\t\t\t\t$bathroom['others']=$otherscomaseparated;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(!empty($bathroom))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$bathroom['propertyID']=$data['propertyID'];\n\t\t\t\t\t\t\t\t\t$this->AddProperty_model->Insertotherinfo('rp_dbho_bath_room',$bathroom);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$bathi++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//.......................................................................................................Kitchen\n\t\t\t\t\t\t\tif(!empty($data['platform'])){\n\t\t\t\t\t\t\t$kitcheni=1;\n\t\t\t\t\t\t\t$this->AddProperty_model->deletestep3data('rp_dbho_kitchen',array('propertyID'=>$data['propertyID']));\n\t\t\t\t\t\t\tforeach($data['platform'] as $platform)\n\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\t$kitchen=array();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(!empty($data['platform']))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$kitchen['platformType']=$platform;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(!empty($data['Cabinet']))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$kitchen['cabinet']=$data['Cabinet'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(!empty($data[\"$kitcheni-otherskitchen\"]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$otherscomaseparated=implode(\",\",$data[\"$kitcheni-otherskitchen\"]);\n\t\t\t\t\t\t\t\t\t\t$kitchen['others']=$otherscomaseparated;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(!empty($kitchen))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$kitchen['propertyID']=$data['propertyID'];\n\t\t\t\t\t\t\t\t\t$this->AddProperty_model->Insertotherinfo('rp_dbho_kitchen',$kitchen);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$kitcheni++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//.....................................................................................................\n\t\t\t\t\t\t\t\n\t\t\t\t\tforeach($data as $key=> $datas)\n\t\t\t\t\t{ \n\t\t\t\t\t\t\tif(!empty($key))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$typeofattribute=explode(\"-\",$key);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(count($typeofattribute)>1)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$this->AddProperty_model->deleteattributesandvaluesflooring($data['propertyID'],$typeofattribute[1]);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif($typeofattribute[0]==\"multi\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$stringmulti1 = '';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$stringmulti2 = '';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(!empty($datas))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tforeach($datas as $attributemulti){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$multiarr=explode(\"#\",$attributemulti);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$stringmulti1.= rtrim($multiarr[0]).'#|#';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$stringmulti2.= rtrim($multiarr[1]).'#|#';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$selectattribute[]=array('attributeID'=>$typeofattribute[1],'attrOptionID'=>substr($stringmulti1,0,-3));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$selectattributeval[]=array('attrDetValue'=>substr($stringmulti2,0,-3));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(!empty($selectattribute) && !empty($selectattributeval))\n\t\t\t\t\t\t\t\t\t\t{\t$j=0;\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tforeach($selectattribute as $selectattributeinsert)\n\t\t\t\t\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\t\t\t\t\t$selectattributeinsert['propertyID']=$data['propertyID'];\n\t\t\t\t\t\t\t\t\t\t\t\t$attributevalueId=$this->AddProperty_model->InsertProperty('rp_property_attribute_values',$selectattributeinsert);\n\t\t\t\t\t\t\t\t\t\t\t\t$selectattributeval[$j]['attrValueID']=$attributevalueId;\n\t\t\t\t\t\t\t\t\t\t\t\tforeach($this->languages as $language){\n\t\t\t\t\t\t\t\t\t\t\t\t$selectattributeval[$j]['languageID']=$language->languageID;\n\t\t\t\t\t\t\t\t\t\t\t\t$this->AddProperty_model->InsertProperty('rp_property_attribute_value_details',$selectattributeval[$j]);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t$j++;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\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\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telseif($formname==\"form-4\")\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\tif(!empty($propertyid)){ echo $propertyid;\t}else{ if(!empty($data['propertyID'])){ echo $data['propertyID']; }}\n\t\t\t\t\t\n\t\t\t}else{\n\t\t\t\techo\"Add Property Fail!!\";\n\t\t\t}\n\t\t\n\t}", "public function postAdd()\n {\n $this->saveModelAndNotify( new Policy(request()->all()));\n return redirect()->route('policies.index');\n }", "function Showpreview()\n\t{\t\n\t\t$this->data['propertyid']=$propertyid=$this->input->post('propertyid');\n\t\t\n\t\tif(!empty($propertyid))\n\t\t\t{\n\t\t\t\t$filter=array('propertyID'=>$this->input->post('propertyid'));\n\t\t\t\t$propertytabledetails=$this->AddProperty_model->Shownpreview($this->input->post('propertyid'));\n\t\t\t\t$propertyplandetails=$this->AddProperty_model->getplandetailsofproperty($this->input->post('propertyid'));\n\t\t\t\t\n\t\t\t\tif(!empty($propertyplandetails)){\n\t\t\t\t\t$userplan=$propertyplandetails[0]->planTitle;\n\t\t\t\t}else{\n\t\t\t\t\t\t$userplan=\"Not Mentioned\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!empty($propertytabledetails))\n\t\t\t\t{\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyPurpose)){$purpose=$propertytabledetails[0]->propertyPurpose;}else{$purpose=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->projectID))\n\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$under=\"Property Under Project\";\n\t\t\t\t\t\t\t\t$projectid=$propertytabledetails[0]->projectID;\n\t\t\t\t\t\t\t\t$projectnames=$this->AddProperty_model->get_project(\" and rp_projects.projectID=$projectid\");\n\t\t\t\t\t\t\t\tif(!empty($projectnames)){\n\t\t\t\t\t\t\t\t$projectname=$projectnames[0]->projectName;\n\t\t\t\t\t\t\t\t}else{ $under=\"Individual Property\";$projectname=\"No\"; }\n\t\t\t\t\t}else{ $under=\"Individual Property\";$projectname=\"No\"; }\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyTypeID)){$propertytypeid=$propertytabledetails[0]->propertyTypeID;\n\t\t\t\t\t\t$propertytypenames=$this->AddProperty_model->getPropertyType(\" AND t2.propertyTypeID=$propertytypeid\");\n\t\t\t\t\t\t$propertytypename=$propertytypenames[0]->propertyTypeName;\n\t\t\t\t\t}else{$propertytypename=\"NO\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyName)){$propertyname=$propertytabledetails[0]->propertyName;}else{$propertyname=\"NO\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyCurrentStatus)){$propertyCurrentStatus=$propertytabledetails[0]->propertyCurrentStatus;}else{$propertyCurrentStatus=\"NO\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->possessionDate)){$propertydate=$propertytabledetails[0]->possessionDate;}else{$propertydate=\"NO\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->userID)){$userID=$propertytabledetails[0]->userID;\n\t\t\t\t\t\t\t\t$userdetails=$this->AddProperty_model->getuserforpreview($userID);\n\t\t\t\t\t\t\t\t$useremail='';$usertype='';\n\t\t\t\t\t\t\t\tif(!empty($userdetails)){\n\t\t\t\t\t\t\t\t$usertypeid=$userdetails[0]->userTypeID;\n\t\t\t\t\t\t\t\t$usertypedetails=$this->AddProperty_model->get_user_type(\" and rp_user_types.userTypeID=$usertypeid\");\n\t\t\t\t\t\t\t\t$useremail=$userdetails[0]->userEmail;$usertype=$usertypedetails[0]->userTypeName;}\n\t\t\t\t\t}else{$useremail=\"Not Mentioned\";$usertype=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\t$getpropertyprice=$this->AddProperty_model->Getotherdata('rp_property_price',$filter);\n\t\t\t\t\tif(!empty($getpropertyprice[0]->propertyPrice)){$propertyprice=$getpropertyprice[0]->propertyPrice;}else{$propertyprice=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->isNegotiable)){$isNegotiable=$propertytabledetails[0]->isNegotiable;}else{$isNegotiable=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyDescription)){$propertyDescription=$propertytabledetails[0]->propertyDescription;}else{$propertyDescription=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyLatitude)){$propertyLatitude=$propertytabledetails[0]->propertyLatitude;}else{$propertyLatitude=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyLongitude)){$propertyLongitude=$propertytabledetails[0]->propertyLongitude;}else{$propertyLongitude=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyZipCode)){$propertyZipCode=$propertytabledetails[0]->propertyZipCode;}else{$propertyZipCode=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyLocality)){$propertyLocality=$propertytabledetails[0]->propertyLocality;}else{$propertyLocality=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyAddress1)){$propertyAddress1=$propertytabledetails[0]->propertyAddress1;}else{$propertyAddress1=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyAddress2)){$propertyAddress2=$propertytabledetails[0]->propertyAddress2;}else{$propertyAddress2=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyMetaTitle)){$propertyMetaTitle=$propertytabledetails[0]->propertyMetaTitle;}else{$propertyMetaTitle=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyMetaKeyword)){$propertyMetaKeyword=$propertytabledetails[0]->propertyMetaKeyword;}else{$propertyMetaKeyword=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyMetaDescription)){$propertyMetaDescription=$propertytabledetails[0]->propertyMetaDescription;}else{$propertyMetaDescription=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyKey)){$propertykey=$propertytabledetails[0]->propertyKey;}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->countryID)){$filter=array('countryID'=>$propertytabledetails[0]->countryID,'languageID'=>'1');$key='countryName';$countryname=$this->AddProperty_model->getcountryname('rp_country_details',$filter,$key);$countryname=$countryname[0]->countryName;}else{$countryname=\"Not Mentioned\";}\n\t\t\t\t\tif(!empty($propertytabledetails[0]->stateID)){ $filter1=array('stateID'=>$propertytabledetails[0]->stateID,'languageID'=>'1');$key='stateName';$statename=$this->AddProperty_model->getcountryname('rp_state_details',$filter1,$key); $statename=$statename[0]->stateName;}else{$statename=\"Not Mentioned\";}\n\t\t\t\t\tif(!empty($propertytabledetails[0]->cityID)){ $filter2=array('cityID'=>$propertytabledetails[0]->cityID,'languageID'=>'1');$key='cityName';$cityname=$this->AddProperty_model->getcountryname('rp_city_details',$filter2,$key); $cityname=$cityname[0]->cityName;}else{$cityname=\"Not Mentioned\";}\n\t\t\t\t\t\n\t\t\t\t\techo\"<div style=\\\"margin-top:20px;\\\" class=\\\"row labcol\\\">\n <div class=\\\"col-sm-3\\\">\n <div class=\\\"form-group botbott\\\">\n <label>$purpose</label>\n <p>$purpose</p>\n </div>\n </div>\n <div class=\\\"col-sm-3\\\">\n <div class=\\\"form-group botbott\\\">\n <label> $under</label>\n <p>$under </p>\n </div>\n </div>\n <div class=\\\"col-sm-3\\\">\n <div class=\\\"form-group botbott\\\">\n <label>Select Project</label>\n <p>$projectname</p>\n </div>\n </div>\n <div class=\\\"col-sm-3\\\">\n <div class=\\\"form-group botbott\\\">\n <label>Property Type</label>\n <p>$propertytypename </p>\n </div>\n </div>\n <div class=\\\"col-sm-3\\\">\n <div class=\\\"form-group botbott\\\">\n <label> Property Name</label>\n <p>$propertyname </p>\n </div>\n </div>\n <div class=\\\"col-sm-3\\\">\n <div class=\\\"form-group botbott\\\">\n <label> Current Status</label>\n <p>$propertyCurrentStatus </p>\n </div>\n </div>\n <div class=\\\"col-sm-3\\\">\n <div class=\\\"form-group botbott\\\">\n <label> Date</label>\n <p>$propertydate </p>\n </div>\n </div>\n <div class=\\\"col-sm-3\\\">\n <div class=\\\"form-group botbott\\\">\n <label> User Type</label>\n <p>$usertype </p>\n </div>\n </div>\n <div class=\\\"col-sm-3\\\">\n <div class=\\\"form-group botbott\\\">\n <label> $usertype</label>\n <p>$useremail </p>\n </div>\n </div>\n <div class=\\\"col-sm-3\\\">\n <div class=\\\"form-group botbott\\\">\n <label> User Plan</label>\n <p>$userplan </p>\n </div>\n </div>\n <div class=\\\"col-sm-3\\\">\n <div class=\\\"form-group botbott\\\">\n <label> Price</label>\n <p>$propertyprice </p>\n </div>\n </div>\n <div class=\\\"col-sm-3\\\">\n <div class=\\\"form-group botbott\\\">\n <label> Negotiable </label>\n <p>$isNegotiable </p>\n </div>\n </div>\n </div>\n <div style=\\\"margin-top:20px;\\\" class=\\\"row labcol\\\">\n <div class=\\\"col-md-12 col-sm-12 col-xs-12\\\">\n <div class=\\\"form-group botbott\\\">\n <label>Description</label>\n <p>$propertyDescription.</p>\n </div>\n </div>\n </div>\";\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\tif(!empty($propertytypeid))\n\t\t\t{\n\t\t\t\t$AttributesGroup=$this->AddProperty_model->Getattributesgroups($propertytypeid);\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($AttributesGroup))\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t$atti=1;\n\t\t\t\t\t\tforeach($AttributesGroup as $AttributesGroups)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$Attribute=$this->AddProperty_model->GetAttributes($AttributesGroups->attributeGroupID);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo \" <div style=\\\"margin-top:20px;\\\" class=\\\"row labcol\\\">\n\t\t\t\t\t\t\t\t\t\t<h2 class=\\\"StepTitle\\\">$AttributesGroups->name</h2>\";\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(!empty($Attribute))\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\n\t\t\t\t\t\t\t\t\t\t\t\tforeach($Attribute as $Attributes)\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($Attributes->attrName !=\"Amenities\" )\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$Attributeoption=$this->AddProperty_model->GetAttributesoption($Attributes->attributeID);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(!empty($propertyid))\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$checkattri=$this->AddProperty_model->Shownoofbedrooms('rp_property_attribute_values',array('propertyID'=>$propertyid,'attributeID'=>$Attributes->attributeID));\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(!empty($checkattri)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$attoptval=$checkattri[0]->attrDetValue;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif($Attributes->attrInputType==\"multiselect\"){ \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$attoptval1=explode('#|#',$checkattri[0]->attrDetValue);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$attoptval=implode(',',$attoptval1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$attoptval='NO';\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$attoptval='No';\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\techo\"<div class=\\\"col-sm-3 martop15\\\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\\\"form-group botbott\\\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<label>$Attributes->attrName</label>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>$attoptval </p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\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\techo\"List Is !empty!!\";\n\t\t\t\t\t\t\t\t\t\t\t}\n \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo'\t\t</div>';\n \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo\"List Is !empty!!\";\n\t\t\t\t\t}\n\t\t\t}\n\t\t\t\t\t\n \n\t\t\t\t\t\n echo\" <div style=\\\"margin-top:20px;\\\" class=\\\"row labcol\\\">\n <h2 class=\\\"StepTitle\\\">Amenities</h2>\";\n\t\t\t\t\t $Attributeoption=$this->AddProperty_model->GetAttributesoption(6);\n\t\t\t\t\t $getamenities=$this->AddProperty_model->Getotherdata('rp_property_attribute_values',array('propertyID'=>$this->input->post('propertyid'),'attributeID'=>6));\n\t\t\t\t\t\t\t\t\tif(!empty($getamenities)){\n\t\t\t\t\t\t\t\t\t\t$amenitiescheckvalues=explode(\"#|#\",$getamenities[0]->attrOptionID);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tforeach($Attributeoption as $Attributeoptions){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t echo\" <div class=\\\"col-sm-3 martop15\\\">\n <div class=\\\"form-group botbott\\\">\n <label> $Attributeoptions->attrOptName </label>\";\n\t\t\t\t\t\t \n\t\t\t\t\t\t if(!empty($amenitiescheckvalues)){ if(in_array($Attributeoptions->attrOptionID,$amenitiescheckvalues)){echo\"<p>YES </p>\";}else{echo\"<p>NO</p>\";}}else{echo\"<p>NO</p>\";}\n \n echo\" </div>\n </div>\";\n\t\t\t\t\t\t\t\t\t}\n echo\"</div>\";\n\t\t\t\t \n echo' <div style=\"margin-top:20px;\" class=\"row labcol\">\n <h2 class=\"StepTitle\">Property Location </h2>\n <div class=\"col-sm-3 martop15\">\n <div class=\"form-group botbott\">\n <label> Address1 </label>';\n echo\" <p>$propertyAddress1 </p>\";\n echo' </div>\n </div>\n\t\t\t\t\t <div class=\"col-sm-3 martop15\">\n <div class=\"form-group botbott\">\n <label> Address2 </label>';\n echo\" <p>$propertyAddress2 </p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-3 martop15\">\n <div class=\"form-group botbott\">\n <label>Locality </label>';\n echo\" <p>$propertyLocality </p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-3 martop15\">\n <div class=\"form-group botbott\">\n <label>Country </label>';\n echo\" <p>$countryname </p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-3 martop15\">\n <div class=\"form-group botbott\">\n <label>State </label>';\n echo\" <p>$statename </p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-3 martop15\">\n <div class=\"form-group botbott\">\n <label> City / Area </label>';\n echo\"<p>$cityname </p>\";\n echo'</div>\n </div>\n <div class=\"col-sm-3 martop15\">\n <div class=\"form-group botbott\">\n <label>Zip / Postal Code </label>';\n echo\" <p>$propertyZipCode </p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-3 martop15\">\n <div class=\"form-group botbott\">\n <label>Latitude </label>';\n echo\" <p>$propertyLongitude </p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-3 martop15\">\n <div class=\"form-group botbott\">\n <label>Longitude </label>';\n echo\" <p>$propertyLatitude </p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-3 martop15\">\n <div class=\"form-group botbott\">\n <label>Status </label>\n <p>Active </p>\n </div>\n </div>\n </div>\n <div style=\"margin-top:20px;\" class=\"row labcol\">\n <h2 class=\"StepTitle\">Meta Details </h2>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label> Title </label>';\n echo\" <p>$propertyMetaTitle</p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Meta Keywords </label>';\n echo\" <p>$propertyMetaKeyword </p>\";\n echo'</div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Meta Description </label>';\n echo\"<p>$propertyMetaDescription </p>\";\n\t\t\t\t\t\t \n\t\t\t\t\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t echo' </div>\n </div>\n </div>';\n\t\t\t\t\t\n\t\t\t\t\t$getroomdetails=$this->AddProperty_model->Getotherdatafromnewdb('rp_dbho_bed_room',array('propertyID'=>$this->input->post('propertyid')));\n if(!empty($getroomdetails)){\n\t\t\t\t\t\t $count=1;\n\t\t\t\t\t\t foreach($getroomdetails as $getroomdetailss){\n\t\t\t\t\t\t\t$bedothers=explode(\",\",$getroomdetailss->others);\n echo'<div style=\"margin-top:20px;\" class=\"row labcol\">';\n echo\" <h2 class=\\\"StepTitle\\\">Bed Room $count</h2>\";\n echo' <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label> Flooring Type </label>';\n echo\" <p>$getroomdetailss->flooringType </p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>AC </label>';\n\t\t\t\t\t\t if(in_array(\"AC\", $bedothers)){ $ac=\"YES\";}else{$ac=\"NO\";}\n echo\" <p>$ac </p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Bed </label>';\n\t\t\t\t\t\t if(in_array(\"Bed\", $bedothers)){ $Bed=\"YES\";}else{$Bed=\"NO\";}\n echo\"<p>$Bed</p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Dressing Table </label>';\n\t\t\t\t\t\t if(in_array(\"DressingTable\", $bedothers)){ $DressingTable=\"YES\";}else{$DressingTable=\"NO\";}\n echo\"<p>$DressingTable</p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Wardrobe </label>';\n\t\t\t\t\t\t if(in_array(\"Wardrobe\", $bedothers)){ $Wardrobe=\"YES\";}else{$Wardrobe=\"NO\";}\n echo\" <p>$Wardrobe</p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>False Seiling </label>';\n\t\t\t\t\t\t if(in_array(\"FalseCeiling\", $bedothers)){ $FalseCeiling=\"YES\";}else{$FalseCeiling=\"NO\";}\n echo\"<p>$FalseCeiling</p>\";\n echo' </div>\n </div>\n </div>';\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t$count++; }\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t\t $getlivingroomdetails=$this->AddProperty_model->Getotherdatafromnewdb('rp_dbho_living_room',array('propertyID'=>$this->input->post('propertyid')));\n if(!empty($getlivingroomdetails)){\n\t\t\t\t\t\t $count=1;\n\t\t\t\t\t\t foreach($getlivingroomdetails as $getlivingroomdetailss){\n\t\t\t\t\t\t\t$livingothers=explode(\",\",$getlivingroomdetailss->others);\n echo'<div style=\"margin-top:20px;\" class=\"row labcol\">';\n echo\" <h2 class=\\\"StepTitle\\\">Living Room </h2>\";\n echo' <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label> Flooring Type </label>';\n echo\" <p>$getlivingroomdetailss->flooringType </p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Sofa </label>';\n\t\t\t\t\t\t if(in_array(\"Sofa\", $livingothers)){ $Sofa=\"YES\";}else{$Sofa=\"NO\";}\n echo\" <p>$Sofa </p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Dining Table </label>';\n\t\t\t\t\t\t if(in_array(\"DiningTable\", $livingothers)){ $DiningTable=\"YES\";}else{$DiningTable=\"NO\";}\n echo\"<p>$DiningTable</p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>AC </label>';\n\t\t\t\t\t\t if(in_array(\"AC\", $livingothers)){ $AC=\"YES\";}else{$AC=\"NO\";}\n echo\"<p>$AC</p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Shoe Rack </label>';\n\t\t\t\t\t\t if(in_array(\"ShoeRack\", $livingothers)){ $ShoeRack=\"YES\";}else{$ShoeRack=\"NO\";}\n echo\" <p>$ShoeRack</p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>TV </label>';\n\t\t\t\t\t\t if(in_array(\"TV\", $livingothers)){ $TV=\"YES\";}else{$TV=\"NO\";}\n echo\"<p>$TV</p>\";\n echo' </div>\n </div>\n </div>';\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t$count++; }\n\t\t\t\t\t }\n \n\t\t\t\t\t\n\t\t\t\t\t$getbathroomdetails=$this->AddProperty_model->Getotherdatafromnewdb('rp_dbho_bath_room',array('propertyID'=>$this->input->post('propertyid')));\n if(!empty($getbathroomdetails)){\n\t\t\t\t\t\t $count=1;\n\t\t\t\t\t\t foreach($getbathroomdetails as $getbathroomdetailss){\n\t\t\t\t\t\t\t$bathothers=explode(\",\",$getbathroomdetailss->others);\n echo'<div style=\"margin-top:20px;\" class=\"row labcol\">';\n echo\" <h2 class=\\\"StepTitle\\\">Bath Room $count</h2>\";\n echo' <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label> Flooring Type </label>';\n echo\" <p>$getbathroomdetailss->flooringType </p>\";\n echo' </div>\n </div>';\n\t\t\t\t\t \n\t\t\t\t\t echo '<div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label> Hot Water Supply </label>';\n echo\" <p>$getbathroomdetailss->hotwatersupply </p>\";\n echo' </div>\n </div>';\n\t\t\t\t\t \n\t\t\t\t\t echo '<div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label> Toilet </label>';\n echo\" <p>$getbathroomdetailss->toilet </p>\";\n echo' </div>\n </div>';\n\t\t\t\t\t\t\n echo'<div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Glass Partition </label>';\n\t\t\t\t\t\t if(in_array(\"GlassPartition\", $bathothers)){ $GlassPartition=\"YES\";}else{$GlassPartition=\"NO\";}\n echo\" <p>$GlassPartition </p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Bath Tub </label>';\n\t\t\t\t\t\t if(in_array(\"BathTub\", $bathothers)){ $BathTub=\"YES\";}else{$BathTub=\"NO\";}\n echo\"<p>$BathTub</p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Axhaust fan </label>';\n\t\t\t\t\t\t if(in_array(\"ExhaustFan\", $bathothers)){ $ExhaustFan=\"YES\";}else{$ExhaustFan=\"NO\";}\n echo\"<p>$ExhaustFan</p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Windows </label>';\n\t\t\t\t\t\t if(in_array(\"Windows\", $bathothers)){ $Windows=\"YES\";}else{$Windows=\"NO\";}\n echo\" <p>$Windows</p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Shower Curtain </label>';\n\t\t\t\t\t\t if(in_array(\"ShowerCurtain\", $bathothers)){ $ShowerCurtain=\"YES\";}else{$ShowerCurtain=\"NO\";}\n echo\"<p>$ShowerCurtain</p>\";\n echo' </div>\n </div>\n\t\t\t\t\t <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Cabinet </label>';\n\t\t\t\t\t\t if(in_array(\"Cabinet\", $bathothers)){ $Cabinet=\"YES\";}else{$Cabinet=\"NO\";}\n echo\"<p>$Cabinet</p>\";\n echo' </div>\n </div>\n </div>';\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t$count++; }\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t\t $getkitchendetails=$this->AddProperty_model->Getotherdatafromnewdb('rp_dbho_kitchen',array('propertyID'=>$this->input->post('propertyid')));\n if(!empty($getbathroomdetails)){\n\t\t\t\t\t\t $count=1;\n\t\t\t\t\t\t foreach($getkitchendetails as $getkitchendetailss){\n\t\t\t\t\t\t\t$kitchenothers=explode(\",\",$getkitchendetailss->others);\n echo'<div style=\"margin-top:20px;\" class=\"row labcol\">';\n echo\" <h2 class=\\\"StepTitle\\\">Kitchen </h2>\";\n echo' <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Platform </label>';\n echo\" <p>$getkitchendetailss->platformType </p>\";\n echo' </div>\n </div>';\n\t\t\t\t\t \n\t\t\t\t\t echo '<div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Cabinet </label>';\n echo\" <p>$getkitchendetailss->cabinet </p>\";\n echo' </div>\n </div>';\n\t\t\t\t\t \n\t\t\t\t\t /* echo '<div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label> Toilet </label>';\n echo\" <p>$getkitchendetailss->toilet </p>\";\n echo' </div>\n </div>'; */\n\t\t\t\t\t\t\n echo'<div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Refrigerator </label>';\n\t\t\t\t\t\t if(in_array(\"Refrigerator\", $kitchenothers)){ $Refrigerator=\"YES\";}else{$Refrigerator=\"NO\";}\n echo\" <p>$Refrigerator </p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Water purifier </label>';\n\t\t\t\t\t\t if(in_array(\"Waterpurifier\", $kitchenothers)){ $Waterpurifier=\"YES\";}else{$Waterpurifier=\"NO\";}\n echo\"<p>$Waterpurifier</p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Loft </label>';\n\t\t\t\t\t\t if(in_array(\"Loft\", $kitchenothers)){ $Loft=\"YES\";}else{$Loft=\"NO\";}\n echo\"<p>$Loft</p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Gas Pipline </label>';\n\t\t\t\t\t\t if(in_array(\"GasPipline\", $kitchenothers)){ $GasPipline=\"YES\";}else{$GasPipline=\"NO\";}\n echo\" <p>$GasPipline</p>\";\n echo' </div>\n </div>\n <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Microwave </label>';\n\t\t\t\t\t\t if(in_array(\"Microwave\", $kitchenothers)){ $Microwave=\"YES\";}else{$Microwave=\"NO\";}\n echo\"<p>$Microwave</p>\";\n echo' </div>\n </div>\n\t\t\t\t\t <div class=\"col-sm-4 martop15\">\n <div class=\"form-group botbott\">\n <label>Chimaey </label>';\n\t\t\t\t\t\t if(in_array(\"Chimaey\", $kitchenothers)){ $Chimaey=\"YES\";}else{$Chimaey=\"NO\";}\n echo\"<p>$Chimaey</p>\";\n echo' </div>\n </div>\n </div>';\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t$count++; }\n\t\t\t\t\t }\n \n\t\t\t\t\t if(!empty($propertykey)){\n\t\t\t\t\techo'<div class=\"title_right\">\n <div class=\"input-group pull-right\"> ';\n echo\" <a href=\\\"http://$this->severname/india/en/sale/apartment-for-sale.htm/$propertykey/srchdet/preview/\\\" target=\\\"_blank\\\" class=\\\"btn btn-success taright\\\">View Preview</a>\";\n\t\t\techo' </div>\n </div>';\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t}", "public function propertyPreview(){\n\t\t\t$data = array();\n\t\t\t\n\t\t\t$propertyID = $this->uri->segment(3);\n\t\t\t$this->load->model('Properties_model');\n\t\t\t\n\t\t\t$data['individualUserList'] = $this->Properties_model->IndividualUserList();\n\t\t\t\n\t\t\t$data['property'] = $this->Properties_model->getPropertyName($propertyID);\n\t\t\t\n\t\t\t$data['propertyImage'] = $this->Properties_model->getPropertyImage($propertyID);\n\t\t\t//echo \"<pre>====\";print_r($data['propertyImage']);\n\t\t\t\n\t\t\t$data['usertype'] = $this->Properties_model->getUserType($data['property'][0]->userID);\n\n\t\t\t$data['userTypeDropdown'] = $this->Properties_model->getUser($data['property'][0]->userID,$data['usertype'][0]->userTypeID);\n\n\t\t\t$data['propertyPrice'] = $this->Properties_model->getPropertyPrice($data['property'][0]->propertyID);\n\t\t\t//echo \"<pre>1====\";print_r($data['propertyPrice']);\t\t\t\n\t\t\n\t\t\t$data['userAddress'] = $this->Properties_model->getUserAddress($data['property'][0]->userID);\n\t\n\t\t\t$data['propertyLoc'] = $this->Properties_model->getPropertyLoc($data['property'][0]->propertyID);\n\t\t\t//echo \"<li>======> \".$data['propertyLoc'][0]->cityLocID;\n\t\t\tif(!empty($data['propertyLoc'][0]->cityLocID)){\n\t\t\t$data['cityname'] = $this->Properties_model->getPropertyCityName($data['propertyLoc'][0]->cityLocID);\n\t\t\t}\n\t\t\t$data['type'] = $this->Properties_model->getPropertyPreviewType($propertyID);\n\t\t\t\n\t\t\t/************************** get all attributes ************************************************/\n\t\t\t$data['PropertySpecInfo'] = $this->Properties_model->getPropertySpecInfo($data['property'][0]->propertyID);\n\t\t\t//echo \"<pre>1====\";print_r($data['PropertySpecInfo']);\n\t\t\t$data['PropertyAttributes'] = $this->Properties_model->getPropertyAttributes($data['property'][0]->propertyTypeID,$data['property'][0]->propertyID);\n\t\t\t$data['PropertyAmenitiesInfo'] = $this->Properties_model->getPropertyAmenitiesInfo($data['property'][0]->propertyID);\n\t\t\t//echo \"<pre>AM====\";print_r($data['PropertyAmenitiesInfo']);\n\t\t\t$this->load->view('PropertyPreview',$data);\n\n\t}", "public function create()\n {\n $prop = Property::all('id','property_name');\n return view('properties.images',compact('prop'));\n }", "public function create()\n {\n if(empty(Auth::user()->id)){\n return redirect(\"login\")->with(\"error_msg\", \"login to continue.\");\n }\n if(!empty(Auth::user()->email_verified_at)){\n\n if(Auth::user()->phone == null && Auth::user()->state == null){\n return redirect(\"profile\");\n }\n\n return view(\"pages.dashboard.manage_product.add\");\n }else{\n return redirect('/home');\n }\n }", "public function update(PropertyRequest $request, $id)\n {\n\n $property=Property::find($id);\n $property->cost=$request->cost;\n $property->type_id=$request->type;\n $property->reference=$request->reference;\n $property->room=$request->room;\n $property->bathroom=$request->bathroom;\n $property->map=$request->map;\n $property->user_id=Auth::user()->id;\n $property->region_id=$request->region;\n $property->area=$request->area;\n $property->type=$request->display;\n $property->save();\n PropertyDescription::where('property_id',$id)->delete();\n PropertyDescription::create([\n 'name'=>$request->descEn,\n 'lang'=>'en',\n 'property_id'=>$id\n ]);\n PropertyDescription::create([\n 'name'=>$request->descAr,\n 'lang'=>'ar',\n 'property_id'=>$id\n ]);\n PropertyHeader::where('property_id',$id)->delete();\n PropertyHeader::create([\n 'name'=>$request->headerEn,\n 'lang'=>'en',\n 'property_id'=>$id\n ]);\n PropertyHeader::create([\n 'name'=>$request->headerAr,\n 'lang'=>'ar',\n 'property_id'=>$id\n ]);\n PropertyLabel::where('property_id',$id)->delete();\n PropertyLabel::create([\n 'name'=>$request->labelEn,\n 'lang'=>'en',\n 'property_id'=>$id\n ]);\n PropertyLabel::create([\n 'name'=>$request->labelAr,\n 'lang'=>'ar',\n 'property_id'=>$id\n ]);\n $packages=Input::get('feature');\n $property->feature()->sync($packages);\n $destinationPath=\"uploads/\";\n if($files=$request->file('Images'))\n {\n \tforeach($files as $file)\n {\n \t $name=$file->getClientOriginalName();\n \t $file->move($destinationPath,$file->getClientOriginalName());\n \t $img=new PropertyImage;\n \t $img->property_id=$id;\n \t $img->path=$destinationPath.$file->getClientOriginalName();\n \t $img->save();\n \t}\n }\n return redirect()->route('property.index');\n }", "public function add()\n\t{\n\t\t// Initialize variables.\n\t\t$app = &JFactory::getApplication();\n\n\t\t// Clear the level edit information from the session.\n\t\t$app->setUserState('com_users.edit.user.id', null);\n\t\t$app->setUserState('com_users.edit.user.data', null);\n\n\t\t// Redirect to the edit screen.\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_users&view=user&layout=edit', false));\n\t}", "public function addAction()\n {\n\n $this->view->headTitle()->prepend('Add Product');\n\n $this->_helper->viewRenderer->setRender('form');\n\n $request = $this->getRequest();\n\n $form = new Application_Form_Product();\n \n if ($request->isPost()) {\n if ($form->isValid($request->getPost())) {\n\n $this->loadModel('product');\n $this->modelProduct->insert($form->getValues());\n\n $this->view->success = true;\n $this->view->productName = $form->getValues()['name'];\n $this->view->actionPerformed = 'added';\n $form->reset();\n }\n }\n \n $this->view->form = $form;\n }", "public function get_add()\n { \n // Render the page\n View::make($this->bundle . '::product.add')->render();\n }", "public function run()\n {\n $type = new Propertytyperelation();\n\n $type->propertyid = $_GET['id'];\n $type->save();\n\n }", "function index($propertyid=false)\n\t{\n\t\t\n\t\tif(!empty($propertyid))\n\t\t\t{\n\t\t\t\t$this->data['countdata']=0;\n\t\t\t\t$this->data['propertyid']=$propertyid;\n\t\t\t\t$filter=array('propertyID'=>$propertyid);\n\t\t\t\t$propertytabledetails=$this->AddProperty_model->Shownpreview($propertyid);\n\t\t\t\t\n\t\t\t\tif(!empty($propertytabledetails))\n\t\t\t\t{\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyPurpose))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['purpose']=$propertytabledetails[0]->propertyPurpose;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->projectID))\n\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->data['under']=\"1\";\n\t\t\t\t\t\t\t\t$this->data['projectid']=$propertytabledetails[0]->projectID;\n\t\t\t\t\t}else\n\t\t\t\t\t{ \n\t\t\t\t\t\t\t\t$this->data['under']=\"2\"; \n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyTypeID))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertytypeid']=$propertytabledetails[0]->propertyTypeID;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyName))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertyname']=$propertytabledetails[0]->propertyName;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyStatus))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertystatus']=$propertytabledetails[0]->propertyStatus;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyAddedDate))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertydate']=$propertytabledetails[0]->propertyAddedDate;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->userID))\n\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->data['userID']=$userID=$propertytabledetails[0]->userID;\n\t\t\t\t\t\t\t\t$userdetails=$this->AddProperty_model->getuserforpreview($userID);\n\t\t\t\t\t\t\t\tif(!empty($userdetails)){\n\t\t\t\t\t\t\t\t$this->data['usertypeid']=$usertypeid=$userdetails[0]->userTypeID;\n\t\t\t\t\t\t\t\t$usertypedetails=$this->AddProperty_model->get_user_type(\" and rp_user_types.userTypeID=$usertypeid\");\n\t\t\t\t\t\t\t\t$this->data['useremail']=$userdetails[0]->userEmail;\n\t\t\t\t\t\t\t\t$this->data['usertype']=$usertypedetails[0]->userTypeName;}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$getpropertyprice=$this->AddProperty_model->Getotherdata('rp_property_price',$filter);\n\t\t\t\t\tif(!empty($getpropertyprice[0]->propertyPrice))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertyprice']=$getpropertyprice[0]->propertyPrice;}else{$propertyprice=\"Not Mentioned\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->isNegotiable))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['isNegotiable']=$propertytabledetails[0]->isNegotiable;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyStatus))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertyStatus']=$propertytabledetails[0]->propertyStatus;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyDescription))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertyDescription']=$propertytabledetails[0]->propertyDescription;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyLatitude))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertyLatitude']=$propertytabledetails[0]->propertyLatitude;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyLongitude))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertyLongitude']=$propertytabledetails[0]->propertyLongitude;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyZipCode))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertyZipCode']=$propertytabledetails[0]->propertyZipCode;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyLocality))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertyLocality']=$propertytabledetails[0]->propertyLocality;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyAddress1))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertyAddress1']=$propertytabledetails[0]->propertyAddress1;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyAddress2))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertyAddress2']=$propertytabledetails[0]->propertyAddress2;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyMetaTitle))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertyMetaTitle']=$propertytabledetails[0]->propertyMetaTitle;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyMetaKeyword))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertyMetaKeyword']=$propertytabledetails[0]->propertyMetaKeyword;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($propertytabledetails[0]->propertyMetaDescription))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['propertyMetaDescription']=$propertytabledetails[0]->propertyMetaDescription;\n\t\t\t\t\t}\n\t\t\t\t\tif(!empty($propertytabledetails[0]->countryID)){$filter=array('countryID'=>$propertytabledetails[0]->countryID,'languageID'=>'1');$key='countryName';$countryname=$this->AddProperty_model->getcountryname('rp_country_details',$filter,$key);$this->data['countryname']=$countryname[0]->countryName;}\n\t\t\t\t\tif(!empty($propertytabledetails[0]->stateID)){ $filter1=array('stateID'=>$propertytabledetails[0]->stateID,'languageID'=>'1');$key='stateName';$statename=$this->AddProperty_model->getcountryname('rp_state_details',$filter1,$key); $this->data['statename']=$statename[0]->stateName;}\n\t\t\t\t\tif(!empty($propertytabledetails[0]->cityID)){ $filter2=array('cityID'=>$propertytabledetails[0]->cityID,'languageID'=>'1');$key='cityName';$cityname=$this->AddProperty_model->getcountryname('rp_city_details',$filter2,$key); $this->data['cityname']=$cityname[0]->cityName;}\n\t\t\t\t\t\n\t\t\t\t\t$this->data['propertyimages']=$this->AddProperty_model->Getpropertyimages($propertyid);\n\t\t\t\t\t\n\t\t\t\t\t$this->data['coveredarea']=$this->AddProperty_model->Shownoofbedrooms('rp_property_attribute_values',array('propertyID'=>$propertyid,'attributeID'=>94));\n\t\t\t\t\t$this->data['plotarea']=$this->AddProperty_model->Shownoofbedrooms('rp_property_attribute_values',array('propertyID'=>$propertyid,'attributeID'=>2));\n\t\t\t\t\t$this->data['carpetarea']=$this->AddProperty_model->Shownoofbedrooms('rp_property_attribute_values',array('propertyID'=>$propertyid,'attributeID'=>67));\n \n // print_r($this->data['propertyimages']);die;\n\t\t\t\t\t\n\t\t\t\t\t/*$getamenities=$this->AddProperty_model->Getotherdata('rp_property_attribute_values',array('propertyID'=>$this->input->post('propertyid'),'attributeID'=>6,'attrOptionID'=>$Attributeoptions->attrOptionID));\n \n\t\t\t\t\tif(!empty($getamenities)){echo\"<p>YES </p>\";}else{echo\"<p>NO</p>\";}\n \n /* $getroomdetails=$this->AddProperty_model->Getotherdatafromnewdb('rp_dbho_bed_room',array('propertyID'=>$this->input->post('propertyid')));\n \n\t\t\t\t\t\t if(in_array(\"AC\", $bedothers)){ $ac=\"YES\";}else{$ac=\"NO\";}*/\n \n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t}\n\n\t\n\t\t$this->data['projects']=$this->AddProperty_model->get_project();\n\t\t$this->data['propertytype']=$this->AddProperty_model->getPropertyType();\n\t\t$this->data['user_type']=$this->AddProperty_model->get_user_type();\n\t\t$this->parser->parse('header',$this->data);\n\t\t$this->load->view('addproperty',$this->data);\n\t\t$this->parser->parse('footer',$this->data);\n\t\t\n\t}", "public function store() {\n\t\tif( ! $this->isValid(Input::all(), $this->genre))\n\t\t\treturn Redirect::back()->withInput()->withErrors($this->genre->inputErrors);\n\n\t\tif( ! $this->genre->saveNewGenre(Input::all())) {\n\t\t\t//log error to logger\n\t\t\t$this->errorNum = $this->logger->createLog('GenresController', 'store', 'Failed to add genre to DB.', Request::url(), Request::path(), 8);\n\t\t\tSession::put('adminDangerAlert', 'Error #'. $errorNum . ' - Something went wrong attempting to save the genre to the database. Contact an administrator if this continues.');\n\t\t\treturn Redirect::back();\n\t\t}\n\n\t\t// Platform has been added successfully\n\t\tSession::put('adminSuccessAlert', '<b>'. Input::get('name') .'</b> has successfully been added.');\n\t\treturn Redirect::to('/admin/genres');\n\t}", "public function xadd() {\n\t\t$args = $this->getAllArguments ();\n\t\tif ($args ['view'] == 'forms') {\n\t\t\t$this->_redirect ( '_newForm' );\n\t\t} elseif ($args ['view'] == 'fields') {\n\t\t\t$this->_redirect ( '_newField' );\n\t\t} elseif ($args ['view'] == 'actions') {\n\t\t\t$this->_redirect ( '_newAction' );\n\t\t} else {\n\t\t\tparent::xadd ();\n\t\t}\n\t}", "public function addnew(){\n\t\t\tif($this->session->userdata('loggedIn_adminInfo')=='')redirect('admincp');\n\t\t\t$data['title'] \t\t\t= 'Projects 100K';\n\t\t\t$postedValue_fname \t\t= array();\n\t\t\tif($this->session->userdata('post_promotionData'))\n\t\t\t$data['postedValue'] \t\t= \t$this->session->userdata('post_promotionData');\n\t\t\t$data['hdnPromotionID']\t\t=\t'';\t\n\t\t\t$data['promotionInfo']\t\t=\tarray();\n\t\t\t$data['catg_uri_string']\t=\t'';\n\t\t\t$this->load->view('templates/admincp/header', $data);\n\t\t\t$this->load->view('admincp/promotion/form', $data);\n\t\t}", "public function add() {\n\n\t\t\t$projetoNome = $_POST['pjt_new_1'];\n\t\t\t$projetoData = $_POST['pjt_new_2'];\n\n\t\t\t$db = new Projetos_Model();\n\t\t\t$db->insert('sis_pjt', array(\n\t\t\t\t\"pjt_nme\" => \"$projetoNome\",\n\t\t\t\t\"pjt_data\" => \"$projetoData\",\n\t\t\t));\n\n\t\t\treturn header( \"Location: ../projetos\" );\n\t\t}" ]
[ "0.72755873", "0.6783344", "0.6649812", "0.6515382", "0.64898837", "0.6471323", "0.6460506", "0.64482766", "0.64041764", "0.6403086", "0.6321117", "0.6259629", "0.6201523", "0.6154337", "0.61452883", "0.6132091", "0.6129847", "0.6096012", "0.6054864", "0.6048137", "0.6021136", "0.60082936", "0.5997641", "0.5972057", "0.59548557", "0.5931779", "0.59185994", "0.58939004", "0.5880081", "0.58783615", "0.58575356", "0.58389986", "0.58389986", "0.5838171", "0.5820824", "0.5815877", "0.58135605", "0.5809635", "0.58023995", "0.5799642", "0.5798307", "0.5780004", "0.57795686", "0.57776546", "0.5776754", "0.5759239", "0.5756399", "0.5741485", "0.5739916", "0.57377076", "0.572371", "0.5723461", "0.5702026", "0.5702026", "0.57019633", "0.56776935", "0.5677126", "0.5640397", "0.5638131", "0.56103194", "0.56103194", "0.56023455", "0.56017756", "0.5588535", "0.5577867", "0.55687803", "0.55685604", "0.5555022", "0.5554387", "0.5547998", "0.5546269", "0.5545497", "0.55451494", "0.5539326", "0.5530502", "0.5529497", "0.5525848", "0.55200636", "0.5518366", "0.5514592", "0.550746", "0.55054915", "0.5499221", "0.5494124", "0.54932654", "0.5492467", "0.5487043", "0.5482157", "0.54544157", "0.54499966", "0.5447411", "0.5434422", "0.5432455", "0.54298955", "0.5417677", "0.5406876", "0.540237", "0.540138", "0.538265", "0.53798044" ]
0.6691195
2
This will serve the editing page for a property
public function edit(Request $request, $id) { if($request->isMethod("GET")) { $property = Property::find($id); if(is_null($property)) { return redirect()->back()->with("error", "Invalid Request, Object Not Found"); } return view("admin.property.edit", [ "features" => Feature::all()->toArray(), "property_features" => PropertyFeature::where("property_id", $property->id) ->get()->pluck("feature_id")->all(), "property" => $property, "currencies" => Currency::all(), "photos" => Photo::where("property_id", $id)->get()->toArray(), "types" => PropertyType::all(), "states" => PropertyState::all() ]); } else if($request->isMethod("POST")) { Log::info("post features"); Log::info(Input::all()); return redirect()->route('admin.dashboard.index')->with("success", "Property Features Added Successfully"); } return redirect()->back()->with("error", "Invalid Request"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Property $property)\n {\n //\n }", "public function edit(Property $property)\n {\n //\n }", "public function edit(Property $property)\n {\n $locs = Location::pluck('area','id');\n $tags = Tag::pluck('property','id');\n return view('app.properties.edit',compact('property','locs', 'tags'));\n }", "function editProperties()\n\t{\n\t\tglobal $ilAccess;\n\t\tglobal $tpl, $ilTabs;\n\n\t\t$ilTabs->activateTab(\"properties\");\n\t\t\n\t\t$save = ((strcmp($this->ctrl->getCmd(), \"saveProperties\") == 0)) ? true : false;\n\n\t\tinclude_once(\"./Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$form = new ilPropertyFormGUI();\n\t\t$form->setFormAction($this->ctrl->getFormAction($this, 'properties'));\n\t\t$form->setTitle($this->lng->txt(\"properties\"));\n\t\t$form->setMultipart(false);\n\t\t$form->setId(\"properties\");\n\n\t\t// online\n\t\t$online = new ilCheckboxInputGUI($this->txt(\"mpl_online_property\"), \"online\");\n\t\tif(ilObjMatchMemoPool::_lookupPairCount($this->object->getId()) < ilObjMatchMemoPool::MIN_PAIRS_NUM)\n\t\t{\n\t\t\t$online->setInfo(implode('<br />', array(\n\t\t\t\t$this->txt(\"mpl_online_property_description\"),\n\t\t\t\t'<span style=\"color:red\">' . $this->txt(\"cannot_set_online_not_enough_pairs\") . '</span>'\n\t\t\t)));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$online->setInfo($this->txt(\"mpl_online_property_description\"));\n\t\t}\n\t\t$online->setChecked($this->object->online);\n\t\t$form->addItem($online);\n\n\t\t// add entry to navigation history\n\t\tif ($ilAccess->checkAccess(\"write\", \"\", $_GET[\"ref_id\"])) $form->addCommandButton(\"saveProperties\", $this->lng->txt(\"save\"));\n\n\t\tif ($save)\n\t\t{\n\t\t\t$form->checkInput();\n\t\t}\n\t\t$this->tpl->setVariable(\"ADM_CONTENT\", $form->getHTML());\n\t}", "public function action_edit($id = null)\n\t{\n\t\tarray_push($this->template->head->scripts, 'media/js/property.js', 'media/js/swfobject.js', 'media/js/jquery.uploadify.js');\n\t\tarray_push($this->template->head->styles, 'media/css/uploadify.css');\n\n\t\t// Setup view\t\t\n\t\t$this->template->content = View::factory('admin/property/form')\n\t\t\t->bind('post', $post)\n\t\t\t->bind('errors', $errors)\n\t\t\t->bind('types', $types)\n\t\t\t->bind('cities', $cities);\n\n\t\t$this->template->content->title = 'Property management > '.($id ? \"Property Edit ($id)\" : 'Property new');\n\n\t\t// get all cities and add first option as blank\n\t\t$cities = ORM::factory('city')->find_all()->as_array('id', 'name');\n\t\tarr::unshift($cities, NULL, '-- Select --');\n\n\t\t// get all types and add first option as blank\n\t\t$types = ORM::factory('type')->find_all()->as_array('id', 'name');\n\t\tarr::unshift($types, NULL, '-- Select --');\n\n\t\t// get item to be edited, or an empty object if creating new item\n\t\t$property = ORM::factory('property', (int) $id);\n\n\t\t// make sure agents can only edit their own property\n\t\tif ($id AND ! in_array('admin', Session::instance()->get('user_roles')))\n\t\t{\n\t\t\t// if authenticate user id doesn't match the property created by id, redirect\n\t\t\tif (Auth::instance()->get_user()->id != $property->created_by_id) {\n\t\t\t\t$this->request->redirect(Route::get('admin')->uri(array('action' => 'notowner')));\n\t\t\t}\n\t\t}\n\n\t\tif ( ! empty($_POST))\n\t\t{\n\t\t\t// get post values, load into object and check validation\n\t\t\t$post = $_POST; \n\t\t\t$property->values($post);\n\t\t\tif ($property->check())\n\t\t\t{\n\t\t\t\t//cookie::set('message', 'Updated city '.$city->name);\n\t\t\t\t// save and redirect to index\n\t\t\t\tif ($property->save()) {\n\t\t\t\t\t$this->request->redirect(Route::get('admin')->uri(array('controller' => 'properties')));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// get errors to show in form\n\t\t\t\t$errors = $property->validate()->errors('admin_errors'); \n\t\t\t}\n\t\t}\n\t\t// shuffle up values for form\n\t\t$post = $property->as_array('type_id', 'city_id', 'name', 'body', 'bedrooms', 'bathrooms', 'sqft', 'image');\n\t}", "public function edit($id) {\n $property = Property::find($id)->toArray();\n return view('administrator.setting.property.edit_property', compact('property'));\n }", "public function edit(PropertyApplication $propertyApplication)\n {\n //\n }", "public function edit(Properties $properties)\n {\n //\n }", "public function edit($id)\n {\n $property=Property::find($id);\n\n $types=Type::all();\n $regions=Region::all();\n $feature=Feature::all();\n return view('admin.property.edit',compact('property','types','regions','feature'));\n }", "public function edit($id)\n {\n $property =Property::find($id);\n \n return view('properties.edit',[\n 'property'=>$property,\n ]);\n }", "public function edit($id)\n {\n $property = Property::find($id);\n $extras = Extra::all();\n return view(\"admin.properties.edit\", compact(\"property\", \"extras\"));\n }", "function inspiry_is_edit_property() {\n\t\tif ( isset( $_GET['edit_property'] ) && ! empty( $_GET['edit_property'] ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function edit($id)\n {\n //\n $properties = DB::table('properties')->get()->where('id',$id);\n return view('user.property.editproperty',['properties' => $properties]);\n }", "public function edit(Request $request, $property_id)\n {\n $data['categories'] = PropertyCategories::getPropertyCategories();\n $data['property_variations'] = PropertyVariations::getPropertyVariations();\n $data['property'] = Property::getProperty()->where('property_id', $property_id)->first();\n // dd( $data['property'] );\n return view('property.edit')->with($data);\n }", "public function edit($id)\n {\n $property = Property::find($id);\n return view('properties.edit', compact('property'));\n }", "public function edit($id)\n {\n $property = Property::find($id);\n return view('properties.edit', compact('property'));\n }", "public function edit($id)\n {\n $property = Property::find($id);\n $area = Area::where('id' , $property->areas_id)->first();\n $all_areas = Area::all();\n return view('dashboard.pages.Property.edit')->with(array('property'=>$property,'area'=>$area,'all_areas'=>$all_areas));\n }", "public function edit($properties) {\n\t\tsetVariables(mysql_real_escape_string($properties['pageId']),mysql_real_escape_string($properties['instanceId']),array('code'=>$properties['code']));\n\t}", "public function edit($id)\n {\n $property = Property::findOrFail($id);\n return view('properties.edit', ['property' => $property]);\n }", "public function edit($id)\n {\n $user = Property::findOrFail($id);\n return view('properties.edit', compact('user'));\n }", "public function edit($id)\n {\n if(!\\Auth::user()->can('property.update'))\n return view('backend.partial.no-permission', ['title' => 'No-permission']);\n\n $front_refer_to = $this->getFrontReferTo();\n $item = null;\n\n /*\n * Get all properties current office\n */\n if(!\\Auth::user()->hasRole('administrator') && \\Auth::user()->isOffice()) {\n $staffObj = \\Auth::user()->staff;\n /*\n * Get properties in office\n */\n if (!empty($staffObj->office)) {\n if($staffObj->office->properties()->count()) {\n $item = $staffObj->office->properties()->where('property_id', $id)->first();\n }\n\n /*\n * Get properties in staff\n */\n } \n elseif (!empty($staffObj->properties) && count($staffObj->properties) > 0) {\n $item = $staffObj->properties()->where('property_id', $id)->first();\n }\n }\n\n if(\\Auth::user()->isAdministrator()) {\n $item = $this->propertyRepo->find($id);\n }\n\n if (!\\Auth::user()->hasRole('administrator') && \\Auth::user()->isCollector()) {\n $item = $this->propertyRepo->model()->where('id', $id)\n ->where('status', 0)\n ->first();\n }\n\n if(empty($item)) {\n return redirect('administrator/property')->with(['error' , 'Property not found!']);\n }\n\n $item = Property::with([\"owner\", \"collector\", \"property_tag\"])->find($id);\n $provinces = $this->provinceRepo->lists()->pluck('title', 'id')->toArray();\n $districts = $this->districtRepo->lists()\n ->where([\"province_id\" => $item->province_id])\n ->pluck('title', 'id')\n ->toArray();\n $communes = $this->communeRepo->lists()\n ->where([\"district_id\" => $item->district_id])\n ->pluck('title', 'id')\n ->toArray();\n\n $villages = $this->communeRepo->lists()\n ->where([\"commune_id\" => $item->commune_id])\n ->pluck('title', 'id')\n ->toArray();\n if(!empty(@$item->owner)){\n $item->owners = $item->owner->pluck('owner_id')->toArray();\n }\n\n if(!empty(@$item->owner)) {\n $item->collector = $item->collector->pluck('staff_id')->toArray();\n }\n\n if(!empty(@$item->tag)) {\n $item->tag = $item->tag->map(function($tag) {\n return [\n 'id' => $tag->tag_id,\n 'text' => $tag->tag->title\n ];\n })->toArray();\n // $item->tag = $item->tag->pluck('tag_id')->toArray();\n }\n\n $action = route(\"administrator.property-update\", $id);\n $property_types = PropertyType::orderBy(\"id\", \"desc\")->get();\n $owners = Owner::orderBy(\"id\", \"desc\")->get();\n\n $collectors = Staff::where(function($query){\n $query->orWhereIn('type', [2,4]);\n $query->orWhereHas(\"user\", function ($query) {\n $query->whereHas(\"user_has_role\", function ($query) {\n $query->whereHas(\"role\", function ($query) {\n $query->where(\"role_type\", \\Constants::ROLE_TYPE_COLLECTOR);\n });\n });\n });\n })->with(\"user\")->orderBy(\"id\", \"DESC\")->get();\n\n $projects = Project::orderBy(\"id\", \"DESC\")->get();\n\n return view('backend.property.form', compact('item', 'front_refer_to', \"provinces\", \"districts\", \"communes\", \"villages\", \"property_types\", \"owners\", \"action\", \"collectors\", \"projects\"));\n }", "public function edit($id)\n {\n return view('admindashboard.property.edit');\n }", "public function edit(PropertyCategory $propertyCategory)\n {\n //\n }", "public function edit($id)\n {\n $property = Property::findOrFail($id);\n $propertytypes = PropartyType::pluck('type_name','type_id')->all();\n$owners = Owner::pluck('name','id')->all();\n\n return view('properties.edit', compact('property','propertytypes','owners'));\n }", "public function edit($id)\n {\n $property = Property::find($id);\n return new ResourcesProperty($property);\n\n return view('admin.property.edit', compact(['property', 'users', 'area_one', 'area_two', 'area_three']));\n }", "public function edit($id)\n {\n $property = Property::findOrFail($id);\n $categorys = Category::whereNotNull('parent_id')->get();\n $property_values = PropertyValue::where('property_id',$property->id)->get();\n $languages = Language::all();\n return view('property.form',compact('property','categorys','languages','property_values'));\n }", "public function edit(Propertycomments $propertycomments)\n {\n //\n }", "public function editAction()\n {\n parent::editAction();\n $this->_fillMappingsArray();\n $this->_fillAvailableProperties();\n }", "abstract public function admin_edit($object, $uri, Page $page);", "public function actionProperty() {\n\t\ttry {\n\t\t\t\\Yii::trace(__METHOD__.'()', 'sweelix.yii1.admin.structure.controllers');\n\t\t\t$notice = false;\n\t\t\tif(isset($_POST[Html::modelName($this->currentContent)]) === true) {\n\t\t\t\t$originalNodeId = $this->currentContent->nodeId;\n\t\t\t\t$this->currentContent->setScenario('updateProperty');\n\t\t\t\t$this->currentContent->attributes = $_POST[Html::modelName($this->currentContent)];\n\t\t\t\tif(\\CPropertyValue::ensureBoolean($_POST[Html::modelName($this->currentContent)]['contentStartDateActive']) === false) {\n\t\t\t\t\t$this->currentContent->contentStartDate = null;\n\t\t\t\t}\n\t\t\t\tif(\\CPropertyValue::ensureBoolean($_POST[Html::modelName($this->currentContent)]['contentEndDateActive']) === false) {\n\t\t\t\t\t$this->currentContent->contentEndDate = null;\n\t\t\t\t}\n\n\t\t\t\t$this->currentContent->authorId = \\Yii::app()->user->id;\n\t\t\t\tif($this->currentContent->validate() === true) {\n\t\t\t\t\tif($this->currentContent->save() === true) {\n\t\t\t\t\t\tif($this->currentContent->nodeId !== $originalNodeId) {\n\t\t\t\t\t\t\t$this->currentContent->move('top');\n\t\t\t\t\t\t\t$originalNode = Node::model()->findByPk($originalNodeId);\n\t\t\t\t\t\t\tif($originalNode !== null) {\n\t\t\t\t\t\t\t\t$originalNode->reOrder();\n\t\t\t\t\t\t\t\t$this->redirect(array('property', 'contentId'=>$this->currentContent->contentId));\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$notice = true;\n\t\t\t}\n\n\t\t\t$criteriaBuilder = new CriteriaBuilder('node');\n\t\t\t$criteriaBuilder->orderBy('nodeLeftId', 'asc');\n\t\t\t$treeDataProvider = $criteriaBuilder->getActiveDataProvider(array('pagination' => false));\n\n\t\t\t$criteriaBuilder = new CriteriaBuilder('template');\n\t\t\t$criteriaBuilder->filterBy('templateType', 'single');\n\t\t\t$criteriaBuilder->orderBy('templateTitle');\n\t\t\t$templatesDataProvider = $criteriaBuilder->getActiveDataProvider(array('pagination' => false));\n\n\t\t\t$contentCriteriaBuilder = new CriteriaBuilder('content');\n\t\t\t$contentCriteriaBuilder->filterBy('contentId', $this->currentContent->contentId);\n\n\t\t\tif(\\Yii::app()->request->isAjaxRequest === true) {\n\t\t\t\t$this->renderPartial('_property', array(\n\t\t\t\t\t'create' => false,\n\t\t\t\t\t'content'=>$this->currentContent,\n\t\t\t\t\t'treeDataProvider'=>$treeDataProvider,\n\t\t\t\t\t'templatesDataProvider'=>$templatesDataProvider,\n\t\t\t\t\t'contentsDataProvider' => $contentCriteriaBuilder->getActiveDataProvider(array('pagination' => false)),\n\t\t\t\t\t'notice' => $notice,\n\t\t\t\t));\n\t\t\t} else {\n\t\t\t\t$this->setCurrentNode($this->currentContent->node);\n\t\t\t\t$this->render('property', array(\n\t\t\t\t\t'create' => false,\n\t\t\t\t\t'breadcrumb' => $this->buildBreadcrumb($this->currentContent->contentId),\n\t\t\t\t\t'mainMenu' => $this->buildMainMenu(2, 1),\n\t\t\t\t\t'content' => $this->currentContent,\n\t\t\t\t\t'treeDataProvider'=>$treeDataProvider,\n\t\t\t\t\t'templatesDataProvider'=>$templatesDataProvider,\n\t\t\t\t\t'contentsDataProvider' => $contentCriteriaBuilder->getActiveDataProvider(array('pagination' => false)),\n\t\t\t\t\t'notice' => $notice,\n\t\t\t\t));\n\t\t\t}\n\t\t} catch(\\Exception $e) {\n\t\t\t\\Yii::log('Error in '.__METHOD__.'():'.$e->getMessage(), \\CLogger::LEVEL_ERROR, 'sweelix.yii1.admin.structure.controllers');\n\t\t\tthrow $e;\n\t\t}\n\t}", "protected function handlePageEditing() {}", "public function edit($id = 0)\n {\n if ($id < 1) {\n return redirect('/property')->with(\n 'error', Lang::get('property.ERROR_MESSAGES.EDIT_ID_MISSING'\n ));\n }\n\n // Property::findOrFail($id);\n\n // Check ID exists in the system, before updating the data\n if (! $property = Property::find($id) ) {\n return redirect('/property')->with(\n 'warn', Lang::get('property.ERROR_MESSAGES.EDIT_ID_NOT_EXISTS'\n ));\n }\n\n $propertyTypes = MMFormHelper::getPropertyTypes();\n $apartmentTypes = MMFormHelper::getApartmentTypes();\n $propertyMeasurements = MMFormHelper::getPropertyMeasurements();\n $editForm = 'T';\n\n return view('property.create', compact(\n 'propertyTypes', 'apartmentTypes', 'propertyMeasurements', 'property', 'editForm', 'id'\n ));\n }", "public function edit(PropertyService $propertyService)\n {\n $services = Service::all();\n $properties = Property::all();\n $propertyService = PropertyService::find($propertyService->id);\n \n if ($propertyService->property->property_type_id == 9) {\n $propertyOptions = implode('&#13;&#10;', json_decode($propertyService->property_options, true));\n } else {\n $propertyOptions = '';\n }\n\n\n return View('property_service.edit', [\n 'services' => $services,\n 'properties' => $properties,\n 'propertyService' => $propertyService,\n 'propertyOptions' => $propertyOptions\n ]);\n }", "abstract protected function renderEdit();", "public function edit($id)\n {\n $facilities = Facility::orderBy('description_translate')->get();\n $property = Property::where('id', $id)->first();\n $propertyFacilities = $property->facilities()->where('propertyId', $property->id)->get();\n $users = User::all();\n\n return view('admin.properties.edit', [\n 'property' => $property,\n 'facilities' => $facilities,\n 'propertyFacilities' => $propertyFacilities,\n 'users' => $users\n ]);\n \n }", "function pa_edit() {\n\t\t\t\t$edit_pid = (int)UTIL::get_post('edit_pid');\n\t\t\t\t\n\t\t\t\t//-- haben wir keine edit-id, gibts eine seiten-tabelle zur auswahl\n\t\t\t\tif (!$edit_pid) {\n\t\t\t\t\techo 'error: no pid';\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$form = MC::create('form');\n\t\t\t\t$form->init('page', 'mod_page');\n\t\t\t\t$form->add_hidden('edit_pid', $edit_pid);\n\t\t\t\t\n\t\t\t\t// hatten wir fehler\n\t\t\t\tif ($this->get_var('error')) {\n\t\t\t\t\t$form->set_values($this->get_var('data'));\n\t\t\t\t\t$form->set_error_fields($this->get_var('error'));\n\t\t\t\t}\t\n\t\t\t\telse {\n\t\t\t\t\t// frisch aus db lesen\n\t\t\t\t\t$sql = 'SELECT * FROM '.$this->mod_tbl.' WHERE id='.$edit_pid;\n\t\t\t\t\t$res = $this->DB->query($sql);\n\t\t\t\t\t$data = $res->r();\n\t\t\t\t\t$form->set_values($data);\n\t\t\t\t}\n\n\t\t\t\t$this->set_var('path', $this->_get_path_print($edit_pid));\n\t\t\t\t$this->set_var('form', $form);\n\t\t\t\t\n\t\t\t\t$this->OPC->generate_view($this->tpl_dir.'pa_edit.php');\n\n\t\t\t}", "public function edit(setting $setting)\n {\n //\n }", "public function edit(Setting $setting)\n {\n //\n }", "public function edit(Setting $setting)\n {\n //\n }", "public function edit(Setting $setting)\n {\n //\n }", "public function edit(Setting $setting)\n {\n //\n }", "public function edit(Setting $setting)\n {\n //\n }", "public function show(Property $property)\n {\n //\n }", "public function show(Property $property)\n {\n //\n }", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n {\n $property = Property::where('id', $id)->first();\n \n if ($property !== null)\n {\n $bosses = User::where([\n 'isAdmin' => null,\n 'isEmployee' => null,\n 'isBoss' => 1,\n 'boss_id' => null\n ])->get();\n \n $admins = User::where([\n 'isAdmin' => 1,\n 'isEmployee' => null,\n 'isBoss' => null,\n 'boss_id' => null\n ])->get();\n \n if (count($admins) > 0)\n {\n foreach ($admins as $admin)\n {\n $bosses->push($admin);\n }\n \n $property['bosses'] = $bosses;\n\n return view('property.edit')->with('property', $property);\n }\n }\n \n return redirect()->route('welcome');\n }", "public function edit( )\r\n {\r\n //\r\n }", "public function edit($id)\n {\n $elementProperty = $this->elementPropertyRepository->find($id);\n\n if(empty($elementProperty))\n {\n Flash::error('ElementProperty not found');\n\n return redirect(route('elementProperties.index'));\n }\n\n return view('elementProperties.edit')->with('elementProperty', $elementProperty);\n }", "public function edit($uuid)\n {\n $client = new \\GuzzleHttp\\Client();\n $client->setDefaultOption('verify', false);\n $response = $client->get(env('MTC_API_URL') . \"property/\". $uuid .\"?api_key=\" . env('MTC_API_KEY'));\n\n if($response->getStatusCode() !== 200){\n throw new \\Exception('Api request error');\n }\n\n $property = $response->getBody();\n return view('properties.edit', compact('property'));\n }", "public function show(Property $property_id)\n {\n }", "public function editAction() {}", "function commerce_store_ui_entity_property_info_alter(&$info) {\n $info['commerce_store']['properties']['edit_url'] = array(\n 'label' => t('Edit URL'),\n 'description' => t(\"The URL of the store's edit page.\"),\n 'getter callback' => 'commerce_store_get_properties',\n 'type' => 'uri',\n );\n}", "public function editAction(): object\n {\n // Sets webpage title\n $title = \"Edit content\";\n\n // Sets extended webpage title\n $titleExtended = \" | Eshop\";\n\n // Framework variables\n $response = $this->app->response;\n $session = $this->app->session;\n\n // Verifies if user is logged in\n if (!$session->get(\"loggedIn\")) {\n $response->redirect(\"eshop/login\");\n };\n\n // Connects to db\n $this->app->db->connect();\n\n // Retrieve content id\n $contentId = getGet(\"id\");\n\n // SQL statement\n $sql = \"SELECT * FROM content WHERE id = ?;\";\n\n // Fetches data from db and stores in $resultset\n $content = $this->app->db->executeFetch($sql, [$contentId]);\n\n // Data array\n $data = [\n \"title\" => $title,\n \"titleExtended\" => $titleExtended,\n \"contentId\" => $contentId,\n \"content\" => $content,\n // \"filters\" => $filters\n ];\n\n // Includes admin header\n $this->app->page->add(\"content/header_admin\");\n\n // Adds route and sends data array to view\n $this->app->page->add(\"content/edit\", $data);\n\n // Renders page\n return $this->app->page->render($data);\n }", "public function edit() {\n\t\t\t\n\t\t}", "public function actionEdit()\n\t{\n\t\t$field = $this->_getFieldOrError($this->_input->filterSingle('field_id', XenForo_Input::STRING));\n\t\treturn $this->_getFieldAddEditResponse($field);\n\t}", "public function edit(Pro $pro)\n {\n //\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 edit(Page $page)\n {\n //\n }", "public function edit() {\n\t\t$data['pagetitle'] = 'Dashboard - Edit Posts';\n\n\t\t$data['postid'] = $viewmodel->getPostById($postid['id'] );\n\t\tView::renderAdminTemplate($data, \"App/Views/admin/edit/index.php\") ;\n\t}", "public function edit($id)\n {\n if (! Gate::allows('document_edit')) {\n return abort(401);\n }\n\n $properties = \\App\\Property::get()->pluck('name','id');\n $document = PropertiesFacturas::findOrFail($id);\n\n return view('admin.properties_facturas.edit', compact('document', 'properties'));\n }", "public function edit(PropertyStatus $propertyStatus)\n {\n return view('administrator.PropertyStatusView.edit',['propertyStatus' => $propertyStatus]); \n }", "public function edit()\n {\n $setting = Setting::findOrFail(1)->first();\n return view('backend.setting.edit', compact('setting'));\n }", "public function edit() {\n }", "public function edit($id)\n {\n $propertyclass = \\App\\PropertyClasses::where('id', $id)->first();\n return view('admin.property-classes.edit')->with('propertyclass', $propertyclass);\n }", "public function edit(Promotion $promotion)\n {\n //\n }", "public function edit(Pelamar $pelamar)\n {\n //\n }", "function doAction() {\n\n\t\t$i18n = new I18n($this->context->config->UI_LANG);\n\n\t\tif (isset($this->session->errorCode)) {\n\t\t\t$listItemProperty = unserialize($this->session->formData);\n\t\t\t$applicationId = $listItemProperty->applicationDefinitionId;\n\t\t} else {\n\t\t\t$listItemPropertyId = Request::get(\n\t\t\t\t\"list_item_property_id\", Request::TYPE_INTEGER, 0);\n\t\t\tif ($listItemPropertyId) {\n\t\t\t\t$listItemProperty = ListItemPropertyDefinition::fetch(\n\t\t\t\t\t$this->context, $listItemPropertyId);\n\t\t\t\t$applicationId = $listItemProperty->applicationDefinitionId;\n\t\t\t} else {\n\t\t\t\t$listItemProperty =\n\t\t\t\t\tnew ListItemPropertyDefinition($this->context);\n\t\t\t\t$applicationId = Request::get(\n\t\t\t\t\t\"application_definition_id\", Request::TYPE_INTEGER, 0);\n\t\t\t}\n\t\t}\n\n\t\t$title = $listItemProperty->id\n\t\t\t? $i18n[\"Edit list item property\"]\n\t\t\t: $i18n[\"Create new list item property\"];\n\n\t\t$helpTexts = array(\n\n\t\tListItemPropertyDefinition::TYPE_INPUT =>\n\t\t$i18n[\"\\nWIDTH\".\n\t\t\t\"\\tWidth of the input box in pixels, number\".\n\t\t\t\"\\tWIDTH=100\".\n\t\t\t\"\\nMAXLENGTH\".\n\t\t\t\"\\tMaximum number of characters that will be accepted\".\n\t\t\t\"\\tMAXLENGTH=50\".\n\t\t\t\"\\n\"],\n\t\t/*$i18n[\"\\nWIDTH\".\n\t\t\t\"\\tBreedte in pixels van de input box, getal\".\n\t\t\t\"\\tWIDTH=100\".\n\t\t\t\"\\nMAXLENGTH\".\n\t\t\t\"\\tMaximaal aantal karkaters dat wordt geaccepteerd\".\n\t\t\t\"\\tMAXLENGTH=50\".\n\t\t\t\"\\n\"],*/\n\n\t\tListItemPropertyDefinition::TYPE_INFO =>\n\t\t$i18n[\"\\nThe info property provides you with a possibility to add \".\n\t\t\t\"informative texts in the dialog window. Just enter the text in \".\n\t\t\t\"the \\\"type data\\\" field. The text can contain HTML.\"],\n\t\t/*$i18n[\"\\nHet info data type is een mogelijkheid om eigen tekst in \".\n\t\t \"het dialoogvenster te zetten. Alleen het \\\"type data\\\" veld hoeft \".\n\t\t \"hier ingevuld te worden. Het veld kan HTML bevatten.\"],*/\n\n\t\tListItemPropertyDefinition::TYPE_HTML_TEXT =>\n\t\t$i18n[\"\\nHEIGHT\".\n\t\t\t\"\\tHeight if the text field in pixels\".\n\t\t\t\"\\tHEIGHT=100\".\n\t\t\t\"\\n\"],\n\t\t/*$i18n[\"\\nHEIGHT\".\n\t\t\t\"\\tHoogte van het textvak in pixels\".\n\t\t\t\"\\tHEIGHT=100\".\n\t\t\t\"\\n\"],*/\n\n\t\tListItemPropertyDefinition::TYPE_TEXT =>\n\t\t$i18n[\"\\nROWS\".\n\t\t\t\"\\tHeight if the text field in rows\".\n\t\t\t\"\\tROWS=5\".\n\t\t\t\"\\n\"],\n\t\t/*$i18n[\"\\nROWS\".\n\t\t\t\"\\tHoogte van het textvak in regels\".\n\t\t\t\"\\tROWS=5\".\n\t\t\t\"\\n\"],*/\n\n\t\tListItemPropertyDefinition::TYPE_IMAGE =>\n\t\t$i18n[\"\\nWIDTH\".\n\t\t\t\"\\tWidth in pixels of the image in the CMS dialog window, number\".\n\t\t\t\"\\tWIDTH=100\".\n\t\t\t\"\\nHEIGHT\".\n\t\t\t\"\\tHeight in pixels of the image in the CMS dialog window, number\".\n\t\t\t\"\\nTEMPLATE_WIDTH\".\n\t\t\t\"\\tSuggested width in pixels when cropping the image, number\".\n\t\t\t\"\\nTEMPLATE_HEIGHT\".\n\t\t\t\"\\tSuggested height in pixels when cropping the image, number\".\n\t\t\t\"\\n\"],\n\t\t/*$i18n[\n\t\t\t\"\\nWIDTH\".\n\t\t\t\"\\tBreedte in pixels van het plaatje in cms dialoogvenster, getal\".\n\t\t\t\"\\tWIDTH=100\".\n\t\t\t\"\\nHEIGHT\".\n\t\t\t\"\\tHoogte in pixels van het plaatje in cms dialoogvenster, getal\".\n\t\t\t\"\\nTEMPLATE_WIDTH\".\n\t\t\t\"\\tVoorgestelde breedte voor het croppen van de afbeelding, getal\".\n\t\t\t\"\\nTEMPLATE_HEIGHT\".\n\t\t\t\"\\tVoorgestelde hoogte voor het croppen van de afbeelding, getal\".\n\t\t\t\"\\n\"],*/\n\n\t\tListItemPropertyDefinition::TYPE_DATE_TIME =>\n\t\t$i18n[\"\\nDEFAULT_VALUE\".\n\t\t\t\"\\tThe 'default' DEFAULT_VALUE is the current date. You can enter \".\n\t\t\t\"NULL if you don't want a default date set. Else you can enter \".\n\t\t\t\"any by PHP:strtotime parseble value as DEFAULT_VALUE.\".\n\t\t\t\"\\tDEFAULT_VALUE=NULL\".\n\t\t\t\"\\tDEFAULT_VALUE=-2 days\".\n\t\t\t\"\\n\"],\n\t\t/*$i18n[\n\t\t\t\"\\nDEFAULT_VALUE\".\n\t\t\t\"\\tDe 'default' DEFAULT_VALUE is de huidige datum. NULL kan je \".\n\t\t\t\"opgeven als je geen default geen waarde ingevuld wilt. Daarnaast \".\n\t\t\t\"kan je elke door PHP:strtotime parsebare waarde als \".\n\t\t\t\"DEFAULT_VALUE opgeven.\".\n\t\t\t\"\\tDEFAULT_VALUE=NULL\".\n\t\t\t\"\\tDEFAULT_VALUE=-2 days\".\n\t\t\t\"\\n\"],*/\n\n\t\tListItemPropertyDefinition::TYPE_SELECT =>\n\t\t$i18n[\"\\nDATA\".\n\t\t\t\"\\tList with items to display in the select list. These are \".\n\t\t\t\"value/text pairs separated by a semicolon. Each value/text pair \".\n\t\t\t\"is on its turn separated by a colon.\".\n\t\t\t\"\\tDATA=M:male;F:Female\".\n\t\t\t\"\\nTYPE\".\n\t\t\t\"\\tSelect list type\".\n\t\t\t\"\\tTYPE=MULTIPLE\".\n\t\t\t\"\\nSIZE\".\n\t\t\t\"\\tSize of the (multiple) select list in rows\".\n\t\t\t\"\\tSIZE=4\".\n\t\t\t\"\\n\"],\n\t\t/*$i18n[\n\t\t\t\"\\nDATA\".\n\t\t\t\"\\tLijst met items die worden getoond in de select list. \".\n\t\t\t\"Waarde-tekst paren gescheiden door een punt-komma. Elk \".\n\t\t\t\"waarde-tekst paar is weer gescheiden door een dubbele punt.\".\n\t\t\t\"\\tDATA=M:male;F:Female\".\n\t\t\t\"\\nTYPE\".\n\t\t\t\"\\tType van de select list\".\n\t\t\t\"\\tTYPE=MULTIPLE\".\n\t\t\t\"\\nSIZE\".\n\t\t\t\"\\tGrootte van de (multiple) select list\".\n\t\t\t\"\\tSIZE=4\".\n\t\t\t\"\\n\"],*/\n\n\t\t\"col\" =>\n\t\t$i18n[\"Settings for the property in column layout\".\n\t\t\t\"\\nCOL_WIDTH\".\n\t\t\t\"\\tcolumn width, number (defaults to 100)\".\n\t\t\t\"\\tCOL_WIDTH=125\".\n\t\t\t\"\\nCOL_ALIGN\".\n\t\t\t\"\\tAlingment of the column. left-center-right (defaults to 'left')\".\n\t\t\t\"\\tCOL_ALIGN=center\".\n\t\t\t\"\\nCOL_IS_NUMERIC\".\n\t\t\t\"\\tTo indicate that column contains a numerical value so that \".\n\t\t\t\"these columns will be sorted correctly, true-false (defaults \".\n\t\t\t\"to false)\".\n\t\t\t\"\\tCOL_IS_NUMERIC=true\".\n\t\t\t\"\\n\"],\n\t\t/*$i18n[\"Instellingen voor velden in kolom lay out\".\n\t\t\t\"\\nCOL_WIDTH\".\n\t\t\t\"\\tkolombreedte, getal (default waarde is 100)\".\n\t\t\t\"\\tCOL_WIDTH=125\".\n\t\t\t\"\\nCOL_ALIGN\".\n\t\t\t\"\\tUitlijning van de kolom. left-center-right (default waarde \".\n\t\t\t\"is 'left')\".\n\t\t\t\"\\tCOL_ALIGN=center\".\n\t\t\t\"\\nCOL_IS_NUMERIC\".\n\t\t\t\"\\tGeef aan dat de waarde nummeriek is, zodat kolommen met \".\n\t\t\t\"getallen goed worden gesorteerd, true-false (default waarde \"\n\t\t\t\"is false)\".\n\t\t\t\"\\tCOL_IS_NUMERIC=true\".\n\t\t\t\"\\n\"],*/\n\t\t);\n\n\t\t$tr = \"../ScrivoUi/Config/Templates\";\n\t\tinclude \"{$tr}/common.tpl.php\";\n\t\tinclude \"{$tr}/Forms/list_item_property_form.tpl.php\";\n\t\t$this->useLayout(\"{$tr}/master.tpl.php\");\n\n\t\t$this->setResult(self::SUCCESS);\n\n\t}", "public function edit()\n {\n \n \n }", "public function show($id = 0)\n {\n if ($id < 1) {\n return redirect('/property')->with(\n 'error', Lang::get('property.ERROR_MESSAGES.EDIT_ID_MISSING'\n ));\n }\n\n // Check ID exists in the system, before updating the data\n if (! $property = Property::find($id) ) {\n return redirect('/property')->with(\n 'warn', Lang::get('property.ERROR_MESSAGES.EDIT_ID_NOT_EXISTS'\n ));\n }\n\n return view('property.show', compact('property'));\n }", "public function edit()\n {\n $id = $this->request->getParameter('id'); // récupérer le paramètre de l'ID\n $post = $this->post->getPost($id); // je récupère le post\n\n // j'arrive en post car des données sont saisies dans le formulaire\n if($this->request->parameterExist('title') && $this->request->parameterExist('content')) {\n\n $this->post->updatePost(\n $this->request->getParameter('title'),\n $this->request->getParameter('content'),\n $id\n );\n\n $this->redirect(\"admin\", \"post/\" . $post['id']); // une fois le post créé, je redirige vers la vue Admin/post/iddupost\n }\n\n // j'arrive sur la vue en Get\n $this->buildView(array('post'=>$post));\n }", "public function editAction(){\n\t\t$id = $this->getInput('id');\n\t\t$info = Ola_Service_Area::get(intval($id)); \n\t\t$this->assign('roots', $this->roots);\n\t\t$this->assign('parents', $this->parents);\n\t $this->assign('info', $info);\t\n\t}", "public function edit(Pharmacy $pharmacy)\n {\n }", "public function edit()\n\t{\n\t\t//\n\t}", "function lb_show_edit_page_action() {\n\tlb_show_templates(\n\t\tarray(\n\t\t\t'name' => 'edit',\n\t\t\t'this_cafe' => lb_get_this_cafe_from_cafe( $_GET['edit-id'] ),\n\t\t)\n\t);\n}", "public function edit()\n {\n return Inertia::render('back/admin/settings/privacy-policy/index', [\n 'privacy_policy' => settings('privacy_policy.content'),\n 'published' => settings('privacy_policy.published'),\n ]);\n }", "public function update(Request $request, Property $property)\n {\n //\n }", "public function update(Request $request, Property $property)\n {\n //\n }", "public function update(Request $request, Property $property)\n {\n //\n }", "public function _editField() {\n\t\t\n\t\t$args = $this->getAllArguments ();\n\t\t\n\t\tif (array_key_exists ( 'cid', $args )) {\n\t\t\t$field_id = $args ['cid'] [0];\n\t\t} else {\n\t\t\t$field_id = @$args [3] ? @$args [3] : $args [1];\n\t\t}\n\t\t\n\t\t$field = $this->getModel ( 'field' );\n\t\t$field->get ( ( int ) $field_id );\n\t\t\n\t\t$this->loadPluginModel ( 'fields' );\n\t\t\n\t\t$this->setView ( 'edit_field' );\n\t\n\t}", "protected function actionEdit() {\r\n\r\n //try 1: get the object type and names based on the current object\r\n $objInstance = class_objectfactory::getInstance()->getObject($this->getSystemid());\r\n if($objInstance != null) {\r\n $strObjectTypeName = uniSubstr($this->getActionNameForClass(\"edit\", $objInstance), 4);\r\n if($strObjectTypeName != \"\") {\r\n $strType = get_class($objInstance);\r\n $this->setCurObjectClassName($strType);\r\n $this->setStrCurObjectTypeName($strObjectTypeName);\r\n }\r\n }\r\n\r\n //try 2: regular, oldschool resolving based on the current action-params\r\n $strType = $this->getCurObjectClassName();\r\n\r\n if(!is_null($strType)) {\r\n\r\n $objEdit = new $strType($this->getSystemid());\r\n $objForm = $this->getAdminForm($objEdit);\r\n $objForm->addField(new class_formentry_hidden(\"\", \"mode\"))->setStrValue(\"edit\");\r\n\r\n return $objForm->renderForm(getLinkAdminHref($this->getArrModule(\"modul\"), \"save\".$this->getStrCurObjectTypeName()));\r\n }\r\n else\r\n throw new class_exception(\"error editing current object type not known \", class_exception::$level_ERROR);\r\n }", "public function edit(Proposal $proposal)\n {\n //\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(Propal $propal)\n {\n return view('propositions.edit', ['proposition' => $propal,\n 'types' => Type::all(),\n 'count' => $propal->conception\n ->getCountModificationsRestantes(), \n ]); \n //\n }", "public function editAction()\n {\n return $this->editor($isEditAction=true);\n }", "public function getEdit(){\n return view(\"admin.product.edit\" );\n }", "public function editAction()\n {\n echo'Hi Wlodek, I\\'m in edit() action in the Post controller';\n echo'<br/><p>Route parameters: <pre>'.htmlspecialchars(print_r($this->route_params, true)).'</pre></p>';\n }", "public function edit()\n {\n return view('policy.edit')->withPage(Policy::first());\n }", "public function edit()\n {\n \n }", "public function edit()\n {\n \n }", "public function edit()\n {\n \n }", "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 edit()\n {\n \n }", "public function edit()\n\t{\n\t\t\n\t}", "public function edit()\r\n\r\n {\r\n\r\n $this->page_title->push(lang('menu_products_add'));\r\n\r\n $this->data['pagetitle'] = $this->page_title->show();\r\n\r\n\r\n /* Breadcrumbs :: Common */\r\n\r\n $this->breadcrumbs->unshift(1, lang('menu_products_add'), 'admin/setup/product/edit');\r\n\r\n\r\n /* Breadcrumbs */\r\n\r\n $this->data['breadcrumb'] = $this->breadcrumbs->show();\r\n\r\n\r\n /* Data */\r\n\r\n $this->data['error'] = NULL;\r\n\r\n $this->data['charset'] = 'utf-8';\r\n\r\n $this->data['form_url'] = 'admin/setup/product/update';\r\n\r\n\r\n /* Load Template */\r\n\r\n $this->template->admin_render('admin/products/edit', $this->data);\r\n\r\n\r\n }", "public function edit()\n {\n // $setting = Setting::findOrFail($id);\n\n // return view('invoice.edit');\n }", "public function getEdit()\n\t{\n\t}", "public function editAction()\n {\n $tiles = [];\n // Reuse the parameters from $_REQUEST\n // If we are going to render a full page for edit form, we shall also render the _form_controls\n $tiles[] = Region::create($this->getEditRegionPath(), array_merge($_REQUEST, [\n '_form_controls' => true,\n ]));\n return $this->render($this->findTemplatePath('page.html') , array( 'tiles' => $tiles ));\n }", "public function edit(Prosiding $prosiding)\n {\n //\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function showEdit()\n {\n\n }" ]
[ "0.79631835", "0.79631835", "0.72413117", "0.71995866", "0.7050617", "0.7014664", "0.69389445", "0.6938554", "0.68690866", "0.68670905", "0.6842158", "0.6813458", "0.67859155", "0.6758462", "0.6732217", "0.6732217", "0.6729612", "0.67035055", "0.67013127", "0.6677669", "0.66514635", "0.66135085", "0.6598345", "0.6535124", "0.6515827", "0.65055114", "0.6479116", "0.64690304", "0.6466401", "0.6347475", "0.6345604", "0.6339431", "0.6329356", "0.6313727", "0.6263525", "0.6261193", "0.6254415", "0.6241589", "0.6241589", "0.6241589", "0.6241589", "0.6241589", "0.62400323", "0.62400323", "0.62347037", "0.6194339", "0.615081", "0.61364734", "0.61352354", "0.6132683", "0.6131445", "0.61215836", "0.610124", "0.60910606", "0.60797036", "0.60779315", "0.60728073", "0.60593235", "0.60529757", "0.6039944", "0.6031474", "0.59941727", "0.5986561", "0.5985571", "0.5985266", "0.597786", "0.59671324", "0.5963108", "0.59589106", "0.5958446", "0.5957309", "0.5956116", "0.595498", "0.5951946", "0.59389937", "0.5923375", "0.5923375", "0.5923375", "0.59221804", "0.5916408", "0.59131855", "0.59096295", "0.58899426", "0.58883256", "0.58857924", "0.5878057", "0.58778936", "0.5871267", "0.5871267", "0.5871267", "0.58695084", "0.58555895", "0.5851826", "0.58495516", "0.58449346", "0.58431846", "0.58428776", "0.58402216", "0.5838653", "0.58379275" ]
0.61310536
51
Async method for adding photos after creating property
public function addPhoto(Request $request) { // Log::info($request->all()); if(Input::hasFile('file') && Input::file('file')->isValid() && !is_null($request->id)) { $file = Input::file('file'); $extension = $file->getClientOriginalExtension(); $fileName = str_random(10) .'.'. $extension; $clientMimeType = $file->getClientMimeType(); if(!preg_match("/^(image).+$/", $clientMimeType)) { Log::info("error not an image ". $clientMimeType); return response()->json(["error" => "Not an Image"], 200); } $original = config('image.profile.original.path') . $fileName; \Storage::disk('public')->put( $original , file_get_contents( $file->getRealPath()) ); //persist the record to the db $photo = new Photo(); $photo->property_id = $request->id; $photo->url = $original; $photo->save(); return response()->json(["url" => $original], 200); } return response()->json(["error" => "No File Selected"], 504); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($id, AddPhotoRequest $request)\n {\n $property = Property::find($id);\n\n if($property->photos()->count() === 10) {\n\n return response()->json([\n \"Property cannot have more than 10 photos\"\n ], 403);\n \n }\n\n $photo = $request->file('photo');\n\n try {\n\n (new AddPhotoToProperty($property, $photo))->saveToImgur();\n\n } catch(\\Exception $e) {\n\n return $e->getMessage();\n }\n\n \n\n }", "public function store(Request $request)\n {\n /*foreach ($request->photos as $photo)\n {\n if ($photo->extension() !== 'jpeg')\n {\n dd($photo->extension());\n }\n }\n\n $photo = $request->except('_token');\n\n $type = HotelPhotoType::where('name', $photo['type_name'])->first();\n $photo['type_id'] = $type->id;\n\n if($photo['type_name'] == 'main')\n {\n unset($photo['type_name']);\n $file = $photo['photos'][0];\n unset($photo['photos']);\n $photo['img'] = $file->getClientOriginalName();\n\n $required_width = $type->width;\n $required_height = $type->height;\n list($current_width, $current_height) = getimagesize($file);\n\n if($required_width != $current_width || $required_height != $current_height)\n {\n if($required_width > $current_width || $required_height > $current_height)\n {\n dd('выбранное изобржение меньше нужных размеров');\n } else {\n $photo['optimized'] = false;\n }\n } else {\n $photo['optimized'] = true;\n }\n\n $type->photos()->create($photo);\n } else {\n unset($photo['type_name']);\n $file = $photo['photos'][0];\n unset($photo['photos']);\n $photo['img'] = $file->getClientOriginalName();\n\n $required_width = $type->width;\n $required_height = $type->height;\n list($current_width, $current_height) = getimagesize($file);\n\n if($required_width != $current_width || $required_height != $current_height)\n {\n if($required_width > $current_width || $required_height > $current_height)\n {\n dd('выбранное изобржение меньше нужных размеров');\n } else {\n $photo['optimized'] = false;\n }\n } else {\n $photo['optimized'] = true;\n };\n }*/\n\n //dd($photo);\n\n //$type->photos()->create($photo);\n\n $hotel = Hotel::find($request->hotel_id);\n\n $photo_type = HotelPhotoType::find($request->type_id);\n\n /*foreach ($data['photos'] as $photo)\n {\n if($photo->extension() == 'jpeg')\n {\n $arr['img'] = $photo->getClientOriginalName();\n $arr['hotel_id'] = $data['hotel_id'];\n $arr['optimized'] = false;\n $hotel->photos()->create($arr);\n\n $photo->move('public/img/photo', $arr['img']);\n }\n }*/\n\n $array = $request->except('photos');\n\n $file = $request->photos;\n $array['img'] = $hotel->slug . '_' . $photo_type->name . '.jpg';\n\n $file->move(env('DIR_IMG') . 'photo/', $array['img']);\n\n $delete = $hotel->photos()->where('type_id', $request->type_id)->delete();\n //dd($delete);\n\n $hotel->photos()->create($array);\n \n return redirect(route('hotels.show', $hotel->id));\n }", "public function photosAdd($id, PhotosRequest $photosrequest){\n\n $directory = '/uploads/photos/'.$id;\n\n if (!File::exists(public_path().$directory)){\n File::makeDirectory(public_path().$directory, 0775,true);\n }\n\n $files = $photosrequest->file('file');\n\n\n\n foreach ($files as $file) {\n\n $name = Auth::id().'_'.$id.'_'.str_slug(pathinfo($file->getClientOriginalName(), PATHINFO_FILENAME),'-').rand(1000,9999);\n $name_thumb = 'thumb_'.$name;\n $name_thumb2 = 'thumb2_'.$name;\n $file_path = $name.'.'.$file->getClientOriginalExtension();\n\n $img = Image::make($file);\n $img->interlace();\n $img->save('uploads/photos/'.$id.'/' . $name .'.'. $file->getClientOriginalExtension());\n\n $img->fit(200, 200);\n $img->save('uploads/photos/'.$id.'/' . $name_thumb .'.'. $file->getClientOriginalExtension());\n\n $img = Image::make($file);\n $img->resize(180, null, function($constraint){\n $constraint->aspectRatio();\n });\n $img->save('uploads/photos/'.$id.'/' . $name_thumb2 .'.'. $file->getClientOriginalExtension());\n\n $picture = new Pictures();\n\n $picture->name = $file_path;\n $picture->directory = $directory;\n $picture->albums_id = $id;\n\n $picture->save();\n }\n\n\n Session::flash('success', \"Vos photos on été ajoutées à l'album\");\n\n return redirect('/albums/'.$id);\n\n }", "public function store(Request $request)\n {\n $photos = $request->file('file');\n\n if (!is_array($photos)) {\n $photos = [$photos];\n }\n\n if (!is_dir($this->photos_path)) {\n mkdir($this->photos_path, 0777);\n }\n\n for ($i = 0; $i < count($photos); $i++) {\n $photo = $photos[$i];\n $name = sha1(date('YmdHis') . Str::random(30));\n $save_name = $name . '.' . $photo->getClientOriginalExtension();\n $resize_name = $name . Str::random(2) . '.' . $photo->getClientOriginalExtension();\n\n $resized_image = InterventionImage::make($photo)\n ->encode('jpg', 75)\n ->resize(1000, 750)\n ->crop(1000, 750);\n // ->save($this->photos_path . '/' . $resize_name);\n\n Storage::disk('s3')->put($resize_name,file_get_contents($photo), 'public');\n //$photo->move($this->photos_path, $save_name);\n\n $upload = new Image();\n $upload->file = $save_name;\n $upload->resizedfilename = $resize_name;\n $upload->originalfilename = basename($photo->getClientOriginalName());\n $upload->property_id = $request->input('propertyadd_id');\n $upload->save();\n }\n\n return Response()->json([\n 'message' => 'Image Enrégistrer avec sucès'\n ], 200);\n\n }", "private function addProductPhotos(array $request){\n\n if(array_key_exists('photos', $request)){\n \n foreach($request['photos'] as $photos){\n\n $photo = new Photo();\n\n $photoProduct = Product::where('name', $request['name'])->get();\n $path = $photos->store('/storage/products');\n $filename = basename($path);\n $extension = $photos->getClientOriginalExtension();\n \n $photo->product_id = $photoProduct[0]->id; \n $photo->path = $filename;\n $photo->extension = $extension;\n\n $photo->save();\n }\n }\n }", "public function addPhotoAction(){\n $data = $this->getRequestData();\n $types = array('activity', 'operation', 'people');\n if(isset($data['photo']['name']) && isset($data['photo']['content']) && isset($data['type']) && in_array($data['type'], $types)){\n $user = Object_User::getById($this->getDeviceSession()->getUserId());\n $folder = Asset_Folder::getByPath('/images/'.$data['type'].'/'.$user->getKey().'-'.$data['type']);\n if (!$folder) {\n switch($data['type']){\n case 'activity':\n $fid = 3;\n break;\n case 'operation':\n $fid = 4;\n break;\n case 'people':\n $fid = 7;\n break;\n }\n $folder = new Object_Folder();\n $folder->setKey($user->getKey() . \"-\" . $data['type']);\n $folder->setParentId($fid);\n $folder->save();\n }\n\n $asset = new Asset_Image();\n $asset->setCreationDate(time());\n $asset->setUserOwner(1);\n $asset->setUserModification(1);\n $asset->setParentId($folder->getId());\n $asset->setFilename(Pimcore_File::getValidFilename($data['name'] . \"-\" . time()));\n $asset->setData(base64_decode($data['content']));\n if(!$asset->save()){\n $this->setErrorResponse('cannot save photo!');\n }\n } else {\n $this->setErrorResponse('photo and type is mandatory for this request!');\n }\n\n $this->_helper->json(array('photo' => $asset->getId()));\n }", "public function update(Request $request)\n {\n\n\n $validator = Validator::make($request->all(), [\n 'file-multiple-input' => 'required',\n 'file-multiple-input.*' => 'mimes:jpg,png,jpeg'\n\n ]);\n if ($validator->passes()) {\n\n\n $photos = $request->file('file-multiple-input');\n if (!is_array($photos)) {\n $photos = [$photos];\n }\n\n if (!is_dir($this->photos_path)) {\n mkdir($this->photos_path, 0777);\n }\n $deleteImages = Image::where('property_id', $request->input('property_id'))\n ->delete();\n\n for ($i = 0; $i < count($photos); $i++) {\n $photo = $photos[$i];\n $name = sha1(date('YmdHis') . Str::random(30));\n $save_name = $name . '.' . $photo->getClientOriginalExtension();\n $resize_name = $name . Str::random(2) . '.' . $photo->getClientOriginalExtension();\n\n InterventionImage::make($photo)\n ->encode('jpg', 75)\n ->resize(1000, 750)\n ->crop(1000, 750)\n ->save($this->photos_path . '/' . $resize_name);\n\n $photo->move($this->photos_path, $save_name);\n $upload = new Image();\n $upload->file = $save_name;\n $upload->resizedfilename = $resize_name;\n $upload->originalfilename = basename($photo->getClientOriginalName());\n $upload->property_id = $request->input('property_id');\n $upload->save();\n }\n }\n\n return redirect()->route('property_details', ['id' => $request->input('property_id')]);\n }", "public function make_a_photo()\n {\n $product = factory(Product::class, 1)->create();\n\n $file = new UploadedFile(\n 'C:\\Users\\Admin\\Projects\\whimsical\\storage\\test\\test_file.jpg',\n 'test_file.jpg',\n 'jpg',\n 'null',\n 'null',\n true\n );\n\n $this->assertTrue(file_exists($file->path()), 'Test file does not exist');\n\n $product->addPhoto($product, $file);\n\n }", "public function createPropertyPost(Request $request)\n {\n $type_property = $request->type;\n $propertytype_id = DB::table('property_types')->where('property_type', $type_property)->first()->id;\n $district_id = DB::table('districts')->where('district_name', $request->district)->first()->id;\n $input = $request->all();\n $user_id = DB::table('users')->where('token',$input[\"token\"])->first()->id;\n\n if( $type_property == \"Land\" ){\n $propertypost = PropertyPost::create([\n \"price\" => $input[\"price\"],\n \"land_width\" => $input[\"land_width\"],\n \"land_height\" => $input[\"land_height\"],\n \"phone_number1\" => $input[\"phone_number1\"],\n \"phone_number2\" => $input[\"phone_number2\"],\n \"duration\" => $input[\"duration\"],\n \"description\" => $input[\"description\"],\n \"latitude\" => $input[\"latitude\"],\n \"longitude\" => $input[\"longitude\"],\n // \"check_status_property\" => $input[\"check_status_property\"],\n \"status\" => $input[\"status\"],\n // \"post_view\" => $input[\"post_view\"],\n \"property_type_id\" => $propertytype_id,\n \"district_id\"=>$district_id,\n \"user_id\" => $user_id\n ]);\n NotificationProperty::create([\n \"property_post_id\"=>$propertypost->id\n ]);\n\n PropertyOrder::create([\n \"property_post_id\"=>$propertypost->id,\n \"user_id\"=>$user_id\n ]);\n\n //uploud multiple images in to database and folder estate_imgs in laravel\n\n $img = $input[\"img_path\"];\n\n foreach ($img as $k=>$v) {\n $image = $v; // your base64 encoded\n $image = str_replace('data:image/png;base64,', '', $image);\n $image = str_replace(' ', '+', $image);\n $imageName = str_random(10).'.'.'png';\n \\File::put(public_path(). '/' . $imageName, base64_decode($image));\n\n PropertyImage::create([\n \"img_path\" => $imageName,\n \"property_post_id\" => $propertypost->id\n ]);\n\n }\n\n\n $response[\"message\"] = \"Create Post Successful\";\n $response[\"post_id\"] = $propertypost->id;\n return response()->json($response);\n }\n\n else if( $type_property == \"Condo\" ){\n\n $propertypost = PropertyPost::create([\n \"property_name\" => $input[\"property_name\"],\n \"price\" => $input[\"price\"],\n \"property_name\" => $input[\"property_name\"],\n // \"land_width\" => $input[\"land_width\"],\n // \"land_height\" => $input[\"land_height\"],\n \"width\" => $input[\"width\"],\n \"height\" => $input[\"height\"],\n \"bathroom_number\" => $input[\"bathroom_number\"],\n \"bedroom_number\" => $input[\"bedroom_number\"],\n \"phone_number1\" => $input[\"phone_number1\"],\n \"phone_number2\" => $input[\"phone_number2\"],\n \"duration\" => $input[\"duration\"],\n \"description\" => $input[\"description\"],\n \"latitude\" => $input[\"latitude\"],\n \"longitude\" => $input[\"longitude\"],\n //\"check_status_property\" => $input[\"check_status_property\"],\n \"status\" => $input[\"status\"],\n // \"post_view\" => $input[\"post_view\"],\n \"property_type_id\" => $propertytype_id,\n \"district_id\"=>$district_id,\n \"user_id\" => $user_id\n ]);\n\n NotificationProperty::create([\n \"property_post_id\"=>$propertypost->id\n ]);\n\n PropertyOrder::create([\n \"property_post_id\"=>$propertypost->id,\n \"user_id\"=>$user_id\n ]);\n\n $img = $input[\"img_path\"];\n\n foreach ($img as $k=>$v) {\n $image = $v; // your base64 encoded\n $image = str_replace('data:image/png;base64,', '', $image);\n $image = str_replace(' ', '+', $image);\n $imageName = str_random(10).'.'.'png';\n \\File::put(public_path(). '/' . $imageName, base64_decode($image));\n\n PropertyImage::create([\n \"img_path\" => $imageName,\n \"property_post_id\" => $propertypost->id\n ]);\n }\n\n $response[\"message\"] = \"Create Post Successful\";\n $response[\"post_id\"] = $propertypost->id;\n return response()->json($response);\n\n }\n else if( $type_property == \"House\" ){\n $propertypost = PropertyPost::create([\n\n \"price\" => $input[\"price\"],\n \"land_width\" => $input[\"land_width\"],\n \"land_height\" => $input[\"land_height\"],\n \"width\" => $input[\"width\"],\n \"height\" => $input[\"height\"],\n \"bathroom_number\" => $input[\"bathroom_number\"],\n \"bedroom_number\" => $input[\"bedroom_number\"],\n \"phone_number1\" => $input[\"phone_number1\"],\n \"phone_number2\" => $input[\"phone_number2\"],\n \"duration\" => $input[\"duration\"],\n \"description\" => $input[\"description\"],\n \"latitude\" => $input[\"latitude\"],\n \"longitude\" => $input[\"longitude\"],\n // \"check_status_property\" => $input[\"check_status_property\"],\n \"status\" => $input[\"status\"],\n //\"post_view\" => $input[\"post_view\"],\n \"property_type_id\" => $propertytype_id,\n \"district_id\"=>$district_id,\n \"user_id\" => $user_id\n ]);\n\n NotificationProperty::create([\n \"property_post_id\"=>$propertypost->id\n ]);\n\n PropertyOrder::create([\n \"property_post_id\"=>$propertypost->id,\n \"user_id\"=>$user_id\n ]);\n\n //uploud multiple images in to database and folder estate_imgs in laravel\n $img = $input[\"img_path\"];\n\n foreach ($img as $k=>$v) {\n\n $image = $v; // your base64 encoded\n $image = str_replace('data:image/png;base64,', '', $image);\n $image = str_replace(' ', '+', $image);\n $imageName = str_random(10).'.'.'png';\n \\File::put(public_path(). '/' . $imageName, base64_decode($image));\n\n PropertyImage::create([\n \"img_path\" =>$imageName,\n \"property_post_id\" => $propertypost->id\n ]);\n }\n\n\n $response[\"message\"] = \"Create Post Successful\";\n $response[\"post_id\"] = $propertypost->id;\n return response()->json($response);\n\n }\n else if( $type_property == \"Building\" ){\n $propertypost = PropertyPost::create([\n \"property_name\" => $input[\"property_name\"],\n \"price\" => $input[\"price\"],\n \"property_name\" => $input[\"property_name\"],\n // \"land_width\" => $input[\"land_width\"],\n // \"land_height\" => $input[\"land_height\"],\n \"width\" => $input[\"width\"],\n \"height\" => $input[\"height\"],\n \"bathroom_number\" => $input[\"bathroom_number\"],\n \"bedroom_number\" => $input[\"bedroom_number\"],\n \"phone_number1\" => $input[\"phone_number1\"],\n \"phone_number2\" => $input[\"phone_number2\"],\n \"duration\" => $input[\"duration\"],\n \"description\" => $input[\"description\"],\n \"latitude\" => $input[\"latitude\"],\n \"longitude\" => $input[\"longitude\"],\n // \"check_status_property\" => $input[\"check_status_property\"],\n \"status\" => $input[\"status\"],\n //\"post_view\" => $input[\"post_view\"],\n \"property_type_id\" => $propertytype_id,\n \"district_id\"=>$district_id,\n \"user_id\" => $user_id\n ]);\n\n NotificationProperty::create([\n \"property_post_id\"=>$propertypost->id\n ]);\n\n PropertyOrder::create([\n \"property_post_id\"=>$propertypost->id,\n \"user_id\"=>$user_id\n ]);\n\n //uploud multiple images in to database and folder estate_imgs in laravel\n\n $img = $input[\"img_path\"];\n\n foreach ($img as $k=>$v) {\n\n $image = $v; // your base64 encoded\n $image = str_replace('data:image/png;base64,', '', $image);\n $image = str_replace(' ', '+', $image);\n $imageName = str_random(10).'.'.'png';\n \\File::put(public_path(). '/' . $imageName, base64_decode($image));\n\n PropertyImage::create([\n \"img_path\" => $imageName,\n \"property_post_id\" => $propertypost->id\n ]);\n }\n\n\n\n $response[\"message\"] = \"Create Post Successful\";\n $response[\"post_id\"] = $propertypost->id;\n return response()->json($response);\n }\n\n else if( $type_property = \"Villa\" ){\n\n $propertypost = PropertyPost::create([\n\n \"price\" => $input[\"price\"],\n \"property_name\" => $input[\"property_name\"],\n // \"land_width\" => $input[\"land_width\"],\n // \"land_height\" => $input[\"land_height\"],\n \"width\" => $input[\"width\"],\n \"height\" => $input[\"height\"],\n \"type_villa\" => $input[\"type_villa\"],\n \"bathroom_number\" => $input[\"bathroom_number\"],\n \"bedroom_number\" => $input[\"bedroom_number\"],\n \"phone_number1\" => $input[\"phone_number1\"],\n \"phone_number2\" => $input[\"phone_number2\"],\n \"duration\" => $input[\"duration\"],\n \"description\" => $input[\"description\"],\n \"latitude\" => $input[\"latitude\"],\n \"longitude\" => $input[\"longitude\"],\n //\"check_status_property\" => $input[\"check_status_property\"],\n \"status\" => $input[\"status\"],\n //\"post_view\" => $input[\"post_view\"],\n \"property_type_id\" => $propertytype_id,\n \"district_id\"=>$district_id,\n \"user_id\" => $user_id\n ]);\n\n NotificationProperty::create([\n \"property_post_id\"=>$propertypost->id\n ]);\n\n PropertyOrder::create([\n \"property_post_id\"=>$propertypost->id,\n \"user_id\"=>$user_id\n ]);\n //uploud multiple images in to database and folder estate_imgs in laravel\n $img = $input[\"img_path\"];\n\n foreach ($img as $k=>$v) {\n $image = $v; // your base64 encoded\n $image = str_replace('data:image/png;base64,', '', $image);\n $image = str_replace(' ', '+', $image);\n $imageName = str_random(10).'.'.'png';\n \\File::put(public_path(). '/' . $imageName, base64_decode($image));\n\n PropertyImage::create([\n \"img_path\" => $imageName,\n \"property_post_id\" => $propertypost->id\n ]);\n }\n\n $response[\"message\"] = \"Create Post Successful\";\n $response[\"post_id\"] = $propertypost->id;\n return response()->json($response);\n }\n }", "public function postBulk($album_id)\n {\n\n $photos = Input::file('photos');\n\n // Validate and all.\n foreach ($photos as $photo)\n {\n $validator = Validator::make([\n 'photo' => $photo,\n ], [\n 'photo' => 'required|image',\n ]);\n\n if ($validator->fails())\n {\n // Update the error language to be in Arabic.\n return Redirect::back()->withInput()->with('error_message', 'الرجاء التأكد من اختيار ملفات صور.');\n }\n }\n\n $failed_photos_count = 0;\n\n // Try to upload the photos.\n foreach ($photos as $photo)\n {\n // Create a new photo table record.\n try\n {\n // Create the two photos, large and thumb.\n $photo_name = Str::random(40) . '.png';\n\n // Make the large photo first.\n $large_photo = Image::make($photo->getRealPath());\n\n $large_photo->widen(Photo::PHOTO_LARGE_WIDTH, function ($constraint) {\n $constraint->upsize();\n });\n\n $large_photo->save(public_path() . '/photos/large/' . $photo_name);\n\n // Make the thumb photo secondly.\n $thumb_photo = Image::make($photo->getRealPath());\n\n $thumb_photo->widen(Photo::PHOTO_THUMB_WIDTH, function ($constraint) {\n $constraint->upsize();\n });\n\n $thumb_photo->save(public_path() . '/photos/thumb/' . $photo_name);\n\n // Set the URLs for both, large and thumb.\n $large_photo_url = url('/photos/large/' . $photo_name);\n $thumb_photo_url = url('/photos/thumb/' . $photo_name);\n\n // After everything, save the photo in photos table.\n $_photo = new Photo();\n $_photo->album_id = $album_id;\n $_photo->title = $photo->getClientOriginalName();\n $_photo->large_url = $large_photo_url;\n $_photo->thumb_url = $thumb_photo_url;\n $_photo->save();\n }\n catch (Exception $exception)\n {\n // Log about the error.\n Log::error($exception);\n $failed_photos_count++;\n }\n }\n\n if ($failed_photos_count > 0)\n {\n return Redirect::route(\"admin_photos_index\", [$album_id])->with('warning_message', 'تمّ إضافة الصور بنجاح مع تعذّر ' . $failed_photos_count . ' صور عن الرفع.');\n }\n\n return Redirect::route(\"admin_photos_index\", [$album_id])->with('success_message', 'تمّ إضافة الصور بنجاح.');\n }", "public function store(Request $request)\n {\n $request->validate([\n 'property_name'=>'required',\n\n\n ]);\n\n\n\n if($request->hasFile('slide')){\n $files = $request->file('slide');\n foreach($files as $image){\n $filename = $image->getClientOriginalName();\n $location = public_path('slides/'.$filename);\n Image::make($image)->resize(750, 500)->save($location);\n if($location){\n $img = new Images;\n $img->property_id = $request->get('property_name');\n $img->images = $filename;\n $img->save();\n }\n }\n}\n\n\nreturn redirect('/image')->with('success', 'Property Image Slider has been added');\n\n }", "public function store()\n\t{\n\t\t// Remove empty and boolean false inputs;\n\t\t\n\t\t$input = array_filter(Input::all());\n\t\t//return $input;\n\t\tif (isset($input['pets_allowed'])) $input['pets_allowed'] = 1;\n\n\t\tif (isset($input['smoking_allowed'])) $input['smoking_allowed'] = 1;\n\t\t\n\t\tif (isset($input['available_at'])) {\n\t\t\t$input['available_at'] = Carbon::parse($input['available_at']);\n\t\t}\n\n\t\t$property = Property::create($input);\n\n\t\tfor ($i=0; $i< rand ( 1 , 5 ); $i++) {\n\t\t\tPhoto::create(['property_id' => $property->id, 'name' => rand (1, 15)]);\n\t\t}\n\n\t\treturn Response::json(array('success' => true));\n\t}", "public function store(Request $request)\n {\n\n\n \n\n $photos = $request->file('photos');\n if ($photos) {\n $inc = 0;\n foreach($photos as $photo){\n $inc++;\n $blog_image = new NewsImage();\n $image_name = Auth::user()->id.time().$inc.'.'.$photo->getClientOriginalExtension();\n\n\n $image_full_name = $image_name;\n $destination_path = 'uploads/newsimages/';\n $image_url = $destination_path . $image_full_name;\n $success = $photo->move($destination_path, $image_full_name);\n if ($success) {\n \n $blog_image->photos = $image_url;\n }\n $blog_image->news_id = $request->news_id;\n $blog_image->save();\n }\n }\n\n return back();\n\n\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'title'=>'required',\n 'type'=>'required',\n 'price'=>'required',\n 'bedrooms'=>'required',\n 'bathrooms'=>'required',\n 'floor_area'=>'required',\n 'min_lot_area'=>'required',\n 'status'=>'required',\n 'photos'=>'required|image|mimes:jpeg,png,jpg|max:2048',\n 'location'=>'required',\n 'address'=>'required',\n 'barangay'=>'required',\n 'city_prov'=>'required',\n 'country'=>'required',\n 'zip'=>'required',\n 'description'=>'required',\n ]);\n\n\n $property = new Property();\n $property->title = $request->title;\n $property->type = $request->type;\n $property->price = $request->price;\n $property->bedrooms = $request->bedrooms;\n $property->bathrooms = $request->bathrooms;\n $property->floor_area = $request->floor_area;\n $property->min_lot_area = $request->min_lot_area;\n $property->status = $request->status;\n $property = $request->file('photos');\n $photoname = time().'.'.$request->image->getClientOriginalExtension();\n $property->move(public_path('img/listing'), $photoname);\n $property->photos = $request->photos;\n $property->location = $request->location;\n $property->address = $request->address;\n $property->barangay = $request->barangay;\n $property->city_prov = $request->name;\n $property->country = $request->country;\n $property->zip = $request->zip;\n $property->description = $request->description;\n $property->save();\n\n Session::flash('success', 'Successfully created the new '. $property->title . ' role in the database.');\n return redirect()->route('property.show', $property->id);\n }", "function add_photo($photo, $gallery) {\n\n $photo_post = array();\n $photo_post['post_title'] = $photo['title'];\n $photo_post['post_content'] = '';\n $photo_post['post_type'] = 'attachment';\n $photo_post['post_status'] = 'publish';\n $photo_post['post_author'] = $this->flickr_author;\n $photo_post['post_category'] = array($this->flickr_category, );\n $photo_post['post_mime_type'] = 'image/jpeg'; //assuming jpeg, is this ok?\n $photo_post['post_parent'] = $gallery['pageid'];\n if ($photo['url_o']) {\n $photo_post['guid'] = $photo['url_o']; //magically linking the photo\n } else {\n $photo_post['guid'] = $photo['url_m']; //for some reason url_o isnt always available\n }\n \n //$postid = wp_insert_post($photo_post);\n $postid = wp_insert_attachment($photo_post);\n /* Update metadata now */\n $this->set_metadata($postid, $photo);\n\n //now tag with mediatags\n wp_set_object_terms($postid, array($gallery['mediatag']), MEDIA_TAGS_TAXONOMY);\n\n //and we should be done. Horay!\n}", "private function _add_photo(){\n global $db;\n\n $photo_name = $db->quote($this->_photo_name);\n $photo_caption = $db->quote($this->_photo_caption);\n $file_name = $db->quote($this->_file_name);\n $file_type = $db->quote($this->_file_type);\n\n $sql = \"SELECT * FROM photos WHERE file_name = \".$file_name.\" LIMIT 1\";\n\n // if photo with file name $file_name is not present in database, insert into database\n if(!$db->query1($sql)->rowCount()){\n $sql = \"INSERT INTO photos (\";\n $sql .= \"photo_name, photo_caption, file_name, file_size, file_type, user_id\";\n $sql .= \") VALUES ( \";\n $sql .= $photo_name .\", \". $photo_caption .\", \". $file_name.\", \". $this->_file_size .\", \". $file_type.\",\" .$this->_user_id;\n $sql .= \")\";\n try {\n //adding photo to db\n $db->exec($sql);\n return \"Photo with name \".$photo_name.\" added, query Successful.\";\n } catch (Exception $e) {\n throw $e;\n }\n }\n else{\n throw new Exception(\"The file name \".$file_name. \" alrady exists\");\n }\n }", "public function store(Request $request)\n {\n\n// dd($request);\n $this->validate($request, [\n 'latitude' => 'required',\n 'locationDescription' => 'required',\n 'price' => 'required',\n 'description' => 'required',\n 'type' => 'required',\n 'longitude' => 'required',\n\n ]);\n $property = new Property();\n $property->price = $request->price;\n $property->description = $request->description;\n $property->longitude = $request->longitude;\n $property->latitude = $request->latitude;\n $property->locationDescription = $request->locationDescription;\n\n if (isset($request->showPrice)) $property->showPrice = $request->showPrice; else $property->showPrice = 0;\n\n if ($request->bedroomsNumber != -1) {\n $property->bedroomsNumber = $request->bedroomsNumber;\n }\n if ($request->bathroomsNumber != -1) {\n $property->bathroomsNumber = $request->bathroomsNumber;\n }\n if ($request->parkingNumber != -1) {\n $property->parkingNumber = $request->parkingNumber;\n }\n $property->accepted = 0;\n $property->userId = Auth::user()->id;\n $property->categoryId = $request->category;\n $property->packageId = $request->packageId;\n $property->typeId = $request->type;\n\n $property->save();\n // Handle File Upload\n if ($request->hasFile('images')) {\n foreach ($request->images as $image) {\n if ($image->getClientOriginalExtension() == 'mp4') {\n // Get filename with the extension\n $filenameWithExt = $image->getClientOriginalName();\n // Get just filename\n $filename = pathinfo($filenameWithExt, PATHINFO_FILENAME);\n // Get just ext\n $extension = $image->getClientOriginalExtension();\n // Filename to store\n $fileNameToStore = $filename . '_' . time() . '.' . $extension;\n // Upload Image\n $path = $image->storeAs('public/properties_images', $fileNameToStore);\n\n $image = new PropertyImage;\n $image->propertyId = $property->id;\n $image->url = $fileNameToStore;\n $image->save();\n\n } else {\n $Name = time() . '.' . $image->getClientOriginalExtension();\n\n $destinationPath = public_path('storage/properties_images/');\n $img = Image::make($image->getRealPath());\n $img->resize(650, 650, function ($constraint) {\n $constraint->aspectRatio();\n })->save($destinationPath . '/' . time() . $image->getClientOriginalName());\n\n /*$user->profileImg = time().$image->getClientOriginalName();*/\n $fileNameToStore = time() . $image->getClientOriginalName();\n $image = new PropertyImage;\n $image->propertyId = $property->id;\n $image->url = $fileNameToStore;\n $image->save();\n\n\n $destinationPath = public_path('/storage/images');\n //$image->move($destinationPath, $Name);\n }\n\n\n }\n }\n\n $history = new History;\n $history->propertyId = $property->id;\n $history->post_description = $property->description;\n $history->post_price = $property->price;\n $history->post_roomsNumber = $property->roomsNumber;\n $history->post_bathroomsNumber = $property->bathroomsNumber;\n $history->post_parkingNumber = $property->parkingNumber;\n $history->post_bedroomsNumber = $property->bedroomsNumber;\n $history->post_accepted = $property->accepted;\n $history->post_userId = $property->userId;\n $history->post_category = Category::findOrFail($property->categoryId)->title;\n $history->post_type = PropertyType::findOrFail($property->typeId)->title;\n $history->post_locationDescription = $property->locationDescription;\n $history->post_contactInfo = $property->contactInfo;\n $history->post_longitude = $property->longitude;\n $history->post_latitude = $property->latitude;\n $history->isCreated = 1;\n $history->isUpdated = 0;\n $history->isDeleted = 0;\n $history->save();\n\n\n $package = Packages::findOrFail($request->packageId);\n $payment = Payment::all()->where('user_id', '=', Auth::user()->id)->where('package', '=', $package->title)->where('used', '=', 0)->first();\n $payment->used = 1;\n $payment->save();\n\n\n $mail = Auth::user()->email;\n Mail::to('[email protected]')->send(new NewPropertyMail());\n Mail::to($mail)->send(new PropertyCreated());\n\n return redirect('/properties/myProperties')->with('message', 'Property Created Successfully!');\n }", "public function setPhotosAttribute($value)\n {\n $attribute_name = \"photos\";\n $disk = \"public_folder\";\n $destination_path = \"uploads/albums\";\n $album_originalName = $_POST['name'];\n // ******** Generate unique album name ********\n $album_name = md5( $album_originalName . time() );\n \n foreach ( $value as $file ) {\n // 0. Generate new size file\n $image = \\Image::make( $file );\n $image_350 = \\Image::make( $file ) -> widen( 350 );\n \n // 1. Generate new file names\n $new_file_name = md5( $file -> getClientOriginalName() . time() ).'.'.$file->getClientOriginalExtension();\n $new_file_name_350 = md5( $file -> getClientOriginalName() . time() ).'_350.'.$file->getClientOriginalExtension();\n \n // 2. Move new files to the correct path\n $file_path = $destination_path . '/' . $album_name . '/' . $new_file_name;\n $file_path_350 = $destination_path . '/' . $album_name . '/' . $new_file_name_350;\n \\Storage::disk( $disk )->put( $file_path, $image -> stream() );\n \\Storage::disk( $disk )->put( $file_path_350, $image_350 -> stream() );\n \n // 3. Add the public path to the database\n $attribute_value[] = [ $file_path, $file_path_350 ];\n }\n $this->attributes[$attribute_name] = str_replace( '\\\\', '', json_encode($attribute_value) );\n }", "private function addData()\n {\n $data=new Image();\n $file =Input::file('gallery');\n $image_name=time().\"-gallery-\".$file->getClientOriginalName();\n $file->move(public_path().'/upload',$image_name);\n $data->image=$image_name;\n $data->save();\n return true;\n }", "function sfgov_utilities_deploy_00_profile_photos() {\n $nids = \\Drupal::entityQuery('node')->condition('type','person')->execute();\n $nodes = \\Drupal\\node\\Entity\\Node::loadMultiple($nids);\n\n $mediaIds = \\Drupal::entityQuery('media')->condition('bundle', 'image')->execute();\n $mediaImages = Media::loadMultiple($mediaIds);\n $mediaFileNames = [];\n\n foreach($mediaImages as $mediaImage) {\n $mediaFileNames[] = trim($mediaImage->getName());\n }\n\n foreach($nodes as $node) {\n $title = $node->getTitle();\n $field_photo_entity = $node->field_photo->entity;\n\n if (!empty($field_photo_entity)) {\n $field_photo_uri = $field_photo_entity->getFileUri();\n $field_photo_filename = trim(substr($field_photo_uri, strrpos($field_photo_uri, \"/\")+1));\n $field_photo_id = $field_photo_entity->id();\n \n echo $title . \" (\" . $field_photo_id . \"):\" . \"[\" . $field_photo_filename . \"] \";\n \n if (array_search($field_photo_filename, $mediaFileNames) == false) {\n echo \"...no media found, create and assign\";\n $media_image = Media::create([\n 'bundle' => 'image',\n 'uid' => \\Drupal::currentUser()->id(),\n 'langcode' => \\Drupal::languageManager()->getDefaultLanguage()->getId(),\n 'field_image' => [\n 'target_id' => $field_photo_id,\n 'alt' => t($title),\n 'title' => t($title),\n ],\n 'field_media_image' => [\n \"target_id\" => $field_photo_id,\n 'alt' => t($title),\n 'title' => t($title),\n ]\n ]);\n $media_image->setPublished(true);\n $media_image->save();\n \n $node->field_profile_photo->target_id = $media_image->id();\n $node->get('field_photo')->removeItem(0);\n $node->save();\n \n } else {\n echo \"...media found, skip\";\n }\n \n echo \"\\n\";\n }\n }\n}", "public function store(Request $request)\n {\n \n foreach ($request->file as $photo) {\n \n \n $photo->move('uploads/galeria' , $photo->getClientOriginalName());\n \n Galeria::create([ \n 'imagen' => $photo->getClientOriginalName(), \n 'albums_id'=>$request->albums_id\n ]);\n\n \n } \n\n \n }", "public function store()\n {\n $inputs = Input::all();\n\n $validator = $this->photoGallery->validate($inputs);\n if ($validator->fails()) {\n return redirect(PREFIX.'/multicms/pages/gallery/photoCreate')->withErrors($validator)->withInput();\n }\n\n if (Input::hasFile('cover_pic')) {\n $directory = base_path() . '/uploads/gallery';\n $originalName = InputHelpers::cleanURL(Input::file('cover_pic')->getClientOriginalName());\n $fileName = uniqid() .'.'.Input::file('cover_pic')->getClientOriginalExtension();\n $fileNameDir = $directory . '/' . $fileName;\n $image = Image::make(Input::file('cover_pic'));\n $image->resize(200, null, function ($constraint) {\n $constraint->aspectRatio();\n });\n $image->save($fileNameDir, 100);\n $inputs['cover_pic'] = $fileName;\n }\n\n // Store the gallery details\n\n if($this->photoGallery->add($inputs))\n {\n $data['msgSuccess'] =\"Gallery added.\";\n return redirect(PREFIX.'/multicms/pages/gallery')->withErrors($data);\n }\n else\n {\n $data['msgError'] =\"Could not add gallery.\";\n return redirect(PREFIX.'/multicms/pages/gallery')->withErrors($data);\n } \n \n\n\n }", "public function add(){\n $uploaded_image = Input::file('image_file_actual');\n $allowedTypes = array(\"image/jpeg\", \"image/png\", \"image/jpg\");\n \n \tif( !Input::hasFile('image_file_actual') ){\n return $this->jsonResponse(\"error\", \"No image provided\", Input::get('callback'));\n \t}\n if( !in_array($uploaded_image->getMimeType(),$allowedTypes) ){\n return $this->jsonResponse(\"error\", \"Uploaded invalided file type\", Input::get('callback'));\n }\n \t\n $image = new Image;\n $image->user_id = isset(Auth::user()->id) ? Auth::user()->id : \"guest\";\n $image->id = strtoupper(str_random(\"5\"));\n\twhile( isset(Image::find($image->id)->file) ){\n\t\t$image->id = strtoupper(str_random(\"5\"));\n\t}\n $imageName = $image->id . \".\" . $uploaded_image->getClientOriginalExtension();\t\n\t$image->file = URL::asset('images/'.$imageName);\n $image->rating = 0;\n $image->raters_count = 0;\n \n if(!$image->save()){\n return $this->jsonResponse(\"error\", \"Cannot add image\", Input::get('callback'), $image->errors());\n }\n \t\n $uploaded_image->move(public_path('images'), $imageName);\n \n if(!empty(Auth::user()->id)){\n $user = User::find(Auth::user()->id);\n $user->uploaded_count = $user->uploaded_count + 1;\n $user::$rules['password'] = '';\n if(!$user->updateUniques()){\n return $this->jsonResponse(\"error\", \"Unable to increase upload_count of user\", Input::get('callback'), $user->errors());\n }\n }\n \n return $this->jsonResponse(\"ok\", \"Succesfully added image\", Input::get('callback'), $image);\n }", "public function testGetUserPhotosSuccess()\n {\n $user = factory(\\App\\User::class)->make();\n\n $user->photos()->createMany(\n factory(\\App\\Photo::class, 3)->make()->toArray()\n );\n\n $response = $this->get('/photos');\n\n $response->assertStatus(200);\n }", "public function photoStore()\n {\n $langId = $this->language->getAllDataNoPagination()->pluck('id');\n $gallery_id = Input::get('form.photo.gallery_id');\n\n $defLang = $this->defaultLanguage->getDefaultLang();\n $photoInput = Input::get('form.photo');\n $photoInput['picture'] = Input::file('form.photo.picture');\n\n $validator = $this->photo->validate($photoInput);\n if ($validator->fails()) {\n return redirect(PREFIX . '/multicms/pages/gallery/photoCreate?gallery_id=' . $gallery_id)->withErrors($validator)->withInput();\n }\n\n if (Input::hasFile('form.photo.picture')) {\n\n $directory = base_path() . '/uploads/gallery/pictures';\n $originalName = InputHelpers::cleanURL(Input::file('form.photo.picture')->getClientOriginalName());\n $fileName = uniqid() .'.'.Input::file('form.photo.picture')->getClientOriginalExtension();\n $fileNameDir = $directory . '/' . $fileName;\n $image = Image::make(Input::file('form.photo.picture'));\n $image->save($fileNameDir, 100);\n $photoInput['picture'] = $fileName;\n\n }\n\n $savedphoto = $this->photo->add($photoInput);\n if ($savedphoto) {\n $pic_id = $savedphoto->id;\n\n }\n\n $i = 0;\n $len = count($langId);\n foreach ($langId as $Lid) {\n\n //create new record in tbl_page_lg\n $inputs = Input::get('form.' . $Lid);\n $inputs['picture_id'] = $pic_id;\n\n $validator = $this->photoLg->validate($inputs);\n if ($validator->fails()) {\n Session::put('flag', Input::get('form.' . $Lid . 'language_id'));\n\n return redirect(PREFIX . '/multicms/pages/gallery/lists?gallery_id=' . $gallery_id)->withErrors($validator)->withInput();\n }\n\n // Store the pages details\n\n //save changes\n\n if ($this->photoLg->add($inputs)) {\n\n $inputs = \"\";\n if ($i == $len - 1) {\n // last iteration of foreach loop\n $data['msgSuccess'] = 'Successfully saved !!';\n\n return redirect(PREFIX . '/multicms/pages/gallery/lists?gallery_id=' . $gallery_id)->withErrors($data);\n }\n\n } else {\n $inputs = \"\";\n $data['msgError'] = 'Changes could not be saved !!';\n\n return redirect(PREFIX . '/multicms/pages/gallery/lists?gallery_id=' . $gallery_id)->withErrors($data);\n }\n\n $i++;\n }\n\n // Store the pages details\n\n return redirect(PREFIX.'/multicms/pages/gallery/lists?gallery_id=' . $id);\n\n }", "public function store(Request $request)\n {\n $slug_link = Str::slug($request->product_name).'-'.Str::random(5);\n $request->validate([\n 'product_photo' => 'image',\n ]);\n // print_r($request->except('_token'));\n $porduct_id = Product::insertGetId($request->except('_token','product_photo','product_multiple_photos') + [\n 'created_at' => Carbon::now(),\n 'slug' => $slug_link\n ]);\n\n if ($request->hasFile('product_photo')) {\n $uploaded_photo = $request->file('product_photo');\n $photo_name = $porduct_id.\".\".$uploaded_photo->getClientOriginalExtension($uploaded_photo);\n $new_photo_location = 'public/dashboard_asset/photo/product_photo/'.$photo_name;\n\n Image::make($uploaded_photo)->resize(500,385)->save(base_path($new_photo_location), 50);\n Product::find($porduct_id)->update([\n 'product_photo' => $photo_name\n ]);\n }\n\n if ($request->hasFile('product_multiple_photos')) {\n $flag = 1;\n foreach ($request->file('product_multiple_photos') as $single_photo) {\n $uploaded_photo = $single_photo;\n $photo_name = $porduct_id.'-'.$flag++.\".\".$uploaded_photo->getClientOriginalExtension();\n\n $new_photo_location = 'public/dashboard_asset/photo/multiple_photos/'.$photo_name;\n\n Image::make($uploaded_photo)->resize(600,622)->save(base_path($new_photo_location), 50);\n ProductMultiplePhoto::insert([\n 'product_id' => $porduct_id,\n 'product_multiple_photos' => $photo_name,\n 'created_at' => Carbon::now()\n ]);\n\n }\n }\n return back()->with('created_status', 'Product created successfully.');\n }", "public function store(PropertyRequest $request)\n {\n $property=Property::create([\n 'cost'=>$request->cost,\n 'type_id'=>$request->type,\n 'reference'=>$request->reference,\n 'room'=>$request->room,\n 'bathroom'=>$request->bathroom,\n 'map'=>$request->map,\n 'user_id'=>Auth::user()->id,\n 'region_id'=>$request->region,\n 'area'=>$request->area,\n 'type'=>$request->display\n ]);\n $propertyId=$property->id;\n PropertyDescription::create([\n 'name'=>$request->descEn,\n 'lang'=>'en',\n 'property_id'=>$propertyId\n ]);\n PropertyDescription::create([\n 'name'=>$request->descAr,\n 'lang'=>'ar',\n 'property_id'=>$propertyId\n ]);\n PropertyHeader::create([\n 'name'=>$request->headerEn,\n 'lang'=>'en',\n 'property_id'=>$propertyId\n ]);\n PropertyHeader::create([\n 'name'=>$request->headerAr,\n 'lang'=>'ar',\n 'property_id'=>$propertyId\n ]);\n PropertyLabel::create([\n 'name'=>$request->labelEn,\n 'lang'=>'en',\n 'property_id'=>$propertyId\n ]);\n PropertyLabel::create([\n 'name'=>$request->labelAr,\n 'lang'=>'ar',\n 'property_id'=>$propertyId\n ]);\n $packages=Input::get('feature');\n $property->feature()->attach($packages);\n $destinationPath=\"uploads/\";\n if($files=$request->file('Images'))\n {\n \tforeach($files as $file)\n {\n \t $name=$file->getClientOriginalName();\n \t $file->move($destinationPath,$file->getClientOriginalName());\n \t $img=new PropertyImage;\n \t $img->property_id=$propertyId;\n \t $img->path=$destinationPath.$file->getClientOriginalName();\n \t $img->save();\n \t}\n }\n\n return redirect()->route('property.index');\n }", "public function store(Request $request)\n {\n $data = $request->all();\n // dd($data);\n //validation\n $request->validate([\n \"title\" => \"required|max:255\",\n \"street\" => \"required\",\n \"metropolis\" => \"required\",\n \"country\" => \"required\",\n \"zip_code\" => \"required|max:10\",\n \"description\" => \"max:400\",\n \"rooms_number\" => \"required|integer\",\n \"beds_number\" => \"required|integer\",\n \"bathrooms_number\" => \"required|integer\",\n \"flat_image\" => \"required|image\",\n \"square_meters\" => \"required|integer\",\n \"latitude\" => \"required|between:-90,90\",\n \"longitude\" => \"required|between:-180,180\",\n \"active\" => \"boolean\"\n ]);\n\n //indirizzo di salvataggio dell'immagine e creo cartella \"images\" dove salvo le immagini uploadate\n $path = Storage::disk(\"public\")->put(\"images\", $data[\"flat_image\"]);\n\n //creo nuovo oggetto di tipo Proprietà\n $newProperty = new Property;\n\n $newProperty->user_id = Auth::id();\n $newProperty->title = $data[\"title\"];\n $newProperty->street = $data[\"street\"];\n $newProperty->metropolis = $data[\"metropolis\"];\n $newProperty->country = $data[\"country\"];\n $newProperty->description = $data[\"description\"];\n $newProperty->rooms_number = $data[\"rooms_number\"];\n $newProperty->beds_number = $data[\"beds_number\"];\n $newProperty->bathrooms_number = $data[\"bathrooms_number\"];\n $newProperty->flat_image = $path;\n $newProperty->square_meters = $data[\"square_meters\"];\n $newProperty->latitude = $data[\"latitude\"];\n $newProperty->longitude = $data[\"longitude\"];\n if(isset($data[\"active\"])){\n $newProperty->active = $data[\"active\"];\n };\n\n //salvataggio\n $newProperty->save();\n\n if (isset($data[\"extras\"])) {\n $newProperty->extras()->sync($data[\"extras\"]);\n }\n\n //redirect verso nuova pagina (show)\n return redirect()->route(\"admin.properties.show\", $newProperty);\n }", "public function addPhoto($value)\n {\n $this->photos[] = $value;\n }", "public function upload_photo(){\n $sql=\"INSERT INTO photos \";\n $sql.=\"(name,size,type,date,img_navigacija_id) VALUES ('{$this->name}',$this->size,'{$this->type}',NOW(),2)\";\n self::$connect->query($sql);\n\n\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 }", "public function store()\n {\n\n //$data = $request->all();\n // dd($data);\n //$data = $this->requestValidate();\n //dd($data);\n //$data['user_id'] = auth()->user()->id;\n // $data['slug'] = strtolower(preg_replace('/\\s+/', '-', $request->title));\n // $property = Property::create($data);\n //dd($data);\n\n if(! request()->cover_image){\n request()->cover_image = 'property/defaultproperty.png';\n }\n\n try {\n $property = auth()->user()->properties()->create($this->requestValidate() + ['slug' => strtolower(preg_replace('/\\s+/', '-', request()->title)),'cover_image' => request()->cover_image]);\n $this->storeImage($property,'property');\n $property->tags()->sync(request()->get('tag_list'));\n\n //Mail::to(request()->user()->email)\n // ->send(new Propertylist($property));\n\n //request()->user()->notify(new PaymentReceived($property));\n\n event(new PropertyAdded($property)); //broadcast a new property created event\n\n return redirect(\"property\")->with([\n 'status' => 'success',\n 'flash_message' => $property->title.' listing was published successfully',\n ]);\n\n } catch (Exception $e) {\n return redirect()->route('property.index')->with([\n 'status' => 'danger',\n 'flash_message' => $e->getMessage(),\n ]);\n }\n }", "public function run()\n {\n $photos = [];\n for ($i=551;$i<=825;$i++){\n for ($j=0; $j<=3; $j++){\n $photos[] = [\n 'publications'=>$i,\n 'link_img'=>'https://yugid.ru/ugid/image/phana-new6-min.jpg',\n ];\n }\n }\n APIPhotos::query()->insert($photos);\n }", "public function store()\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 if($this->crop())\n {\n try {\n $this->_propertyImage->pid = $this->_pid;\n $this->_propertyImage->image_full_path = $this->_imageOut;\n $this->_propertyImage->save();\n }catch(Exception $e) {\n $response = [\n 'status' => 'error',\n 'message' => GENERIC_UPLOAD_ERROR_MESSAGE\n ];\n return $this->_response->returnJson($response);\n }\n $response = [\n 'status' => 'success',\n 'url' => $this->_imageOut\n ];\n return $this->_response->returnJson($response);\n }\n $response = [\n 'status' => 'error',\n 'message' => GENERIC_UPLOAD_ERROR_MESSAGE\n ];\n return $this->_response->returnJson($response);\n }", "public function savepropertyimages(Request $request){\n\t\t$data = array();\n\t\t$data['status'] = 0;\n\t\t$data['msg'] = 'Error';\n\t\t$data['imagesdata'] = '';\n\t\t\n\t\t$input = $request->all();\n\t\t$propertyid = $input['propertyid'];\n\t\t$finalfiles = (!empty($request->file('multipleimages')) && $request->file('multipleimages') != NULL) ? $request->file('multipleimages') : '';\n\t\t//$propertyimage = (empty($_FILES['mainimage']) && $_FILES['mainimage'] != NULL) ? $_FILES['mainimage'] : '';\n\t\t$propertymainimage = (!empty($request->file('mainimage')) && $request->file('mainimage') != NULL) ? $request->file('mainimage') : '';\n\t\t$propertylogoimage = (!empty($request->file('logoimage')) && $request->file('logoimage') != NULL) ? $request->file('logoimage') : '';\n\t\t$propertydocument = (!empty($request->file('propertydocument')) && $request->file('propertydocument') != NULL) ? $request->file('propertydocument') : '';\n\t\t$propertydata = Property::find($propertyid);\n\t\t\n\t\t\n\t\tif(empty($propertydata)){\n\t\t\t$data['msg'] = 'Invalid Property';\n\t\t}\n\t\telse{\n\t\t\t\n\t\t\tif($propertymainimage != ''){\n\t\t\t\t$imageName = 'mainimage.'.$propertymainimage->getClientOriginalExtension();\n\t\t\t\t$oldimage = $propertydata->property_mainimage;\n\t\t\t\t$path = public_path().'/images/property/'.$propertyid;\n\t\t\t\t$propertydata->property_mainimage = $imageName;\n\t\t\t\tif($propertydata->update()){\n\t\t\t\t\tFile::makeDirectory($path, $mode = 0777, true, true);\n\t\t\t\t\tFile::delete($path.'/'.$oldimage);\n\t\t\t\t\t$propertymainimage->move($path, $imageName);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif($propertylogoimage != ''){\n\t\t\t\t$logoimageName = 'logoimage.'.$propertylogoimage->getClientOriginalExtension();\n\t\t\t\t$logooldimage = $propertydata->property_logoimage;\n\t\t\t\t$path = public_path().'/images/property/'.$propertyid;\n\t\t\t\t$propertydata->property_logoimage = $logoimageName;\n\t\t\t\tif($propertydata->update()){\n\t\t\t\t\tFile::makeDirectory($path, $mode = 0777, true, true);\n\t\t\t\t\tFile::delete($path.'/'.$logooldimage);\n\t\t\t\t\t$propertylogoimage->move($path, $logoimageName);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif($propertydocument != ''){\n\t\t\t\t$docName = 'maindocument.'.$propertydocument->getClientOriginalExtension();\n\t\t\t\t$olddoc = $propertydata->property_document;\n\t\t\t\t$docpath = public_path().'/images/property/'.$propertyid;\n\t\t\t\t$propertydata->property_document = $docName;\n\t\t\t\tif($propertydata->update()){\n\t\t\t\t\tFile::makeDirectory($docpath, $mode = 0777, true, true);\n\t\t\t\t\tFile::delete($docpath.'/'.$olddoc);\n\t\t\t\t\t$propertydocument->move($docpath, $docName);\n\t\t\t\t}\n\t\t\t\t$data['newdocpath'] = URL::to('/').'/images/property/'.$propertyid.'/'.$docName;\n\t\t\t}\n\t\t\t\n\t\t\t//print_r($propertymainimage); die();\n\t\t\t//print_r($finalfiles); die();\n\t\t\tif($finalfiles != ''){\n\t\t\t\tforeach($finalfiles as $k=>$image){\n\t\t\t\t\t$propertyimagearray = array();\n\t\t\t\t\t$propertyimagearray['property_id'] = $propertyid;\t\n\t\t\t\t\t$imageName = date('YmdHis').$propertyid.rand(0,9999).'.'.$image->getClientOriginalExtension();\n\t\t\t\t\t$propertyimagearray['image_name'] = $imageName;\n\t\t\t\t\t$uploadpath = public_path().'/images/property/'.$propertyid;\n\t\t\t\t\tif(PropertyImages::create($propertyimagearray)){\n\t\t\t\t\t\t$image->move($uploadpath, $imageName);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$data['imagesdata'] = PropertyImages::where('property_id','=',$propertyid)->get();\n\t\t\t}\n\t\t\t$data['status'] = 1;\n\t\t\t$data['msg'] = 'Property Saved';\n\t\t}\n\t\t\n\t\treturn response()->json($data); \n\t\texit();\n }", "public function run()\n {\n Image::factory(200)->create()\n ->each(function ($image) {\n $gallery = Gallery::inRandomOrder()->first();\n $image->gallery_id = $gallery->id;\n $image->save();\n });\n }", "public function store(Request $request)\n {\n $product_slug = Str::slug($request->product_name . '-' . Carbon::now()->timestamp);\n $product_id = Product::insertGetId([\n 'category_id' => $request->category_id,\n 'product_name' => $request->product_name,\n 'product_price' => $request->product_price,\n 'quantity' => $request->product_quantity,\n 'product_short_description' => $request->product_short_description,\n 'product_long_description' => $request->product_long_description,\n 'product_thumbnail_photo' => 'jahid.jpg',\n 'product_slug' => $product_slug,\n 'created_at' => Carbon::now()\n ]);\n // photo uploas code start\n $uploaded_product_images = $request->file('product_thumbnail_photo');\n $new_product_photo_name = $product_id . \".\" . $uploaded_product_images->extension();\n $new_product_photo_location = base_path('public/uploads/product_thumbnail/' . $new_product_photo_name);\n Image::make($uploaded_product_images)->resize(300, 322)->save($new_product_photo_location);\n\n product::find($product_id)->update([\n 'product_thumbnail_photo' => $new_product_photo_name\n ]);\n // photo uploas code end\n \n $all_images = $request->file('product_multiple_photos');\n $flag =1;\n foreach ($all_images as $single_image) {\n // photo uploas code one by one start\n \n $new_product_photo_name = $product_id .\"-\".$flag.\".\".$single_image->extension();\n $new_product_photo_location = base_path('public/uploads/product_multiple/' . $new_product_photo_name);\n Image::make($single_image)->resize(600, 550)->save($new_product_photo_location);\n // photo uploas code one by one end\n product_multiple_photo::insert([\n 'product_id' => $product_id,\n 'multiple_photo_name' => $new_product_photo_name,\n 'created_at' => Carbon::now()\n ]);\n $flag++;\n }\n return back();\n }", "public function store(Request $request, $id)\n {\n try {\n $photo = new \\App\\Photo;\n $validator = $photo->validate($request->file());\n if ($validator->fails()) {\n $validationStr = '';\n foreach ($validator->errors()->getMessages() as $k => $error) {\n foreach ($error as $err) {\n $validationStr .= $err .'<br/>';\n }\n \n }\n return response()->json($validationStr, 400, [], JSON_UNESCAPED_UNICODE);\n }\n $roomPhoto = new \\App\\Photo;\n $photo = $request->file('photo');\n $roomID = $request->input('roomID');\n $filename = $photo->getClientOriginalName();\n $name = pathinfo($filename, PATHINFO_FILENAME); // file\n $ext = pathinfo($filename, PATHINFO_EXTENSION); // jpg\n \n $uploadPath = \\Config::get('copenhagen.uploadsPath') .'/';\n $path = \\Config::get('copenhagen.rooms.url');// . '/' . $roomID; \n\n if (\\File::exists(public_path(). $path .'/'. $filename))\n {\n $name = $name .'_'. time();\n $filename = $name .'.'.$ext;\n }\n\n if ($photo->move(public_path(). $path, $filename)) {\n $dir = public_path(). $path . '/';\n $sizes = \\Config::get('copenhagen.rooms.image.sizes');\n $images = array(\n 'orig' => $path .'/'. $filename\n );\n foreach ($sizes as $key => $size) {\n $img = \\Image::make($dir. $filename)->fit($size['width'], $size['height']);\n $_n = $name. '_'. $size['width'] .'x'. $size['height'] .'.'. $ext;\n $images[$key] = $path .'/'. $_n;\n $img->save($dir.$_n);\n }\n\n \n $roomPhoto->file = $images;\n $roomPhoto->default = 0;\n \n $room = \\App\\Room::findOrFail($id);\n \n $room->photos()->save($roomPhoto);\n \n\n $photos = $room->photos()->get();\n foreach($photos as $i => $photo) {\n $photos[$i]['file'] = $photo->file;\n }\n return response()->json($photos, 200, [], JSON_UNESCAPED_UNICODE);\n } else {\n return response()->json('failed', 400);\n }\n\n } catch(\\Exception $e) {\n \\Log::info('ERROR: '.$e->getMessage());\n return response()->json('Oops! Error please report to administrator.', 400, [], JSON_UNESCAPED_UNICODE);\n }\n }", "public function addRelatedImage(Request $request, $id)\n {\n Validator::make($request->all(), [\n 'photos.*' => \"file|image|mimes:jpeg,png,jpg,gif,svg|max:5000\"\n ])->validate();\n $product = Product::find($id);\n $lastID = DB::table('products_photos')->latest('id')->first()->id;\n\n // Store related images into Storage/app\n $arr_img = [];\n if ($photos = $request->file('photos')) {\n $i = $lastID + 1;\n foreach ($photos as $photo) {\n $photoExt = $photo->getClientOriginalExtension();\n $photoName = $product['name'] . \"_\" . $i . \".\" . $photoExt;\n $photo->move(base_path('storage/app/public/product_images'), $photoName);\n $arr_img[] = $photoName;\n $i++;\n }\n }\n // Insert database\n foreach ($arr_img as $key => $value) {\n $insertPhoto = DB::table('products_photos')->insert(\n ['product_id' => $id, 'photos' => $value]\n );\n }\n\n return redirect()->route(\"adminAddRelatedImageForm\",$id)->withSuccess('Related Images has already inserted');\n }", "public function store(Request $request)\n {\n // dd([$request->file('files'), $request->input()]);\n foreach ($request->file('files') as $file) {\n\n $photo = new Photo();\n $photo->filename = $file->getClientOriginalName();\n $photo->extension = $file->getClientOriginalExtension();\n $photo->mimetype = $file->getMimeType();\n $photo->save();\n\n $uploaded_file = $this->streamFile($file->getRealPath(), $photo->filepath);\n\n $mimetype = $file->getMimeType();\n\n $intervention_image = Image::make($file->getRealPath());\n $exif_data = ($intervention_image->exif()) ? json_encode($intervention_image->exif()) : null;\n $iptc_data = ($intervention_image->iptc()) ? json_encode($intervention_image->iptc()) : null;\n\n\n foreach(config('system.thumbnails.sizes') as $size){\n $intervention_image->resize($size, null, function ($constraint) {\n $constraint->aspectRatio();\n });\n\n $this->photo_private_disk->put(sprintf('%s/%s', $photo->storage_path, $size . '.jpg'), (string) $intervention_image->encode('jpg'));\n }\n\n\n // ConvertPhoto::dispatch($photo);\n // IndexPhoto::dispatchNow($photo);\n }\n\n return response()->json($photo);\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 UploadPhotos(UploadRequest $request, $id)\n {\n\n $school = School::findOrFail($id);\n\n //Store image directory to the database\n foreach ($request->photos as $photo) {\n $imageName = $photo->getClientOriginalName();\n\n //remove non numbers characters\n $newname = preg_replace('~\\D~', '', $imageName);\n\n $newimagename = $newname . '.' .\"jpg\";\n \n\n\n //save image ImageData to DB\n // $newimagename = $photo->store('school_photos/'.$school->center_number.'/', $newimagename );\n SchoolPhoto::create([\n 'school_id' => $school->id,\n 'filename' => $newname\n ]);\n\n\n //Save the Image to Public Folder\n $photo->move(\n base_path() . '/public/school_photos/'.$school->center_number.'/', $newimagename\n );\n }\n\n\n\n}", "public function store(int $id, Request $request)\n {\n foreach ($request->photos as $photo) {\n $filename = Str::random(10).'.'.$photo->extension();\n\n $path = $photo->storeAs('public/images', $filename);\n\n $photo = $this->photo->create([\n 'url' => config('app.url').'/storage/images/'.$filename,\n 'property_id' => $id,\n ]);\n }\n\n return back()\n ->with('success', 'Foto(s) anexada(s) com sucesso!')\n ;\n }", "public function run()\n {\n \t$products = Product::all();\n \t$no = 1;\n \tforeach ($products as $product) {\n\t $product->photos()->firstOrcreate([\n\t \t'name' => 'softcase0'. $no++ . '.png'\n\t ]);\n \t}\n }", "public function create()\n {\n $path = request()->file('photo')->store('testing');\n return response()->json(['path' => $path], 200);\n }", "public function uploadPhoto($currentAlbumId, $currentUserID, $photoName, $shortDescription, $placeTaken, $selectedCategories, $writtenTags, $photoFile, $titlePhoto,$users){\n\n $insertedPhotoId = 'nothing to upload';\n\n // upload photo to server\n if (!empty($photoFile)){\n\n foreach($photoFile as $file) {\n $destinationPath = 'uploads/albums/'.$currentAlbumId;\n\n //creates album directory if not exist\n if(!is_dir('uploads'))\n mkdir('uploads', 0777, true);\n if(!is_dir('uploads/albums'))\n mkdir('uploads/albums', 0777, true);\n if(!is_dir('uploads/albums/'.$currentAlbumId))\n mkdir('uploads/albums/'.$currentAlbumId, 0777, true);\n\n $filename = $file->getClientOriginalName();\n $extension = $file->getClientOriginalExtension();\n if ($extension == 'jpeg') {\n $extension = 'jpg';\n }\n $fileSize = $file->getSize();\n\n if($extension == 'jpeg' || $extension == 'jpg' || $extension == 'bmp' || $extension == 'png' || $extension == 'gif')\n if($fileSize <= 1024*1024*10){\n //make: if this albumId exist in albums table do this insert\n $isAlbumIdExist = DB::select('select album_id from albums where album_id = ?', array($currentAlbumId));\n if($isAlbumIdExist){\n //upload photo in database\n $insertedPhotoId = DB::table('photos')->insertGetId(\n array('photo_name' => $photoName,\n 'photo_short_description' => $shortDescription,\n 'photo_taken_at' => $placeTaken,\n 'album_id' => $currentAlbumId,\n 'user_id' => $currentUserID,\n 'photo_size' => $fileSize\n )\n );\n\n UserAction::add('Photo \"' . $photoName . '\" was uploaded');\n\n $explodedTags = preg_replace(\"/[^\\w\\ _]+/\", '', $writtenTags); // strip all punctuation characters, news lines, etc.\n $explodedTags = preg_split(\"/\\s+/\", $explodedTags); // split by left over spaces\n $tagLine = \"\";\n for($i=0; $i<sizeOf($explodedTags); $i++)\n $tagLine = $tagLine.$explodedTags[$i].\", \";\n $tagLine = substr($tagLine, 0, -2);\n\n DB::insert('insert into photo_tags (photo_id, tags) values (?,?)', array($insertedPhotoId, $tagLine));\n\n\n\n $upload_success = $file->move($destinationPath, $insertedPhotoId.\".\".$extension);\n if($upload_success){\n //makes photo thumb\n $fileForThumb = $destinationPath.\"/\".$insertedPhotoId.\".\".$extension;\n App::make('phpthumb')\n ->create('resize', array($fileForThumb, 200, 200, 'adaptive'))\n ->save($destinationPath.\"/\", $insertedPhotoId.\"_thumb.\".$extension);\n\n DB::update('update photos set\n photo_destination_url = ?,\n photo_thumbnail_destination_url = ?\n where photo_id = ?',\n array(\n $destinationPath.\"/\".$insertedPhotoId.\".\".$extension,\n $destinationPath.\"/\".$insertedPhotoId.\"_thumb.\".$extension,\n $insertedPhotoId));\n }\n\n //add categories\n for($i = 0; $i < sizeOf($selectedCategories); $i++){\n $catId = DB::select('select * from categories where category_name = ?', array($selectedCategories[$i]));\n if($catId)\n DB::table('photo_categories')->insert(\n array(\n 'photo_id' => $insertedPhotoId,\n 'category_id' => $catId[0]->category_id,\n )\n );\n }\n //add users\n $ob = new User();\n foreach($users as $user){\n if($user != \"\"){\n $usId = $ob->getUserNameById($user);\n $photoP = DB::insert('insert into photo_people (photo_id, user_id) values (?,?)',array($insertedPhotoId,$usId));\n }\n }\n\n //-----------------Editing album title photo data---------------------//\n //if 'make uploaded photo to title album photo' property is selected\n if($titlePhoto){\n\n //gets old title url\n $titlePhoto = DB::table('albums')->where('album_id', $currentAlbumId)->get();\n\n //if album exist\n if($titlePhoto != null){\n\n //deletes old title photo if exists from directory\n $oldAlbumTitlePhoto = null;\n $oldAlbumTitlePhoto = $titlePhoto[0]->album_title_photo_url;\n if($oldAlbumTitlePhoto != null ){\n if(is_file($oldAlbumTitlePhoto))\n File::delete($oldAlbumTitlePhoto);\n }\n //deletes old title photo thumb if exists from directory\n $oldAlbumTitlePhotoThumb = null;\n $oldAlbumTitlePhotoThumb = $titlePhoto[0]->album_title_photo_thumb_url;\n if($oldAlbumTitlePhotoThumb != null )\n if(is_file($oldAlbumTitlePhotoThumb))\n File::delete($oldAlbumTitlePhotoThumb);\n }\n\n //gets current photo url\n $newTitlePhoto = DB::table('photos')->where('photo_id', $insertedPhotoId)->get();\n if($newTitlePhoto){\n\n //photo\n $photo = null;\n $photo = $newTitlePhoto[0]->photo_destination_url;\n if($photo != null ){\n if(is_file($photo)){\n $photoExtension = File::extension($photo);\n $newPhoto = $destinationPath.\"/title_\".$currentAlbumId.\".\".$photoExtension;\n File::copy($photo, $newPhoto);\n $photo = $newPhoto;\n }\n }\n\n //thumb\n $photoThumb = null;\n $photoThumb = $newTitlePhoto[0]->photo_thumbnail_destination_url;\n if($photoThumb != null){\n if(is_file($photoThumb)){\n $thumbExtension = File::extension($photoThumb);\n $newPhotoThumbUrl = $destinationPath.\"/title_\".$currentAlbumId.\"_thumb.\".$thumbExtension;\n File::copy($photoThumb, $newPhotoThumbUrl);\n $photoThumb = $newPhotoThumbUrl;\n }\n }\n else if($photoThumb == null && is_file($photo) != null){\n App::make('phpthumb')\n ->create('resize', array($photo, 200, 200, 'adaptive'))\n ->save($destinationPath.\"/\", \"title_\".$currentAlbumId.\"_thumb.\".$photoExtension);\n $photoThumb = $destinationPath.\"/title_\".$currentAlbumId.\"_thumb.\".$photoExtension;\n }\n\n //insert uploaded/unuploaded files to database\n DB::table('albums')\n ->where('album_id', $currentAlbumId)\n ->update(array(\n 'album_title_photo_url' => $photo,\n 'album_title_photo_thumb_url' => $photoThumb\n ));\n }\n }\n }\n }\n }\n }\n return $insertedPhotoId;\n }", "public function getPhotos();", "function create_collection($images)\n{\n $temp_collection = array();\n for ($i = 0; $i < count($images); $i++) {\n $temp_collection[strval($i + 1)] = 'https://ignaszak.pl/files/' . $images[$i]->folder . '/' . $images[$i]->filename; // modify this to suit your picture path data\n }\n $post_string = otomoto_encode($temp_collection);\n $url = set_url('gallery');\n $token = $_SESSION['token'];\n $cURLConnection = curl_init($url);\n curl_setopt($cURLConnection, CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'Authorization: Bearer ' . $token,]);\n curl_setopt($cURLConnection, CURLOPT_POSTFIELDS, $post_string);\n curl_setopt($cURLConnection, CURLOPT_RETURNTRANSFER, true);\n $apijson = curl_exec($cURLConnection);\n $apiResponse = json_decode($apijson, true);\n curl_close($cURLConnection);\n return $apiResponse;\n}", "function main() {\n \n //first, dig out the photos we already have\n $args = array(\n 'orderby' => 'date',\n 'order' => 'DESC'\n );\n \n //Check and add new photos\n foreach ($this->galleries as $gallery) {\n $args['media_tags'] = $gallery['mediatag'];\n\n $old_photos = get_attachments_by_media_tags($args);\n $this->add_new_recursive(1, $old_photos, $gallery);\n }\n}", "public function photos(){\n return $this->morphMany('App\\Models\\Photo','image');\n \n }", "public function uploadPhotos(Request $request)\n {\n $path = 'uploads/photos/';\n $image = $request->file('file');\n $originalName = $image->getClientOriginalName();\n $extension = $image->getClientOriginalExtension();\n\n $filename = generateFilename($path, $extension);\n\n $photo = Photo::create([\n 'gallery_id' => $request->input('gallery_id'),\n 'original_name' => $originalName,\n 'filename' => $filename\n ]);\n\n if ($photo) {\n // Upload Original\n $image = Image::make($image)->save($path . $filename);\n // Upload thumbnail\n $thumbimage = Image::make($image)->fit(500)->save($path . 'thumbs/' . $filename);\n\n if(!$image || !$thumbimage) {\n $photo->delete();\n return response()->json([\n 'error' => true,\n 'message' => 'Server error while uploading',\n 'code' => 500\n ], 500);\n }\n }\n\n return response()->json([\n 'error' => false,\n 'code' => 200\n ], 200);\n }", "public function handle() : void\n {\n if (! $this->option('auth')) {\n $this->input->setOption('auth', 'default');\n }\n\n $gphoto = new GPhoto($this->option('auth'));\n\n if (! file_exists($gphoto->path('storage/token'))) {\n $this->components->error(\n 'TOKEN NOT EXISTS run \"gphoto auth:create\" instead'\n );\n\n return;\n }\n\n $photos = $this->getPhotosFromSource();\n\n if (empty($photos)) {\n return;\n }\n\n try {\n $client = $gphoto->client();\n\n $this->components->info('UPLOADING PHOTOS' . ($this->option('album') ? ' TO ALBUM : ' . $this->option('album') : ''));\n\n config([\n 'cache.stores.file.path' => $gphoto->path('storage/cache'),\n ]);\n\n $media = [];\n $total = count($photos);\n foreach ($photos as $number => $photo) {\n $task = sprintf('[%s/%s] %s', str_pad($number + 1, strlen($total), '0', STR_PAD_LEFT), $total, basename(\n $photo\n ));\n\n $this->components->task($task, function () use (&$media, $client, $photo, $gphoto) {\n // get image token from cache\n $media[] = Cache::sear(md5_file($photo), function () use ($photo, $client) {\n return PhotosLibraryResourceFactory::newMediaItem($client->upload(file_get_contents($photo)));\n });\n });\n }\n\n if (! Cache::has(md5(implode(',', $photos)))) {\n $options = [];\n if ($this->option('album')) {\n $options = [\n 'albumId' => $this->getAlbumId($client),\n ];\n }\n\n foreach (array_chunk($media, 50) as $chunk) {\n $client->batchCreateMediaItems($chunk, $options);\n }\n\n Cache::sear(md5(implode(',', $photos)), function () {\n return true;\n });\n }\n\n echo PHP_EOL;\n } catch (InvalidTokenException|ClientException $exception) {\n echo PHP_EOL;\n\n $this->components->warn(\n 'AN ERROR OCCURRED WHILE UPLOADING PHOTOS, RETRYING'\n );\n\n $gphoto->revoke();\n\n $this->call('auth:reload', [\n 'name' => $this->option('auth'),\n ]);\n\n if ($this->retry > 0) {\n $this->retry--;\n $this->handle();\n }\n } catch (ApiException $exception) {\n $this->components->error($exception->getMessage());\n }\n }", "public function photos()\n {\n return $this->morphToMany(\n 'App\\RentalManager\\AddOns\\Photo', // model\n 'node', // node\n 'photo_node', // table\n 'node_id',\n 'photo_id'\n );\n }", "public function store(Request $request)\n {\n //return $request->all();\n $request->validate($this->getCreateValidateRules($request));\n\n $data = $request->except(['_token', 'related_photo', 'photo']);\n $data['user_id'] = $request->user()->id;\n $data['slug'] = slugThis($data['name']);\n $data['created_at'] = now();\n $data['photo'] = 'default_img.jpg';\n\n if($request->hasFile('photo')){\n $photo = $request->file('photo');\n $photoName = \"product_cover_\".time().\".\".$photo->getClientOriginalExtension();\n\n $this->uploadProductCoverImage($photo, $photoName);\n $data['photo'] = $photoName;\n }\n\n $newProductId = DB::table('products')->insertGetId($data);\n\n if($request->hasFile('related_photo')){\n foreach ($request->file('related_photo') as $index=>$relatedPhoto){\n\n $photoName = \"product_related_$index\".time().\".\".$relatedPhoto->getClientOriginalExtension();\n Image::make($relatedPhoto)->resize(600, 600)->save(base_path('uploads/product/related/600x600/'.$photoName));\n ProductPhoto::create(['product_id' => $newProductId, 'photo' => $photoName]);\n }\n }\n\n return redirect()->route('admin.product.index')->with('success', __('backend.Product created'));\n }", "public function setPhotosAttribute($value)\n {\n $attribute_name = \"photos\";\n $disk = \"uploads\";\n $destination_path = \"products\";\n\n $this->uploadMultipleFilesToDisk($value, $attribute_name, $disk, $destination_path);\n }", "public function photoCreate()\n {\n $gallery_id = Input::get('gallery_id');\n $gallery = PhotoGallery::where('id', '=', $gallery_id)->first();\n $data['thisPageId'] = $this->thisPageId;\n $data['thisModuleId'] = $this->thisModuleId;\n $flags = $this->language->getAllDataNoPagination();\n\n return view('cms.modules.multicms.photos_addnew', compact('flags', 'gallery'), $data);\n\n }", "public function addPhoto()\n\t{\n\t\t// check if any key in request is of error type\n\t\tif ($this->request->hasKey(ErrorEnum::ERROR))\n\t\t{\n\t\t\t// setting general error message and view style for a template\n\t\t\t$this->view->add_new_photo_message_class = ErrorEnum::ERROR;\n\t\t\t$this->view->add_new_photo_message = MessageBundle::getMessage('form.validation.field.addphoto.noimage.exists');\n\t\t\t\n\t\t\tif ($this->request->hasKey(ErrorEnum::FILENOIMAGE))\n\t\t\t{\n\t\t\t\t$this->view->add_new_photo_message = MessageBundle::getMessage('form.validation.field.addphoto.filenoimage');\n\t\t\t}\n\t\t}\n\t\t$this->view->add_to_existing_album = $this->helper->getExistingAlbumsToForm();\n\t\t$this->view->show('profile_gallery_add');\n\t}", "public function processImages()\n \t{\n $this->save();\n if (! $this->errorMessage)\n \t\t parent::uploadImages('image', 'RecipeImage', \"recipeID\");\n \n \t}", "public function store($id, Request $request)\n {\n foreach($request->file('images') as $p){\n $photo = new Photo();\n $photo->album_id = $id;\n $fileName = \"\";\n if($p->isValid()){\n $path = public_path().'/uploads/photos/';\n $fileName = str_random(32).'.'.$p->getClientOriginalExtension();\n $p->move($path, $fileName);\n }else{\n App::abort(404);\n }\n $photo->photo = $fileName;\n $photo->save();\n }\n return Redirect::route('admin.photos.show', $id);\n }", "abstract public function addItems(\\Media\\Entity\\Photo\\PhotoBase $item);", "public function syncImages() {\r\n\r\n /** @var Mage_Catalog_Helper_Product_Flat $helper */\r\n $process = Mage::helper('catalog/product_flat')->getProcess();\r\n $status = $process->getStatus();\r\n $process->setStatus(Mage_Index_Model_Process::STATUS_RUNNING);\r\n\r\n // Fetch attribute set id by attribute set name\r\n /** @var $collection Mage_Catalog_Model_Resource_Product_Collection */\r\n $attributeSetId = Mage::getModel('eav/entity_attribute_set')\r\n ->load('Oodji', 'attribute_set_name')\r\n ->getAttributeSetId();\r\n\r\n $website = Mage::getResourceModel('core/website_collection')\r\n ->addFieldToFilter('code', 'oodji')\r\n ->getFirstItem();\r\n\r\n $storeId = Mage::app()->getStore(Mage::app()->getWebsite($website)->getDefaultGroup()->getDefaultStoreId())->getId();\r\n\r\n // Load product model collection filtered by attribute set id\r\n $products = Mage::getResourceModel('catalog/product_collection')\r\n ->setStoreId($storeId)\r\n ->addAttributeToSelect('name')\r\n ->addAttributeToSelect('sku')\r\n ->addAttributeToFilter('type_id', 'configurable')\r\n ->addFieldToFilter('attribute_set_id', $attributeSetId)\r\n ->addFieldToFilter('status', 2);\r\n\r\n $process->setStatus($status);\r\n\r\n // Process your product collection as per your bussiness logic\r\n /** @var Agere_PhotoGrabber_Helper_Grabber $grab */\r\n $grab = Mage::helper('photoGrabber/grabber');\r\n\r\n foreach($products as $product){\r\n $grab->searchProduct($product->getSku());\r\n }\r\n }", "public function store(Request $request)\n {\n try {\n $item = Product::create([\n 'user_id' => Auth::id(),\n 'category_id' => $request->category_id,\n 'name' => $request->name,\n 'short_text' => $request->short_text,\n 'description' => $request->description,\n 'img' => (isset($request->img) ? file_store($request->img, 'assets/uploads/photos/product_img/', 'photo_') : null),\n ]);\n\n if (isset($request->property_value)) {\n foreach ($request->property_value as $key => $property_value) {\n if ($property_value) {\n $pp = ProductProperty::create([\n 'product_id' => $item->id,\n 'property_id' => $request->property_id[$key],\n 'value' => $property_value\n ]);\n }\n }\n }\n\n if (isset($request->photo)) {\n foreach ($request->photo as $key => $photo) {\n if (isset($photo) and $photo) {\n $ph = new Photo();\n $ph->path = file_store($photo, 'assets/uploads/photos/product_photos/', 'photo_');\n $item->photo()->save($ph);\n }\n }\n }\n\n return redirect()->route('product.index')->with('flash_message', 'با موفقیت انجام شد');\n }catch (\\Exception $e){\n return redirect()->back()->withInput()->with('err_message', 'خطایی رخ داده است، لطفا مجددا تلاش نمایید');\n }\n }", "private function generate()\n {\n $originalImages = Storage::files(env('PHOTO_PATH'));\n\n foreach ($originalImages as $originalImage) {\n $pieces = explode('/', $originalImage);\n\n $exp = explode('.', end($pieces));\n\n $extension = end($exp);\n\n array_pop($exp);\n\n $imageId = implode('.', $exp);\n\n $photos = [];\n\n foreach ($this->dimensions as $key => $dimension) {\n $fileName = env('PHOTO_PATH_RESIZE') . \"{$imageId}_{$key}.$extension\";\n\n if (! Storage::exists($fileName)) {\n $img = Image::make(Storage::get($originalImage));\n $img->resize($dimension['width'], $dimension['height']);\n\n Storage::put($fileName, (string)$img->encode(), 'public');\n\n if (Storage::exists($fileName)) {\n $photos[$key] = asset(Storage::url($fileName));\n }\n }\n }\n\n /**\n * Save on Storage\n */\n if (count($photos)) {\n $photo = new Photo();\n $photo->name = $imageId;\n $photo->photos = $photos;\n $photo->photos = $photos;\n $photo->save();\n }\n }\n }", "function wyz_upload_business_gallery_ajax() {\n\t$nonce = filter_input( INPUT_POST, 'nonce' );\n\tif ( ! wp_verify_nonce( $nonce, 'wyz_ajax_custom_nonce' ) ) {\n\t\twp_die( 'busted' );\n\t}\n\n\t$bus_id = filter_input( INPUT_POST, 'bus_id' );\n\t$img_ids = explode( ',', filter_input( INPUT_POST, 'imgs_ids' ) );\n\t$gallery = array();\n\tforeach ( $img_ids as $img_id ) {\n\t\t$url = wp_get_attachment_url( $img_id );\n\t\tif ( $url )\n\t\t\t$gallery[ $img_id ] = $url;\n\t}\n\tupdate_post_meta( $bus_id, 'business_gallery_image', $gallery );\n\twp_die( $array[0] );\n}", "public function store(PhotoCreateRequest $request)\n {\n DB::beginTransaction();\n $photo = $this->createPhotoInstance($request->all());\n $photo->owner()->associate(auth()->user());\n $photo->save();\n\n $photo->location()->save(\n new PhotoLocation($request->only('location'))\n );\n\n $tags = $this->createTags(explode(',', $request->tags));\n\n $photo->tags()->sync($tags->pluck('id')->toArray());\n\n // Execute processing to external photo: download, apply geocoding...\n dispatch(new ProcessingExternalPhoto($photo));\n\n DB::commit();\n\n // 201\n return $photo;\n }", "public function store(Request $request)\n {\n \n $this->validate($request, [\n 'photos' => 'required',\n 'photos.*' => 'image|mimes:jpeg,png,jpg,gif,svg|max:8096'\n ]);\n \n\n $files = $request->photos;\n if(!empty($files)):\n foreach($files as $row):\n // Storage::disk('public')\n // ->put($row->getClientOriginalName(),'Contents');\n Storage::disk('public')->put($row->getClientOriginalName(), file_get_contents($row));\n endforeach;\n \n foreach($files as $row):\n Media::create([\n 'image_name' => $row->getClientOriginalName(),\n 'image_url' => '/storage/'.$row->getClientOriginalName() \n ]);\n endforeach;\n \n endif;\n \n return $this->index()->with('success');\n\n \n }", "public function getAllPhotos();", "public function run()\n {\n\n\n $length = sizeof($property_tercero['galleries'][0]);\n for ($i = 0; $i < $length - 1; $i++) {\n error_reporting(0);\n $gallery_id = $property_tercero['galleries'][0]['id'];\n $galleries = Gallery::create([\n 'gallery_wasi_id' => $property_tercero['galleries'][0]['id'],\n 'id_image' => $property_tercero['galleries'][0][$i]['id'],\n 'url' => $property_tercero['galleries'][0][$i]['url'],\n 'description' => $property_tercero['galleries'][0][$i]['description'],\n 'position' => $property_tercero['galleries'][0][$i]['position'],\n 'property_id' => $properties->id\n ]);\n }\n }", "public function testPeopleImagesCreate()\n { \n $randomId = self::$f1->randomId('person');\n $checkNoImage = self::$f1->get('/v1/people/'.$randomId['person'].'.json');\n if($checkNoImage['body']['person']['@imageURI'] != null){\n $this->testPeopleImagesCreate();\n } else {\n $img = file_get_contents('../tests/img/smilley.jpg');\n $r = self::$f1->post_img($img, '/v1/people/'.$randomId['person'].'/images'); \n $this->assertEquals('201', $r['http_code']);\n return $personId = $randomId['person'];\n }\n }", "public function store(PropertyRequest $request)\n {\n $facilities = Facility::all();\n $createProperty = Property::create($request->all());\n\n $createProperty->setSlug();\n\n $arrayNewFacilities = array();\n\n foreach($facilities as $fac) {\n if(array_key_exists($fac->description, $request->all())) {\n $arrayNewFacilities[] = $fac->id;\n }\n }\n\n $createProperty->facilities()->attach($arrayNewFacilities);\n\n $validator = Validator::make($request->only('files'), ['files.*' => 'image']);\n\n if($validator->fails() === true) {\n return redirect()->back()->withInput()->with(['color' => 'orange', 'message' => 'Todas as imagens devem ser do tipo jpg, jpeg ou png']);\n }\n\n if($request->allFiles()) {\n foreach($request->allFiles()['files'] as $image) {\n $propertyImage = new PropertyImage();\n $propertyImage->property = $createProperty->id;\n $propertyImage->path = $image->storeAs('properties/' . $createProperty->id, str_slug($request->title) . '-' . str_replace('.', '', microtime(true)) . '.' . $image->extension());\n $propertyImage->save();\n unset($propertyImage);\n }\n }\n\n return redirect()->route('admin.properties.edit', [\n 'property' => $createProperty->id\n ])->with([\n 'color' => 'green',\n 'message' => 'Imóvel cadastrado com sucesso!'\n ]);\n }", "public function photos()\n {\n return $this->belongsToMany('App\\Photo')->withTimestamps();\n }", "public function store(Request $request)\n {\n $validatedData = $request->validate([\n \"title_name\" => \"required\",\n \"description\" => \"required\",\n \"price\" => \"required\",\n \"Location\" => \"required\",\n \"address\" => \"required\",\n \"status\" => \"required\",\n ]);\n\n $data = array(\n 'title'=>$title_name,\n 'description'=>$description,\n 'price'=>$price,\n 'location'[\"description\"]=>$location,\n // 'photos'=>@/Users/hello/Downloads/property6.jpg',\n // 'photos'=>@/Users/hello/Downloads/property2.jpg',\n 'location[\"address\"]'=>$address,\n 'location[\"coordinates\"]'=>array(\n [0]=>$lat,\n [1]=>$long\n )\n );\n\n $token = \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVmNTBjN2E3NTUxYWQ4MGJhMjI2MzYyNSIsImlhdCI6MTU5OTEyOTcxMSwiZXhwIjoxNjA2OTA1NzExfQ.p8iG1eorMOMSCKdIyyBaHFlmJTmvdUa7KHINWPtfNTg\";\n $url = 'http://ec2-52-14-234-54.us-east-2.compute.amazonaws.com/api/v1/property/createProperty';\n $ch = curl_init($url);\n $header=array(\n 'Content-Type:application/json',\n 'Authorization: Bearer '.$token\n );\n\n curl_setopt($ch,CURLOPT_HTTPHEADER, $header);\n curl_setopt($ch,CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);\n\n $result = curl_exec($ch);\n curl_close($ch);\n $propertyList = json_decode($result);\n\n session()->flash('message', 'New Property Created Successfully !');\n session()->flash('class', '1');\n return redirect()->route('property');\n }", "public function store(Request $request)\n {\n //\n\n $this->validate($request,[\n 'place_id'=>'nullable|alpha_dash',\n 'place_title'=>'required|string',\n 'place_address'=>'required|string',\n 'place_lat'=>'required|numeric',\n 'place_lng'=>'required|numeric',\n 'place_type'=>'required|string',\n 'images.*'=>'nullable|image'\n ]);\n $place= new Place();\n $place->place_id= $request['place_id'];\n $place->place_name= $request['place_title'];\n $place->place_address= $request['place_address'];\n $place->place_lat= $request['place_lat'];\n $place->place_lng= $request['place_lng'];\n $place->type=$request['place_type'];\n $place->category_id=$request['category_id'];\n\n if( $place->save() ){\n $images = $request->file('images');\n //add the images of place if are founded\n if(!is_null($images)){\n foreach ($images as $image){\n $img= new \\App\\Image();\n $img->image_url= $image->storeAs('public\\place_images',uniqid(rand(0,1000)).'.jpg');\n $place->images()->save($img);\n }\n }\n return redirect()->back()->with(['success'=>'Place added successfully']);\n }else{\n return redirect()->back()->with(['fail'=>'Place added successfully']);\n }\n\n }", "public function create()\n {\n $prop = Property::all('id','property_name');\n return view('properties.images',compact('prop'));\n }", "public function savePhoto(){\n if($this->imageFile && $this->photo = $this->upload($this->user_id, $this->getPrimaryKey())) {\n //off the events to avoid infinite loop\n $this->off(self::EVENT_AFTER_INSERT, [$this, 'savePhoto']);\n $this->off(self::EVENT_AFTER_UPDATE, [$this, 'savePhoto']);\n \n return $this->save(false);\n } \n return true;\n }", "public function run()\n {\n Gallery::create([\n 'building_id' => 1,\n 'image' => \"aadfdafadf\"\n ]);\n\n Gallery::create([\n 'building_id' => 2,\n 'image' => \"aadfdafadf\"\n ]);\n }", "public function store()\n {\n $photo = Photo::create($this->validateRequest());\n return redirect('recitals/photos');\n }", "public function photos() {\n \treturn $this->morphMany('App\\Photo', 'imageable');\n }", "public function save(Request $request){\n \t//echo $lastId;\n if($request->hasFile('image'))\n {\n \t$pictureInfo=$request->file('image');\n $array_len=count($pictureInfo);\n // dd($array_len);\n // show this view in browser\n //echo $array_len;\n\n for($i=0 ;$i<$array_len; $i++)\n {\n $userId=Auth::user()->id;\n $image_ext=$pictureInfo[$i]->getClientOriginalExtension();\n //echo $image_ext.\"<br/>\";\n $folder=\"venue/\";\n $new_image_name=$folder.rand(123456,999999).\".\".$image_ext;\n $destination_path=public_path('/venue');\n $pictureInfo[$i]->move( $destination_path,$new_image_name); // is this working? yes sir\n $venueEntry=new venue();\n $lastId=$venueEntry->id;\n $venueEntry->user_id=$userId;\n $venueEntry->eventType=$request->eventType;\n $venueEntry->venueName=$request->name;\n $venueEntry->cost=$request->price;\n $venueEntry->image=$new_image_name;\n $venueEntry->location=$request->location;\n \n $venueEntry->save();\n }\n return redirect('/venue/addvenue')->with('message','Venue insert successfully!');\n // sob gulo images kon function theke query kore ancho?\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \t//\n //echo \"<pre>\";\n \t//print_r($pictureInfo);\n \t//echo \"</pre>\";\n \t//$picName=$lastId.$pictureInfo->getClientOriginalName();\n \t//echo $picName;\n \t \t//$folder=\"productImage/\";\n \t//$pictureInfo->move($folder,$picName);\n \t////$picUrl=$folder.$picName;\n \t//$productPic=Venue::find($lastId);\n \t//$productPic->image=$picUrl;\n \t//$productPic->save();\n \t//return redirect('/venue/addvenue')->with('message','Venue insert successfully!');\n \t\n \n }", "public function checkPhoto(Resource $model)\n {\n if (rhas('photo')) {\n $photo = photos()->create();\n $data = [];\n if (rhas('coordinates')) {\n \t$data['location'] = parser()->pointFromCoordinates(input('coordinates'));\n }\n $data['photo_uuid'] = $photo->uuid;\n $data['photo_url'] = config('storage.path') . 'photos/' . $photo->photo_url;\n $model->update($data);\n $model->photos()->attach($photo->uuid);\n }\n\n }", "public function photos(): HasMany\n\t{\n\t\treturn $this->hasMany('App\\Models\\Photo', 'album_id', 'id');\n\t}", "public function addPhoto($paramsPhoto)\n {\n return DB::table('photos')->insert(\n [\n 'photos_link' => trim(strip_tags($paramsPhoto['link'])),\n 'album_id' => trim(strip_tags($paramsPhoto['albumId'])),\n ]\n ); }", "public function store(Request $request, $id)\n {\n\n $photos = $request->file('file');\n \n if (!is_array($photos)) {\n $photos = [$photos];\n }\n \n if (!is_dir(public_path('/images'))) {\n mkdir(public_path('/images'));\n }\n \n for ($i = 0; $i < count($photos); $i++) {\n $photo = $photos[$i];\n $name = sha1(date('YmdHis') . str_random(30));\n $save_name = $name . '.' . $photo->getClientOriginalExtension();\n // $resize_name = $name . str_random(2) . '.' . $photo->getClientOriginalExtension();\n \n \n $photo->move(public_path('/images'), $save_name);\n \n $upload = new ProyectoImagen();\n $upload->url = $save_name;\n $upload->proyecto_id = $id;\n $upload->save();\n }\n\n return redirect('/proyectos/image/'.$id);\n\n }", "public function store(PictureRequest $request)\n {\n //\n $id = Auth()->user()->id;\n $validatedData = $request->validated();\n $data = [\n \"user_id\" => $id,\n \"title\" => $validatedData[\"title\"],\n \"photos\" => $validatedData[\"photos\"],\n \"photoCount\" => count($validatedData[\"photos\"]),\n \"photoTag\" => Str::slug($validatedData[\"title\"])\n ];\n\n Picture::create($data);\n\n return response()->json([\n \"status\" => \"success\",\n \"status_code\" => StatusCodes::SUCCESS,\n \"message\" => \"Photos uploaded successfully\",\n \"data\" => array(\n \"user_id\" => $data[\"user_id\"],\n \"title\" => $data[\"title\"],\n \"photos\" => $data[\"photos\"]\n )\n ],StatusCodes::SUCCESS);\n }", "public function store(Request $request)\n {\n\n\n $validator = Validator::make($request->all(),\n [\n \n 'photos[]' => ['mimes:jpg,bmp,png'],\n 'file' => ['max:50120'],\n 'attachments' => ['max:3'],\n 'photos.*' => ['mimes:jpeg,jpg,png,gif','max:5120'],\n ],\n [\n 'photos.*.mimes' => '*Vienas iš failų nėra nuotrauka.',\n 'photos.max' => '*Galite turėti ne daugiau 10 nuotraukų.',\n 'photos.*.max' => '*Viena nuotrauka turi neviršyti 5MB.',\n 'photos.image' => '*Visi failai turi būti nuotraukos',\n 'file' => '*Nuotraukos dydis turi neviršyti 5MB '\n ]);\n if ($validator->fails()) {\n $request->flash();\n return redirect()->back()->withErrors($validator);\n }\n\n $item = new Item();\n $item->name = $request->name;\n $item->price = $request->price;\n $item->description = $request->description;\n $item->quantity = $request->quantity;\n $item->category_id = $request->category_id;\n $item->discount = $request->discount;\n $item->manufacturer = $request->manufacturer;\n $item->status = 0;\n if(isset($request->show)){\n $item->status = 10;\n }\n $item->save();\n $category = Category::find($request->category_id);\n foreach ($category->parameters as $parameter) {\n $item->parameters()->attach($parameter,['data' => $request->input($parameter->id)]);\n\n\n }\n\n if ($request->has('photos')) {\n foreach ($request->file('photos') as $photo) {\n // var_dump($photo);\n $img = Image::make($photo); //bitu kratinys, be jokios info\n $fileName = Str::random(5).'.jpg';// random sugalvojau\n $folder = public_path('images/items'); \n $img->resize(1200, null, function ($constraint) {\n $constraint->aspectRatio();\n });\n $img->save($folder.'/big/'.$fileName, 80, 'jpg');\n\n // $img = Image::make($photo);\n $img->resize(200, null, function ($constraint) {\n $constraint->aspectRatio();\n });\n $img->save($folder.'/small/'.$fileName, 80, 'jpg');\n $photo = new Photo();\n $photo->name = $fileName;\n $photo->item_id = $item->id;\n $photo->save();\n }\n }\n\n return redirect()->route('category.map',$request->category_id);\n }", "public static function putImages($model, $images, $path, $type, $quantity)\n {\n $images = (array) $images;\n $number = $model->media()->get()->count();\n $difference = null;\n $limitedImgs = null;\n\n if($number < $quantity)\n {\n $difference = $quantity - $number;\n // dd($images);\n $limitedImgs = array_slice($images,0,$difference);\n\n foreach ($limitedImgs as $key => $image) \n {\n $img = Image::make($image->getRealPath());\n\n $img->resize(800, null, function ($constraint) {\n $constraint->aspectRatio();\n });\n $image_name = $key. '-' .time().'.'.$image->getClientOriginalExtension();\n\n /*\n ** check if directory exists\n ** if not, create it\n */\n $directory = public_path('/uploads/'. $path);\n if (!file_exists($directory)) \n {\n File::makeDirectory($directory, $mode = 0777, true, true); \n }\n if($directory)\n {\n /*\n ** Save image\n */\n $img->save(public_path('/uploads/'. $path . '/' .$image_name));\n }\n\n $model->media()->create([\n 'id' => (string) Uuid::generate(4),\n 'media_key' => $type,\n 'media_value' => $image_name,\n ]);\n }\n\n // $cover = $model->media()->where('image_key', 'cover')->first();\n\n // if(!$cover)\n // {\n // $model->media()->first()->update(['image_key' => 'cover']);\n // }\n \n }\n else{\n \\Session::flash('msg', trans('session.you_uploaded_max_img_number'));\n return back();\n }\n \n }", "public function store(ItemsCreateRequest $request)\n {\n\n $input = $request->all();\n\n\n if($file = $request->file('photo_id')){\n\n $name = $file->getClientOriginalName();\n\n $file->move('images', $name);\n\n $photo = Photo::create(['file'=>$name]);\n\n $input['photo_id'] = $photo->id;\n }\n\n Item::create($input);\n\n return redirect('/admin/items');\n\n\n\n\n }", "public function configure()\n {\n return $this->afterMaking(function (Product $product) {\n //\n })->afterCreating(function (Product $product) {\n if ($product->images()->count()) {\n $product->cover()->associate($product->images()->first());\n $product->save();\n }\n });\n }", "public function store()\n {\n // Create new product\n $product = Product::create(request()->validate([\n 'product_name' => 'required',\n 'category_id' => 'required',\n 'product_price' => 'required',\n 'product_thumbnail_photo' => 'required | image',\n 'product_quantity' => 'required',\n 'product_short_description' => 'required',\n 'product_long_description' => 'required',\n ]));\n // Get the id and rename the img\n $id = $product->id;\n $uploaded_img = request()->file('product_thumbnail_photo'); // Get the file from user\n $img_name = $id . '.' . $uploaded_img->getClientOriginalExtension(); // rename image to id+file extension\n $img_url = base_path('public/uploads/product_photos/' . $img_name); // image url with path to store\n Image::make($uploaded_img)->resize(600, 622)->save($img_url); // save the new image with new name\n // Update img field with new name\n Product::findOrFail($id)->update([\n 'product_thumbnail_photo' => $img_name\n ]);\n /* Multiple photo upload start */\n // Set a counter\n $counter = 0;\n // Loop through each uploaded img as a variable and store in a folder\n foreach (\\request()->file('product_photos') as $product_photo) {\n $uploaded_img = $product_photo; // Get the file from user\n $img_name = $id . \"-\" . $counter . '.' . $uploaded_img->getClientOriginalExtension(); // rename image to id+file extension\n $img_url = base_path('public/uploads/product_multiple_photos/' . $img_name); // image url with path to store\n Image::make($uploaded_img)->resize(600, 550)->save($img_url); // save the new image with new name\n // insert all photo name and product id to a new table\n ProductMultiplePhoto::create([\n 'product_id' => $id,\n 'photo_name' => $img_name\n ]);\n $counter++;\n }\n\n /* Multiple photo upload end */\n\n\n $notification = 'Product Added Successfully.';\n return back()->with('success_message', $notification);\n }", "public function store(Request $request)\n {\n $product = Product::create($request->all());\n\n // return redirect()->route('products.index')->with('status', 'Producto agregado');\n $max_size= (int)ini_get('upload_max_filesize') * 10240;\n $images = $request->file('images');\n // $user_id =Auth::id();\n\n if ($request->hasFile('images')) {\n foreach ($images as $image) {\n $fileName = encrypt($image->getClientOriginalName()) . '.' . $image->getClientOriginalExtension();\n if (Storage::putFileAs('/public/' . 'Gallery' . '/', $image, $fileName)) {\n $product->image()->create(['url' => $fileName]);\n $product->save();\n }\n }\n Alert::success('Success Title', 'Success Message');\n return redirect()->route('products.index');\n }else{\n Alert::Error('¡Error!', 'Debes subir uno o mas archivos');\n return back();\n }\n //\n }", "public function createPost()\n\t{\n\t\t$photos = Input::file('photos');\n\t \n\t\t\t\tforeach($photos as $photo) {\n\t\t\t\t\t \n\t\t\t\t \n\t\t\t\t // validating each photo.\n\t\t\t\t $rules = array('photos' => 'image|max:5500'); //'required|mimes:png,gif,jpeg,txt,pdf,doc'\n\t\t\t\t $validator = Validator::make(array('photos'=> $photo), $rules);\n\t\t\t\t \n\t\t\t\t if($validator->fails()){\n\t\t\t\t \t$input = Input::except('photos');\n\t\t\t\t \treturn Redirect::back()->withErrors($validator)->withInput($input);\n\t\t\t\t } \n\t\t\t\t}\n\t\t\t \n\t \n\t\t$rules = array(\n\t\t\t'user_post' => 'required|max:2000' , \n\t\t);\n\n\n\t\t// run the validation rules on the inputs from the form\n\t\t$validator = Validator::make(Input::all() ,$rules) ;\n\n\t\t//if the validator fails, redirect back to the form\n\t\tif($validator->fails()) {\n\t\t\treturn Redirect::back()\n\t\t\t\t->withErrors($validator)\n\t\t\t\t->withInput(Input::except('photos')) ; //send back all errors to the\n\t\t}else{\n\t\t\t$userPost = htmlentities(Input::get('user_post')) ;\n\t\t\t$user_id = Auth::id() ;\n\t\t\t$status = Post::create([\n\t\t\t\t\t'user_id'\t=> $user_id ,\n\t\t\t\t\t'post_body' => $userPost,\n\t\t\t\t\t'like'\t\t=> 0,\n\t\t\t\t\t'dislike'\t=> 0,\n\t\t\t\t\t'group_id'\t=> 0,\n\t\t\t\t]);\n\n\t\t\t$photos = array_filter($photos);\n\t\t\t \n\t\t\tif(!empty($photos)){\n\t\t\t\tforeach ($photos as $photo) {\n\t\t\t\t\t $image_name = time().$photo->getClientOriginalName();\n\t\t\t\t\t\t$img = Image::make($photo) ;\n\t\t\t\t\t \n\t\t\t\t\t//$result = File::makeDirectory('/path/to/directory', 0775, true);\n\t\t\t\t\t\t$img->save('store/photo/original/'.$image_name);\n\n\t\t\t\t\t\t$img->resize(null, 200, function ($constraint) {\n\t\t\t\t\t $constraint->aspectRatio();\n\t\t\t\t\t\t})->save('store/photo/lowsize_image/'.$image_name);\n\t \t \t\t\n\t\t\t\t\t//save to photo table\n\t\t\t\t\t$photo_flag = Photo::create([\n\t\t\t\t\t\t'user_id' => Auth::id() ,\n\t\t\t\t\t\t'location' => $image_name ,\n\t\t\t\t\t\t'source_id' => $status->id , //can be null ....doesnt matter for profile\n\t\t\t\t\t\t'source_type' => 'post' ,\n\t\t\t\t\t\t]);\n\t\t\t\t\tif(!$photo_flag)\n\t\t\t\t\t\treturn Redirect::back()->with('flash_error','Something went wrong with the photos');\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($status){\n\t\t\t\treturn Redirect::back()->with('flash_notice' , 'Post Posted Successfully') ;\n\t\t\t}else{\n\t\t\t\techo Redirect::back()->with('flash_error' , 'Post Failed Try Again!') ;\t\n\t\t\t}\n\t\t}\n\n\t}", "public function run()\n {\n $user = [\n 1 => [\n 'link' => 'photos/reebook.png',\n 'product_id' => 1,\n ],\n 2 => [\n 'link' => 'photos/reebook.png',\n 'product_id' => 1,\n ],\n ];\n foreach ($user as $value) {\n ProductPhoto::firstOrCreate($value);\n }\n }", "public function store(Request $request)\n {\n $files = $request->file('images');\nforeach ($files as $image) {\n // if ($image) {\n $imageName = rand(11111, 99999) . '.' . $image-> getClientOriginalExtension();\n $image->move(public_path('multipic'), $imageName);\n // return $imageName;\n\n Multipics::insert([\n 'image'=>$imageName,\n // 'created_at'=>Carbon::now(),\n\n ]);\n \n\n\n}\n return back()->with('success','Images created successfully!');\n \n // }\n}", "public function store(Request $request)\n {\n $this->validate($request, [\n 'name' => 'required|string|min:4',\n 'description' => 'required|string|min:4',\n 'price' => 'required|min:3',\n 'size' => 'required|min:2',\n 'rooms_no' => 'required',\n 'floors_no' => 'required',\n 'pathroom_no' => 'required',\n 'image' => 'required|image',\n 'phone' => 'required|min:11|max:15'\n\n ]);\n\n $property = new Property();\n $property->user_id = auth()->user()->id;\n //$property->areas_id = $request->area_name;\n $property->name = $request->name;\n $property->price = $request->price;\n $property->size = $request->size;\n $property->description = $request->description;\n $property->rooms_no = $request->rooms_no;\n $property->floors_no = $request->floors_no;\n $property->pathroom_no = $request->pathroom_no;\n\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n //dd($images);\n\n // dd($image);\n $name = time() . '.' . $image->getClientOriginalExtension();\n\n $destinationPath = public_path('/images');\n $image->move($destinationPath, $name);\n\n $property->image = $name;\n }\n $property->phone= $request->phone;\n $area_name = $request->area_name;\n\n $row = Area::where('name' , $area_name)->first();\n\n $property->areas_id = $row->id;\n //dd($area_name);\n\n $property->save();\n session()->flash('success', 'Property Added Successfully');\n return redirect('Property');\n }", "public function run()\n {\n DB::table('pictures')->insert([\n [\n 'id' => 1,\n 'folder' => '/pictures/',\n 'name' => 'fc26eb10-ee19-11eb-9a03-0242ac130003.jpg',\n 'cover' => true,\n 'alt' => 'fc26eb10-ee19-11eb-9a03-0242ac130003.jpg',\n 'created_at' => '2021-07-26 16:18:00',\n 'updated_at' => null,\n 'id_estate' => 1,\n ],\n [\n 'id' => 2,\n 'folder' => '/pictures/',\n 'name' => 'a4619d90-f03e-11eb-9a03-0242ac130003.jpg',\n 'cover' => false,\n 'alt' => 'a4619d90-f03e-11eb-9a03-0242ac130003.jpg',\n 'created_at' => '2021-07-26 16:18:00',\n 'updated_at' => null,\n 'id_estate' => 1,\n ],[\n 'id' => 3,\n 'folder' => '/pictures/',\n 'name' => 'b172aa06-f03e-11eb-9a03-0242ac130003.jpg',\n 'cover' => false,\n 'alt' => 'b172aa06-f03e-11eb-9a03-0242ac130003.jpg',\n 'created_at' => '2021-07-26 16:18:00',\n 'updated_at' => null,\n 'id_estate' => 1,\n ],[\n 'id' => 4,\n 'folder' => '/pictures/',\n 'name' => 'ba8a3a14-f03e-11eb-9a03-0242ac130003.jpg',\n 'cover' => false,\n 'alt' => 'ba8a3a14-f03e-11eb-9a03-0242ac130003.jpg',\n 'created_at' => '2021-07-26 16:18:00',\n 'updated_at' => null,\n 'id_estate' => 1,\n ],[\n 'id' => 5,\n 'folder' => '/pictures/',\n 'name' => 'c1ff0bc6-f03e-11eb-9a03-0242ac130003.jpg',\n 'cover' => false,\n 'alt' => 'c1ff0bc6-f03e-11eb-9a03-0242ac130003.jpg',\n 'created_at' => '2021-07-26 16:18:00',\n 'updated_at' => null,\n 'id_estate' => 1,\n ],\n [\n 'id' => 6,\n 'folder' => '/pictures/',\n 'name' => 'caa61f3a-f03e-11eb-9a03-0242ac130003.jpg',\n 'cover' => true,\n 'alt' => 'caa61f3a-f03e-11eb-9a03-0242ac130003.jpg',\n 'created_at' => '2021-07-26 16:18:00',\n 'updated_at' => null,\n 'id_estate' => 2,\n ],\n [\n 'id' => 7,\n 'folder' => '/pictures/',\n 'name' => 'd2688ffa-f03e-11eb-9a03-0242ac130003.jpg',\n 'cover' => false,\n 'alt' => 'd2688ffa-f03e-11eb-9a03-0242ac130003.jpg',\n 'created_at' => '2021-07-26 16:18:00',\n 'updated_at' => null,\n 'id_estate' => 2,\n ],[\n 'id' => 8,\n 'folder' => '/pictures/',\n 'name' => 'dccd82b6-f03e-11eb-9a03-0242ac130003.jpg',\n 'cover' => false,\n 'alt' => 'dccd82b6-f03e-11eb-9a03-0242ac130003.jpg',\n 'created_at' => '2021-07-26 16:18:00',\n 'updated_at' => null,\n 'id_estate' => 2,\n ],[\n 'id' => 9,\n 'folder' => '/pictures/',\n 'name' => 'e310caca-f03e-11eb-9a03-0242ac130003.jpg',\n 'cover' => false,\n 'alt' => 'e310caca-f03e-11eb-9a03-0242ac130003.jpg',\n 'created_at' => '2021-07-26 16:18:00',\n 'updated_at' => null,\n 'id_estate' => 2,\n ],[\n 'id' => 10,\n 'folder' => '/pictures/',\n 'name' => 'e959c17a-f03e-11eb-9a03-0242ac130003.jpg',\n 'cover' => false,\n 'alt' => 'e959c17a-f03e-11eb-9a03-0242ac130003.jpg',\n 'created_at' => '2021-07-26 16:18:00',\n 'updated_at' => null,\n 'id_estate' => 2,\n ],\n ]);\n }", "public function store()\n\t{\n\t\t$path = Config::get('wucms::gallery.upload_images_path').'/'.date('Y-m-d');\n\t\t\n\t\t$root = public_path()?:$_SERVER['DOCUMENT_ROOT'];\t\t\n\t\t\n\t\t$full_path = $root.'/'.$path;\n\t\t//dd($base_path);\n\t\t//print_array($_FILES);\n\t\t\n\t\t$upload_files_count = 0;\t\t\n\t\t\n\t\t\n\t\tif ( ! Input::hasFile('images')) return Response::json(['status'=>'error','message'=>'not select file']); \n\t\n\t\t$files = Input::file('images');\n\t\t$files_count = count($files);\n\t\t\n\t\t$album_id = Input::get('album_id');\n\t\n\t\t$images = [];\n\t\n\t\tforeach($files as $file) \n\t\t{\n\t\t\t$validator = Validator::make(array('image'=>$file),Image::rules());\t\t\t\t\n\t\t\t\n\t\t\tif ($validator->fails()) return Response::json(['status'=>'error','message'=>$validator->messages()->first()]);\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t//$filename = date('H-i-s').'-'.URLify::filter(str_random(12), 60, \"\", true);\n\t\t\t$filename = date('H-i-s').'-'.URLify::filter($file->getClientOriginalName(), 60, \"\", true);\n\t\t\t\n\t\t\t//$upload_success = true;\n\t\t\t\n\n\t\t\tif($upload_success = $file->move($full_path, $filename))\n\t\t\t{\n\t\t\t\t$upload_files_count++;\n\t\t\t \n\t\t\t\t$image = new Image;\n\t\t\t\t$image->filename = $filename;\n\t\t\t\t$image->name = $file->getClientOriginalName();\n\t\t\t\t$image->path = $path;\n\t\t\t\t$image->album_id = $album_id;\n\t\t\t\t$image->save();\n\t\t\t\t$images[] = View::make('wucms::albums.image',['image'=>$image,'hide'=>true])->render();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn Response::json(['status'=>'error','message'=>'upload error']);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tif($album_id) Album::find($album_id)->save();\n\n\t\treturn Response::json(['status'=>'ok','message'=>'<b>Загружено:</b> '.$files_count.'/'.$upload_files_count,'images'=>$images]);\n\t}", "public function agregar(Request $request) \n {\n \n $responsable = new Responsable;\n $responsable->nombre = $request->get('nombre');\n $responsable->apellidos = $request->get('apellidos');\n $responsable->tel = $request->get('tel');\n $responsable->desc = $request->get('desc');\n \n $responsable->id_photo = 0;\n \n $responsable->save();\n \n $new_id = $responsable->id;\n ///////////\n \n //////// Guardar imagen si existe\n \n $curfile = $request->file('image');\n \n\n \n if ($curfile) \n {\n $imageName = $curfile->getClientOriginalName();\n $filesize = $curfile->getSize();\n $filetype = $curfile->getMimeType();\n \n\n $file_save_folder = \"uploaded_folder\".DIRECTORY_SEPARATOR.\"fotos_responsables\".DIRECTORY_SEPARATOR.\"$new_id\".DIRECTORY_SEPARATOR;\n \n $curPath = public_path($file_save_folder);\n \n if (!file_exists($curPath))\n {\n \n if (mkdir($curPath)){\n \n }\n else {\n Session::flash('error', 'No se agrego la fotografia'); \n return redirect('responsables');\n }\n }\n \n $curfile->move($curPath, $imageName);\n\n $responsable_foto = new Responsable_Fotos;\n $responsable_foto->id_responsable=$new_id;\n $responsable_foto->archivo = $imageName;\n $responsable_foto->type = $filetype;\n $responsable_foto->size = $filesize;\n $responsable_foto->save();\n \n \n \n \n \n \n \n }\n \n \n Session::flash('success', 'Datos Agregados correctamente'); \n return redirect('responsables');\n }", "private function createPhotoTableUp(): void\n\t{\n\t\tSchema::create('photos', function (Blueprint $table) {\n\t\t\t// Column definitions\n\t\t\t$table->char('id', self::RANDOM_ID_LENGTH)->nullable(false);\n\t\t\t$table->unsignedBigInteger('legacy_id')->nullable(false);\n\t\t\t$table->dateTime('created_at', 6)->nullable(false);\n\t\t\t$table->dateTime('updated_at', 6)->nullable(false);\n\t\t\t$table->unsignedInteger('owner_id')->unsigned()->nullable(false)->default(0);\n\t\t\t$table->char('album_id', self::RANDOM_ID_LENGTH)->nullable()->default(null);\n\t\t\t$table->string('title', 100)->nullable(false);\n\t\t\t$table->text('description')->nullable();\n\t\t\t$table->text('tags')->nullable();\n\t\t\t$table->string('license', 20)->nullable(false)->default('none');\n\t\t\t$table->boolean('is_public')->nullable(false)->default(false);\n\t\t\t$table->boolean('is_starred')->nullable(false)->default(false);\n\t\t\t$table->string('iso')->nullable()->default(null);\n\t\t\t$table->string('make')->nullable()->default(null);\n\t\t\t$table->string('model')->nullable()->default(null);\n\t\t\t$table->string('lens')->nullable()->default(null);\n\t\t\t$table->string('aperture')->nullable()->default(null);\n\t\t\t$table->string('shutter')->nullable()->default(null);\n\t\t\t$table->string('focal')->nullable()->default(null);\n\t\t\t$table->decimal('latitude', 10, 8)->nullable()->default(null);\n\t\t\t$table->decimal('longitude', 11, 8)->nullable()->default(null);\n\t\t\t$table->decimal('altitude', 10, 4)->nullable()->default(null);\n\t\t\t$table->decimal('img_direction', 10, 4)->nullable()->default(null);\n\t\t\t$table->string('location')->nullable()->default(null);\n\t\t\t$table->dateTime('taken_at', 6)->nullable(true)->default(null)->comment('relative to UTC');\n\t\t\t$table->string('taken_at_orig_tz', 31)->nullable(true)->default(null)->comment('the timezone at which the photo has originally been taken');\n\t\t\t$table->string('type', 30)->nullable(false);\n\t\t\t$table->unsignedBigInteger('filesize')->nullable(false)->default(0);\n\t\t\t$table->string('checksum', 40)->nullable(false);\n\t\t\t$table->string('original_checksum', 40)->nullable(false);\n\t\t\t$table->string('live_photo_short_path')->nullable()->default(null);\n\t\t\t$table->string('live_photo_content_id')->nullable()->default(null);\n\t\t\t$table->string('live_photo_checksum', 40)->nullable()->default(null);\n\t\t\t// Indices and constraint definitions\n\t\t\t$table->primary('id');\n\t\t\t$table->unique('legacy_id');\n\t\t\t$table->foreign('owner_id')->references('id')->on('users');\n\t\t\t$table->foreign('album_id')->references('id')->on('albums');\n\t\t\t$table->index('created_at');\n\t\t\t$table->index('updated_at');\n\t\t\t$table->index('taken_at');\n\t\t\t$table->index('checksum');\n\t\t\t$table->index('original_checksum');\n\t\t\t$table->index('live_photo_content_id');\n\t\t\t$table->index('live_photo_checksum');\n\t\t\t$table->index('is_public');\n\t\t\t$table->index('is_starred');\n\t\t\t// This index is needed to efficiently add the range of take dates\n\t\t\t// to each album.\n\t\t\t$table->index(['album_id', 'taken_at']);\n\t\t\t// These indices are needed to efficiently list all photos of an\n\t\t\t// album acc. to different sorting criteria\n\t\t\t// Upload time, take date, is starred or is public\n\t\t\t$table->index(['album_id', 'created_at']);\n\t\t\t$table->index(['album_id', 'is_starred']);\n\t\t\t$table->index(['album_id', 'is_public']);\n\t\t\t$table->index(['album_id', 'type']);\n\t\t\t// These indices are needed to efficiently retrieve the covers of\n\t\t\t// albums acc. to different sorting criteria\n\t\t\t// Note, that covers are always sorted acc. to `is_starred` first.\n\t\t\t$table->index(['album_id', 'is_starred', 'created_at']);\n\t\t\t$table->index(['album_id', 'is_starred', 'taken_at']);\n\t\t\t$table->index(['album_id', 'is_starred', 'is_public']);\n\t\t\t$table->index(['album_id', 'is_starred', 'type']);\n\t\t});\n\t}", "public function photos(){\n return $this->morphMany('cms\\Photo', 'imageable');\n }", "public function store(Request $request)\n {\n \n $file = $request->file('file');\n\n\n $name = time() . $file->getClientOriginalName();\n\n $file->move('images', $name);\n\n\n\n Photo::create(['file'=>$name]);\n\n Session::flash('message', 'Photo added!');\n Session::flash('status', 'success');\n\n }" ]
[ "0.6306265", "0.63003373", "0.62811214", "0.62595695", "0.62441295", "0.61837286", "0.59660083", "0.594623", "0.59230673", "0.58977985", "0.5869958", "0.58518547", "0.581117", "0.5793872", "0.5783948", "0.5781305", "0.57774526", "0.5776408", "0.5765149", "0.57524174", "0.5740584", "0.5732384", "0.5708136", "0.57004154", "0.5692635", "0.5690203", "0.56880236", "0.56822693", "0.5681721", "0.5681499", "0.566856", "0.5653089", "0.5646324", "0.5645609", "0.5630747", "0.5627269", "0.5604761", "0.5589919", "0.55796814", "0.5576153", "0.5572821", "0.5566608", "0.5564523", "0.55601406", "0.55476373", "0.5545342", "0.5542198", "0.553828", "0.55335087", "0.5532728", "0.5532655", "0.5520287", "0.55122495", "0.5510311", "0.550582", "0.549762", "0.54976", "0.54963225", "0.54792714", "0.5477164", "0.5469956", "0.5466804", "0.54629916", "0.5459335", "0.54572946", "0.5453481", "0.54505986", "0.54491544", "0.5448437", "0.54473406", "0.54359996", "0.5423367", "0.54219705", "0.5414929", "0.53964", "0.5386754", "0.53795105", "0.5376431", "0.5374593", "0.537182", "0.5357914", "0.53557765", "0.53485054", "0.5344069", "0.5340732", "0.5338756", "0.53371835", "0.5329323", "0.5328771", "0.5325361", "0.5324484", "0.5322193", "0.5320357", "0.53197914", "0.5312659", "0.53123546", "0.53123355", "0.53104115", "0.5309876", "0.5309198" ]
0.59204334
9
Async method for deleting photos of properties I am returning 200 status code, so as to be able to handle the response in the jQuery onSuccess method it's a known error afterall
public function deletePhoto(Request $request) { // Log::info("request image delete " . $request['image']); if(is_null($request->image) || is_null($request->id)) { return response()-json(["error" => "No Image Specified"], 200); } $photo = Photo::where([ ["property_id", $request->id], ["url", $request->image] ]); if(!is_null($photo)) { $photo->delete(); } Storage::disk('public')->delete($request->image); return response()->json(["success" => "success"], 200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deletePoImage() {\n // return data\n $returnArray = array('status' => false, 'msg' => 'Something went to wrong. Try again!!');\n\n // Get values\n $imageId = Input::get('id');\n\n // set image as delete\n $status = DB::table('po_images')\n ->where('id', $imageId)\n ->update(array('isDeleted' => 1));\n if ($status) {\n $returnArray['status'] = true;\n $returnArray['msg'] = 'Image deleted successfully.';\n }\n\n // return response\n return Response(json_encode($returnArray));\n }", "private function deletePhoto()\n {\n try \n {\n global $cbphoto;\n \n $request = $_REQUEST;\n \n if(!isset($request['photo_id']) || $request['photo_id']==\"\" )\n throw_error_msg(\"photo id not provided\");\n\n if( !is_numeric($request['photo_id']) )\n throw_error_msg(\"invalid photo id\");\n\n if(!userid())\n throw_error_msg(lang(\"you_not_logged_in\")); \n\n $id = (int)$request['photo_id'];\n $photo = $cbphoto->get_photo($id);\n\n if(!$photo)\n {\n throw_error_msg(lang(\"photo_not_exists\"));\n }\n else\n {\n if($photo['userid']!=userid())\n throw_error_msg(\"You don't have enough permission to delete this photo\");\n } \n \n $cbphoto->delete_photo($id); \n \n if( error() )\n {\n if(error('single')!=\"Photo does not exist in this collection\")\n {\n throw_error_msg(error('single')); \n } \n else\n {\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => \"photo deleted successfully\", \"data\" => array());\n $this->response($this->json($data)); \n } \n }\n\n if( msg() )\n {\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => \"photo deleted successfully\", \"data\" => array());\n $this->response($this->json($data));\n } \n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage()); \n } \n }", "function photos_delete ($photo_id) {\n $response = $this->execute(array('method' => 'flickr.photos.delete', 'photo_id' => $photo_id));\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function photo_remove() {\n if ( ! $this->input->is_ajax_request() || ! $this->auth->is_login()) {\n return redirect(config_item('site_url'));\n }\n \n $item = filter($this->uri->segment(3), 'str', 40);\n $photo = $this->media->get_by_id($item);\n \n if ( ! $photo || empty($photo)) {\n log_write(LOG_WARNING, 'Photo not found, ID: ' . $item . ', USER: ' . $this->auth->get_user_id(), __METHOD__);\n return $this->output->set_output(json_encode(array(\n 'code' => 'error'\n )));\n }\n \n if ($photo->item_author != $this->auth->get_user_id()) {\n log_write(LOG_ERR, 'User is not the author of the photo, ID: ' . $item . ', USER: ' . $this->auth->get_user_id(), __METHOD__);\n return $this->output->set_output(json_encode(array(\n 'code' => 'error'\n )));\n }\n\n $image = explode('.', $photo->item_filename);\n\n unlink(FCPATH . '/uploads/' . $photo->item_point . '/' . $image[0] . '_thumb.' . $image[1]);\n unlink(FCPATH . '/uploads/' . $photo->item_point . '/' . $image[0] . '.' . $image[1]);\n\n $this->media->remove($item);\n \n return $this->output->set_output(json_encode(array(\n 'code' => 'luck'\n )));\n }", "function deletePhotos($inputArr) {\n $ro = new BaseRO();\n $album = $inputArr[\"albumName\"];\n $filesToDel = $inputArr[\"picurls\"];\n $numfiles = count($filesToDel);\n\n for ($i=0; $i < $numfiles; $i++)\n {\n $ro->success = unlink($filesToDel[$i]);\n $ro->retmsg = \"Deleted \" . $filesToDel[$i];\n if (!($ro->success)) {\n $ro->retcode = 4;\n $ro->retmsg = \"Couldn't delete files\";\n return $ro;\n }\n }\n\n return $ro;\n}", "public function postRemove() {\n if(Request::ajax()) {\n $status = false; // Start status check\n $image_src = Input::get('src');\n $task_id = Input::get('id');\n $type = Input::get('type');\n $tasks = Task::find($task_id);\n $imagePath = public_path($image_src);\n switch($type){\n case 'new_image':\n @unlink($imagePath);\n return Response::json(['success'=>true]);\n\n break;\n\n default: // Old images already saved in DB\n\n if(isset($tasks->image_src)) {\n $new_image_src = json_decode($tasks->image_src,true);\n foreach($new_image_src as $key => $value) {\n\n if($value['path'] == $image_src) { // Matches in db so remove from the set\n unset($new_image_src[$key]); // removes image from array\n // remove image from folder\n @unlink($imagePath);\n // update the db with a new \n $tasks->image_src = json_encode($new_image_src);\n if($tasks->save()){\n return Response::json(['success'=>true]);\n }\n }\n }\n }\n break;\n }\n return Response::json(['success'=>false]);\n }\n }", "public function destroy($id)\n\t{\n\t\tProperty::destroy($id);\n\n\t\t$photos = Photo::wherePropertyId($id)->get();\n\n\t\tforeach ($photos as $photo) {\n\t\t\t$photo->delete();\n\t\t}\n\n\t\treturn Response::json(array('success' => true));\n\t}", "function beforeDelete(){\r\n\t\t$photo = $this->findById($this->id);\r\n\t\tunlink($this->dir . $photo['Photo']['small']);\r\n\t\tunlink($this->dir . $photo['Photo']['large']);\r\n\t\treturn true;\r\n\t}", "public function deletepropertyimage(Request $request){\n\t\t$data = array();\n\t\t$data['status'] = 0;\n\t\t$data['msg'] = 'Error';\n\t\t\n\t\t$input = $request->all();\n\t\t$propertyid = $input['propertyid'];\n\t\t$propertyimageid = $input['propertyimageid'];\n\t\t\n\t\t$propertydata = PropertyImages::find($propertyimageid);\n\t\t\n\t\tif(empty($propertydata)){\n\t\t\t$data['msg'] = 'Invalid Property Image';\n\t\t}\n\t\telse{\n\t\t\tif(PropertyImages::destroy($propertyimageid)){\n\t\t\t\t$oldimage = trim($propertydata->image_name);\n\t\t\t\t$imagepath = public_path().'/images/property/'.$propertyid;\n\t\t\t\tFile::delete($imagepath.'/'.$oldimage);\n\t\t\t\t$data['status'] = 1;\n\t\t\t\t$data['msg'] = 'Property Saved';\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$data['msg'] = 'Error';\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn response()->json($data); \n\t\texit();\n }", "public function destroy($id)\n {\n $delete = albumdetail::findOrFail($id);\n $delete->delete();\n try {\n $response = Http::post('https://api.miccapro.com/api/training/repairGallery');\n } catch (\\Throwable $th) {\n // dd($th);\n //throw $th;\n }\n return response(['status' => true ,'text' => 'has deleted'], 200);\n }", "public function getDelete()\n {\n $name_to_delete = $this->getRequest('items');\n\n $file_to_delete = $this->getWorkingDir() . '/' . $name_to_delete ;\n $thumb_to_delete = $this->getWorkingDir() . '/'.config('lfm.thumb_folder_name').'/' . $name_to_delete ;\n\n\n event(new ImageIsDeleting($file_to_delete));\n\n if (is_null($name_to_delete)) {\n return $this->error('folder-name');\n }\n\n if (!Storage::disk('s3')->exists($file_to_delete)) {\n return $this->error('folder-not-found', ['folder' => $file_to_delete]);\n }\n\n $is_directoty = File::isDirectory($file_to_delete);\n Storage::deleteDirectory($file_to_delete);\n\n if (!Storage::disk('s3')->exists($file_to_delete)) {\n return $this->success_response;\n }\n\n Storage::delete($file_to_delete);\n if (Storage::disk('s3')->exists($thumb_to_delete)) {\n Storage::delete($thumb_to_delete);\n }\n\n foreach(config('lfm.resize_folder') as $width){\n $resize_file = $this->getWorkingDir() . '/' . $width .'/' . $name_to_delete ;\n if (Storage::disk('s3')->exists($resize_file)) {\n Storage::delete($resize_file);\n }\n }\n\n event(new ImageWasDeleted($file_to_delete));\n\n return $this->success_response;\n }", "public function deletePhoto (Request $request) {\n\n \ttry {\n\n \t\t$this->profileRepo->deletePhoto(Auth::user()->id, $request->photo_name);\n \t\treturn response()->json(['status' => 'success']);\n\n\n \t} catch (\\Exception $e) {\n\n \t\treturn response()->json(['status' => 'error', 'errors' => [trans_choice('app.unable_to_delete',1)] ]);\n \t}\n }", "public function getRemove()\n {\n $filename_saved_as = Session::get('filename_saved_as');\n $upload = Upload::where('filename_saved_as', '=', $filename_saved_as)->first();\n if ($upload->user_id == Auth::id()) {\n $path = public_path('uploads');\n $filename = $upload->filename_saved_as;\n File::delete($path.'/'.$filename);\n if (!File::exists($path.'/'.$filename)) {\n $upload->delete();\n return Response::json(array('success' => 200));\n } else {\n return Response::json(array('error' => 400));\n }\n } else {\n return Redirect::to('posts/index')\n ->with('message', 'You cannot delete files that do not belong to you.');\n }\n }", "public function predelete()\n\t{\n\t\t$no_error = true;\n\t\t$photos = $this->get_all_photos()->get();\n\t\tforeach ($photos as $photo) {\n\t\t\t$no_error &= $photo->predelete();\n\t\t\t$no_error &= $photo->delete();\n\t\t}\n\n\t\treturn $no_error;\n\t}", "protected function _delete()\r\n\t{\r\n\t\t$oFlexSliderSlider = new FlexSliderSlider($this -> _iId);\r\n\t\t$mStatus = $oFlexSliderSlider -> delete();\r\n\t\t//$this -> _removeSlides($this -> _iId);\r\n\t\t$this -> _aRedirect['id'] = false;\r\n\t\t$this -> _aRedirect['action'] = false;\r\n\t\t\t\r\n\t\tif (is_string($mStatus))\r\n\t\t{\r\n\t\t\t$this -> _aRedirect['message'] = $mStatus;\r\n\t\t}\r\n\t\telse if ($mStatus === true)\r\n\t\t{\r\n\t\t\t$this -> _aRedirect['message'] = 'removed';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this -> _aRedirect['message'] = 'error';\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public function delete()\n {\n $by_id = $_POST[\"_id\"];\n $picture=$_POST[\"_name\"];\n \n \n // delete to db\n $_data =$this->Generic->delete($by_id, $tablename=\"img_ads\");\n if($_data)\n { \n // delete image from folder\n $dir_to_delete = './assets/jollof_banners/'.$_POST[\"_type\"].'_banner/';\n unlink($dir_to_delete.$picture);\n \n $this->session->set_flashdata('success','success');\n $this->session->set_flashdata('message', 'Promo Deleted');\n $Json_resultSave = array ('status' => '1');\n echo json_encode($Json_resultSave);\n //exit();\n }\n else \n {\n $this->session->set_flashdata('error','error');\n $this->session->set_flashdata('message', 'An error occur when Deleted Promo');\n $Json_resultSave = array ('status' => '1');\n echo json_encode($Json_resultSave);\n //exit();\n }\n\n }", "public function actionDelete()\n {\n if (Yii::app()->getRequest()->getIsPostRequest()) {\n $id = $_POST['id'];\n /** @var $photo GalleryPhoto */\n $photo = GalleryPhoto::model()->findByPk($id);\n if ($photo !== null && $photo->delete()) echo 'OK';\n else echo 'FAIL';\n } else echo 'FAIL';\n }", "public function delete_photo(){\n $sql=\"DELETE FROM photos WHERE id=\".$this->id;\n self::$connect->query($sql);\n\n }", "public function delete_business_service_gallery_image() {\n $post_data = $this->input->post();\n $data['result'] = $this->Cs_vendor->delete_business_service_gallery_image($post_data);\n echo json_encode($data);\n }", "public function delete_images(Request $request)\n {\n //die($request);\n // echo '<pre>';print_r($_POST);die();\n $result = 0;\n $productimg = ProductImage::where('id','=', $request->image_id)->first(); \n $product_image = ProductImage::find($productimg->id); \n \n if($product_image->delete()){\n $result = 1;\n }\n\n return response()->json(['success'=> $result]);\n }", "function imageDelete($property);", "public function delete_meta()\n {\n # process the request which it must be post and ajax request\n if (request()->isPost() && request()->isAjax()) {\n \n $objectId = request()->getPost('object-id', 'int');\n $object = request()->getPost('object', 'alphanum');\n \n $this->setJsonResponse();\n\n $object = PostMeta::findFirstByMeta_id($objectId);\n\n if(!$object) {\n $this->jsonMessages['messages'][] = [\n 'type' => 'warning',\n 'content' => 'Object not found!'\n ];\n return $this->jsonMessages;\n }\n $object->delete();\n\n \n $this->jsonMessages['messages'][] = [\n 'type' => 'success',\n 'content' => 'Object has been deleted!'\n ];\n return $this->jsonMessages;\n \n\n }\n }", "public function actionAjaxDeleteHomeImage()\n {\n $id=$_REQUEST['id'];\n $detail=HomeImages::model()->findByAttributes(array('id'=>$id));\n unlink(Yii::app()->basePath.'/../HomeImages/'. $detail->image);\n \t //echo \"<pre>\";print_r($detail);die;\n \t $detail->delete();\n \t echo \"success\";\n }", "public function postDelete($result) { }", "protected function deleted()\n {\n $this->response = $this->response->withStatus(204);\n $this->jsonBody($this->payload->getOutput());\n }", "public function business_service_gallery_delete() {\n $post_data = $this->input->post();\n $data['result'] = $this->Cs_vendor->delete_business_service_gallery_edit($post_data);\n\n echo json_encode($data);\n }", "public function delete_business_gallery() {\n $post_data = $this->input->post();\n $data['result'] = $this->Cs_vendor->delete_business_gallery_image($post_data);\n\n echo json_encode($data);\n }", "public function delete(){\n $record = $this->getImageWithId($this->id);\n if(!$record){\n return false;\n }\n $conn = static::connect();\n $stmt = $conn->prepare(\"DELETE FROM images WHERE id = :id\");\n $stmt->bindValue(\"id\", $record['id'], PDO::PARAM_INT);\n\n /* removes file from server */\n unlink($record['path']);\n return $stmt->execute();\n }", "public function delete_business_gallery_image() {\n\n $post_data = $this->input->post();\n $data['result'] = $this->Cs_vendor->delete_business_gallery($post_data);\n echo json_encode($data);\n }", "public function destroy($id)\n {\n try{\n $model = Imagem::find($id);\n $model->delete();\n unlink('./public/imagens/'.$model->observacoes);\n $ret = ['resultado' => true, 'mensagem' => 'Imagem excluída com sucesso!'];\n }\n catch(\\Exception $e){\n $ret = ['resultado' => false, 'mensagem' => 'Erro ao excluir imagem!', 'exception' => $e];\n }\n return json_encode($ret);\n }", "public function delete(){\n\t\t$query = \"DELETE FROM partner WHERE id=?\";\n\n\t\t$deleteStatus = self::affectRowsPrepared($query, 'i', $this->id)['affected_rows'];\n\t\tif ($deleteStatus == 1) {\n\t\t\tforeach ($this->photo_basenames as $photo) {\n\t\t\t\tunlink(constant(\"PARTNER_IMG_DIR\") . $photo . constant(\"IMG_EXTENSION\"));\n\t\t\t}\n\t\t}\n\n\t\treturn $deleteStatus;\n\t}", "public function destroy($id, $img)\n {\n \n $main_services = main_services::findOrfail($id);\n $main_services->destroy($id);\n \n return response()->json([\n 'success' => 'Record deleted successfully!',\n ]);\n }", "public function destroy($id)\n {\n $album=Album::find($id);\n //finding the photos related to that model\n $photos=DB::table('photos')->where('album_id',$id)->get();\n //fetching each photos to the variable photo\n foreach($photos as $photo)\n {\n //finding the photo in photo model\n $p=Photo::find($photo->id);\n //deleting photo from the storage as well as form the database \n if(Storage::delete('public/photos/'.$photo->album_id.'/'.$photo->photo));\n $p->delete();\n }\n //deleting the album\n if(Storage::delete('public/photos/'.$album->album_id.'/'.$album->cover_image));\n $album->delete();\n return redirect('/')->with('success','Album Deleted Sucessfully'); \n }", "public function destroy_photo($id)\n {\n //\n if(File::exists(public_path('files/products_img/'.Photo::find($id)->name)))\n {\n File::delete(public_path('files/products_img/'.Photo::find($id)->name));\n Photo::find($id)->delete();\n return redirect()->back();\n }\n }", "protected function _delete()\n {\n $photoTable = Engine_Api::_()->getItemTable('socialstore_product_photo');\n $photoSelect = $photoTable->select()->where('album_id = ?', $this->getIdentity());\n foreach( $photoTable->fetchAll($photoSelect) as $productPhoto ) {\n $productPhoto->delete();\n }\n\n parent::_delete();\n }", "public function delImage(){\n // user user-id from session\n $encodedkey = $this->session->userdata('PariKey_session');\n $user_id='';\n $key=base64_decode($encodedkey);\n $keyarr=explode('|', $key);\n\n if(!empty($_POST['img_path'])){\n $result = $this->user_model->delImage($_POST['img_path'],$keyarr[2]);\n\n if($result){\n $response=array(\n 'status' => 'success',\n 'message' => '<b>Success:</b> You Have Successfully deleted Image!'\n );\n }\n else{\n $response=array(\n 'status' => 'error',\n 'message' => '<b>Error:</b> Image was not deleted Successfully!'\n );\n } \n}\nelse{\n $response=array(\n 'status' => 'validation',\n 'message' => '<b>Warning:</b> Image not found!'\n );\n}\n\necho json_encode($response);\n}", "public function destroy()\n {\n\n $id = Input::get('id');\n\n if ( ! empty( $this->photoGallery->getDataById($id)->cover_pic )) {\n $cover_pic = $this->photoGallery->getDataById($id)->cover_pic;\n\n $coverpicDirectory = base_path() . '/uploads/gallery';\n\n File::delete($coverpicDirectory . '/' . $cover_pic);\n\n }\n\n $success = \"Successfully deleted Page\";\n $error = \"Error! Adding Page\";\n\n if ($this->photoGallery->deleteData($id)) {\n return redirect(PREFIX.'/multicms/pages/gallery')->withErrors($success);\n } else {\n return redirect(PREFIX.'/multicms/pages/gallery')->withErrors($error);\n }\n\n\n }", "public function postRemoveTmpImages() {\n if (Request::ajax()) {\n $images = Input::get('images');\n $this->removeImages($images);\n\n return Response::json($images);\n }\n }", "function deleteAutore()\n{\n global $connection;\n $_SESSION['authorDeleteSuccess'] = false;\n $_SESSION['authorDeleteError'] = false;\n if (isset($_POST['delete'])) {\n $idAutore = $_POST['delete'];\n $photoAutore = $_POST['photoAutore'];\n\n $delete_Autore = \"DELETE FROM autore_video WHERE id_autore='$idAutore'\";\n $result_delete = mysqli_query($connection, $delete_Autore);\n if ($result_delete) {\n if (file_exists($photoAutore)) {\n unlink($photoAutore);\n }\n $_SESSION['authorDeleteSuccess'] = true;\n } else {\n $_SESSION['authorDeleteError'] = true;\n }\n }\n}", "public function destroy(Request $request)\n {\n //\n $filename = $request->id;\n $uploaded_image = Image::where('original_name', basename($filename))->first();\n\n if (empty($uploaded_image)) {\n return Response()->json(['message' => 'Fichier Inexistant'], 400);\n }\n\n $file_path = $this->photos_path . '/' . $uploaded_image->filename;\n $resized_file = $this->photos_path . '/' . $uploaded_image->resized_name;\n\n if (file_exists($file_path)) {\n unlink($file_path);\n }\n\n if (file_exists($resized_file)) {\n unlink($resized_file);\n }\n\n if (!empty($uploaded_image)) {\n $uploaded_image->delete();\n }\n\n return Response()->json(['message' => 'Fichier Supprimé'], 200);\n\n }", "function ajaxDelete() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t$model = $this->getDefaultModel();\n\n\t\t$ids = KRequest::getInt('id');\n\n\t\t// Legacy param name\n\t\tif (!$ids) {\n\t\t\t$ids = KRequest::getInt('cid');\n\t\t}\n\n\t\t$success = $model->delete($ids);\n\n\t\t$response = new stdClass();\n\t\tif ($success) {\n\t\t\t$response->success = true;\n\t\t\t$response->errors = array();\n\t\t}\n\t\telse {\n\t\t\t$response->success = false;\n\t\t\t$response->errors = $model->getErrors();\n\t\t}\n\n\t\t// Purge the cache\n\t\t$this->purgeCache();\n\n\t\techo json_encode($response);\n\n\t\t// For now, Magento puts in some JS code for some reason\n\t\tdie();\n\n\t}", "public function destroy($id)\n {\n $photo=Gallery::all()->where('id',$id)->pluck('photos')->first();\n Storage::disk('public')->delete($photo);\n $deletedPhoto=Gallery::all()->where('id',$id)->first();\n $deletedPhoto->delete();\n return redirect('admin/realestate/' . $realestate.'/photos');\n }", "public function destroy($id)\n\t{\n\t\t$json = [];\n\t\t\n\t\tif($image = Image::find($id))\n\t\t{\n\t\t\t\n\t\t\tif (File::exists(public_path().$image->src)) \n\t\t\t\tFile::delete(public_path().$image->src);\n\t\t\t\t\n\t\t\t$json['status'] = 'ok';\n\t\t\t$json['id'] = $image->id;\n\t\t\t$json['message'] = 'Изображение удалено';\n\t\t\t$album_id = $image->album_id;\t\t\t\t\t\n\t\t\t$image->delete();\n\t\t\t\n\t\t\tif($album_id) \n\t\t\t\tAlbum::find($album_id)->save();\t\t\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$json['status'] = 'error';\n\t\t\t$json['message'] = 'Ошибка удаления';\n\t\t\t$json['id'] = $id;\n\t\t}\n\t\treturn Response::json($json);\n\t}", "public function destroy(Request $request)\n {\n try {\n if ($request->has('delete_photo')) {\n Storage::disk($request->get('storage'))->delete($request->get('delete_photo'));\n }\n return response()->json(['success' => true], 200);\n } catch (Exception $ex) {\n return response()->json(['success' => false, 'message' => $ex->getMessage()], 422);\n }\n }", "public function DeletePhotos()\n\t{\tforeach ($this->imagesizes as $sizename=>$size)\n\t\t{\t@unlink($this->GetImageFile($sizename));\n\t\t}\n\t}", "public function delete_product($id){\n $img = DB::table('products')->where('id',$id)->first();\n $image_url = $img->product_image;\n if( $image_url == NULL ){\n \n $delete = DB::table('products')->where('id',$id)->delete();\n if($delete){\n $notification=array(\n 'messege'=>'products delete Successfully without image',\n 'alert-type'=>'success'\n );\n return Redirect()->route('all.product')->with($notification);\n }else{\n return Redirect()->back();\n }\n }\n else{\n $done = unlink($image_url); \n $delete = DB::table('products')->where('id',$id)->delete(); \n if($delete){\n $notification=array(\n 'messege'=>'products delete Successfully with image',\n 'alert-type'=>'success'\n );\n return Redirect()->route('all.product')->with($notification);\n }else{\n return Redirect()->back();\n }\n } \n\n }", "public function delete()\n\t{\n\t\t$product_id = $this->input->post('product_id');\n\t\t$vendor_id = $this->session->userdata('vendor_id');\n\n\t\t$thumb_image = get_product($product_id, 'thumb_image'); //get thumb_image\n\t\t$images = unserialize(get_product($product_id, 'images')); //get multiple images\n\n\t\t$deleted = $this->products->delete($product_id);\n\n\t\tif ($deleted)\n\t\t{\n\t\t\t//thumb image//\n\t\t\t$copy_thumb = str_replace('products', 'products/deleted', $thumb_image); //replace path\n\t\t\tcopy($thumb_image, $copy_thumb); //copy image\n\t\t\tunlink($thumb_image);\n\n\t\t\tforeach ($images as $image) //multiple images//\n\t\t\t{\n\t\t\t\t$copy_image = str_replace('products', 'products/deleted', $image); //replace path\n\t\t\t\tcopy($image, $copy_image); //copy image\n\t\t\t\tunlink($image);\n\t\t\t}\n\n\t\t\t$this->vendors->update_total_product($vendor_id, 'total_products - 1');\n\t\t\techo 'true';\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo 'false';\n\t\t}\n\t}", "function deleteAuthor($id){\r\n $url = \"http://localhost:8080/WebServicesProjet/api/rest/authors/delete/\".$id;\r\n $result = delete($url);\r\n if(intval($result) != 200 && intval($result)<=503 && intval($result)>=400){\r\n header(\"Location: \".$_SERVER['HTTP_ORIGIN'].$_SERVER['PHP_SELF'].'?/authors');\r\n die();\r\n }else{\r\n header(\"Location: \".$_SERVER['HTTP_ORIGIN'].$_SERVER['PHP_SELF'].'?/authors');\r\n die();\r\n }\r\n\r\n}", "public function destroy($id)\n {\n try {\n $image = Image::findOrFail($id);\n $url = $image->url;\n if(isset($url) && $url != null){\n $image->delete();\n unlink($url);\n }\n return response()->json([\n 'message' => 'Imagen eliminada con éxito',\n 'data' => $image\n ], 200);\n } catch (Exception $e) {\n return response()->json([\n 'message' => 'ImageController.destroy.failed',\n 'error' => $e->getMessage()\n ], 505);\n }\n }", "public function destroy(Image $gallery)\n {\n // abort_if(Gate::denies('gallery_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n\n $gallery->delete();\n\n return back()->withSuccess('Task Created Successfully!');\n }", "public function delete($image_id){\n $image = Image::find($image_id);\n if(empty($image)){\n return $this->jsonResponse(\"error\", \"Cannot find image\", Input::get('callback'));\n }\n if($image->user_id != Auth::user()->id){\n return $this->jsonResponse(\"error\", \"Image owned by another user. Cannot delete image.\", Input::get('callback'));\n }\n \n // Delete Image File\n File::delete(public_path() . \"/images/\" . basename($image->file));\n \n // Delete SQL record\n if(!$image->delete()){\n return $this->jsonResponse(\"error\", \"Cannot delete image\", Input::get('callback'), $image->errors());\n }\n \n return $this->jsonResponse(\"ok\", \"Image deleted\", Input::get('callback'));\n }", "public function postDestroy($method = FALSE, $id = FALSE)\n\t{\n\t\tif ($method == 'image' && ! empty(Input::get('image')) && ! empty(Input::get('dir')))\n\t\t{\n\t\t\t$path = Config::get('system_settings.sliders_upload_path');\n\n\t\t\tif (file_exists($path.Input::get('dir').DIRECTORY_SEPARATOR.Input::get('image')))\n\t\t\t{\n\t\t\t\tunlink($path.Input::get('dir').DIRECTORY_SEPARATOR.Input::get('image'));\n\t\t\t}\n\n\t\t\t$response['status'] = 'success';\n\t\t\t$response['message'] = trans('sliders.image_removed');\n\t\t}\n\t\telseif ($method === FALSE || $method == 'slider')\n\t\t{\n\t\t\t$response['status'] = 'error';\n\t\t\t$response['message'] = trans('sliders.not_removed');\n\n\t\t\tif ( ! empty($id) && intval($id) > 0)\n\t\t\t{\n\t\t\t\t$dir = Config::get('system_settings.sliders_upload_path');\n\t\t\t\tif (Model_Sliders::removeSlider($id, $dir) === TRUE)\n\t\t\t\t{\n\t\t\t\t\t$response['status'] = 'success';\n\t\t\t\t\t$response['message'] = trans('sliders.removed');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn response()->json($response);\n\t}", "public function removeAction() {\r\n //DELETE SLIDE DURING THE UPLOAD\r\n $is_ajax = (int) $this->_getParam('is_ajax');\r\n if (!empty($is_ajax)) {\r\n\r\n //GET IMAGE ID AND IT'S OBJECT\r\n $image_id = (int) $this->_getParam('image_id');\r\n $image = Engine_Api::_()->getItem('advancedslideshow_image', $image_id);\r\n\r\n $db = $image->getTable()->getAdapter();\r\n $db->beginTransaction();\r\n\r\n try {\r\n $image->delete();\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n //@unlink(APPLICATION_PATH . \"/public/advancedslideshow/1000000/1000/5/\" . $image_id . 't.' . $image->extension);\r\n }\r\n\r\n //GET SLIDESHOW ID AND IT'S OBJECT\r\n $advancedslideshow_id = (int) $this->_getParam('advancedslideshow_id');\r\n $this->view->advancedslideshow = $advancedslideshow = Engine_Api::_()->getItem('advancedslideshow', $advancedslideshow_id);\r\n\r\n if ($this->getRequest()->isPost() && $this->getRequest()->getPost('confirm') == true) {\r\n\r\n //GET IMAGE ID AND IT'S OBJECT\r\n $image_id = (int) $this->_getParam('image_id');\r\n $image = Engine_Api::_()->getItem('advancedslideshow_image', $image_id);\r\n\r\n if (empty($image)) {\r\n return;\r\n }\r\n\r\n $db = $image->getTable()->getAdapter();\r\n $db->beginTransaction();\r\n\r\n try {\r\n $image->delete();\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n\r\n //@unlink(APPLICATION_PATH . \"/public/advancedslideshow/1000000/1000/5/\" . $image_id . 't.' . $image->extension);\r\n\r\n //GET TOTAL SLIDES COUNT\r\n $total_images = Engine_Api::_()->getDbTable('images', 'advancedslideshow')->getTotalSlides($advancedslideshow_id);\r\n\r\n $start_index = $advancedslideshow->start_index;\r\n\r\n if ($start_index > $total_images - 1) {\r\n if ($total_images != 0) {\r\n $advancedslideshow->start_index = $total_images - 1;\r\n $advancedslideshow->save();\r\n } else {\r\n $advancedslideshow->start_index = 0;\r\n $advancedslideshow->save();\r\n }\r\n }\r\n\r\n $parentRedirect = 'admin/advancedslideshow/slides/manage/advancedslideshow_id/' . $advancedslideshow_id;\r\n $this->_forward('success', 'utility', 'core', array(\r\n 'smoothboxClose' => true,\r\n 'parentRefresh' => 10,\r\n 'parentRedirect' => $parentRedirect,\r\n 'messages' => Zend_Registry::get('Zend_Translate')->_('You have successfully deleted the slide.')\r\n ));\r\n }\r\n }", "function Deletepropertyimage()\n\t{\t\n\t\t\t$imageid=$this->input->post('imageid');\n\t\t\tif(!empty($imageid))\n\t\t\t{\n\t\t\t\t\t/* $imagename = $this->AddProperty_model->Getotherdata('rp_property_images',array('propertyImageID'=>$imageid));\n\t\t\t\t\tif(!empty($imagename)){ \n\t\t\t\t\t$imgName=$imagename[0]->propertyImageName; */\n\t\t\t\t\t$this->AddProperty_model->Deletepropertyimage($this->input->post('imageid'));\n\t\t\t\t\t\n\t\t\t\t\t/* $originalPath = \"/data/homeonline/$this->severname/public/uploads/property/images/original/\".$imgName; \n\t\t\t\t\t$commonThumbPath = \"/data/homeonline/$this->severname/public/uploads/property/images/thumb/\".$imgName;\n\t\t\t\t\t$mediumPath = \"/data/homeonline/$this->severname/public/uploads/property/images/medium/\".$imgName;\n\t\t\t\t\t$lightboxPath = \"/data/homeonline/$this->severname/public/uploads/property/images/lightbox/\".$imgName;\n\t\t\t\t\t\n\t\t\t\t\tif (file_exists($originalPath)){unlink($originalPath);}\n\t\t\t\t\tif (file_exists($commonThumbPath)){unlink($commonThumbPath);}\n\t\t\t\t\tif (file_exists($mediumPath)){unlink($mediumPath);}\n\t\t\t\t\tif (file_exists($lightboxPath)){unlink($lightboxPath);} */\n\t\t\t\t\t\n\t\t\t\t\techo\"Image Deleted Successfully!!\";\n\t\t\t\t\t//}\n\t\t\t}else{\n\t\t\t\t\techo\"Image Deletion Fail!!\";\n\t\t\t}\n\t\t\n\t}", "public function destroy()\r\n {\r\n $data = Input::get();\r\n $rules = array\r\n (\r\n\r\n 'id' => ['required','numeric']\r\n );\r\n $validator = Validator::make($data, $rules);\r\n if ($validator->fails())\r\n {\r\n $message=\"Some thing went wrong..\";\r\n $validation_errors=$validator->messages()->toArray();\r\n return Response::json(array('error' => true,'message' => $message,'validationerror' => $validation_errors),200);\r\n }\r\n else\r\n {\r\n $event_obj = new Newsevent();\r\n $event = $event_obj->find($data['id']);\r\n if(!empty($event))\r\n {\r\n if(file_exists('upload/event/'.$event['photo']))\r\n {\r\n $path=base_path().'/upload/event/'.$event['photo'];\r\n File::delete($path);\r\n }\r\n $event->delete();\r\n $message = \" Sucessfully Deleted..\";\r\n return Response::json(array('error' => false, 'message' => $message), 200);\r\n }\r\n else\r\n {\r\n $message = \"Something Wrong.. \";\r\n return Response::json(array('error' => true, 'message' => $message), 200);\r\n }\r\n }\r\n }", "public function deleteFiles()\r\n {\r\n $fileId = Input::get('FILE');\r\n $file = UploadedFiles::find($fileId);\r\n $path = public_path().'/';\r\n if($file!=null){\r\n $path.=$file->url;\r\n File::delete($path);\r\n $file->delete();\r\n Transaction::createTransaction('','',$file->fileName,'DELETE_FILE','FILE ID: '.$fileId,$file->project_id,'','','','','');\r\n return json_encode($fileId);\r\n }\r\n return \"-1\";\r\n }", "public function delete(){\n $socialMediaId = $this->input->post(\"socialMediaId\");\n $resultSocialMediaDelete = $this->Social_Model->delete($socialMediaId);\n echo json_encode($resultSocialMediaDelete);\n }", "protected function _postdelete($result) {\n }", "public function destroy($id)\n {\n //\n $img = Images::find($id);\n $img->delete();\n return redirect('/image')->with('success', 'Property Image Slider has been deleted');\n }", "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 }", "public function deletephoto()\n\t\t\t{\n\t\t\t\t$photo_details = explode(',', $this->fields_arr['checkbox']);\n\t\t\t\tif($this->fields_arr['action']=='Delete')\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach($photo_details as $photo_key=>$photo_value)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$photo_arr = explode('-',$photo_value);\n\t\t\t\t\t\t\t\t$photo_id = $photo_arr[0];\n\t\t\t\t\t\t\t\t$user_id = $photo_arr[1];\n\t\t\t\t\t\t\t\t$photoHandler = new photoHandler();\n\t\t\t\t\t\t\t\t$photoHandler->deletePhotos(array($photo_id), $user_id);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\telse if($this->fields_arr['action']=='Flag')\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach($photo_details as $photo_key=>$photo_value)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$photo_arr = explode('-',$photo_value);\n\t\t\t\t\t\t\t\t$flag[] = $photo_arr[0];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t$photo_list = implode(',',$flag);\n\n\t\t\t\t\t\t$sql = 'DELETE FROM '.$this->CFG['db']['tbl']['flagged_contents'].' WHERE'.\n\t\t\t\t\t\t\t\t' content_type=\\'photo\\' AND content_id IN('.$photo_list.')';\n\t\t\t\t\t\t$stmt = $this->dbObj->Prepare($sql);\n\t\t\t\t\t\t$rs = $this->dbObj->Execute($stmt);\n\t\t\t\t\t\tif (!$rs)\n\t\t\t\t\t\t\ttrigger_db_error($this->dbObj);\n\n\t\t\t\t\t\t$sql = 'UPDATE '.$this->CFG['db']['tbl']['photo'].' SET flagged_status=\\'Yes\\''.\n\t\t\t\t\t\t\t\t' WHERE photo_id IN('.$photo_list.')';\n\n\t\t\t\t\t\t$stmt = $this->dbObj->Prepare($sql);\n\t\t\t\t\t\t$rs = $this->dbObj->Execute($stmt);\n\t\t\t\t\t\tif (!$rs)\n\t\t\t\t\t\t\ttrigger_db_error($this->dbObj);\n\n\t\t\t\t\t}\n\t\t\t\telse if($this->fields_arr['action']=='UnFlag')\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach($photo_details as $photo_key=>$photo_value)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$photo_arr = explode('-',$photo_value);\n\t\t\t\t\t\t\t\t$flag[] = $photo_arr[0];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t$photo_list = implode(',',$flag);\n\n\t\t\t\t\t\t$sql = 'DELETE FROM '.$this->CFG['db']['tbl']['flagged_contents'].' WHERE'.\n\t\t\t\t\t\t\t\t' content_type=\\'photo\\' AND content_id IN('.$photo_list.')';\n\n\t\t\t\t\t\t$stmt = $this->dbObj->Prepare($sql);\n\t\t\t\t\t\t$rs = $this->dbObj->Execute($stmt);\n\t\t\t\t\t\tif (!$rs)\n\t\t\t\t\t\t\ttrigger_db_error($this->dbObj);\n\n\t\t\t\t\t\t$sql = 'UPDATE '.$this->CFG['db']['tbl']['photo'].' SET flagged_status=\\'No\\''.\n\t\t\t\t\t\t\t\t' WHERE photo_id IN('.$photo_list.')';\n\n\t\t\t\t\t\t$stmt = $this->dbObj->Prepare($sql);\n\t\t\t\t\t\t$rs = $this->dbObj->Execute($stmt);\n\t\t\t\t\t\tif (!$rs)\n\t\t\t\t\t\t\ttrigger_db_error($this->dbObj);\n\t\t\t\t\t}\n\t\t\t\telse if($this->fields_arr['action']=='Featured')\n\t\t\t\t\t{\n\n\t\t\t\t\t\tforeach($photo_details as $photo_key=>$photo_value)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$photo_arr = explode('-',$photo_value);\n\t\t\t\t\t\t\t\t$flag[] = $photo_arr[0];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t$photo_list = implode(',',$flag);\n\t\t\t\t\t\t$sql = 'UPDATE '.$this->CFG['db']['tbl']['photo'].' SET featured=\\'Yes\\''.\n\t\t\t\t\t\t\t\t' WHERE photo_id IN('.$photo_list.')';\n\t\t\t\t\t\t$stmt = $this->dbObj->Prepare($sql);\n\t\t\t\t\t\t$rs = $this->dbObj->Execute($stmt);\n\t\t\t\t\t\tif (!$rs)\n\t\t\t\t\t\t\ttrigger_db_error($this->dbObj);\n\t\t\t\t\t}\n\t\t\t\telse if($this->fields_arr['action']=='UnFeatured')\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach($photo_details as $photo_key=>$photo_value)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$photo_arr = explode('-',$photo_value);\n\t\t\t\t\t\t\t\t$flag[] = $photo_arr[0];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t$photo_list = implode(',',$flag);\n\n\t\t\t\t\t\t$sql = 'UPDATE '.$this->CFG['db']['tbl']['photo'].' SET featured=\\'No\\''.\n\t\t\t\t\t\t\t\t' WHERE photo_id IN('.$photo_list.')';\n\n\t\t\t\t\t\t$stmt = $this->dbObj->Prepare($sql);\n\t\t\t\t\t\t$rs = $this->dbObj->Execute($stmt);\n\t\t\t\t\t\tif (!$rs)\n\t\t\t\t\t\t\ttrigger_db_error($this->dbObj);\n\t\t\t\t\t}\n\t\t\t\telse if($this->fields_arr['action']=='Move')\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach($photo_details as $photo_key=>$photo_value)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$photo_arr = explode('-',$photo_value);\n\t\t\t\t\t\t\t\t$flag[] = $photo_arr[0];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t$photo_list = implode(',',$flag);\n\n\t\t\t\t\t\tif($parent_id=$this->isParentExists($this->fields_arr['photo_categories']))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$sql = 'UPDATE '.$this->CFG['db']['tbl']['photo'].' SET '.\n\t\t\t\t\t\t\t\t\t\t' photo_category_id= \\''.$parent_id.'\\', '.\n\t\t\t\t\t\t\t\t\t\t' photo_sub_category_id = \\''.$this->fields_arr['photo_categories'].'\\' '.\n\t\t\t\t\t\t\t\t\t\t' WHERE photo_id IN('.$photo_list.')';\n\n\t\t\t\t\t\t\t\t$stmt = $this->dbObj->Prepare($sql);\n\t\t\t\t\t\t\t\t$rs = $this->dbObj->Execute($stmt);\n\t\t\t\t\t\t\t\tif (!$rs)\n\t\t\t\t\t\t\t\t\ttrigger_db_error($this->dbObj);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$sql = 'UPDATE '.$this->CFG['db']['tbl']['photo'].' SET '.\n\t\t\t\t\t\t\t\t\t\t' photo_sub_category_id=0, photo_category_id='.$this->dbObj->Param('photo_categories').\n\t\t\t\t\t\t\t\t\t\t' WHERE photo_id IN('.$photo_list.')';\n\n\t\t\t\t\t\t\t\t$stmt = $this->dbObj->Prepare($sql);\n\t\t\t\t\t\t\t\t$rs = $this->dbObj->Execute($stmt, array($this->fields_arr['photo_categories']));\n\t\t\t\t\t\t\t\tif (!$rs)\n\t\t\t\t\t\t\t\t\ttrigger_db_error($this->dbObj);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}", "public function destroy($id)\n {\n $input = $this->request;\n\n $id = explode(\",\",$id);\n // dd($id);\n if(in_array(1,$id)) {\n return \\Response::json(array(\"status\"=>400,\"msg\"=>\"You can't perform this action. Please provide valid id of user you want to delete.\",\"result\"=>array()));\n }\n\n $data = User::whereIn('id',$id);\n if(count($data->get()) == 0) {\n return \\Response::json(array(\"status\"=>400,\"msg\"=>\"No users found.\",\"result\"=>array()));\n }\n try {\n $for_delete = $data->get();\n $result = aid($data,$input);\n $json = json_decode($result->getContent(),true);\n if($json[\"status\"] == 200) {\n if($input[\"type\"] == 'Delete') {\n\n foreach ($for_delete as $u) :\n if(isset($u->profile_pic) && !empty($u->profile_pic)) {\n unlink(public_path($u->profile_pic));\n }\n\n endforeach;\n }\n }\n return $result;\n } catch ( \\Illuminate\\Database\\QueryException $ex) {\n $msg = $ex->getMessage();\n if(isset($ex->errorInfo[2])) {\n $msg = $ex->errorInfo[2];\n }\n $arr = array(\"status\" => 400, \"msg\" =>$msg, \"result\" => array());\n } catch (Exception $ex) {\n $msg = $ex->getMessage();\n if(isset($ex->errorInfo[2])) {\n $msg = $ex->errorInfo[2];\n }\n $arr = array(\"status\" => 400, \"msg\" =>$msg, \"result\" => array());\n }\n return \\Response::json($arr);\n}", "function delete_photo($FormID) {\r\n $conn = db_connect();\r\n\r\n $query = \"delete from PortfolioPictures\r\n where PictureURL='\".$FormID.\"'\";\r\n $result = @$conn->query($query);\r\n if (!$result) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n}", "public function delete_gallery($id)\n {\n echo json_encode(true);\n }", "public function deletePhoto($photoId){\n $photos = DB::select('select * from photos where photo_id = ?', array($photoId));\n if($photos){\n File::delete($photos[0]->photo_destination_url);\n\n UserAction::add('Photo \"' . ($photos[0]->photo_name) . '\" was deleted');\n\n DB::table('photos')->where('photo_id', $photoId)->delete();\n }\n return \"Deleted\";\n }", "public function getDelete()\n {\n $name_to_delete = Request::get('items');\n\n $file_path = parent::getPath('directory');\n\n $file_to_delete = $file_path . $name_to_delete;\n $thumb_to_delete = parent::getPath('thumb') . $name_to_delete;\n\n if(!$this->storage->exists($file_to_delete)) {\n return $file_to_delete . ' not found!';\n }\n\n if(is_dir($this->storage->path($file_to_delete))) {\n if(sizeof($this->storage->files($file_to_delete)) != 0) {\n return Lang::get('laravel-filemanager::lfm.error-delete');\n }\n\n $this->storage->deleteDirectory($file_to_delete);\n\n return 'OK';\n }\n\n $this->storage->delete($file_to_delete);\n event(new ImageWasDeleted($file_to_delete));\n\n if('Images' === $this->file_type) {\n $this->storage->delete($thumb_to_delete);\n }\n\n return 'OK';\n }", "public function destroy($id)\n {\n //\n Picture::destroy($id);\n return response()->json(array(\"success\" => 1, \"redirect\" => '/admin'), 200);\n }", "public function actionAjaxDeleteHtUse()\n {\n \t $id=$_REQUEST['id'];\n\t $detail=HtuseHome::model()->findByAttributes(array('id'=>$id));\n\t unlink(Yii::app()->basePath.'/../HowToUseImages/'. $detail->image);\n\t \t //echo \"<pre>\";print_r($detail);die;\n\t \t $detail->delete();\n\t \t echo \"success\";\n }", "public static function delete_photo($id){\n global $db;\n $row = static::find_photo($id);\n $k78sql = \"DELETE FROM photos WHERE photo_id = '\".$id.\"'\";\n try {\n //check if photo is present in database\n if($db->query($sql)){\n //$row = static::find_photo($id);\n //deletes file in image path\n unlink(IMG_PATH.DS.$row['file_name']);\n //deleting photo from database table\n $db->exec($sql);\n return 'Photo with ID '.$id.' deleted from DB';\n }else{\n throw new Exception(\"File could not be deleteed\");\n }\n } catch (Exception $e) {\n return $e;\n }\n }", "public function delete_all_photos() {\r\n return Foto::where('albums_id', '=', $this->id)->delete();\r\n }", "public function deletePhoto($id)\n {\n return DB::table('photos')->where(['photos_id' => $id])->delete();\n }", "public function delete() {\n\n $input_data = $this->request->getJsonRawBody();\n $id = isset($input_data->id) ? $input_data->id : '';\n if (empty($id)):\n return $this->response->setJsonContent(['status' => false, 'message' => 'Id is null']);\n else:\n $kidphysical_delete = NidaraKidPhysicalInfo::findFirstByid($id);\n if ($kidphysical_delete):\n if ($kidphysical_delete->delete()):\n return $this->response->setJsonContent(['status' => true, 'Message' => 'Record has been deleted succefully ']);\n else:\n return $this->response->setJsonContent(['status' => false, 'Message' => 'Data could not be deleted']);\n endif;\n else:\n return $this->response->setJsonContent(['status' => false, 'Message' => 'ID doesn\\'t']);\n endif;\n endif;\n }", "public function destroy(Request $request)\n\t{\n\t\t$id = $request->id;\n\n\t\t$image = Ot_Images::where('id', $id)->first();\n\t\t$image_url = $image->image_url;\n\t\t$image_path = 'uploads/images/' . $image_url;\n\t\t$image_thumb_path = 'uploads/images/thumb/' . $image_url;\n\n\t\t$row = DB::table(\"images\")\n\t\t\t->where('id', $id)\n\t\t\t->where('created_by', '=', Auth::user()->name)\n\t\t\t->whereNull('tour_id')->delete();\n\n\t\tif ($row > 0) {\n\t\t\tif (File::exists($image_path)) {\n\t\t\t\tFile::delete($image_path);\n\t\t\t}\n\t\t\tif (File::exists($image_thumb_path)) {\n\t\t\t\tFile::delete($image_thumb_path);\n\t\t\t}\n\t\t}\n\n\t\treturn response()->json(['success' => \"360 Images deleted.\", 'row' => $row]);\n\t}", "public function destroy($id)\n {\n $item = PhotoGallary::find($id);\n $item->delete();\n\n //delete image\n $image_path = \"uploads/photogallary/\".$item->image; // Value is not URL but directory file path\n if(File::exists($image_path)) {\n // dd($image_path);\n File::delete($image_path);\n }\n\n $item = PhotoGallary::get();\n return redirect()->route('photoGallary.index')->with('message','Photo Successfully Deleted');\n }", "function delete_file()\n{\n\n if (isset($_POST['attachment_id']) \n && isset($_POST['woa-secudeal-nonce'])\n && wp_verify_nonce($_POST['woa-secudeal-nonce'], 'woa_secudeal_ajax_nonce')\n ) {\n $attachment_id = absint($_POST['attachment_id']);\n\n $result = wp_delete_attachment($attachment_id, true); // permanently delete attachment\n\n if ($result) {\n wp_send_json(array('status' => 'ok'));\n }\n }\n wp_send_json(array('status' => 'error'));\n}", "public function destroy(Gallery $gallery)\n : RedirectResponse {\n// Delete images\n $image = public_path() . '/uploads/images/gallery/' . $gallery->image;\n unlink($image);\n $gallery->delete();\n return redirect()->back();\n }", "public function DeleteSupplier($id){\n\n $delete=DB::table('suppliers')\n ->where('id',$id)\n ->first();\n $photo=$delete->photo;\n unlink($photo);\n $dltuser=DB::table('suppliers')\n ->where('id',$id)\n ->delete(); \n\n return Redirect()->route('all.supplier')->with('message','Deleted Successfully.');\n\n \n}", "public function deletePhoto(Image $image)\n {\n $image->moveToTrash();\n\n return $this->successResponse();\n }", "public function deleteSearchImageAsync($request) \n {\n $returnType = '';\n $isBinary = true;\n $hasReturnType = false;\n $request = $this->getHttpRequest($request, 'DELETE');\n $options = $this->createHttpClientOptions();\n\n return $this->client\n ->sendAsync($request, $options)\n ->then(\n function ($response) use ($request, $hasReturnType, $returnType, $isBinary) {\n return $this->processResponse($request, $response, $hasReturnType, $returnType, $isBinary);\n },\n function ($exception) use ($request) {\n $this->processException($exception);\n }\n );\n }", "public function deletePhotos(ProfileRequest $request)\n {\n $id = Auth::user()->id;\n\n $delete = $request->all();\n\n DB::table('uploaded_photos')\n ->where('userID', '=', $id)\n ->where('photo','=',$delete['delP'])\n ->delete();\n\n File::delete('Uploaded_photos/' . Auth::user()->id . '/' . $request->$delete['delP']);\n\n $image=DB::table('uploaded_photos')\n ->where('userID','=',$id)\n ->get();\n\n return view('ajax.LoadPhotos')->with('image',$image);\n\n }", "public function destroy($id)\n {\n $action = new Action();\n try {\n $galleryModel = new GalleryModel();\n $action->writeAction(\"Post successfuly deleted!\");\n $galleryModel->delete($id);\n $All = $galleryModel->getAllGallery();\n return Json::encode($All);\n }catch (QueryException $exception){\n return response(['message' => $exception->getMessage()],404);\n }\n }", "function del_images_object($obj_type, $obj_id)\n{\n $rows = db()->query('SELECT img_id FROM object_images WHERE obj_type = \"' . strtok($obj_type, \" \") .\n '\" AND obj_id = ' . (int)$obj_id);\n if (!$rows)\n return false;\n\n foreach ($rows as $row)\n delete_image($row['img_id']);\n\n db()->query('DELETE FROM object_images WHERE obj_type = \"' . strtok($obj_type, \" \") .\n '\" AND obj_id = ' . (int)$obj_id);\n\n return true;\n}", "public function delete_file()\n {\n if(Module::hasAccess(\"Uploads\", \"delete\")) {\n\t\t\t$file_id = Input::get('file_id');\n\t\t\t\n\t\t\t$upload = Upload::find($file_id);\n\t\t\tif(isset($upload->id)) {\n\t\t\t\tif($upload->user_id == Auth::user()->id || Entrust::hasRole('SUPER_ADMIN')) {\n\t\n\t\t\t\t\t// Update Caption\n\t\t\t\t\t$upload->delete();\n\t\n\t\t\t\t\treturn response()->json([\n\t\t\t\t\t\t'status' => \"success\"\n\t\t\t\t\t]);\n\t\n\t\t\t\t} else {\n\t\t\t\t\treturn response()->json([\n\t\t\t\t\t\t'status' => \"failure\",\n\t\t\t\t\t\t'message' => \"Unauthorized Access 1\"\n\t\t\t\t\t]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn response()->json([\n\t\t\t\t\t'status' => \"failure\",\n\t\t\t\t\t'message' => \"Upload not found\"\n\t\t\t\t]);\n\t\t\t}\n\t\t} else {\n\t\t\treturn response()->json([\n\t\t\t\t'status' => \"failure\",\n\t\t\t\t'message' => \"Unauthorized Access\"\n\t\t\t]);\n\t\t}\n }", "public function delete_file()\n {\n if(Module::hasAccess(\"Uploads\", \"delete\")) {\n\t\t\t$file_id = Input::get('file_id');\n\t\t\t\n\t\t\t$upload = Upload::find($file_id);\n\t\t\tif(isset($upload->id)) {\n\t\t\t\tif($upload->user_id == Auth::user()->id || Entrust::hasRole('SUPER_ADMIN')) {\n\t\n\t\t\t\t\t// Update Caption\n\t\t\t\t\t$upload->delete();\n\t\n\t\t\t\t\treturn response()->json([\n\t\t\t\t\t\t'status' => \"success\"\n\t\t\t\t\t]);\n\t\n\t\t\t\t} else {\n\t\t\t\t\treturn response()->json([\n\t\t\t\t\t\t'status' => \"failure\",\n\t\t\t\t\t\t'message' => \"Unauthorized Access 1\"\n\t\t\t\t\t]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn response()->json([\n\t\t\t\t\t'status' => \"failure\",\n\t\t\t\t\t'message' => \"Upload not found\"\n\t\t\t\t]);\n\t\t\t}\n\t\t} else {\n\t\t\treturn response()->json([\n\t\t\t\t'status' => \"failure\",\n\t\t\t\t'message' => \"Unauthorized Access\"\n\t\t\t]);\n\t\t}\n }", "public function destroy($id)\n { \n $image = BusDetail::where('bus_id', $id)->get();\n \n foreach($image as $data)\n {\n unlink(public_path('images/').'/'.str_replace('\"','',$data->foto));\n }\n $post = Bus::where('id', $id)->delete();\n\n BusDetail::where('bus_id', $id)->delete();\n return response()->json($post);\n }", "function cleanTrash() {\n\t\t$result = $this->select(\"logo_url\", \"status=2\");\n\t\tif ($result)\n\t\tforeach ($result as $image){\n\t\t\tunlink(ROOT_PATH.\"gallery/avatar_upload/flash/storage/\".$image['logo_url']);\n\t\t}\n\t\t$results = $this->delete(\"status=2\");\n\t\tif ($results)\n\t\t\treturn 1;\n\t\treturn 0;\n\t}", "public function deleteAction()\n {\n \t$this->_helper->getHelper('ViewRenderer')->setNoRender(true);\n \t\n \t// Récuperation de l'ID photo\n\t\t$id = (is_numeric($this->_getParam('id'))) ? $this->_getParam('id') : 0;\n\t\t\n\t\t// Récuperation de la photo\n\t\t$photoMapper = new Application_Model_PhotoMapper();\n\t\t$photo = $photoMapper->getPhoto($id);\n\t\t\n\t\tif(!is_null($photo))\n\t\t{\n\t\t\t// Suppression de la photo\n\t\t\t$rowsDeleted = $photoMapper->deletePhoto($id);\n\t\t\n\t\t\t// Message\n\t\t\t$message = $rowsDeleted.' photo supprimée';\n\t\t\t$this->_helper->getHelper('FlashMessenger')->addMessage($message);\n\t\t\t\n\t\t\t// Redirection\n\t\t\t$this->_helper->getHelper('Redirector')->gotoSimple('edit', 'project', 'admin', array('id' => $photo->getIdProjet()));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_helper->getHelper('Redirector')->gotoSimple('list', 'project', 'admin');\n\t\t}\n }", "public function deleteImage($file) {\r\n if (file_exists(FCPATH . 'public/upload/' . $file))\r\n $success = unlink(FCPATH . 'public/upload/' . $file);\r\n //$success = unlink(FCPATH . 'public/upload/' . $file);\r\n //info to see if it is doing what it is supposed to\r\n $info = new StdClass;\r\n $info->sucess = $success;\r\n $info->path = base_url() . 'public/upload/' . $file;\r\n $info->file = is_file(FCPATH . 'public/upload/' . $file);\r\n\r\n if (IS_AJAX) {\r\n //I don't think it matters if this is set but good for error checking in the console/firebug\r\n echo json_encode(array($info));\r\n } else {\r\n //here you will need to decide what you want to show for a successful delete \r\n $file_data['delete_data'] = $file;\r\n //$this->load->view('admin/delete_success', $file_data);\r\n }\r\n }", "public function testDeleteSuccess()\n {\n $mock_response = new MockHttpResponse(200);\n\n $stub_http_client = $this->createMock(\\GuzzleHttp\\Client::class);\n $stub_http_client->method('request')\n ->willReturn($mock_response);\n\n $client = new FilestackClient(\n $this->test_api_key,\n $this->test_security,\n $stub_http_client\n );\n\n $test_handle = 'gQNI9RF1SG2nRmvmQDMU';\n $result = $client->delete($test_handle);\n\n $this->assertTrue($result);\n }", "public function covers_delete(): void\n {\n $response = $this->check_request('Delete cover');\n if (!$response) {\n $cover = input_request('cover');\n $result = unlink(folder_covers() . $cover);\n if ($result) {\n $response = $this->get_response(false, 'Cover removed');\n $this->log_info(\"Cover remove \\\"$cover\\\"\");\n } else {\n $response = $this->get_response(true, 'Delete failed');\n $this->log_error(\"Cover remove \\\"$cover\\\" FAILED\");\n }\n }\n exit(json_encode($response));\n }", "public function destroy($id)\n {\n $noticia=Noticia::findOrFail($id);\n if($noticia->imagen!=\"1.jpg\"){\n unlink($noticia->directorio);\n }\n $noticia->delete();\n return response()->json([\"success\"=>\"Noticia borrada\"]);\n }", "public function destroy($id)\n {\n $image = Image::find($id);\n Storage::delete($image->path);\n $image->delete();\n return response()->json((['message' => 'Delete image successfully']), 200);\n }", "public function actionDelete()\n {\n if (Yii::$app->user->can('imagedelete')) {\n if (Yii::$app->request->isAjax) {\n $system = new Filesystem();\n $param = Yii::$app->request->post();\n $model = $this->findModel($param['id']);\n $system->remove($this->original . $model->unique_name);\n $system->remove($this->thumb_145x145 . $model->unique_name);\n $system->remove($this->thumb_original . $model->unique_name);\n $system->remove($this->thumb_191x128 . $model->unique_name);\n $model->delete();\n }\n } else {\n throw new HttpException(403, 'You are not allowed to access this page', 0);\n }\n }", "public function remove_company_logo()\n {\n if ($this->input->is_ajax_request()) {\n $company_logo_deleted = unlink(COMPANY_FILES . '/' . get_option('company_logo'));\n if ($company_logo_deleted) {\n $this->db->where('name', 'company_logo');\n $this->db->update(OPTIONS_TABLE, array(\n 'value' => ''\n ));\n if ($this->db->affected_rows() > 0) {\n echo json_encode(array(\n 'success' => true\n ));\n exit;\n }\n }\n }\n }", "public function test_can_delete_a_media()\n { \n $data =$this->mediaDataHelper(); \n $response = $this->postJson('v1/media', $data);\n $media = Media::first();\n \n $response = $this->json('DELETE', 'v1/media/'.$media->id); \n $response->assertStatus(200)\n ->assertJson([\n 'success' => true,\n ]); \n }", "abstract public static function deleted($callback);", "function rest_delete_data($url, $data)\n{\n if (is_array($data)) {\n $data = json_encode($data);\n }\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $result = curl_exec($ch);\n curl_close($ch);\n return $result;\n}", "protected function _postDelete() {}", "protected function _postDelete() {}", "public static function deleteImage(){}" ]
[ "0.66654944", "0.6664268", "0.64997065", "0.64413315", "0.6407811", "0.62276196", "0.62003267", "0.6162665", "0.6128029", "0.6125796", "0.60897624", "0.60713035", "0.6058961", "0.59991664", "0.5987356", "0.5982436", "0.5976687", "0.5953793", "0.59520704", "0.59408665", "0.58989173", "0.58931637", "0.5890568", "0.58795613", "0.5855018", "0.5846017", "0.5844278", "0.5833343", "0.58221537", "0.58179355", "0.5810972", "0.5807663", "0.5802679", "0.5798112", "0.5795439", "0.57935804", "0.5779945", "0.57716465", "0.57606566", "0.57553947", "0.5752117", "0.57323414", "0.57208806", "0.5705933", "0.5701518", "0.5701313", "0.570014", "0.569813", "0.56965166", "0.5683283", "0.5679023", "0.5677261", "0.567305", "0.566526", "0.566457", "0.5655765", "0.56406885", "0.56310874", "0.5627257", "0.5624874", "0.56194353", "0.5610219", "0.560933", "0.5607333", "0.5602329", "0.5601551", "0.56012565", "0.5597302", "0.55969995", "0.5594806", "0.55946434", "0.55814546", "0.55774313", "0.55745745", "0.5570987", "0.5570146", "0.5565992", "0.5563489", "0.55551225", "0.555508", "0.5549583", "0.5543503", "0.55386716", "0.55386716", "0.5530037", "0.5528099", "0.5527966", "0.55265844", "0.55260587", "0.55244344", "0.552259", "0.5519276", "0.55188555", "0.55057985", "0.54990566", "0.54989696", "0.5497572", "0.5495036", "0.54941386", "0.5488858" ]
0.6157899
8
method for updating property location data a form will actually be submitted to this route
public function updateLocation(Request $request) { // Log::info($request->all()); //validate $validator = Validator::make($request->all(), [ 'property_id' => "required", 'street_address' => 'required', 'street_number' => 'required', 'city' => 'required', 'region' => 'required', "country" => "required", "postal_code" => "required" ], [ "property_id.required" => "Invalid Request, Incomplete Parameter" ])->validate(); $property = Property::find($request->property_id); if(is_null($property)) { return redirect()->back()->with("error", "Property Not Found"); } $property->street_address = $request->street_address; $property->street_number = $request->street_number; $property->city = $request->city; $property->region = $request->region; $property->country = $request->country; $property->postal_code = $request->postal_code; $property->save(); return redirect()->back()->with("success", "Property Location Updated Successfully"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updatelocationAction()\n {\n $userInfo = new UserInfo($_POST);\n if ($userInfo->hasIPUpdated())\n {\n $userInfo->saveIP();\n $userInfo->findLocationFromIP();\n $userInfo->saveLocation();\n }\n }", "public function editLocationAction() {\n\n //USER VALIDATION\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n $this->view->resource_type = $resource_type = $this->_getParam('resource_type');\n\n switch ($resource_type) {\n case 'group':\n $resource_id = 'group_id';\n break;\n\n case 'event':\n $resource_id = 'event_id';\n break;\n case 'user':\n $resource_id = 'user_id';\n break;\n }\n\n $this->view->resource_id = $resource_id = $this->_getParam($resource_id);\n $this->view->seao_locationid = $seao_locationid = $this->_getParam('seao_locationid');\n $this->view->resource = $resource = Engine_Api::_()->getItem($resource_type, $resource_id);\n $viewer = Engine_Api::_()->user()->getViewer();\n\n if ($viewer->getIdentity() != $resource->user_id) {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n $value['id'] = $seao_locationid;\n $this->view->location = $location = Engine_Api::_()->getDbtable('locationitems', 'seaocore')->getLocations($value);\n\n //Get form\n if (!empty($location)) {\n\n $this->view->form = $form = new Seaocore_Form_Location(array(\n 'item' => $resource,\n 'location' => $location->location\n ));\n\n if (!$this->getRequest()->isPost()) {\n $form->populate($location->toarray()\n );\n return;\n }\n\n //FORM VALIDAITON\n if (!$form->isValid($this->getRequest()->getPost())) {\n return;\n }\n\n //FORM VALIDAITON\n if ($form->isValid($this->getRequest()->getPost())) {\n\n $values = $form->getValues();\n unset($values['submit']);\n unset($values['location']);\n\n $seLocationsTable = Engine_Api::_()->getDbtable('locationitems', 'seaocore');\n $seLocationsTable->update($values, array('locationitem_id =?' => $seao_locationid));\n }\n $form->addNotice(Zend_Registry::get('Zend_Translate')->_('Your changes have been saved.'));\n }\n $this->view->location = Engine_Api::_()->getDbtable('locationitems', 'seaocore')->getLocations($value);\n }", "public function update(Request $request, Location $location)\n {\n //\n }", "abstract public function update(Request $request, Location $location): JsonResponse;", "public function update(Request $request, Location $location)\n {\n\n $validator = Validator::make($request->all(), [\n 'name' => 'required|max:50',\n 'description' => 'required|max:2000',\n 'address' => 'required',\n 'working_hours' => 'required'\n ]);\n\n if ($validator->fails()) {\n return back()->withErrors($validator)->withInput();\n }\n\n $location->fill($request->except(['_token','_method']));\n $location->save();\n\n return redirect()->route('locations.show',['location' => $location]);\n }", "public function update(Property $property)\n {\n //$this->authorize('update-property', $property);\n if(Gate::denies('update-property',$property)) {\n return redirect(\"property\")->with([\n 'status' => 'success',\n 'flash_message' => 'You are not authorized to update this property',\n ]);\n }\n // dd($request);\n //$input = $this->requestValidate();\n //dd($input);\n //$input['user_id'] = auth()->user()->id;\n //$input['slug'] = strtolower(preg_replace('/\\s+/', '-', $request->title));\n //$property = auth()->user()->create($input);\n //$property->tags()->attach($request->input('tag_list'));\n // //$property->location()->attach($request->input('plocation'));\n // if(! request()->cover_image){\n // request()->cover_image = 'property/defaultproperty.png';\n // }\n try {\n $property->update($this->requestValidate() + ['slug' => strtolower(preg_replace('/\\s+/', '-', request()->title)),'cover_image' => request()->cover_image]);\n $this->updateImage($property,'property');\n $property->tags()->sync(request()->get('tag_list'));\n\n return redirect(\"property\")->with([\n 'status' => 'success',\n 'flash_message' => $property->title.' was published successfully',\n ]);\n } catch (Exception $e) {\n return redirect()->route('property.index')->with([\n 'status' => 'danger',\n 'flash_message' => $e->getMessage(),\n ]);\n }\n }", "public function update(Request $request, location $location)\n {\n //\n }", "public function save(Request $request) {\n $saveTarget = $request->get('save');\n $closed = false;\n\n if (! $saveTarget) {\n $closed = true;\n }\n\n $id = null;\n\n if ($request->get('_edit')) {\n $id = $request->get('id');\n $redirect = 'admin/property/edit/' . $request->get('id');\n }\n\n /** Form request */\n $this->validations = Validator::make($request->all(), Property::validationRule($id), Property::validationMessage());\n\n if ($this->validations->fails()) {\n return redirect($redirect)->withErrors($this->validations->errors())->withInput();\n }\n\n if ($id) {\n $this->model = Property::findOrFail($request->get('id'));\n }\n\n $lat = $request->get('lat');\n $lng = $request->get('lng');\n\n $this->model->name = $request->get('name');\n $this->model->description = $request->get('description');\n $this->model->property_type_id = $request->get('property_type_id');\n\n if ($lat && $lat) {\n $this->model->gps = $lat . ',' . $lng;\n }\n\n $this->model->save();\n\n $redirect = 'admin/property';\n $redirect = $closed ? $redirect : $redirect . '/new';\n\n return redirect($redirect)->with('success', trans('validation.success'));\n }", "public function update(Location $location, LocationsRequest $locationRequest)\n {\n $location->update($locationRequest->all());\n return redirect()->route('backend.dashboard');\n\n }", "public function setLocation()\n\t{\n\t\t$form=$this->createForm();\n\n\t\tif($form->isValid()){\n\t\t\t$data=$form->getData();\n\n\t\t\t$this->getUser()->setLocation($this->cast('Mapper\\Location',$data['location']));\n\t\t\t$this->flush();\n\t\t\t$response=new Response();\n\t\t\t$response->redirect('/');\n\t\t\treturn $response;\n\t\t}\n\t\treturn compact('form');\n\t}", "function updateLocation($data) {\r\n\r\n\t\t$this->query('UPDATE locations SET `modified` = CURRENT_TIMESTAMP(), `name` = \"'. $data['name'] .'\" WHERE id = '. $data['id'] .';');\r\n\r\n\t}", "public function updateLocation(){\n $location = location::where('id','=','')->first();\n if (!$location){\n dump(\"location could not be updated\");\n }\n else{\n $location->location_name='';\n $location->country='';\n $location->external_code='';\n }\n }", "public function update(Request $request, Property $property)\n {\n //\n }", "public function update(Request $request, Property $property)\n {\n //\n }", "public function update(Request $request, Property $property)\n {\n //\n }", "public function update(locationRequest $request,$id){\n\n\t\t\t$location=Location::find($id);\n\n\t\t\t$location->slug=$request->input('slug');\n\t\t\t$location->designation=$request->input('designation');\n\t\t\t$location->address=$request->input('address');\n\t\t\t$location->locality_id=$request->input('locality_id');\n\t\t\t$location->website=$request->input('website');\n\t\t\t$location->phone=$request->input('phone');\n\t\t\n\n $location->save();\n return redirect('locations');\n\n }", "public function update() {\n $updateData = $this->data;\n $model = new ReferralModel;\n $ref = $model->findOne($updateData['id']);\n if ($ref) {\n $ref->set($updateData);\n $keepNullFields = [\n 'route_id', 'estimator_id', 'date_requested',\n 'date_service', 'class_id', 'lat', 'lng'\n ];\n foreach ($keepNullFields as $field) {\n if (!$updateData[$field]) {\n $ref->set($field, null);\n }\n }\n $ref->save();\n $this->renderJson([\n 'success' => true,\n 'message' => 'Job request updated successfully',\n 'data' => $ref->asArray()\n ]);\n } else {\n http_response_code(404);\n $this->renderJson([\n 'success' => false,\n 'message' => 'Resource not found'\n ]);\n }\n }", "public function save() {\n\t\t\t\n\t\t\t$entityID = '';\n\t\t\tif ( isset( $_REQUEST['_wpnonce'] ) ) {\n\t\t\t\t$nonce = sanitize_text_field( wp_unslash( $_REQUEST['_wpnonce'] ) ); }\n\n\t\t\tif ( isset( $nonce ) and ! wp_verify_nonce( $nonce, 'wpgmp-nonce' ) ) {\n\n\t\t\t\tdie( 'Cheating...' );\n\n\t\t\t}\n\n\t\t\t$this->verify( $_POST );\n\n\t\t\tif ( is_array( $this->errors ) and ! empty( $this->errors ) ) {\n\t\t\t\t$this->throw_errors();\n\t\t\t}\n\n\t\t\tif ( isset( $_POST['entityID'] ) ) {\n\t\t\t\t$entityID = intval( wp_unslash( $_POST['entityID'] ) );\n\t\t\t}\n\n\t\t\tif ( isset( $_POST['location_messages'] ) ) {\n\t\t\t\t$data['location_messages'] = wp_unslash( $_POST['location_messages'] );\n\t\t\t}\n\t\t\t$data['location_settings'] = serialize( wp_unslash( $_POST['location_settings'] ) );\n\t\t\t$data['location_group_map'] = serialize( wp_unslash( $_POST['location_group_map'] ) );\n\t\t\t$extra_fields = wp_unslash( $_POST['location_extrafields'] );\n\t\t\tif ( isset( $extra_fields ) ) {\n\t\t\t\tforeach ( $extra_fields['key'] as $i => $v ) {\n\t\t\t\t\tif ( sanitize_text_field( $v ) == '' ) {\n\t\t\t\t\t\tunset( $extra_fields['key'][ $i ] );\n\t\t\t\t\t\tunset( $extra_fields['value'][ $i ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$data['location_extrafields'] = serialize( wp_unslash( $extra_fields ) );\n\t\t\t$data['location_title'] \t\t= sanitize_text_field( wp_unslash( $_POST['location_title'] ) );\n\t\t\t$data['location_address'] \t\t= sanitize_text_field( wp_unslash( $_POST['location_address'] ) );\n\t\t\t$data['location_latitude'] \t\t= sanitize_text_field( wp_unslash( $_POST['location_latitude'] ) );\n\t\t\t$data['location_longitude'] \t= sanitize_text_field( wp_unslash( $_POST['location_longitude'] ) );\n\t\t\t$data['location_city'] \t\t\t= sanitize_text_field( wp_unslash( $_POST['location_city'] ) );\n\t\t\t$data['location_state'] \t\t= sanitize_text_field( wp_unslash( $_POST['location_state'] ) );\n\t\t\t$data['location_country'] \t\t= sanitize_text_field( wp_unslash( $_POST['location_country'] ) );\n\t\t\t$data['location_postal_code'] \t= sanitize_text_field( wp_unslash( $_POST['location_postal_code'] ) );\n\t\t\t$data['location_zoom'] \t\t= intval( wp_unslash( $_POST['location_zoom'] ) );\n\t\t\t$data['location_draggable'] \t= sanitize_text_field( wp_unslash( $_POST['location_draggable'] ) );\n\t\t\t$data['location_infowindow_default_open'] = sanitize_text_field( wp_unslash( $_POST['location_infowindow_default_open'] ) );\n\t\t\t$data['location_animation'] \t= sanitize_text_field( wp_unslash( $_POST['location_animation'] ) );\n\n\t\t\tif ( $entityID > 0 ) {\n\t\t\t\t$where[ $this->unique ] = $entityID;\n\t\t\t} else {\n\t\t\t\t$where = '';\n\t\t\t}\n\n\t\t\t$result = WPGMP_Database::insert_or_update( $this->table, $data, $where );\n\n\t\t\tif ( false === $result ) {\n\t\t\t\t$response['error'] = __( 'Something went wrong. Please try again.',WPGMP_TEXT_DOMAIN );\n\t\t\t} elseif ( $entityID > 0 ) {\n\t\t\t\t$response['success'] = __( 'Location updated successfully',WPGMP_TEXT_DOMAIN );\n\t\t\t} else {\n\t\t\t\t$response['success'] = __( 'Location added successfully.',WPGMP_TEXT_DOMAIN );\n\t\t\t}\n\t\t\treturn $response;\n\t\t}", "public function updateBasicDetails(Request $request) {\n\n //validate\n $validator = Validator::make($request->all(), [\n 'property_id' => \"required\",\n 'title' => 'required',\n 'description' => \"required\",\n 'type_id' => \"required\",\n \"state_id\" => \"required\",\n \"bedroom_count\" => \"required\",\n \"bathroom_count\" => \"required\",\n \"garage_count\" => \"required\",\n \"plot_area\" => \"required\",\n \"construction_area\" => \"required\",\n \"area_unit\" => \"required\"\n ], \n [\n \"property_id.required\" => \"Invalid Request, Incomplete Parameter\"\n ])->validate(); \n\n $property = Property::find($request->property_id);\n \n if(is_null($property)) {\n return redirect()->back()->with(\"error\", \"Property Not Found\");\n } \n\n $property->title = $request->title;\n $property->description = $request->description;\n $property->type_id = $request->type_id;\n $property->state_id = $request->state_id;\n $property->bedroom_count = $request->bedroom_count;\n $property->bathroom_count = $request->bathroom_count;\n $property->garage_count = $request->garage_count;\n $property->plot_area = $request->plot_area;\n $property->construction_area = $request->construction_area;\n $property->area_unit = $request->area_unit;\n $property->save();\n\n return redirect()->back()->with(\"success\", \"Property Basic Details Updated Successfully\");\n\n }", "public function update(Request $request, $id)\n {\n request()->validate([\n 'title' => 'required',\n 'category' => 'required',\n ]);\n\n $title = Input::get('title');\n $category = Input::get('category');\n $type = Input::get('type');\n $bed = Input::get('bed');\n $bath = Input::get('bath');\n $parking = Input::get('parking');\n $price = Input::get('price');\n $location = Input::get('location');\n $street = Input::get('street');\n $details = Input::get('details');\n\n $prop_obj = new Property();\n $prop_obj->id = $id;\n $prop = Property::find($prop_obj->id);\n $prop->update(['title' => $title, 'category' => $category, 'bath' => $bath, 'bed' => $bed, 'bath' => $bath, 'parking' => $parking, 'price' => $price, 'location' => $location, 'street' => $street, 'details' => $details]);\n\n\n return redirect()->route('homes.show', $id)\n ->with('success', 'Property successfully Updated');\n }", "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}", "public function update(Request $request, $property_id)\n {\n\n $now = Carbon::now('Africa/Nairobi')->toDateTimeString();\n\n /** Get property data from edit property form **/\n $p_name = ucwords($request->input('p_name'));\n $p_category = $request->input('p_category_id');\n $p_location = ucwords($request->input('p_location'));\n $c_name = ucwords($request->input('c_name'));\n $c_phone = $request->input('c_phone');\n\n $property_details = array(\n 'prop_name' => $p_name,\n 'category_id' => $p_category,\n 'location' => $p_location,\n 'c_name' => $c_name,\n 'c_phone' => $c_phone,\n );\n $update_property = Property::where('id', $property_id)->update($property_details);\n\n /** Log the action in the logs file */\n Log::info('Property of ID ' . $property_id . ' updated' .\n ' at ' . $now);\n Toastr::success('Property updated successfully');\n\n return back();\n }", "public function update(Request $request, $id)\n {\n //PRE: request may contain the following\n // latitude (cannot be beyond half a mile of original location)\n // longitude (cannot be beyond half a mile of original location)\n // locationType\n // name\n // description\n // compassDirection\n // $id must match a geolocationID\n\n // request MUST contain the following\n // submitterLatitude (within half a mile of geolocation latitude)\n // submitterLongitude (within half a mile of geolocation longitude)\n\n //POST: overwrites the previous data with the new values\n $geolocation = Geolocation::find($id);\n $latitude = $request->input('latitude', $geolocation->latitude);\n $longitude = $request->input('longitude', $geolocation->longitude);\n $submitLat = $request->input('submitterLatitude');\n $submitLong = $request->input('submitterLongitude');\n if($submitLat == null || $submitLong == null){\n return Responses::BadRequest();\n }\n if(Geolocation::distance($geolocation->latitude, $geolocation->longitude, $latitude, $longitude, \"m\") > .5){\n return Responses::TooFar();\n }\n if(Geolocation::distance($geolocation->latitude, $geolocation->longitude, $submitLat, $submitLong, \"m\") > .5){\n return Responses::TooFar();\n }\n if($geolocation != null){\n $geolocation->latitude = $latitude;\n $geolocation->longitude = $longitude;\n $geolocation->location_type = $request->input('locationType', $geolocation->locationType);\n $geolocation->name = $request->input('name', $geolocation->name);\n $geolocation->description = $request->input('description', $geolocation->description);\n $geolocation->save();\n if(!($geolocation->users->contains(Auth::user()->userID))){ \n $geolocation->users()->attach(Auth::user()->userID, [\n 'latitude' => $submitLat,\n 'longitude' => $submitLong,\n 'compassDirection' => $request->input('compassDirection'),\n 'valid' => 1\n ]); \n }\n else{\n $geolocation->users()->updateExistingPivot(Auth::user()->userID, [\n 'latitude' => $submitLat,\n 'longitude' => $submitLong,\n 'compassDirection' => $request->input('compassDirection', $geolocation->users->get(Auth::user()->userID)->pivot->compassDirection),\n 'valid' => 1\n ]);\n }\n return Responses::Updated();\n }\n else{\n return Responses::DoesNotExist('Geolocation');\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request,[\n 'building_name'=> 'required|string|max:191',\n 'price' => 'required|numeric',\n 'full_price' => 'required|numeric',\n 'site_area' => 'required|numeric',\n 'building_area' => 'required|numeric',\n 'architecture' => 'required',\n 'prefecture' => 'required',\n 'city' => 'required|string|max:191',\n 'address' => 'required|string|max:191',\n 'station' => 'required|string|max:191',\n 'on_foot' => 'required|numeric|max:191',\n ]);\n \n $property =Property::find($id);\n \n $property->building_name = $request->building_name;\n $property->price = $request->price;\n $property->full_price = $request->full_price;\n $property->site_area = $request->site_area;\n $property->building_area = $request->building_area;\n $property->architecture = $request->architecture;\n $property->prefecture = $request->prefecture;\n $property->city = $request->city;\n $property->address = $request->address;\n $property->station = $request->station;\n $property->on_foot = $request->on_foot;\n $property->save();\n \n return redirect('properties/'.$property->id);\n }", "public function update(ValidateProperty $request, $id = 0)\n {\n // Check ID exists in the system, before updating the data\n if (! $property = Property::find($id) ) {\n return redirect('/property')->with(\n 'warn', Lang::get('property.ERROR_MESSAGES.EDIT_ID_NOT_EXISTS'\n ));\n }\n\n $property->property_type = $request->input('property_type');\n $property->apartment_type = $request->input('apartment_type');\n $property->measurement = $request->input('measurement');\n $property->measurement_type = $request->input('measurement_type');\n $property->maintenance_charges = $request->input('maintenance_charges');\n $property->ownership = $request->input('ownership');\n $property->joint_owners_name = $request->input('joint_owners_name');\n $property->sale_price = $request->input('sale_price');\n $property->min_expected_price = $request->input('min_expected_price');\n $property->address = $request->input('address');\n $property->homeloan_details = $request->input('homeloan_details');\n $property->amenities = $request->input('amenities');\n $property->locality_features = $request->input('locality_features');\n\n $property->save();\n\n unset($property);\n\n return redirect('/property')->with(\n 'status', Lang::get('site.SUCCESS_MESSAGES.APARTMENT_UPDATED'\n ));\n }", "public function updateLocation(Request $request)\n {\n $merchant_id = session('current_merchant_id');\n\n $data = $request->all();\n\n $merchant = Merchant::find($merchant_id);\n\n $merchant->name = $data['business_name'];\n\n $merchant->display_name = $data['display_name'];\n\n $merchant->address1 = $data['address1'];\n\n if (!empty($data['merchant_external_id'])) {\n $merchant->merchant_external_id = $data['merchant_external_id'];\n }\n if (isset($data['address2'])) {\n $merchant->address2 = $data['address2'];\n }\n\n $merchant->city = $data['city'];\n\n $merchant->state = $data['state'];\n\n $merchant->zip = $data['zip'];\n\n $merchant->country = $data['country'];\n\n $merchant->time_zone = $data['time_zone']['type_id_value'];\n\n $merchant->time_zone_string = $data['time_zone']['type_id_name'];\n\n //Store\n $merchant->shop_email = $data['shop_email'];\n\n $merchant->phone_no = $data['phone_no'];\n\n $merchant->fax_no = $data['fax_no'];\n\n $merchant->save();\n\n return 1;\n }", "public function location_update( Request $request ) {\n\t\t$this->validate( $request,\n\t\t\t[\n\t\t\t\t'latitude' => 'required|numeric',\n\t\t\t\t'longitude' => 'required|numeric',\n\t\t\t] );\n\n\t\tif ( $Provider = Auth::user() ) {\n\n\t\t\t$Provider->latitude = $request->latitude;\n\t\t\t$Provider->longitude = $request->longitude;\n\t\t\t$Provider->save();\n\n\t\t\treturn back()->with( [ 'flash_success' => trans( 'api.provider.location_updated' ) ] );\n\t\t} else {\n\t\t\treturn back()->with( [ 'flash_error' => trans( 'admin.provider_msgs.provider_not_found' ) ] );\n\t\t}\n\t}", "public function updateLocation($data)\n {\n $imageVo = $this->buildImageVo($data, CImageBoProcess::TYPE_LOCATION); \n $locationVo = $this->buildLocationVo($data, self::UPDATE); \n $locationVo->setImageId($imageVo->getImageId());\n $transmitterVo = $this->buildTransmitterVo($data);\n \n // Set the validation.\n $this->responseVo->setValidation($locationVo->getValidation());\n \n /**\n * Next check that the data is valid and try to insert new records.\n */\n if ($locationVo->isValid())\n {\n // Next write the data to the databse\n $daoResultLocation = MLocationDao::updateLocation($locationVo);\n $daoResultTransmitter = MLocationDao::updateTransmitter($transmitterVo, $locationVo->getLocationId());\n \n if ($daoResultLocation->getStatus() === FDatabaseVoResult::SUCCESS && $daoResultTransmitter->getStatus() === FDatabaseVoResult::SUCCESS)\n {\n // Set the response message\n $this->responseVo->setData($daoResultLocation->getData());\n $this->responseVo->appendData($daoResultTransmitter->getData());\n $this->responseVo->setMessage('Location updated.', FWebVoResponse::SUCCESS);\n }\n else\n {\n // Set the response message\n $this->responseVo->setMessage($daoResult->getMessage(), FWebVoResponse::ERROR);\n }\n }\n else\n {\n $this->responseVo->setMessage('Location update failed validation.', FWebVoResponse::ERROR);\n }\n \n return $this->responseVo;\n }", "public function updateLocation(Request $request, $id)\n {\n // $data = $request->all();\n // $validatedData = $request->validate([\n // 'name' => 'required|max:255',\n // ]); \n\n // $location = LocationPointOfInterest::find($id);\n // $location->name = $request->name;\n // $location->save();\n \n // $request->session()->flash('status', 'Location poi changed!');\n // return Redirect::to('location'); \n }", "public function edit(Location $location)\n {\n //\n }", "public function edit(Location $location)\n {\n //\n }", "public function update(Request $request, Location $location)\n {\n $location->name = $request->input('name');\n\n $location->save();\n\n return back();\n }", "public function update(Request $request)\n {\n // dd($request);\n $id = $request->id;\n $form = Locations::find($id);\n $form->name = $request->post('name');\n $form->province = $request->post('province');\n $form->city = $request->post('city');\n $form->address = $request->post('address');\n $form->save();\n\n return redirect('admin/locations');\n }", "public function update(Request $request, LocationUser $locationUser)\n {\n //\n }", "public function saveLocationAction()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t$user = Application_Model_User::getAuth();\r\n\r\n\t\t\tif ($user == null)\r\n\t\t\t{\r\n\t\t\t\tthrow new RuntimeException('You are not authorized to access this action');\r\n\t\t\t}\r\n\r\n\t\t\t$id = $this->_request->getParam('id');\r\n\r\n\t\t\tif (!v::intVal()->validate($id))\r\n\t\t\t{\r\n\t\t\t\tthrow new RuntimeException('Incorrect post ID value: ' .\r\n\t\t\t\t\tvar_export($id, true));\r\n\t\t\t}\r\n\r\n\t\t\tif (!Application_Model_News::checkId($id, $post, ['join'=>false]))\r\n\t\t\t{\r\n\t\t\t\tthrow new RuntimeException('Incorrect post ID: ' .\r\n\t\t\t\t\tvar_export($id, true));\r\n\t\t\t}\r\n\r\n\t\t\tif (!Application_Model_News::canEdit($post, $user))\r\n\t\t\t{\r\n\t\t\t\tthrow new RuntimeException('You are not authorized to access this action');\r\n\t\t\t}\r\n\r\n\t\t\t$addressForm = new Application_Form_Address;\r\n\r\n\t\t\tif (!$addressForm->isValid($this->_request->getPost()))\r\n\t\t\t{\r\n\t\t\t\tthrow new RuntimeException(My_Form::outputErrors($addressForm));\r\n\t\t\t}\r\n\r\n\t\t\t$data = $addressForm->getValues();\r\n\t\t\t$db = Zend_Db_Table::getDefaultAdapter();\r\n\t\t\t$db->update('address', $data, 'id=' . $post['address_id']);\r\n\r\n\t\t\t$response = [\r\n\t\t\t\t'status' => 1,\r\n\t\t\t\t'address' => Application_Model_Address::format($data)\r\n\t\t\t];\r\n\t\t}\r\n\t\tcatch (Exception $e)\r\n\t\t{\r\n\t\t\tMy_Log::exception($e);\r\n\t\t\t$response = [\r\n\t\t\t\t'status' => 0,\r\n\t\t\t\t'message' => $e instanceof RuntimeException ? $e->getMessage() :\r\n\t\t\t\t\t'Internal Server Error'\r\n\t\t\t];\r\n\t\t}\r\n\r\n\t\t$this->_helper->json($response);\r\n\t}", "public function update(array $data) {\n return $this->updateRequest(\n \"/application/shops/{$this->shop_id}/listings/{$this->listing_id}/properties/{$this->property_id}\",\n $data\n );\n }", "public function update(Request $request, Location $location)\n {\n $location->update($request->all());\n\n return redirect()->back()->with('message', 'Complimenti ha modificato la tua prenotazione');\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 }", "public function postUpdate(\\Propel\\Runtime\\Connection\\ConnectionInterface $con = null) {\n parent::postUpdate($con);\n SearchLocation::prepareForLocation($this, SearchLocationQuery::create()->findPk($this->getId()))\n ->save($con);\n }", "public function update($id)\n\t{\n\t\t$validator = Validator::make(Input::all(), Location::$rules);\n \n \t\tif ($validator->passes()) {\n \t\t$location = Location::find($id);\n \t\t\t$location->name = Input::get('name');\n \t\t\t$location->save();\n \n \t\t\treturn Redirect::to('app/locations')->with('message', 'Succesfully added');\n \t\t} \n \t\telse {\n \t\treturn Redirect::to('app/locations/'. $id . '/edit')->with('message', 'The following errors occurred')->withErrors($validator)->withInput(); \n \t\t}\n\t}", "public function actionUpdateLandData() \r\n {\r\n $res = \"0\";\r\n extract($_POST);\r\n\r\n $landDetails=LandMaster::model()->findByPk($LandID);\r\n $landDetails->Plot_No = $Plot_No ; \r\n $landDetails->Piece = $Piece ; \r\n $landDetails->location = $location ; \r\n $landDetails->Land_Type = $Land_Type ; \r\n $landDetails->TotalArea = $TotalArea ; \r\n $landDetails->length = $length ; \r\n $landDetails->width = $width ; \r\n $landDetails->Remarks = $Remarks ; \r\n $landDetails->North = $North ; \r\n $landDetails->South = $South ; \r\n $landDetails->East = $East ; \r\n $landDetails->West = $West;\r\n\r\n if($landDetails->save()) $res=1;\r\n print CJSON::encode($res);\r\n }", "public function editAddressAction() {\n\n //USER VALIDATION\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n //GET PAGE ID, PAGE OBJECT AND THEN CHECK PAGE VALIDATION\n $resource_type = $this->_getParam('resource_type');\n switch ($resource_type) {\n case 'group':\n $id = 'group_id';\n $itemTable = Engine_Api::_()->getItemTable('group');\n $route = 'sitetagcheckin_groupspecific';\n break;\n\n case 'user':\n $id = 'user_id';\n $itemTable = Engine_Api::_()->getDbtable('users', 'user');\n $route = 'sitetagcheckin_userspecific';\n break;\n\n case 'event':\n $id = 'event_id';\n $itemTable = Engine_Api::_()->getItemTable('event');\n $route = 'sitetagcheckin_specific';\n break;\n }\n\n $seao_locationid = $this->_getParam('seao_locationid');\n $resource_id = $this->_getParam($id);\n $resource = Engine_Api::_()->getItem($resource_type, $resource_id);\n\n $this->view->form = $form = new Sitetagcheckin_Form_Address(array('item' => $resource));\n\n //POPULATE FORM\n if (!$this->getRequest()->isPost()) {\n $form->populate($resource->toArray());\n return;\n }\n\n //FORM VALIDATION\n if (!$form->isValid($this->getRequest()->getPost())) {\n return;\n }\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n\n $values = $form->getValues();\n\n //Update field value\n if ($resource_type == 'user') {\n\n $aliasValues = Engine_Api::_()->fields()->getFieldsValuesByAlias($resource);\n\n $db = Zend_Db_Table_Abstract::getDefaultAdapter();\n $table_exist = $db->query('SHOW TABLES LIKE \\'engine4_user_fields_search\\'')->fetch();\n if (!empty($table_exist)) {\n $column_exist = $db->query('SHOW COLUMNS FROM engine4_user_fields_search LIKE \\'location\\'')->fetch();\n }\n\n $profilemapsTable = Engine_Api::_()->getDbtable('profilemaps', 'sitetagcheckin');\n $profilemapsTablename = $profilemapsTable->info('name');\n\n $select = $profilemapsTable->select()->from($profilemapsTablename, array('profile_type'));\n if (empty($aliasValues['profile_type'])) {\n $select->where($profilemapsTablename . '.option_id = ?', 1);\n } else {\n $select->where($profilemapsTablename . '.option_id = ?', $aliasValues['profile_type']);\n }\n $option_id = $select->query()->fetchColumn();\n\n if (!empty($option_id)) {\n $valuesTable = Engine_Api::_()->fields()->getTable('user', 'values');\n $valuesTableName = $valuesTable->info('name');\n\n $select = $valuesTable->select()\n ->from($valuesTableName, array('item_id'))\n ->where($valuesTableName . '.item_id = ?', $resource_id)\n ->where($valuesTableName . '.field_id = ?', $option_id);\n $valuesResultsLocation = $select->query()->fetchColumn();\n if (!empty($valuesResultsLocation)) {\n Engine_Api::_()->fields()->getTable('user', 'values')->update(array('value' => $values['location']), array('item_id =?' => $resource_id, 'field_id =?' => $option_id));\n\n if (!empty($column_exist)) {\n Engine_Api::_()->fields()->getTable('user', 'search')->update(array('location' => $values['location']), array('item_id =?' => $resource_id));\n }\n } else {\n $valuesTable = Engine_Api::_()->fields()->getTable('user', 'values');\n $row = $valuesTable->createRow();\n $row->item_id = $resource_id;\n $row->field_id = $option_id;\n $row->index = 0;\n $row->value = $values['location'];\n $row->save();\n if (!empty($column_exist)) {\n Engine_Api::_()->fields()->getTable('user', 'search')->update(array('location' => $values['location']), array('item_id =?' => $resource_id));\n }\n }\n }\n }\n\n $resource->location = $values['location'];\n if (empty($values['location'])) {\n //DELETE THE RESULT FORM THE TABLE.\n Engine_Api::_()->getDbtable('locationitems', 'seaocore')->delete(array('resource_id =?' => $resource_id, 'resource_type = ?' => $resource_type));\n $resource->seao_locationid = '0';\n }\n $resource->save();\n unset($values['submit']);\n\n if (!empty($values['location'])) {\n\n //DELETE THE RESULT FORM THE TABLE.\n Engine_Api::_()->getDbtable('locationitems', 'seaocore')->delete(array('resource_id =?' => $resource_id, 'resource_type = ?' => $resource_type));\n\n $seaoLocation = Engine_Api::_()->getDbtable('locationitems', 'seaocore')->getLocationItemId($values['location'], '', $resource_type, $resource_id);\n\n //group table entry of location id.\n $itemTable->update(array('seao_locationid' => $seaoLocation), array(\"$id =?\" => $resource_id));\n }\n\n $db->commit();\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => 500,\n 'parentRedirect' => $this->_helper->url->url(array('action' => 'edit-location', 'seao_locationid' => $seaoLocation, \"$id\" => $resource_id, \"resource_type\" => $resource_type), \"$route\", true),\n 'parentRedirectTime' => '2',\n 'format' => 'smoothbox',\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Your location has been modified successfully.'))\n ));\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n }", "public function setLocation(string $location): void;", "public function update(Request $request,PropertyStatus $propertyStatus)\n {\n $attribute = $request->validate([\n 'property_status'=>'required'\n ]);\n\n $attribute['updated_by'] = auth()->user()->name;;\n \n $propertyStatus->update($attribute); \n\n Session::flash('success',\"Registro actualizado satisfactoriamente\");\n\n return redirect()->route('property_status.index');\n }", "function edit_location_submenu(){\n\t$editing = false;\n\t$selected_location = null;\n\tif(isset($_GET['id'])) {\n\t\t$editing = true;\n\t\t\n\t\t$saved_locations = get_option('wikinearby_saved_locations');\n\t\t$selected_location = $saved_locations->get_location_by_id($_GET['id']);\n\t\t\n\t\t// Localize the script with previous location\n\t\t$data_array = array(\n\t\t\t'latitude' => $selected_location->loc_data['latitude'],\n\t\t\t'longitude' => $selected_location->loc_data['longitude']\n\t\t);\n\t\twp_localize_script( 'wikinearby-locpicker', 'locData', $data_array );\n\t}\n\t\n\twp_enqueue_script('wikinearby-locpicker', plugin_dir_url( __FILE__ ).'js/locationpicker.jquery.js', array('locationpicker'));\n\n\t\n\t?>\n\t<h2><?php echo($editing ? 'Edit location' : 'Add a new location'); ?></h2>\n\t\n\t\t<?php settings_errors(); ?>\n\n\t<form action='<?php echo esc_url( admin_url('admin-post.php') ); ?>' method='post'>\n\t<div class=\"wikinearby_form\" >\n\t\t<p>\n\t\t<label for=\"loc_name\">Location name:</label> \n\t\t<input style=\"max-width:30ch\" class=\"widefat\" id=\"loc_name\" name=\"loc_name\" type=\"text\" value=\"<?php echo($editing ? $selected_location->loc_data['loc_name'] : 'Location'); ?>\" required>\n\t\t</p>\n\n\t\t<p>\n\t\t<label for=\"latitude\">Latitude:</label> \n\t\t<input style=\"max-width:30ch\" class=\"widefat\" id=\"latitude\" name=\"latitude\" type=\"number\" step=\"any\" value=\"<?php echo($editing ? $selected_location->loc_data['latitude'] : ''); ?>\" required>\n\t\t</p>\n\n\t\t<p>\n\t\t<label for=\"longitude\">Longitude:</label> \n\t\t<input style=\"max-width:30ch\" class=\"widefat\" id=\"longitude\" name=\"longitude\" type=\"number\" step=\"any\" value=\"<?php echo($editing ? $selected_location->loc_data['longitude'] : ''); ?>\" required>\n\t\t</p>\n\t\t\n\t\t<div id=\"locpicker\" style=\"width: 500px; height: 400px;\"></div>\n\n\t\t<p>\n\t\t<label for=\"km_range\">Maximum distance of interesting places(in kilometers):</label> \n\t\t<input style=\"max-width:7ch\" class=\"widefat\" id=\"km_range\" name=\"km_range\" type=\"number\" step=\"1\" min=\"1\" max=\"100\" value=\"<?php echo($editing ? $selected_location->loc_data['km_range'] : '10'); ?>\" required>\n\t\t</p>\n\t\t\n\t\t<p>\n\t\t<label for=\"max_results\">Maximum number of results:</label> \n\t\t<input style=\"max-width:7ch\" class=\"widefat\" id=\"max_results\" name=\"max_results\" type=\"number\" step=\"1\" min=\"6\" max=\"60\" value=\"<?php echo($editing ? $selected_location->loc_data['max_results'] : '12'); ?>\" required>\n\t\t</p>\n\t\t\n <p>\n <label for=\"loc_image\">Image:</label>\n <input style=\"max-width:100ch\" class=\"widefat\" id=\"loc_image\" name=\"loc_image\" type=\"text\" value=\"<?php echo($editing ? $selected_location->loc_data['loc_image'] : ''); ?>\" />\n <input id=\"upload_image_button\" type=\"button\" class=\"button-primary\" value=\"Insert Image\" />\n </p>\n\t\t\n\t\t\n \n\t\t<p>\n\t\t<label for=\"show_coord\">Show coordinates:</label> \n\t\t<input class=\"widefat\" id=\"show_coord\" name=\"show_coord\" type=\"checkbox\" <?php echo($editing ? ($selected_location->loc_data['show_coord'] === 'on' ? 'checked' : '') : ''); ?>>\n\t\t</p>\n \n\t\t<p>\n\t\t<label for=\"lang\">Wikipedia language to search in:</label>\n\t\t<select name=\"lang\" id=\"lang\" required>\n\t\t\t<option value=\"en\" <?php echo($selected_location->loc_data['lang'] == 'en' ? 'selected' : ''); ?> >English</option>\n\t\t\t<option value=\"it\" <?php echo($selected_location->loc_data['lang'] == 'it' ? 'selected' : ''); ?>>Italian</option>\n\t\t\t<option value=\"fr\" <?php echo($selected_location->loc_data['lang'] == 'fr' ? 'selected' : ''); ?>>French</option>\n\t\t\t<option value=\"de\" <?php echo($selected_location->loc_data['lang'] == 'de' ? 'selected' : ''); ?>>German</option>\n\t\t</select>\n\t\t</p>\n\t\t\n\t\t<input type=\"hidden\" name=\"action\" value=\"<?php echo($editing ? 'edit_location' : 'add_location' )?>\">\n\t\t<?php echo( $editing ? '<input type=\"hidden\" name=\"id\" value=\"'.$_GET['id'].'\">' : ''); ?>\n\t\t\n\t\t</div>\n\t\t\n\t\t<input class='button button-primary' type='submit' name='submit' value='<?php echo($editing? 'Apply' : 'Add location');?> '>\n\t</form>\n\t<a href=\"<?php echo esc_html(get_admin_url().'admin.php?page=wikinearby-menu');?>\"> Go back to locations</a>\n\t\n\t<?php\n\t\n}", "public function update(Request $request, Location $location)\n {\n $location->fill($request->post())->save();\n return response()->json([\n 'message'=>'Location Updated Successfully!!',\n 'location'=>$location\n ]);\n }", "function ncl_save_current_location_meta( $post_id, $post ) {\n\n\t/* Verify the nonce before proceeding. */\n\tif ( ! isset( $_POST['ncl_current_location_nonce'] ) || ! wp_verify_nonce( $_POST['ncl_current_location_nonce'], basename( __FILE__ ) ) )\n\t\treturn $post_id;\n\n\t/* Get the post type object. */\n\t$post_type = get_post_type_object( $post->post_type );\n\n\t/* Check if the current user has permission to edit the post. */\n\tif ( ! current_user_can( $post_type->cap->edit_post, $post_id ) )\n\t\treturn $post_id;\n\n\t/* Get the posted data and sanitize it for use as an HTML class. */\n\t$new_meta_value = ( isset( $_POST['ncl-current-location'] ) ? $_POST['ncl-current-location'] : '' );\n\n\t/* Get the meta key. */\n\t$meta_key = 'ncl_current_location';\n\n\t/* Get the meta value of the custom field key. */\n\t$meta_value = get_post_meta( $post_id, $meta_key, true );\n\n\t/* If a new meta value was added and there was no previous value, add it. */\n\tif ( $new_meta_value && '' == $meta_value )\n\t\tadd_post_meta( $post_id, $meta_key, $new_meta_value, true );\n\n\t/* If the new meta value does not match the old value, update it. */\n\telseif ( $new_meta_value && $new_meta_value != $meta_value )\n\t\tupdate_post_meta( $post_id, $meta_key, $new_meta_value );\n\n\t/* If there is no new meta value but an old value exists, delete it. */\n\telseif ( '' == $new_meta_value && $meta_value )\n\t\tdelete_post_meta( $post_id, $meta_key, $meta_value );\n}", "public function updatePricing(Request $request) {\n\n //validate\n $validator = Validator::make($request->all(), [\n 'property_id' => \"required\",\n 'currency_id' => 'required',\n ], \n [\n \"property_id.required\" => \"Invalid Request, Incomplete Parameter\"\n ])->validate(); \n\n $property = Property::find($request->property_id);\n \n if(is_null($property)) {\n return redirect()->back()->with(\"error\", \"Property Not Found\");\n } \n\n $property->is_featured = !is_null($request->is_featured) ? true : false;\n $property->is_public = !is_null($request->is_public) ? true : false;\n $property->sale = !is_null($request->sale) ? true : false;\n $property->rental = !is_null($request->rental) ? true : false;\n $property->current_selling_price = $request->current_selling_price;\n $property->current_rental_price = $request->current_rental_price;\n $property->original_selling_price = $request->original_selling_price;\n $property->original_rental_price = $request->original_rental_price;\n $property->currency_id = $request->currency_id;\n $property->save();\n\n return redirect()->back()->with(\"status\", \"Property Pricing details updated Successfully\");\n }", "protected function setPutData()\n\t{\n\t\t$this->request->addPostFields($this->query->getParams());\n\t}", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'name' => 'required|max:140',\n 'address1' => 'required|max:140',\n 'address2' => 'max:140',\n 'link' => 'max:240',\n ]);\n\n if($validator->fails()){\n return back()\n ->withErrors($validator)\n ->withInput();\n } \n\n $location = Location::find($id);\n $location->name = $request->name;\n $location->address1 = $request->address1;\n $location->address2 = $request->address2;\n $location->link = $request->link;\n\n $location->save();\n\n return redirect('/calendar/convention/' .$request->convention . '/manage')->with('status', 'location updated');\n }", "public function update(Request $request, $id) {\n $property = Property::find($id);\n $property->property_name = $request->property_name;\n $property->property_identification = $request->property_identification;\n $property->property_description = $request->property_description;\n $property->save();\n return redirect('/setting/properties')->with('message', 'Update successfully.');\n \n }", "public function update(Request $request, Properties $properties)\n {\n //\n }", "public function edit(location $location)\n {\n //\n }", "public function update() {\r\n\t\tif ( $this->key === 'job_title' || $this->key === 'job_description' ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$value = $this->get_posted_value();\r\n\t\tupdate_post_meta( $this->listing->get_id(), '_'.$this->key, $value );\r\n\t}", "public function update($data) {}", "public function update($data) {}", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'code' => 'required',\n ]);\n\n\n $location = Location::find($id);\n $location->name = $request->input('name');\n $location->code = $request->input('code');\n $location->save();\n\n\n\n\n\n return redirect()->route('locations.index')\n ->with('success','Location updated successfully');\n }", "public function update(Request $request, Location $location,$id)\n {\n $location = Ho_details::find($id);\n $validator = Validator::make($request->all(), [\n 'gst_number' => 'required',\n 'address_line_1' => 'required',\n 'name' => 'required',\n 'state_id' => 'required',\n 'postal_code' => 'required',\n 'name' => 'required|unique:ho_details,name,'.$id.',id,deleted_at,NULL,gst_number,'.$request->gst_number,\n ])->validate();\n\n \n $location->name = $request->name;\n $location->gst_number = $request->gst_number;\n $location->address_line_1 = $request->address_line_1;\n $location->address_line_2 = $request->address_line_2;\n $location->land_mark = $request->land_mark;\n $location->state_id = $request->state_id;\n $location->district_id = $request->district_id;\n $location->city_id = $request->city_id;\n $location->postal_code = $request->postal_code;\n $location->created_by = 0;\n $location->updated_by = 0;\n\n if ($location->save()) {\n return Redirect::back()->with('success', 'Successfully Updated');\n } else {\n return Redirect::back()->with('failure', 'Something Went Wrong..!');\n }\n }", "public function updateLocation (Request $request) {\n\n try {\n\n\t\t\n\t\t\t$errors = null;\n\t\t\t\n\t\t\tif ($this->profileRepo->validateLocationInfo ($request, $errors)) {\n\t\t\t\t\n\t\t\t\t//validation success\n\t\t\t\t$data['latitude'] = $request->lat;\n\t\t\t\t$data['longitude'] = $request->long;\n\t\t\t\t$data['city'] = $request->city;\n\t\t\t\t$data['country'] = $request->country;\n\n\t\t\t\t$this->profileRepo->saveLocation (Auth::user()->id, $data);\n\n\t\t\t\treturn response()->json(['status' => 'success']);\n\t\t\t\t\n\t\t\t} else {\n\n\t\t\t\t//validation fails\n\t\t\t\treturn response()->json(['status' => 'error', 'errors' => $errors]);\n\t\t\t}\t\t\t\n\n\n \t} catch (\\Exception $e) {\n\n \t\treturn response()->json(['status' => 'error', 'errors' => [trans('app.fail_save')]]);\n \t}\n\n }", "public function update(Request $request, Propertycomments $propertycomments)\n {\n //\n }", "public function updatelocation($client_id,$salescenter_id, $location_id, Request $request)\n {\n /* Start Validation rule */\n $this->validate($request, [\n 'name' => 'required',\n // 'street' => 'required',\n // 'city' => 'required',\n // 'state' => 'required',\n // 'country' => 'required',\n // 'zip' => 'required',\n 'zip' => 'nullable|numeric|digits:5',\n ]);\n /* End Validation rule */\n\n $input = $request->only('name','street', 'city','state','country','zip');\n (new Salescenterslocations)->updateLocation($location_id,$input);\n\n return redirect()->route('client.salescenter.locations',['client_id' => $client_id, 'salescenter_id' =>$salescenter_id ])\n ->with('success','Location successfully updated');\n }", "function setLocation($location);", "public function update(Request $request, BuyerProp $buyerProp)\n {\n //\n $request->validate([\n 'property' => 'required',\n 'sell_type' => 'required',\n 'property_type' => 'required',\n 'project_name' => 'required',\n 'city_plan_color' => 'required',\n 'area_type' => 'required',\n 'business_license' => 'required',\n 'buy_with_machine' => 'required',\n 'type' => 'required',\n 'floor_num' => 'required',\n 'bedroom_num' => 'required',\n 'bathroom_num' => 'required',\n 'kitchen_num' => 'required',\n 'parking_num' => 'required',\n 'livingroom_num' => 'required',\n 'furniture' => 'required',\n 'usable_area_min' => 'required',\n 'usable_area_max' => 'required',\n 'area_min' => 'required',\n 'area_max' => 'required',\n 'alley' => 'required',\n 'road' => 'required',\n 'sub_district' => 'required',\n 'district' => 'required',\n 'province' => 'required',\n 'nearby_place' => 'required',\n 'price_range_min' => 'required',\n 'price_range_max' => 'required',\n 'agent_welcome' => 'required'\n ]);\n\n $buyerProp->update($request->all());\n\n return redirect()->route('buyer_prop.index')\n ->with('success', 'Property updated successfully.');\n\n }", "public function update(StoreLocationRequest $request)\r\n {\r\n $opening_hours = $this->formatOpeningHours($request);\r\n $disabled_dates = $this->formatDisabledDates($request);\r\n\r\n $location = $this->location->where('id', $request->get('id'))->first();\r\n\r\n $location->update([\r\n 'name' => $request->get('name'),\r\n 'disabled_weekdays' => $request->get('disabled_weekdays'),\r\n 'disabled_dates' => $disabled_dates,\r\n 'opening_hours' => $opening_hours,\r\n 'order' => (int)$request->get('order'),\r\n 'max_weight' => (int)$request->get('max_weight'),\r\n 'interval' => (int)$request->get('interval'),\r\n 'json' => array()\r\n ]);\r\n\r\n $location->refresh();\r\n\r\n if (is_array($request->get('services'))) {\r\n $location->services()->sync($request->get('services'));\r\n }\r\n\r\n return $location;\r\n }", "public function update($id)\n\t{\n\n\t\t$rules = array('district' => 'required',\n\t\t\t\t\t 'location_name' => 'required');\n\t\t$validator = Validator::make(Input::all(), $rules);\n\n\t\tif($validator->fails()){\n\t\t\treturn Redirect::to('admin/location/' . $id . '/edit')->withErrors($validator);\n\t\t}else{\n\t\t\t$location = $this->location->find($id);\n\t\t\t$location->district = strtoupper(Input::get('district'));\n\t\t\t$location->location_name = strtoupper(Input::get('location_name'));\n\t\t\t$this->location->update($location);\n\n\t\t\tSession::flash('message','Location Updated Successfuly');\n\t\t\treturn Redirect::to('admin/location/');\n\t\t}\n\t}", "function rh_gmw_fl_update_location() {\n global $wpdb;\n parse_str($_POST['formValues'], $location);\n $usergetid = (!empty($_POST['usergetid'])) ? $_POST['usergetid'] : '';\n $userid = ($usergetid) ? $usergetid : get_current_user_id();\n $location['gmw_map_icon'] = ( isset($location['gmw_map_icon']) ) ? $location['gmw_map_icon'] : '_default.png';\n $location = apply_filters('gmw_fl_location_before_updated', $location, $userid);\n if ( $wpdb->replace('wppl_friends_locator', array(\n 'member_id' => $userid,\n 'street_number' => $location['gmw_street_number'],\n 'street_name' => $location['gmw_street_name'],\n 'street' => $location['gmw_street'],\n 'apt' => $location['gmw_apt'],\n 'city' => $location['gmw_city'],\n 'state' => $location['gmw_state'],\n 'state_long' => $location['gmw_state_long'],\n 'zipcode' => $location['gmw_zipcode'],\n 'country' => $location['gmw_country'],\n 'country_long' => $location['gmw_country_long'],\n 'address' => $location['gmw_address'],\n 'formatted_address' => $location['gmw_formatted_address'],\n 'lat' => $location['gmw_lat'],\n 'long' => $location['gmw_long'],\n 'map_icon' => $location['gmw_map_icon']\n ) ) === FALSE ) :\n echo __( 'There was a problem saving your location.', 'rehub_framework' );\n else :\n echo __( 'Location successfully saved!', 'rehub_framework' );\n do_action( 'gmw_fl_after_location_saved', $userid, $location );\n endif;\n die();\n}", "public function set_current_location() {\n\t\t\t$this->location_id = get_the_ID();\n\t\t\t$meta_data = $this->wpseo_local_locations_repository->get( [ 'id' => $this->location_id ] );\n\n\t\t\t$this->location_meta['business_type'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_type'] : '';\n\t\t\t$this->location_meta['business_address'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_address'] : '';\n\t\t\t$this->location_meta['business_address_2'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_address_2'] : '';\n\t\t\t$this->location_meta['business_city'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_city'] : '';\n\t\t\t$this->location_meta['business_state'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_state'] : '';\n\t\t\t$this->location_meta['business_zipcode'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_zipcode'] : '';\n\t\t\t$this->location_meta['business_country'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_country'] : '';\n\t\t\t$this->location_meta['business_phone'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_phone'] : '';\n\t\t\t$this->location_meta['business_phone_2nd'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_phone_2nd'] : '';\n\t\t\t$this->location_meta['business_fax'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_fax'] : '';\n\t\t\t$this->location_meta['business_email'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_email'] : '';\n\t\t\t$this->location_meta['business_url'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_url'] : '';\n\t\t\t$this->location_meta['business_vat'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_vat'] : '';\n\t\t\t$this->location_meta['business_tax'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_tax'] : '';\n\t\t\t$this->location_meta['business_coc'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_coc'] : '';\n\t\t\t$this->location_meta['business_price_range'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_price_range'] : '';\n\t\t\t$this->location_meta['business_currencies_accepted'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_currencies_accepted'] : '';\n\t\t\t$this->location_meta['business_payment_accepted'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_payment_accepted'] : '';\n\t\t\t$this->location_meta['business_area_served'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_area_served'] : '';\n\t\t\t$this->location_meta['coords']['lat'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['coords']['lat'] : '';\n\t\t\t$this->location_meta['coords']['long'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['coords']['long'] : '';\n\t\t\t$this->location_meta['business_timezone'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_timezone'] : '';\n\t\t\t$this->location_meta['business_logo'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_logo'] : '';\n\t\t\t$this->location_meta['custom_marker'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['custom_marker'] : '';\n\t\t}", "public function update(Request $request, $id)\n {\n \\App::setLocale(\\Session::get('lang'));\n //\n $location=Location::find($id);\n\n if ($request->has('destination'))\n $request->merge(['destination' => 1]);\n else\n $request->merge(['destination' => 0]);\n\n if ($request->has('origin'))\n $request->merge(['origin' => 1]);\n else\n $request->merge(['origin' => 0]);\n\n if($location->update($request->all()))\n {\n// $user->updated_at=time();\n return redirect('location/index');\n }\n\n\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required|string|min:4',\n 'description' => 'required|string|min:4',\n 'price' => 'required|min:3',\n 'size' => 'required|min:2',\n 'rooms_no' => 'required',\n 'floors_no' => 'required',\n 'pathroom_no' => 'required',\n 'phone' => 'required|min:11|max:15'\n\n\n ]);\n\n $property =Property::find($id);\n $property->user_id = auth()->user()->id;\n $property->name = $request->name;\n $property->description = $request->description;\n $property->rooms_no = $request->rooms_no;\n $property->floors_no = $request->floors_no;\n $property->pathroom_no = $request->pathroom_no;\n\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n //dd($images);\n\n //dd($image);\n $name = time() . '.' . $image->getClientOriginalExtension();\n\n $destinationPath = public_path('/images');\n $image->move($destinationPath, $name);\n\n $property->image = $name;\n }\n\n $property->phone= $request->phone;\n $area_name = $request->area_name;\n $row = Area::where('name' , $area_name)->first();\n $property->areas_id = $row->id;\n $property->save();\n session()->flash('success', 'Property Added Successfully');\n return redirect('Property');\n }", "public function update(Request $request, $id){\n $locationData = PurchaseLocation::findOrFail($id);\n\n $validator = Validator::make($request->all(), [\n \"name\" => \"required\",\n \"code_name\" => \"required\",\n ]);\n\n $locationData->name = $request->name;\n $locationData->save();\n\n if(!is_null($locationData)) {\n return response()->json([\"status\" => 201, \"message\" => \"Manufacture Produk berhasil diubah !\", \"data\" => $locationData]);\n } else {\n return response()->json([\"status\" => 404, \"message\" => \"Gagal didaftarkan, periksa kembali !\"]);\n }\n }", "function fn_warehouses_store_locator_update_store_location_post($store_location_data, $store_location_id, $lang_code, $action)\n{\n if (isset($store_location_data['store_type'])\n && $store_location_data['store_type'] === Manager::STORE_LOCATOR_TYPE_PICKUP\n ) {\n /** @var Manager $manager */\n $manager = Tygh::$app['addons.warehouses.manager'];\n $manager->removeWarehouse($store_location_id);\n }\n}", "public function update(StoreCoordinationRequest $request, $slug)\n {\n\n $coordinacion = Coordination::where('slug', '=', $slug)->firstOrFail();\n $coordinacion->fill($request->all());\n $coordinacion->departments()->sync($request->departments);\n $coordinacion->save();\n\n return redirect('coordinations')->with('status', 'Coordinación actualizada correctamente');\n }", "public function update(PropertyClassesFormRequest $request)\n {\n $id = $request->input('id');\n $propertyclasses = \\App\\PropertyClasses::find($id);\n $propertyclasses->title = $request->input('title');\n @$message .= 'Property type updated.<br/>';\n $propertyclasses->is_active = $request->has('is_active') ? 1 : 0;\n $propertyclasses->save();\n $fileprefix = 'property-type-';\n $filepath = 'pictures/';\n $filename = str_replace('tmp/', '', $request->input('tmp_img_path_main'));\n if (is_file('tmp/' . $filename)) {\n \\File::move('tmp/' . $filename, $filepath . $fileprefix . $filename);\n $propertyclasses->image = $filepath . $fileprefix . $filename;\n $propertyclasses->save();\n @$message .= 'Picture saved.<br/>';\n } //is_file('tmp/' . $filename)\n return redirect('/admin/property-classes/edit/' . $id)->withMessage($message);\n }", "function update() {\n\t\t$vars = $this->params['url'];\n\t\t$this->Event->id = $vars['id'];\n\t\t$this->Event->saveField('start', $vars['start']);\n\t\t$this->Event->saveField('end', $vars['end']);\n\t\t$this->Event->saveField('all_day', $vars['allday']);\n\t}", "public function update($id, Request $request)\n {\n try {\n \n $data = $this->getData($request);\n \n $property = Property::findOrFail($id);\n $property->update($data);\n\n return redirect()->route('properties.property.index')\n ->with('success_message', 'Property was successfully updated.');\n } catch (Exception $exception) {\n\n return back()->withInput()\n ->withErrors(['unexpected_error' => 'Unexpected error occurred while trying to process your request.']);\n } \n }", "function Update_houseproperty_Stmt (){\n\nif (isset($_POST[\"Update_houseproperty\"])) {\n\n\n// Defining Variables for houseproperty Update SQL Statement \n\n$PropertyID=$_POST['PropertyID'];\n$OwnerID=$_POST['OwnerID'];\n$Location=$_POST['Location'];\n$UserID=$_POST['UserID'];\n$AgentNo=$_POST['AgentNo'];\n$UpdateSQLhouseproperty = \" UPDATE houseproperty SET \n\nPropertyID='$PropertyID',OwnerID='$OwnerID',Location='$Location',UserID='$UserID',AgentNo='$AgentNo' WHERE PropertyID='$PropertyID'\";\n// END of Update SQL Statement for houseproperty\n\n\n$Result_update = mysql_query($UpdateSQLhouseproperty) or die(mysql_error());} //End If\n}", "function inspiry_property_submit_redirect( $updated = false ) {\n\n\t\t// Do not redirect if user is not logged in and guest property submission is enabled\n\t\tif ( ! is_user_logged_in() && inspiry_guest_submission_enabled() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$redirect_url = '';\n\n\t\t$redirect_page_id = get_option( 'inspiry_property_submit_redirect_page' ); // Custom page to redirect to\n\t\tif ( ! empty( $redirect_page_id ) ) {\n\t\t\t$redirect_page_url = get_permalink( $redirect_page_id );\n\t\t} else {\n\t\t\t$redirect_page_url = realhomes_get_dashboard_page_url( 'properties' ); // Default page to redirect\n\t\t}\n\n\t\tif ( ! empty( $redirect_page_url ) ) {\n\t\t\t$key = 'property-added';\n\t\t\tif ( $updated ) {\n\t\t\t\t$key = 'property-updated';\n\t\t\t}\n\t\t\t$redirect_url = add_query_arg( $key, 'true', $redirect_page_url );\n\t\t}\n\n\t\tif ( ! empty( $redirect_url ) ) {\n\t\t\twp_safe_redirect( $redirect_url );\n\t\t\texit;\n\t\t}\n\n\t\treturn false;\n\t}", "public function update() {\n $update = \\DB::table('agents')\n ->where('id', \\Request::get('id'))\n ->update(array(\n 'name' => \\Request::get('name'),\n 'phone_no' => \\Request::get('phone_no'),\n 'region_id' => \\Request::get('region_id'),\n 'user_id' => \\Auth::user()->id,\n ));\n if ($update) {\n return redirect('/agent')\n ->with('global', '<div class=\"alert alert-success\">Agent successfullly updated</div>');\n } else {\n return redirect('/agent')\n ->with('global', '<div class=\"alert alert-warning\">Agent could not be updated</div>');\n }\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 put($location, $body);", "public function updated($property)\n {\n $this->validateOnly($property);\n }", "public function changeUserLocationAction()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t$user = Application_Model_User::getAuth();\r\n\r\n\t\t\tif ($user == null)\r\n\t\t\t{\r\n\t\t\t\tthrow new RuntimeException('You are not authorized to access this action');\r\n\t\t\t}\r\n\r\n\t\t\t$profile_id = $this->_request->getParam('user_id');\r\n\r\n\t\t\tif (!v::optional(v::intVal())->validate($profile_id))\r\n\t\t\t{\r\n\t\t\t\tthrow new RuntimeException('Incorrect user ID value: ' .\r\n\t\t\t\t\tvar_export($profile_id, true));\r\n\t\t\t}\r\n\r\n\t\t\t$queryOptions = [\r\n\t\t\t\t'auth' => $user,\r\n\t\t\t\t'link' => ['thumbs'=>[[448,320]]],\r\n\t\t\t\t'userVote' => $user != null ? true : false,\r\n\t\t\t\t'thumbs' => [[448,320],[960,960]]\r\n\t\t\t];\r\n\r\n\t\t\tif ($profile_id != null)\r\n\t\t\t{\r\n\t\t\t\t$profile = Application_Model_User::findById($profile_id, true);\r\n\r\n\t\t\t\tif ($profile == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new RuntimeException('Incorrect user ID: ' .\r\n\t\t\t\t\t\tvar_export($profile_id, true));\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$queryOptions['user'] = $profile;\r\n\t\t\t}\r\n\r\n\t\t\t$addressForm = new Application_Form_Address;\r\n\r\n\t\t\tif (!$addressForm->isValid($this->_request->getPost()))\r\n\t\t\t{\r\n\t\t\t\tthrow new RuntimeException(My_Form::outputErrors($addressForm));\r\n\t\t\t}\r\n\r\n\t\t\t$data = $addressForm->getValues();\r\n\r\n\t\t\t$searchParameters = [\r\n\t\t\t\t'latitude' => $data['latitude'],\r\n\t\t\t\t'longitude' => $data['longitude'],\r\n\t\t\t\t'keywords' => $this->_request->getPost('keywords'),\r\n\t\t\t\t'filter' => SearchForm::getFilter($this->_request->getPost('filter')),\r\n\t\t\t\t'category_id' => (array) $this->_request->getPost('category_id'),\r\n\t\t\t\t'radius' => $this->_request->getPost('radius')\r\n\t\t\t];\r\n\r\n\t\t\t$searchForm = new SearchForm;\r\n\r\n\t\t\tif (!$searchForm->isValid($searchParameters))\r\n\t\t\t{\r\n\t\t\t\tthrow new RuntimeException(My_Form::outputErrors($searchForm));\r\n\t\t\t}\r\n\r\n\t\t\t(new Application_Model_Address)->update($data,\r\n\t\t\t\t'id=' . $user['address_id']);\r\n\t\t\tApplication_Model_User::cleanUserCache($user);\r\n\r\n\t\t\t$response = ['status' => 1];\r\n\r\n\t\t\t$result = (new Application_Model_News)->search(['limit' => 15] +\r\n\t\t\t\t$searchParameters, $queryOptions);\r\n\r\n\t\t\tforeach ($result as $post)\r\n\t\t\t{\r\n\t\t\t\t$data = [\r\n\t\t\t\t\t'id' => $post['id'],\r\n\t\t\t\t\t'user_id' => $post['user_id'],\r\n\t\t\t\t\t'cid' => $post['category_id'],\r\n\t\t\t\t\t'lat' => $post['latitude'],\r\n\t\t\t\t\t'lng' => $post['longitude'],\r\n\t\t\t\t];\r\n\r\n\t\t\t\tif ($profile_id == null)\r\n\t\t\t\t{\r\n\t\t\t\t\t$assets = [\r\n\t\t\t\t\t\t'post' => $post,\r\n\t\t\t\t\t\t'owner' => [\r\n\t\t\t\t\t\t\t'Name' => $post['owner_name'],\r\n\t\t\t\t\t\t\t'image_id' => $post['owner_image_id'],\r\n\t\t\t\t\t\t\t'image_name' => $post['owner_image_name']\r\n\t\t\t\t\t\t],\r\n\t\t\t\t\t\t'user' => $user,\r\n\t\t\t\t\t\t'limit' => 350\r\n\t\t\t\t\t];\r\n\r\n\t\t\t\t\tif (!empty($post['link_id']))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$assets['link'] = [\r\n\t\t\t\t\t\t\t'id' => $post['link_id'],\r\n\t\t\t\t\t\t\t'link' => $post['link_link'],\r\n\t\t\t\t\t\t\t'title' => $post['link_title'],\r\n\t\t\t\t\t\t\t'description' => $post['link_description'],\r\n\t\t\t\t\t\t\t'author' => $post['link_author'],\r\n\t\t\t\t\t\t\t'image_id' => $post['link_image_id'],\r\n\t\t\t\t\t\t\t'image_name' => $post['link_image_name']\r\n\t\t\t\t\t\t];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$data['html'] = $this->view->partial('post/view.html', $assets);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$response['data'][] = $data;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception $e)\r\n\t\t{\r\n\t\t\t$response = [\r\n\t\t\t\t'status' => 0,\r\n\t\t\t\t'message' => $e instanceof RuntimeException ? $e->getMessage() :\r\n\t\t\t\t\t'Internal Server Error'\r\n\t\t\t];\r\n\t\t}\r\n\r\n\t\t$this->_helper->json($response);\r\n\t}", "public function update(RouteRequest $request, Route $route)\n {\n $route = Route::find($route->id);\n\n $route->name= $request->name;\n $route->startPoint= $request->startPoint;\n $route->endPoint= $request->endPoint;\n $route->stoppagePoints= json_encode($request->stoppagePoints);\n $route->distanceTravelTime= $request->distanceTravelTime;\n $route->childrenSeat= $request->childrenSeat;\n $route->specialSeat= $request->specialSeat;\n $route->status= $request->status;\n $route->save();\n\n return \\redirect()->route('destination.index')->with('success','Route Edited.');\n }", "public function testUpdate()\n {\n $requestInstance = null;\n\n $this->router->patch('/customers/{id}/relationships/{relationship}', [\n 'middleware' => ['request', 'response'],\n function(\\Luminary\\Http\\Requests\\Update $request) use(&$requestInstance) {\n $requestInstance = $request;\n }\n ]);\n\n $data = [\n 'data' => [\n 'type' => 'location',\n 'id' => '1234'\n ]\n ];\n\n $this->json('PATCH', 'customers/1234/relationships/location', $data , $this->headers());\n\n $this->assertResponseStatus(204);\n $this->assertInstanceOf(\\Luminary\\Http\\Requests\\Update::class, $requestInstance);\n $this->assertInstanceOf(CustomerAuthorize::class, $requestInstance->getAuthorize());\n $this->assertInstanceOf(\\Luminary\\Http\\Requests\\Update::class, $requestInstance->validatorArgs());\n $this->assertInstanceOf(\\Luminary\\Services\\Sanitation\\DefaultSanitizable::class, $requestInstance->getSanitizable());\n }", "public function setLocations(array $data) {}", "public function testUpdateSupplierUsingPUT()\n {\n }", "function submit( \\EndpointLocation $endpoint, \\User $user, array $propArr, $preventOverwrite) {\n// $newValues = getSerPropDataFromWeb();\n// $serviceID = $newValues['SERVICEPROPERTIES']['SERVICE'];\n// if($newValues['SERVICEPROPERTIES']['NAME'] == null || $newValues['SERVICEPROPERTIES']['VALUE'] == null){\n// show_view('error.php', \"A property name and value must be provided.\");\n// die();\n// }\n $serv = \\Factory::getServiceService();\n $sp = $serv->addEndpointProperties($endpoint, $user, $propArr, $preventOverwrite);\n\n $params['propArr'] = $propArr;\n $params['endpoint'] = $endpoint;\n\n show_view(\"service/added_endpoint_properties.php\", $params);\n}", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name'=>'required' \n ]);\n\n $location = Location::find($id);\n $location->name = $request->get('name'); \n $location->save();\n\n return redirect('/locations')->with('success', 'Location updated!');\n }", "protected function put() {\n \t// Update room options\n \n }", "public function editAction()\n {\n parent::editAction();\n $this->_fillMappingsArray();\n $this->_fillAvailableProperties();\n }", "public function testUpdateInvalidLocation() {\n\t\t// create a Location, try to update it without actually updating it and watch it fail\n\t\t$location = new Location(null, $this->profile->getProfileId(), $this->payAttention, $this->sinCity, $this->granjalada, $this->stateOfMind, $this->warZone, $this->aptTwo, $this->whatHood);\n\t\t$location->update($this->getPDO());\n\t}", "public function update(PropertyRequest $request, $id)\n {\n\n $property=Property::find($id);\n $property->cost=$request->cost;\n $property->type_id=$request->type;\n $property->reference=$request->reference;\n $property->room=$request->room;\n $property->bathroom=$request->bathroom;\n $property->map=$request->map;\n $property->user_id=Auth::user()->id;\n $property->region_id=$request->region;\n $property->area=$request->area;\n $property->type=$request->display;\n $property->save();\n PropertyDescription::where('property_id',$id)->delete();\n PropertyDescription::create([\n 'name'=>$request->descEn,\n 'lang'=>'en',\n 'property_id'=>$id\n ]);\n PropertyDescription::create([\n 'name'=>$request->descAr,\n 'lang'=>'ar',\n 'property_id'=>$id\n ]);\n PropertyHeader::where('property_id',$id)->delete();\n PropertyHeader::create([\n 'name'=>$request->headerEn,\n 'lang'=>'en',\n 'property_id'=>$id\n ]);\n PropertyHeader::create([\n 'name'=>$request->headerAr,\n 'lang'=>'ar',\n 'property_id'=>$id\n ]);\n PropertyLabel::where('property_id',$id)->delete();\n PropertyLabel::create([\n 'name'=>$request->labelEn,\n 'lang'=>'en',\n 'property_id'=>$id\n ]);\n PropertyLabel::create([\n 'name'=>$request->labelAr,\n 'lang'=>'ar',\n 'property_id'=>$id\n ]);\n $packages=Input::get('feature');\n $property->feature()->sync($packages);\n $destinationPath=\"uploads/\";\n if($files=$request->file('Images'))\n {\n \tforeach($files as $file)\n {\n \t $name=$file->getClientOriginalName();\n \t $file->move($destinationPath,$file->getClientOriginalName());\n \t $img=new PropertyImage;\n \t $img->property_id=$id;\n \t $img->path=$destinationPath.$file->getClientOriginalName();\n \t $img->save();\n \t}\n }\n return redirect()->route('property.index');\n }", "public function updateEntryLocation() {\n\t\t\n\t\t//NOTE: Replace sample data with get/post/session/db\n\t\t$user_entry_id=1;\n\t\t$current_location=37;\n\t\t$prev_location=113;\n\t\t\n\t\tif($user_entry_id != ''\n\t\t\t&& $current_location != '' \n\t\t\t&& $prev_location != '' \n\t\t\t&& $prev_location != $current_location)\n\t\t{\n\t\t\t$params['location_id'] = $current_location;\n\t\t\t$where = \" user_entry_id = \".$user_entry_id;\n\t\t\t$where .= \" AND location_id = \".$prev_location;\n\t\t\treturn $this->Poc->update($params,$table_name='user_entry',$where);\t\t\t\t\n\t\t}\n\t\treturn false;\n\t}", "public function actionUpdate() {}", "public function actionUpdate() {}", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|array',\n 'title.*' => 'required|string',\n ]);\n\n if ($validator->fails()) {\n return back()->withErrors($validator)->withInput();\n }\n\n $property = Property::findOrFail($id);\n\n foreach ($request->title as $key => $value) {\n $property->setTranslation('title', $key, $value);\n }\n\n $property->update($request->except('title'));\n\n\n //Save new property values\n if ($request->new_values && count($request->new_values) > 0) {\n foreach ($request->new_values as $new_value) {\n $property_value = new PropertyValue();\n foreach ($new_value as $key => $value) {\n $property_value->setTranslation('value', $key, $value);\n }\n $property_value->property_id = $property->id;\n $property_value->save();\n }\n }\n\n //Update old property values\n if ($request->old_values && count($request->old_values) > 0) {\n foreach ($request->old_values as $old_key => $old_value) {\n $property_value = PropertyValue::findOrFail($old_key);\n foreach ($old_value as $key => $value) {\n $property_value->setTranslation('value', $key, $value);\n }\n $property_value->save();\n }\n }\n\n \\Session::flash('success', 'Property Updated Successfully');\n return redirect('property/' . $request->parent_id);\n }", "public function updateLocation()\n {\n $core = Core::dbOpen();\n $sql = \"UPDATE program_locations SET city = :city, state = :state, zip = :zip\n WHERE locationID = :id\";\n $stmt = $core->dbh->prepare($sql);\n $stmt->bindParam(':city', $this->city);\n $stmt->bindParam(':state', $this->state);\n $stmt->bindParam(':zip', $this->zip);\n $stmt->bindParam(':id', $this->locationID);\n \n Core::dbClose();\n \n try {\n if($stmt->execute()) {\n return true;\n }\n } catch (PDOException $e) {\n return false;\n }\n }", "public function saveProperties(){\n\n\t\t$props = $_POST['properties'];\n\t\t$props = $this->sanitizeProperties( $props );\n\t\t$props = apply_filters( 'chef_sections_save_column_properties', $props, $this );\n\n\t\tdo_action( 'chef_sections_before_column_save', $this );\n\n\t\t$saved = update_post_meta(\n\t\t\t$this->post_id,\n\t\t\t'_column_props_'.$this->fullId,\n\t\t\t$props\n\t\t);\n\n\t\tdo_action( 'chef_sections_after_column_save', $this );\n\n\t\t//set the new properties in this class\n\t\t$this->properties = $props;\n\t\treturn $saved;\n\t}", "public function update(Request $request, $id)\n {\n if(Gate::allows('edit-property')){\n $parametri=$request->all();\n $struttura=Struttura::find($id);\n $struttura->nome=$parametri[\"nome\"];\n $struttura->indirizzo=$parametri[\"indirizzo\"];\n $struttura->comune=$parametri[\"comune\"];\n $struttura->provincia=$parametri[\"provincia\"];\n $struttura->cap=$parametri[\"cap\"];\n $struttura->save();\n return redirect()->back();\n }\n\n }", "public function update(Request $request,$id)\n {\n //\n $this->validate($request,[\n 'location' => 'required|unique:tbllocation'. ',id,' . $id,\n 'address' => 'required'\n ]);\n $loc = Location::find($id);\n\n $loc ->location = $request->input('location');\n $loc->address=$request->input('address');\n $loc->save();\n return redirect('/loc')->with('success','Location Updated');\n\n }" ]
[ "0.66786766", "0.62279534", "0.62124825", "0.6158833", "0.6119688", "0.60711944", "0.6018104", "0.5987565", "0.59830767", "0.5955898", "0.59451574", "0.59150356", "0.59138036", "0.59138036", "0.59138036", "0.58964556", "0.58889407", "0.58526474", "0.5839611", "0.5802127", "0.58019096", "0.5788825", "0.57829463", "0.5772086", "0.57694286", "0.57500345", "0.57477224", "0.57380784", "0.5734787", "0.5734019", "0.5734019", "0.5718919", "0.570192", "0.56980157", "0.56934", "0.56812817", "0.56761026", "0.5675693", "0.56270474", "0.5614873", "0.5612788", "0.56068873", "0.5603309", "0.55856836", "0.5585235", "0.55815494", "0.5579307", "0.55673254", "0.5560807", "0.5544729", "0.55420226", "0.5540488", "0.55300295", "0.55096513", "0.5507068", "0.5507068", "0.54992247", "0.5498191", "0.549719", "0.54968184", "0.54941857", "0.54799604", "0.547197", "0.54556805", "0.5441926", "0.5437735", "0.54278356", "0.5425578", "0.5403361", "0.5396736", "0.5392291", "0.53874767", "0.53816384", "0.5378745", "0.5361954", "0.5359559", "0.53564566", "0.5344388", "0.53389025", "0.53282595", "0.5320254", "0.5317683", "0.5313517", "0.53080225", "0.5306369", "0.5301739", "0.530119", "0.53011334", "0.52941114", "0.52928567", "0.5289787", "0.52847165", "0.5283815", "0.527754", "0.527754", "0.52758193", "0.5274002", "0.5258669", "0.5258613", "0.5258305" ]
0.7209083
0
This method will update the basic details of the property
public function updateBasicDetails(Request $request) { //validate $validator = Validator::make($request->all(), [ 'property_id' => "required", 'title' => 'required', 'description' => "required", 'type_id' => "required", "state_id" => "required", "bedroom_count" => "required", "bathroom_count" => "required", "garage_count" => "required", "plot_area" => "required", "construction_area" => "required", "area_unit" => "required" ], [ "property_id.required" => "Invalid Request, Incomplete Parameter" ])->validate(); $property = Property::find($request->property_id); if(is_null($property)) { return redirect()->back()->with("error", "Property Not Found"); } $property->title = $request->title; $property->description = $request->description; $property->type_id = $request->type_id; $property->state_id = $request->state_id; $property->bedroom_count = $request->bedroom_count; $property->bathroom_count = $request->bathroom_count; $property->garage_count = $request->garage_count; $property->plot_area = $request->plot_area; $property->construction_area = $request->construction_area; $property->area_unit = $request->area_unit; $property->save(); return redirect()->back()->with("success", "Property Basic Details Updated Successfully"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function update()\n {\n if (self::checkIfSpecifiedTimePassed()) {\n DB::table('apimo_properties')->truncate();\n self::addOrEditPropertiesToDB(self::getAllRealEstate('properties'));\n }\n }", "public function update() {\n\t\t// When loaded, fully sync the property array.\n\t\tif ($this->loadedSettings !== false) {\n\t\t\t$properties = array();\n\t\t\t$ownProperties = $this->bean->ownProperty;\n\t\t\tforeach ($this->properties as $k => $v) {\n\t\t\t\t$found = false;\n\t\t\t\tforeach ($ownProperties as $property) {\n\t\t\t\t\tif ($property->name === $k) {\n\t\t\t\t\t\t$property->value = $v;\n\t\t\t\t\t\t$found = true;\n\t\t\t\t\t\t$properties[] = $property;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!$found) {\n\t\t\t\t\t$property = R::dispense('property');\n\t\t\t\t\t$property->name = $k;\n\t\t\t\t\t$property->value = $v;\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->bean->ownProperty = $properties;\n\t\t\t// When loaded, only add and modify properties, but do not delete any\n\t\t} elseif (!empty($this->properties)) {\n\t\t\t$ownProperties = $this->bean->ownProperty;\n\t\t\tforeach ($this->properties as $k => $v) {\n\t\t\t\t$found = false;\n\t\t\t\tforeach ($ownProperties as $property) {\n\t\t\t\t\tif ($property->name === $k) {\n\t\t\t\t\t\t$property->value = $v;\n\t\t\t\t\t\t$found = true;\n\t\t\t\t\t\t$this->bean->ownProperty[$property->id] = $property;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!$found) {\n\t\t\t\t\t$property = R::dispense('property');\n\t\t\t\t\t$property->name = $k;\n\t\t\t\t\t$property->value = $v;\n\t\t\t\t\t$this->bean->ownProperty[] = $property;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected function _update()\n {\n \n }", "protected function _update()\n {\n \n }", "public function testUpdateValidProperty() : void {\n\t\t//count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"property\");\n\n\t\t//make a valid property uuid\n\t\t$propertyId = generateUuidV4();\n\n\t\t//make a new property with valid entries\n\t\t$property = new Property($propertyId, $this->VALID_PROPERTYCITY, $this->VALID_PROPERTYCLASS, $this->VALID_PROPERTYLATITUDE, $this->VALID_PROPERTYLONGITUDE, $this->VALID_PROPERTYSTREETADDRESS, $this->VALID_PROPERTYVALUE);\n\n\t\t//insert property\n\t\t$property->insert($this->getPDO());\n\n\t\t//edit the property and update it in MySQL\n\t\t$property->setPropertyValue($this->VALID_PROPERTYVALUE2);\n\t\t$property->update($this->getPDO());\n\n\t\t//grab dah data from mySQL and check that the fields match our expectations\n\t\t$pdoProperty = Property::getPropertyByPropertyId($this->getPDO(), $property->getPropertyId());\n\t\t$this->assertEquals($numRows +1, $this->getConnection()->getRowCount(\"property\"));\n\t\t$this->assertEquals($pdoProperty->getPropertyId()->toString(), $propertyId->toString());\n\t\t$this->assertEquals($pdoProperty->getPropertyCity(), $this->VALID_PROPERTYCITY);\n\t\t$this->assertEquals($pdoProperty->getPropertyClass(), $this->VALID_PROPERTYCLASS);\n\t\t$this->assertEquals($pdoProperty->getPropertyLatitude(), $this->VALID_PROPERTYLATITUDE);\n\t\t$this->assertEquals($pdoProperty->getPropertyLongitude(), $this->VALID_PROPERTYLONGITUDE);\n\t\t$this->assertEquals($pdoProperty->getPropertyStreetAddress(), $this->VALID_PROPERTYSTREETADDRESS);\n\t\t$this->assertEquals($pdoProperty->getPropertyValue(), $this->VALID_PROPERTYVALUE2);\n\t}", "protected function setProperties()\n {\n foreach ($this->data as $key => $value) {\n $this->$key = $value;\n }\n }", "function set_property(){\n }", "public function update()\n {\n }", "public function update()\r\n {\r\n \r\n }", "function editProperties()\n\t{\n\t\tglobal $ilAccess;\n\t\tglobal $tpl, $ilTabs;\n\n\t\t$ilTabs->activateTab(\"properties\");\n\t\t\n\t\t$save = ((strcmp($this->ctrl->getCmd(), \"saveProperties\") == 0)) ? true : false;\n\n\t\tinclude_once(\"./Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$form = new ilPropertyFormGUI();\n\t\t$form->setFormAction($this->ctrl->getFormAction($this, 'properties'));\n\t\t$form->setTitle($this->lng->txt(\"properties\"));\n\t\t$form->setMultipart(false);\n\t\t$form->setId(\"properties\");\n\n\t\t// online\n\t\t$online = new ilCheckboxInputGUI($this->txt(\"mpl_online_property\"), \"online\");\n\t\tif(ilObjMatchMemoPool::_lookupPairCount($this->object->getId()) < ilObjMatchMemoPool::MIN_PAIRS_NUM)\n\t\t{\n\t\t\t$online->setInfo(implode('<br />', array(\n\t\t\t\t$this->txt(\"mpl_online_property_description\"),\n\t\t\t\t'<span style=\"color:red\">' . $this->txt(\"cannot_set_online_not_enough_pairs\") . '</span>'\n\t\t\t)));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$online->setInfo($this->txt(\"mpl_online_property_description\"));\n\t\t}\n\t\t$online->setChecked($this->object->online);\n\t\t$form->addItem($online);\n\n\t\t// add entry to navigation history\n\t\tif ($ilAccess->checkAccess(\"write\", \"\", $_GET[\"ref_id\"])) $form->addCommandButton(\"saveProperties\", $this->lng->txt(\"save\"));\n\n\t\tif ($save)\n\t\t{\n\t\t\t$form->checkInput();\n\t\t}\n\t\t$this->tpl->setVariable(\"ADM_CONTENT\", $form->getHTML());\n\t}", "protected function update() {}", "public function updatePropertyIndex ()\n {\n $new_properties_table = array();\n\n foreach ( $this as $declaration ) {\n\n $name = $declaration->property;\n\n if ( isset( $new_properties_table[ $name ] ) ) {\n $new_properties_table[ $name ]++;\n }\n else {\n $new_properties_table[ $name ] = 1;\n }\n }\n $this->properties = $new_properties_table;\n }", "public function update() {\r\n\r\n\t}", "public function updated($property)\n {\n $this->validateOnly($property);\n }", "protected function _update()\n\t{\n\t}", "public function initMutateProperty()\n {\n foreach ( $this->initMutateProperties as $property ) {\n $this->mutateProperties[ $property ] = $this->{$property};\n }\n $this->view->addParams( [\n 'mutateProperties' => $this->mutateProperties\n ] );\n }", "function update() {\n\n\t\t\t}", "public function update() {\r\n }", "protected function fillProperties()\n {\n foreach ($this as $key => $value) {\n if ($this->isPrivate($key)) {\n continue;\n }\n $this->currentProperties[\"{$key}\"] = $value;\n $this->newProperties[\"{$key}\"] = $value;\n }\n }", "public function update()\n\t{\n\n\t}", "public function testUpdateMember()\n {\n }", "public function getUpdatedProperties() {}", "public function edit(Property $property)\n {\n //\n }", "public function edit(Property $property)\n {\n //\n }", "public function update(Property $property)\n {\n //$this->authorize('update-property', $property);\n if(Gate::denies('update-property',$property)) {\n return redirect(\"property\")->with([\n 'status' => 'success',\n 'flash_message' => 'You are not authorized to update this property',\n ]);\n }\n // dd($request);\n //$input = $this->requestValidate();\n //dd($input);\n //$input['user_id'] = auth()->user()->id;\n //$input['slug'] = strtolower(preg_replace('/\\s+/', '-', $request->title));\n //$property = auth()->user()->create($input);\n //$property->tags()->attach($request->input('tag_list'));\n // //$property->location()->attach($request->input('plocation'));\n // if(! request()->cover_image){\n // request()->cover_image = 'property/defaultproperty.png';\n // }\n try {\n $property->update($this->requestValidate() + ['slug' => strtolower(preg_replace('/\\s+/', '-', request()->title)),'cover_image' => request()->cover_image]);\n $this->updateImage($property,'property');\n $property->tags()->sync(request()->get('tag_list'));\n\n return redirect(\"property\")->with([\n 'status' => 'success',\n 'flash_message' => $property->title.' was published successfully',\n ]);\n } catch (Exception $e) {\n return redirect()->route('property.index')->with([\n 'status' => 'danger',\n 'flash_message' => $e->getMessage(),\n ]);\n }\n }", "public function update() {\n \n }", "public function testUpdatePackingPlanCustomFields()\n {\n }", "public function update() {\n parent::update();\n }", "public function update()\n {\n \n }", "public function update()\n {\n \n }", "public function update()\n {\n if ( ! $this->bean->getId()) {\n $this->bean->user = R::dispense('user')->current();\n }\n $this->bean->year = date('Y', strtotime($this->bean->invoicedate));\n $this->bean->m = date('m', strtotime($this->bean->invoicedate));\n $this->bean->d = date('d', strtotime($this->bean->invoicedate));\n $this->bean->yearname = $this->bean->year.$this->bean->name;\n parent::update();\n }", "public function update () {\n\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function setToUpdate()\n\t{\n\t\t$this->todo = 2 ;\n\t}", "public function update() {\r\n\t\t$this->getMapper()->update($this);\r\n\t}", "public function update()\r\n {\r\n //\r\n }", "public function testUpdateReplenishmentCustomFields()\n {\n }", "protected function _updatefields() {}", "public function update()\n {\n //\n }", "public function update()\n {\n //\n }", "function updateProperties($mutations);", "public function update()\n {\n\n }", "public function update()\n {\n\n }", "protected function update( $data = array() )\n {\n foreach ( $data as $property => $value ) {\n if ( property_exists( get_called_class(), $property ) ) {\n $this->$property = $value;\n }\n }\n }", "function properties()\n {\n }", "function setProperty() {\n $instance = $this->CI->ciwy->current_instance[$this->component_name];\n $properties = func_get_arg(0);\n if (is_array($properties)) {\n foreach($properties as $key => $val) {\n if ( ! isset($this->component_property[$key])) {\n $message = '[' . $this->CI->ciwy->library_name . '] '. $key . ' is not a '.$this->component_name .' Property.';\n log_message('error', $message);\n show_error($message);\n } else {\n $this->CI->ciwy->component_config[$instance]['Config'][$key] = $val;\n }\n }\n }\n }", "public function update(): void\n {\n // Update quality\n $this->item->quality = self::QUALITY_MAX;\n }", "public function setUpdated(): void\n {\n $this->originalData = $this->itemReflection->dehydrate($this->item);\n }", "public function dset($property,$value){\n $this->$property = $value;\n $table = $this->table;\n $id = $this->id; \n LAIKA_Database::update($table, $property, $value, \"id = $id\");\n }", "protected function setupUpdateOperation()\n {\n CRUD::setValidation(SettingRequest::class);\n\n $readonly = [];\n if (User::min('id') !== backpack_user()->id) {\n $readonly = ['readonly' => 'readonly'];\n }\n\n CRUD::field('key')->type('text')->label('ID key')->attributes($readonly);\n CRUD::field('name')->type('text')->label('Nom');\n CRUD::field('value')->type(CRUD::getCurrentEntry()->type)->label('Contenu');\n }", "public function testUpdateExtraFields(): void { }", "public function update() {\n global $db;\n $this->_preupdate();\n $sql_set = '';\n $data = array();\n foreach($this->_magicProperties as $key=>$value)\n {\n $sql_set .= \"`\".addslashes($key).\"`=\";\n $sql_set .= \"?,\";\n $data[] = $value;\n }\n $sql_set = substr($sql_set, 0, -1);\n\n $query = \"UPDATE {$this->table} SET $sql_set WHERE \".$this->id_field.\"=?;\";\n $data[] = $this->{'get'.$this->id_field}();\n\n $result = $db->query($query,$data);\n $this->_postupdate($result);\n return $result;\n }", "public function update()\n\t{\n\t\t$this->getModel()->update($this);\n\t}", "public function testSetProperties() {\n\t\t$this->CurrentConditions->update(\n\t\t\t.70,\n\t\t\t.33,\n\t\t\t.34\n\t\t);\n\n\t\t$reflection = new ReflectionClass($this->CurrentConditions);\n\t\t$reflectionTemperature = $reflection->getProperty('temperature');\n\t\t$reflectionTemperature->setAccessible(TRUE);\n\t\t$reflectionHumidity = $reflection->getProperty('humidity');\n\t\t$reflectionHumidity->setAccessible(TRUE);\n\n\t\t$this->assertSame(\n\t\t\t$reflectionTemperature->getValue($this->CurrentConditions),\n\t\t\t.70\n\t\t);\n\t\t$this->assertSame(\n\t\t\t$reflectionHumidity->getValue($this->CurrentConditions),\n\t\t\t.33\n\t\t);\n\t}", "protected function _applyObjectProperty()\r\t{\r\t\t//parent::_applyObjectProperty();\r\r\n\t\t$oConstantLogin = Core_Entity::factory('Constant')->getByName('HOSTCMS_USER_LOGIN');\r\n\t\t$oConstantNumber = Core_Entity::factory('Constant')->getByName('HOSTCMS_CONTRACT_NUMBER');\r\n\t\t$oConstantPin = Core_Entity::factory('Constant')->getByName('HOSTCMS_PIN_CODE');\r\n\r\n\t\tif (is_null($oConstantLogin))\r\n\t\t{\r\n\t\t\t$oConstantLogin = Core_Entity::factory('Constant');\r\n\t\t\t$oConstantLogin->name = 'HOSTCMS_USER_LOGIN';\r\n\t\t\t$oConstantLogin->active = 1;\r\n\t\t}\r\n\r\n\t\tif (is_null($oConstantNumber))\r\n\t\t{\r\n\t\t\t$oConstantNumber = Core_Entity::factory('Constant');\r\n\t\t\t$oConstantNumber->name = 'HOSTCMS_CONTRACT_NUMBER';\r\n\t\t\t$oConstantNumber->active = 1;\r\n\t\t}\r\n\r\n\t\tif (is_null($oConstantPin))\r\n\t\t{\r\n\t\t\t$oConstantPin = Core_Entity::factory('Constant');\r\n\t\t\t$oConstantPin->name = 'HOSTCMS_PIN_CODE';\r\n\t\t\t$oConstantPin->active = 1;\r\n\t\t}\r\n\r\n\t\t$oConstantLogin->value = Core_Array::getPost('HOSTCMS_USER_LOGIN');\r\n\t\t$oConstantLogin->save();\r\n\r\n\t\t$oConstantNumber->value = Core_Array::getPost('HOSTCMS_CONTRACT_NUMBER');\r\n\t\t$oConstantNumber->save();\r\n\r\n\t\t$oConstantPin->value = Core_Array::getPost('HOSTCMS_PIN_CODE');\r\n\t\t$oConstantPin->save();\r\n\r\n\t\tCore_Event::notify(get_class($this) . '.onAfterRedeclaredApplyObjectProperty', $this, array($this->_Admin_Form_Controller));\r\t}", "public function flushProperties()\n\t{\n\t\t$this->properties = array();\n\t}", "public function update(): void\n {\n $this->updateQuality();\n $this->updateSellIn();\n $this->expiresAfterSale();\n }", "protected function resetProperties() {}", "private function api_set_properties( $properties ) {\n\n\t\t// Verify tracking status\n\t\tif ( $this->disable_tracking() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// identify user first\n\t\t$this->set_named_identity( null );\n\n\t\t// remove blank properties\n\t\tif( isset( $properties[''] ) ) {\n\t\t\tunset( $properties[''] );\n\t\t}\n\n\t\t// record the properties\n\t\t$this->get_api()->set( $properties );\n\t}", "public function updating()\n {\n # code...\n }", "public function updatePropertyToFacebook($property,$isNew){\n require JPATH_ROOT.'/components/com_osproperty/helpers/inc/facebook.php';\n require_once JPATH_ROOT.'/components/com_osproperty/helpers/route.php';\n $configClass = self::loadConfig();\n $needs = array();\n $needs[] = \"property_details\";\n $needs[] = $property->id;\n $itemid = OSPRoute::getItemid($needs);\n $url = JURI::root().\"index.php?option=com_osproperty&task=property_details&id=$property->id&Itemid=\".$itemid;\n $url = self::get_tiny_url($url);\n switch ($isNew){\n case \"1\":\n $message = JText::_('OS_NEW_PROPERTY_POSTED');\n break;\n default:\n $message = JText::_('OS_PROPERTY_UPDATED');\n break;\n }\n $appid = $configClass['fb_app_id'];\n $appkey = $configClass['fb_app_secret'];\n\n if(!$facebook = new Facebook(array( 'appId' => $appid, 'secret' => $appkey, 'cookie' => true ))) return false;\n\n $access_token = $configClass['access_token'];\n if($access_token == \"\") {return false;}\n $facebook->setAccessToken($access_token);\n\n $message .= '@ '.$url;\n\n $db = JFactory::getDbo();\n $db->setQuery(\"Select image from #__osrs_photos where pro_id = '$property->id'\");\n $image = $db->loadResult();\n $thumb = \"\";\n if(($image != \"\") and (file_exists(JPATH_ROOT.'/images/osproperty/properties/'.$property->id.'/medium/'.$image))){\n $thumb = JUri::root().'images/osproperty/properties/'.$property->id.'/medium/'.$image;\n }\n\t\tif(OSPHelper::getLanguageFieldValue($property,'price_text') != \"\"){\n\t\t\t$message .= \" - \".OSPHelper::getLanguageFieldValue($property,'price_text');\n\t\t}elseif(($property->price_call == 0) and ($property->price > 0)){\n $message .= \" - \".HelperOspropertyCommon::showPrice($property->price).\" \".self::loadCurrencyCode($property->curr);\n if($property->rent_time != \"\"){\n $message .= \" \".JText::_($property->rent_time);\n }\n }\n\t\tif((int)$configClass['facebook_version'] == 0){\n\t\t\t$fbpost = array(\n\t\t\t\t'message' => $message,\n\t\t\t\t'link' => $url\n\t\t\t);\n\t\t}else{\n\t\t\t$fbpost = array(\n\t\t\t\t'message' => $message,\n\t\t\t\t'name' => $property->pro_name,\n\t\t\t\t'caption' => $property->pro_name,\n\t\t\t\t'link' => $url,\n\t\t\t\t'picture' => $thumb\n\t\t\t);\n\t\t}\n $fb_target = $configClass['fb_target'];\n if($fb_target == \"\"){\n $post_url = \"/me/feed/\";\n }else{\n $post_url = \"/\".$fb_target.\"/feed/\";\n }\n $result = $facebook->api($post_url, 'post', $fbpost);\n return $result;\n }", "protected function buildPropertyInfoAlter() {\n }", "public function update(){\n\n }", "public function update(){\n\n }", "private function update(array $data)\n {\n foreach ($data as $property => $value) {\n if (property_exists($this, $property)) {\n $this->$property = $value;\n }\n }\n }", "public function testUpdate(): void { }", "function __set($name, $value){\n //var_dump($value);\n\n $this->_properties[$name] = $value;\n }", "protected function put() {\n \t// Update room options\n \n }", "public function testUpdatePayslip()\n {\n }", "public function updateProperty($id)\n {\n $apiURL = config('site-config.api-url').'property_xml.asp?id='.$id.'&siteID='.config('site-config.siteID');\n\n try{\n $client = new Client([\n 'verify' => false\n ]);\n $response = $client->request('GET', $apiURL);\n $statusCode = $response->getStatusCode();\n $body = $response->getBody()->getContents();\n\n $xml = simplexml_load_string($body, 'SimpleXMLElement', LIBXML_NOCDATA);\n $json = json_encode($xml);\n $array = json_decode($json,TRUE);\n\n //$arr = $this->xml2array($xml);\n\n\n\n $property_detailModel = new PropertyDetails();\n $crval = array();\n $crval = [\n 'propertycode' => $array['property']['propertycode'],\n ];\n\n if(!empty($array['property']['propertyname'])){\n $crval['propertyname'] = $array['property']['propertyname'];\n }\n if(!empty($array['property']['propertystars'])){\n $crval['propertystars'] = $array['property']['propertystars'];\n }\n if(!empty($array['property']['propertypostcode'])){\n $crval['propertypostcode'] = $array['property']['propertypostcode'];\n }\n\n if(!empty($array['property']['longitude'])){\n $crval['longitude'] = $array['property']['longitude'];\n }\n\n if(!empty($array['property']['latitude'])){\n $crval['latitude'] = $array['property']['latitude'];\n }\n\n if(!empty($array['property']['country'])){\n $crval['country'] = $array['property']['country'];\n }\n\n if(!empty($array['property']['countryiso'])){\n $crval['countryiso'] = $array['property']['countryiso'];\n }\n \n if(!empty($array['property']['sleeps'])){\n $crval['sleeps'] = $array['property']['sleeps'];\n }\n\n if(!empty($array['property']['balance'])){\n $crval['balance'] = $array['property']['balance'];\n }\n\n if(!empty($array['property']['deposit'])){\n $crval['deposit'] = $array['property']['deposit'];\n }\n\n if(!empty($array['property']['deposittype'])){\n $crval['deposittype'] = $array['property']['deposittype'];\n }\n\n if(!empty($array['property']['typename'])){\n $crval['typename'] = $array['property']['typename'];\n }\n if(!empty($array['property']['regionname'])){\n $crval['regionname'] = $array['property']['regionname'];\n }\n\n if(!empty($array['property']['capacity']['adults'])){\n $crval['adults'] = $array['property']['capacity']['adults'];\n }\n if(!empty($array['property']['capacity']['children'])){\n $crval['children'] = $array['property']['capacity']['children'];\n }\n if(!empty($array['property']['capacity']['infants'])){\n $crval['infants'] = $array['property']['capacity']['infants'];\n }\n\n if(!empty($array['property']['bedrooms_new'])){\n $crval['bedrooms_new'] = $array['property']['bedrooms_new'];\n }\n\n if(!empty($array['property']['bathrooms_new'])){\n $crval['bathrooms_new'] = $array['property']['bathrooms_new'];\n }\n\n if(!empty($array['property']['deposittype'])){\n $crval['deposittype'] = $array['property']['deposittype'];\n }\n\n if(!empty($array['property']['checkin'])){\n $crval['checkin'] = $array['property']['checkin'];\n }\n\n if(!empty($array['property']['checkout'])){\n $crval['checkout'] = $array['property']['checkout'];\n }\n\n if(!empty($array['property']['title'])){\n $crval['title'] = $array['property']['title'];\n }\n\n if(!empty($array['property']['metadescription'])){\n $crval['metadescription'] = $array['property']['metadescription'];\n }\n\n if(!empty($array['property']['metakeywords'])){\n $crval['metakeywords'] = $array['property']['metakeywords'];\n }\n\n\n if(!empty($array['property']['siteID'])){\n $crval['siteID'] = $array['property']['siteID'];\n }\n\n if(!empty($array['property']['ownerID'])){\n $crval['ownerID'] = $array['property']['ownerID'];\n }\n\n if(!empty($array['property']['propertyownerID'])){\n $crval['propertyownerID'] = $array['property']['propertyownerID'];\n }\n\n if(!empty($array['property']['groupID'])){\n $crval['groupID'] = $array['property']['groupID'];\n }\n\n if(!empty($array['property']['managerID'])){\n $crval['managerID'] = $array['property']['managerID'];\n }\n\n if(!empty($array['property']['managername'])){\n $crval['managername'] = $array['property']['managername'];\n }\n\n if(!empty($array['property']['manageremail'])){\n $crval['manageremail'] = $array['property']['manageremail'];\n }\n\n if(!empty($array['property']['propertyminbookingdays'])){\n $crval['propertyminbookingdays'] = $array['property']['propertyminbookingdays'];\n }\n\n if(!empty($array['property']['propertyaddress'])){\n $crval['propertyaddress'] = $array['property']['propertyaddress'];\n }\n\n if(!empty($array['property']['availabilitylink'])){\n $crval['availabilitylink'] = $array['property']['availabilitylink'];\n }\n\n if(!empty($array['property']['webdescription'])){\n $crval['webdescription'] = $array['property']['webdescription'];\n }\n\n if(!empty($array['property']['cottageweblocation'])){\n $crval['cottageweblocation'] = $array['property']['cottageweblocation'];\n }\n\n if(!empty($array['property']['lastupdate'])){\n $crval['lastupdate'] = $this->changeDateFormate($array['property']['lastupdate']);\n }\n\n if(!empty($array['property']['photolastupdate'])){\n $crval['photolastupdate'] = $this->changeDateFormate($array['property']['photolastupdate']);\n }\n\n $crval['json_data'] = $json;\n $getPropertyDetails = PropertyDetails::where('propertycode',$id)->get()->toArray();\n\n if(isset($getPropertyDetails) && !empty($getPropertyDetails)){\n\n //$PropertyDetails = $property_detailModel->where('id',$getPropertyDetails[0]['id'])->update($crval);\n\n }else{\n \n $PropertyDetails = $property_detailModel->create($crval);\n\n /*$getPropertyImages = PropertyImages::where('propertycode',$id)->get();\n foreach ($getPropertyImages as $getPropertyImage){\n $getPropertyImage->delete();\n }*/\n\n $property_imagesModel = new PropertyImages();\n foreach($array['property']['photos']['img'] as $key => $value){\n $images = array();\n $images = [\n 'propertycode' => $array['property']['propertycode'],\n 'main' => $value['main'],\n 'thumb' => $value['thumb'],\n 'tiny' => $value['tiny'],\n ];\n $ImagesDetails = $property_imagesModel->create($images);\n }\n\n /*$getPropertyVariables = PropertyVariables::where('propertycode',$id)->get();\n foreach ($getPropertyVariables as $getPropertyVariable){\n $getPropertyVariable->delete();\n }*/\n\n $property_variablesModel = new PropertyVariables();\n foreach($array['property']['variables']['varcat'] as $key => $value){\n $variables = array();\n $variables = [\n 'propertycode' => $array['property']['propertycode'],\n 'varcatname' => $value['varcatname'],\n 'varcatcombined' => $value['varcatcombined'],\n ];\n $VariablessDetails = $property_variablesModel->create($variables);\n }\n\n /*$getPropertyOptions = PropertyOptions::where('propertycode',$id)->get();\n foreach ($getPropertyOptions as $getPropertyOption){\n $getPropertyOption->delete();\n }*/\n\n $property_optionsModel = new PropertyOptions();\n foreach($array['property']['options']['option_db'] as $key => $value){\n $options = array();\n $options = [\n 'propertycode' => $array['property']['propertycode'],\n 'name' => $value['name'],\n 'price' => $value['price'],\n //'pricetype' => $value['pricetype'],\n 'maxQty' => $value['maxQty'],\n //'allowedDates' => $value['allowedDates'],\n 'defaultQty' => $value['defaultQty'],\n //'img' => $value['img'],\n 'optionPayment' => $value['optionPayment'],\n ];\n if(!empty($value['description'])){\n $options['description'] = $value['description'];\n }\n $OptionsDetails = $property_optionsModel->create($options);\n\n }\n }\n\n\n \n\n } catch (\\Exception $ex){\n return response()->json([['success'=>false, \"error\"=>$ex->getMessage()]]);\n }\n\n }", "protected function save($property) {\n\t\t/** @var \\Interfaces\\Shared\\Database $database */\n\t\t$database = $this->dependence_objects['database'];\n\t\tif ($property) {\n\t\t\t$connection = $database->getConnection();\n\t\t\t$connection->exec('UPDATE config SET '.$property.' = \\''.$connection->escapeString($this->$property).'\\'');\n\t\t\t$this->initialize();\n\t\t}\n\t}", "abstract protected function update ();", "public function updatePropertyToTwitter($property,$isNew){\n require JPATH_ROOT.'/components/com_osproperty/helpers/tw/TwitterAPIExchange.php';\n require_once JPATH_ROOT.'/components/com_osproperty/helpers/route.php';\n $configClass = self::loadConfig();\n $needs = array();\n $needs[] = \"property_details\";\n $needs[] = $property->id;\n $itemid = OSPRoute::getItemid($needs);\n $url = JURI::root().\"index.php?option=com_osproperty&task=property_details&id=$property->id&Itemid=\".$itemid;\n $url = self::get_tiny_url($url);\n switch ($isNew){\n case \"1\":\n $message = JText::_('OS_NEW_PROPERTY_POSTED');\n break;\n default:\n $message = JText::_('OS_PROPERTY_UPDATED');\n break;\n }\n $consumer_key = $configClass['consumer_key'];\n $consumer_secret = $configClass['consumer_secret'];\n $tw_access_token = $configClass['tw_access_token'];\n $tw_access_token_secret = $configClass['tw_access_token_secret'];\n\n /* Create a TwitterOauth object with consumer/user tokens. */\n $settings = array(\n 'consumer_key' => $consumer_key,\n 'consumer_secret' => $consumer_secret,\n 'oauth_access_token' => $tw_access_token,\n 'oauth_access_token_secret' => $tw_access_token_secret\n );\n $twitter = new TwitterAPIExchange($settings);\n\n if(OSPHelper::getLanguageFieldValue($property,'price_text') != \"\"){\n\t\t\t$message .= \" - \".OSPHelper::getLanguageFieldValue($property,'price_text');\n\t\t}elseif(($property->price_call == 0) and ($property->price > 0)){\n $message .= \" - \".HelperOspropertyCommon::showPrice($property->price).\" \".self::loadCurrencyCode($property->curr);\n if($property->rent_time != \"\"){\n $message .= \" \".JText::_($property->rent_time);\n }\n }\n\n $postFields = array(\n 'status' => $message.' '.$url\n );\n $rs = json_decode($twitter->buildOauth('https://api.twitter.com/1.1/statuses/update.json', 'POST')->setPostfields($postFields)->performRequest());\n\n return $rs;\n }", "public function __set($property, $value)\n {\n switch ($property) {\n\n case 'name':\n if(!empty($value) && is_string($value)) {\n $this->name = $value;\n $this->changed = true;\n break;\n } else {\n echo 'Wrong type of property, it should be string';\n break;\n }\n \n case 'status':\n if(!empty($value) && is_int($value)) {\n $this->status = $value;\n $this->changed = true;\n break;\n } else {\n echo 'Wrong type of property, it should be integer';\n break;\n }\n \n }\n }", "public function update();", "public function update();", "public function update();", "public function update();", "public function setProperties($properties)\n {\n\n }", "public function actionProperty() {\n\t\ttry {\n\t\t\t\\Yii::trace(__METHOD__.'()', 'sweelix.yii1.admin.structure.controllers');\n\t\t\t$notice = false;\n\t\t\tif(isset($_POST[Html::modelName($this->currentContent)]) === true) {\n\t\t\t\t$originalNodeId = $this->currentContent->nodeId;\n\t\t\t\t$this->currentContent->setScenario('updateProperty');\n\t\t\t\t$this->currentContent->attributes = $_POST[Html::modelName($this->currentContent)];\n\t\t\t\tif(\\CPropertyValue::ensureBoolean($_POST[Html::modelName($this->currentContent)]['contentStartDateActive']) === false) {\n\t\t\t\t\t$this->currentContent->contentStartDate = null;\n\t\t\t\t}\n\t\t\t\tif(\\CPropertyValue::ensureBoolean($_POST[Html::modelName($this->currentContent)]['contentEndDateActive']) === false) {\n\t\t\t\t\t$this->currentContent->contentEndDate = null;\n\t\t\t\t}\n\n\t\t\t\t$this->currentContent->authorId = \\Yii::app()->user->id;\n\t\t\t\tif($this->currentContent->validate() === true) {\n\t\t\t\t\tif($this->currentContent->save() === true) {\n\t\t\t\t\t\tif($this->currentContent->nodeId !== $originalNodeId) {\n\t\t\t\t\t\t\t$this->currentContent->move('top');\n\t\t\t\t\t\t\t$originalNode = Node::model()->findByPk($originalNodeId);\n\t\t\t\t\t\t\tif($originalNode !== null) {\n\t\t\t\t\t\t\t\t$originalNode->reOrder();\n\t\t\t\t\t\t\t\t$this->redirect(array('property', 'contentId'=>$this->currentContent->contentId));\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$notice = true;\n\t\t\t}\n\n\t\t\t$criteriaBuilder = new CriteriaBuilder('node');\n\t\t\t$criteriaBuilder->orderBy('nodeLeftId', 'asc');\n\t\t\t$treeDataProvider = $criteriaBuilder->getActiveDataProvider(array('pagination' => false));\n\n\t\t\t$criteriaBuilder = new CriteriaBuilder('template');\n\t\t\t$criteriaBuilder->filterBy('templateType', 'single');\n\t\t\t$criteriaBuilder->orderBy('templateTitle');\n\t\t\t$templatesDataProvider = $criteriaBuilder->getActiveDataProvider(array('pagination' => false));\n\n\t\t\t$contentCriteriaBuilder = new CriteriaBuilder('content');\n\t\t\t$contentCriteriaBuilder->filterBy('contentId', $this->currentContent->contentId);\n\n\t\t\tif(\\Yii::app()->request->isAjaxRequest === true) {\n\t\t\t\t$this->renderPartial('_property', array(\n\t\t\t\t\t'create' => false,\n\t\t\t\t\t'content'=>$this->currentContent,\n\t\t\t\t\t'treeDataProvider'=>$treeDataProvider,\n\t\t\t\t\t'templatesDataProvider'=>$templatesDataProvider,\n\t\t\t\t\t'contentsDataProvider' => $contentCriteriaBuilder->getActiveDataProvider(array('pagination' => false)),\n\t\t\t\t\t'notice' => $notice,\n\t\t\t\t));\n\t\t\t} else {\n\t\t\t\t$this->setCurrentNode($this->currentContent->node);\n\t\t\t\t$this->render('property', array(\n\t\t\t\t\t'create' => false,\n\t\t\t\t\t'breadcrumb' => $this->buildBreadcrumb($this->currentContent->contentId),\n\t\t\t\t\t'mainMenu' => $this->buildMainMenu(2, 1),\n\t\t\t\t\t'content' => $this->currentContent,\n\t\t\t\t\t'treeDataProvider'=>$treeDataProvider,\n\t\t\t\t\t'templatesDataProvider'=>$templatesDataProvider,\n\t\t\t\t\t'contentsDataProvider' => $contentCriteriaBuilder->getActiveDataProvider(array('pagination' => false)),\n\t\t\t\t\t'notice' => $notice,\n\t\t\t\t));\n\t\t\t}\n\t\t} catch(\\Exception $e) {\n\t\t\t\\Yii::log('Error in '.__METHOD__.'():'.$e->getMessage(), \\CLogger::LEVEL_ERROR, 'sweelix.yii1.admin.structure.controllers');\n\t\t\tthrow $e;\n\t\t}\n\t}", "public function run(){\r\n\t\tforeach ($this->propertyObj->ViewAllDetailedProperty as $key => $value) {\r\n\r\n\t\t\t$propertyXmlConvert = PropertyHelper::convert($value);\r\n\r\n\r\n\t\t\t//Check if that property already exists through \"PropertyCode\" field\r\n\t\t\tif( $property = $this->propertyExists($propertyXmlConvert['code'] ) ){\r\n\t\t\t\t\r\n\t\t\t\t//If Change code has changed mean property has an updated data\r\n\t\t\t\tif($this->propertyUpdated($property->change_code, $propertyXmlConvert['change_code'])){\r\n\r\n\t\t\t\t\t$this->updatedProperties[] = $propertyXmlConvert;\r\n\t\t\t\t\r\n\t\t\t\t\t//Save it To Update Property Array\r\n\t\t\t\t\t$this->updateProperty($property->code, $propertyXmlConvert);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t//Create New Property But Only Those Which are Not Archived or archived == false and also Status == \"Active\"\r\n\t\t\t\t\r\n\t\t\t\tif( ($value->PropertyStatus == \"Active\") && ($value->PropertyArchived == \"false\" ) ){\r\n\r\n\t\t\t\t\t$this->createProperty($propertyXmlConvert);\r\n\t\t\t\t\t//Save it To New Property Array\r\n\t\t\t\t\t$this->newProperties[] = $propertyXmlConvert;\r\n\t\t\t\t\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $this;\t\r\n\r\n\t}", "abstract protected function updateSpecificProperties($row);", "abstract protected function properties();", "function setProperty($property,$value=null){\n\t\t/*\n\t\t * This function is useful to call right after adding the filed:\n\t\t *\n\t\t * $this->addField('line','login')->setProperty('not null');\n\t\t */\n\t\treturn $this->setFieldProperty($this->last_field,$property,$value);\n\t}", "function updateTest()\n {\n $this->cD->updateElement(new Product(1, \"Trang\"));\n }", "abstract protected function propertySet($name, $value);", "public function updateFieldsPersonalization()\n\t{\n\t\tConfiguration::updateValue('PS_MR_SHOP_NAME', Tools::getValue('Expe_ad1'));\n\t\t$this->_html .= '<div class=\"conf confirm\"><img src=\"'._PS_ADMIN_IMG_.'/ok.gif\" alt=\"\" /> '.$this->l('Settings updated').'</div>';\t\t\n\t}", "public function __set($property, $value) {}", "function commerce_store_ui_entity_property_info_alter(&$info) {\n $info['commerce_store']['properties']['edit_url'] = array(\n 'label' => t('Edit URL'),\n 'description' => t(\"The URL of the store's edit page.\"),\n 'getter callback' => 'commerce_store_get_properties',\n 'type' => 'uri',\n );\n}" ]
[ "0.6923822", "0.68684703", "0.6446486", "0.6446486", "0.6444383", "0.64082736", "0.63853353", "0.6317912", "0.6306556", "0.6300753", "0.62676156", "0.62123805", "0.6200455", "0.61912125", "0.6191038", "0.61856204", "0.61530495", "0.6133714", "0.61332744", "0.6120821", "0.61076605", "0.6054206", "0.60456514", "0.60456514", "0.6038015", "0.60360175", "0.6026918", "0.60268", "0.6025744", "0.6025744", "0.60111463", "0.6006885", "0.60025615", "0.60025615", "0.60025615", "0.60025615", "0.60025615", "0.60025615", "0.60025615", "0.60025615", "0.60025615", "0.60025615", "0.60025615", "0.60025615", "0.5999909", "0.5993861", "0.59799016", "0.5963037", "0.5949127", "0.5948378", "0.5948378", "0.5934718", "0.59258455", "0.59258455", "0.59255403", "0.5919117", "0.5899672", "0.5887033", "0.58849823", "0.58507997", "0.5828568", "0.5817529", "0.5788613", "0.57799625", "0.57786417", "0.5758975", "0.57531554", "0.57466525", "0.57450813", "0.57120335", "0.571078", "0.5707606", "0.56816345", "0.56613034", "0.56613034", "0.56576335", "0.5655379", "0.56515586", "0.5650743", "0.5645498", "0.563703", "0.56358385", "0.5634059", "0.5632397", "0.5632307", "0.56274253", "0.56274253", "0.56274253", "0.56274253", "0.56181043", "0.5611708", "0.56097186", "0.56079865", "0.5591015", "0.5589356", "0.5589196", "0.55848396", "0.5582834", "0.5579028", "0.5578935" ]
0.5910352
56
This method is used to update the pricing information form the Change Pricing tab in the admin dashboard of editing properties
public function updatePricing(Request $request) { //validate $validator = Validator::make($request->all(), [ 'property_id' => "required", 'currency_id' => 'required', ], [ "property_id.required" => "Invalid Request, Incomplete Parameter" ])->validate(); $property = Property::find($request->property_id); if(is_null($property)) { return redirect()->back()->with("error", "Property Not Found"); } $property->is_featured = !is_null($request->is_featured) ? true : false; $property->is_public = !is_null($request->is_public) ? true : false; $property->sale = !is_null($request->sale) ? true : false; $property->rental = !is_null($request->rental) ? true : false; $property->current_selling_price = $request->current_selling_price; $property->current_rental_price = $request->current_rental_price; $property->original_selling_price = $request->original_selling_price; $property->original_rental_price = $request->original_rental_price; $property->currency_id = $request->currency_id; $property->save(); return redirect()->back()->with("status", "Property Pricing details updated Successfully"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function editPriceMoney(){\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public function editPricing($id_ressource, $id_pricing, $price_day, $price_night, $price_we){\n\t\t\t\n\t\t$sql = \"update sy_j_resource_pricing set price_day=?, price_night=?, price_we=? \n\t\t where id_resource=? AND id_pricing=?\";\n\t\t$this->runRequest($sql, array($price_day, $price_night, $price_we, $id_ressource, $id_pricing));\n\t}", "function pricing() {\n\t\t\tparent::controller();\n\t\t\t\n\t\t}", "private function SetPricingDetails()\n\t{\n\t\t$product = $this->productClass->getProduct();\n\n\t\t$GLOBALS['PriceLabel'] = GetLang('Price');\n\n\t\tif($this->productClass->GetProductCallForPricingLabel()) {\n\t\t\t$GLOBALS['ProductPrice'] = $GLOBALS['ISC_CLASS_TEMPLATE']->ParseGL($this->productClass->GetProductCallForPricingLabel());\n\t\t}\n\t\t// If prices are hidden, then we don't need to go any further\n\t\telse if($this->productClass->ArePricesHidden()) {\n\t\t\t$GLOBALS['HidePrice'] = \"display: none;\";\n\t\t\t$GLOBALS['HideRRP'] = 'none';\n\t\t\t$GLOBALS['ProductPrice'] = '';\n\t\t\treturn;\n\t\t}\n\t\telse if (!$this->productClass->IsPurchasingAllowed()) {\n\t\t\t$GLOBALS['ProductPrice'] = GetLang('NA');\n\t\t}\n\t\telse {\n\t\t\t$options = array('strikeRetail' => false);\n\t\t\t$GLOBALS['ProductPrice'] = formatProductDetailsPrice($product, $options);\n\t\t}\n\n\t\t// Determine if we need to show the RRP for this product or not\n\t\t// by comparing the price of the product including any taxes if\n\t\t// there are any\n\t\t$GLOBALS['HideRRP'] = \"none\";\n\t\t$productPrice = $product['prodcalculatedprice'];\n\t\t$retailPrice = $product['prodretailprice'];\n\t\tif($retailPrice) {\n\t\t\t// Get the tax display format\n\t\t\t$displayFormat = getConfig('taxDefaultTaxDisplayProducts');\n\t\t\t$options['displayInclusive'] = $displayFormat;\n\n\t\t\t// Convert to the browsing currency, and apply group discounts\n\t\t\t$productPrice = formatProductPrice($product, $productPrice, array(\n\t\t\t\t'localeFormat' => false, 'displayInclusive' => $displayFormat\n\t\t\t));\n\t\t\t$retailPrice = formatProductPrice($product, $retailPrice, array(\n\t\t\t\t'localeFormat' => false, 'displayInclusive' => $displayFormat\n\t\t\t));\n\n\t\t\tif($productPrice < $retailPrice) {\n\t\t\t\t$GLOBALS['HideRRP'] = '';\n\n\t\t\t\t// Showing call for pricing, so just show the RRP and that's all\n\t\t\t\tif($this->productClass->GetProductCallForPricingLabel()) {\n\t\t\t\t\t$GLOBALS['RetailPrice'] = CurrencyConvertFormatPrice($retailPrice);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// ISC-1057: do not apply customer discount to RRP in this case\n\t\t\t\t\t$retailPrice = formatProductPrice($product, $product['prodretailprice'], array(\n\t\t\t\t\t\t'localeFormat' => false,\n\t\t\t\t\t\t'displayInclusive' => $displayFormat,\n\t\t\t\t\t\t'customerGroup' => 0,\n\t\t\t\t\t));\n\t\t\t\t\t$GLOBALS['RetailPrice'] = '<strike>' . formatPrice($retailPrice) . '</strike>';\n\t\t\t\t\t$GLOBALS['PriceLabel'] = GetLang('YourPrice');\n\t\t\t\t\t$savings = $retailPrice - $productPrice;\n\t\t\t\t\t$string = sprintf(getLang('YouSave'), '<span class=\"YouSaveAmount\">'.formatPrice($savings).'</span>');\n\t\t\t\t\t$GLOBALS['YouSave'] = '<span class=\"YouSave\">'.$string.'</span>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function setPrice($new_price)\n {\n $this->price = $new_price;\n }", "public function updateProductStyleOptionPricingAll(){\n\t\t$all_products = $this->getAll();\n\t\t$this->load->model('catalog/product');\n\t\t$this->load->model('tshirtgang/pricing');\n\t\t$this->load->model('catalog/option');\n\t\t$tshirt_option_names = array('Tshirt Color', 'Tshirt Style', 'Tshirt Size');\n\t\t$tshirt_colored = array(\n\t\t\t\"Black\",\n\t\t\t\"Charcoal Grey\",\n\t\t\t\"Daisy\",\n\t\t\t\"Dark Chocolate\",\n\t\t\t\"Forest Green\",\n\t\t\t\"Gold\",\n\t\t\t\"Irish Green\",\n\t\t\t\"Light Blue\",\n\t\t\t\"Light Pink\",\n\t\t\t\"Military Green\",\n\t\t\t\"Navy\",\n\t\t\t\"Orange\",\n\t\t\t\"Purple\",\n\t\t\t\"Red\",\n\t\t\t\"Royal Blue\",\n\t\t\t\"Sport Grey\",\n\t\t\t\"Tan\",\n\t\t\t\"Burgundy\"\n\t\t);\n\t\t$tshirt_ringer = array(\n\t\t\t\"Navy Ringer\",\n\t\t\t\"Black Ringer\",\n\t\t\t\"Red Ringer\"\n\t\t);\n\t\t$tshirt_options = array();\n\t\t$tshirt_options_price = array();\n\t\t$options = $this->model_catalog_option->getOptions();\n\t\t$temp_price = 0.0;\n\t\tforeach($options as $option){\n\t\t\t//if($option['name'] == 'Tshirt Color'){\n\t\t\t//\t$tshirtcolor_option_id = $option['option_id'];\n\t\t\t//}\n\t\t\t//if($option['name'] == 'Tshirt Style'){\n\t\t\t//\t$tshirtstyle_option_id = $option['option_id'];\n\t\t\t//}\n\t\t\t//if($option['name'] == 'Tshirt Size'){\n\t\t\t//\t$tshirtsize_option_id = $option['option_id'];\n\t\t\t//}\n\t\t\tif(in_array($option['name'], $tshirt_option_names)){\n\t\t\t\t$tshirt_options[$option['name']] = array();\n\t\t\t\t$tshirt_options[$option['name']]['option_id'] = $option['option_id'];\n\t\t\t\t$tshirt_options[$option['name']]['prices'] = array();\n\t\t\t}\n\t\t}\n\t\tforeach($tshirt_option_names as $tshirt_option_name){\n\t\t\t$option_value_descriptions = $this->model_catalog_option->getOptionValueDescriptions($tshirt_options[$tshirt_option_name]['option_id']);\n\t\t\tforeach($option_value_descriptions as $opv){\n\t\t\t\t$temp_price = 0.0;\n\t\t\t\tif($tshirt_option_name=='Tshirt Color'){\n\t\t\t\t\tif( in_array($opv['option_value_description'][1]['name'], $tshirt_colored )){\n\t\t\t\t\t\t$temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'ColorShirt' ));\n\t\t\t\t\t} elseif( in_array($opv['option_value_description'][1]['name'], $tshirt_ringer )){\n\t\t\t\t\t\t$temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'RingerShirt' ));\n\t\t\t\t\t} else { // white\n\t\t\t\t\t\t$temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'WhiteShirt' ));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($tshirt_option_name=='Tshirt Style'){\n\t\t\t\t\tif($opv['option_value_description'][1]['name'] == \"Mens Fitted\" ) $temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'MensFittedIncremental' ));\n\t\t\t\t\tif($opv['option_value_description'][1]['name'] == \"Ladies\" ) $temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'LadiesIncremental' ));\n\t\t\t\t\tif($opv['option_value_description'][1]['name'] == \"Hooded Pullover\" ) $temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'HoodieIncremental' ));\n\t\t\t\t\tif($opv['option_value_description'][1]['name'] == \"Apron\" ) $temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'ApronIncremental' ));\n\t\t\t\t\tif($opv['option_value_description'][1]['name'] == \"Vneck\" ) $temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'VneckIncremental' ));\n\t\t\t\t\tif($opv['option_value_description'][1]['name'] == \"Tanktop\" ) $temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'TanktopIncremental' ));\n\t\t\t\t\tif($opv['option_value_description'][1]['name'] == \"Baby One Piece\" ) $temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'BabyOnePieceIncremental' ));\n\t\t\t\t}\n\t\t\t\tif($tshirt_option_name=='Tshirt Size'){\n\t\t\t\t\tif($opv['option_value_description'][1]['name'] == \"2 X-Large\" ) $temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'Shirt_2XL_Incremental' ));\n\t\t\t\t\tif($opv['option_value_description'][1]['name'] == \"3 X-Large\" ) $temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'Shirt_3XL6XL_Incremental' ));\n\t\t\t\t\tif($opv['option_value_description'][1]['name'] == \"4 X-Large\" ) $temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'Shirt_3XL6XL_Incremental' ));\n\t\t\t\t\tif($opv['option_value_description'][1]['name'] == \"5 X-Large\" ) $temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'Shirt_3XL6XL_Incremental' ));\n\t\t\t\t\tif($opv['option_value_description'][1]['name'] == \"6 X-Large\" ) $temp_price = $this->model_tshirtgang_pricing->get(array( 'code' => 'Shirt_3XL6XL_Incremental' ));\n\t\t\t\t}\n\t\t\t\tif($temp_price != 0.0){\n\t\t\t\t\t$tshirt_options_price = array(\n\t\t\t\t\t\t'option_value_id' => $opv['option_value_id'],\n\t\t\t\t\t\t'name' => $opv['option_value_description'][1]['name'],\n\t\t\t\t\t\t'price' => $temp_price\n\t\t\t\t\t);\n\t\t\t\t\t$tshirt_options[$tshirt_option_name]['prices'][] = $tshirt_options_price;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tforeach($tshirt_options as $tso1){\n\t\t\tforeach($tso1['prices'] as $tso2){\n\t\t\t\t$sql = \"UPDATE \" . DB_PREFIX . \"product_option_value ocpov \";\n\t\t\t\t$sql .= \"LEFT JOIN \" . DB_PREFIX . \"product ocp \";\n\t\t\t\t$sql .= \" ON ocp.product_id = ocpov.product_id \";\n\t\t\t\t$sql .= \"LEFT JOIN \" . DB_PREFIX . \"tshirtgang_products tsgp \";\n\t\t\t\t$sql .= \" ON tsgp.product_id = ocp.product_id \";\n\t\t\t\t$sql .= \"SET ocpov.price=\". (float)$tso2['price'] . \" \";\n\t\t\t\t$sql .= \"WHERE \";\n\t\t\t\t$sql .= \" ocpov.option_value_id = \" . (int)$tso2['option_value_id'] . \" \";\n\t\t\t\t//$sql .= \" AND \";\n\t\t\t\t//$sql .= \" tsgp.id IS NOT NULL \";\n\t\t\t\t$this->db->query($sql);\n\t\t\t}\n\t\t}\n\t}", "public function updateProduct()\n {\n \t$quote=$this->getQuote();\n \tif($quote)\n \t{\n \t\t$detailproduct=$this->getProduct();\n \t\t$quoteproduct=$quote->getProduct();\n \t\tif(\n\t\t\t\t$quote->getPrice()!=$this->getPrice() or\n\t\t\t\t$quote->getDiscrate()!=$this->getDiscrate() or\n\t\t\t\t$quote->getDiscamt()!=$this->getDiscamt() or\n\t\t\t\t$quote->getProductId()!=$this->getProductId()\n\t\t\t)\n\t\t\t{\n\t\t\t\t$quote->setPrice($this->getPrice());\n\t\t\t\t$quote->setDiscrate($this->getDiscrate());\n\t\t\t\t$quote->setDiscamt($this->getDiscamt());\n\t\t\t\t$quote->setProductId($this->getProductId());\n\t\t\t\t$quote->calc(); //auto save\n\t\t\t\t$detailproduct->calcSalePrices();\n\t\t\t\t\n\t\t\t\t//if product changed, calc old product\n\t\t\t\tif($quoteproduct->getId()!=$detailproduct->getId())\n\t\t\t\t\t$quoteproduct->calcSalePrices();\n\t\t\t}\n \t}\n \telse\n \t{\n\t\t\t//if none, see if product quote by vendor with similar pricing exists. \n\t\t\t$quote=Fetcher::fetchOne(\"Quote\",array('total'=>$this->getUnittotal(),'vendor_id'=>SettingsTable::fetch(\"me_vendor_id\"),'product_id'=>$this->getProductId()));\n\n\t\t\t//if it doesn't exist, create it, and product->calc()\n\t\t\tif(!$quote)\n\t\t\t{\n\t\t\t\tQuoteTable::createOne(array(\n\t\t\t\t\t'date'=>$this->getInvoice()->getDate(),\n\t\t\t\t\t'price'=>$this->getPrice(),\n\t\t\t\t\t'discrate'=>$this->getDiscrate(),\n\t\t\t\t\t'discamt'=>$this->getDiscamt(),\n\t\t\t\t\t'vendor_id'=>SettingsTable::fetch(\"me_vendor_id\"),\n\t\t\t\t\t'product_id'=>$this->getProductId(),\n\t\t\t\t\t'ref_class'=>\"Invoicedetail\",\n\t\t\t\t\t'ref_id'=>$this->getId(),\n\t\t\t\t\t'mine'=>1,\n\t\t\t\t\t));\n\t\t\t\t$this->getProduct()->calcSalePrices();\n\t\t\t}\n \t}\n }", "function es_save_custom_quickedit_product( $product ) {\n\tif ( isset( $_REQUEST['member_price'] ) AND ! empty( $_REQUEST['member_price'] ) ) {\n\t\tupdate_post_meta( $product->id, 'member_price', wc_clean( $_REQUEST['member_price'] ) );\n\t}\n\telse \n\t\tdelete_post_meta( $product->id, 'member_price' );\n}", "public function api_update_price(){\n $watchlists = $this->wr->all();\n foreach($watchlists as $watchlist)\n {\n $current_price = $this->get_quotes($watchlist->id);\n\n $this->wr->update([\n 'current_price' => $current_price,\n ],$watchlist->id);\n }\n }", "public function edit(PricingCheck $pricingCheck)\n {\n //\n }", "public function updateprices()\n {\n\n $aParams = oxRegistry::getConfig()->getRequestParameter(\"updateval\");\n if (is_array($aParams)) {\n foreach ($aParams as $soxId => $aStockParams) {\n $this->addprice($soxId, $aStockParams);\n }\n }\n }", "public function actionUpdatePrecio()\n\t{\n\t\t$model=$this->loadModel($_POST['pk']);\n\t\t$this->performAjaxValidation($model);\n\t\tif(isset($_POST['value']))\n\t\t{\n\t\t\t$model->precioWeb=$_POST['value'];\n\t\t\t$model->save();\n\t\t}\n\t}", "public function setPricing(array $pricingData)\n {\n $this->repository->setData($pricingData);\n }", "public function setPricing($id_ressource, $id_pricing, $price_day, $price_night, $price_we){\n\t\t\n\t\tif ($this->isPricing($id_ressource, $id_pricing)){\n\t\t\t$this->editPricing($id_ressource, $id_pricing, $price_day, $price_night, $price_we);\n\t\t}\n\t\telse{\n\t\t\t$this->addPricing($id_ressource, $id_pricing, $price_day, $price_night, $price_we);\n\t\t}\n\t}", "function update_settings_tab(){\n woocommerce_update_options($this->get_settings());\n }", "function editPrices() {\n\t\tglobal $HTML;\n\t\tglobal $page;\n\t\tglobal $id;\n\t\t$HTML->details(1);\n\n\t\t$this->getPrices();\n\n\t\t$price_groups = $this->priceGroupClass->getItems();\n\t\t$countries = $this->countryClass->getItems();\n\n\t\t$_ = '';\n\t\t$_ .= '<div class=\"c init:form form:action:'.$page->url.'\" id=\"container:prices\">';\n\t\t$_ .= '<div class=\"c\">';\n\n\t\t$_ .= $HTML->inputHidden(\"id\", $id);\n\t\t$_ .= $HTML->inputHidden(\"item_id\", $id);\n\n\t\t$_ .= $HTML->head(\"Prices\", \"2\");\n\n\t\tif(Session::getLogin()->validatePage(\"prices_update\")) {\n\t\t\t$_ .= $HTML->inputHidden(\"page_status\", \"prices_update\");\n\t\t}\n\n\t\tif($this->item() && count($this->item[\"id\"]) == 1) {\n\n\t\t\tforeach($countries[\"id\"] as $country_key => $country_id) {\n\n\t\t\t\t$_ .= '<div class=\"ci33\">';\n\n\t\t\t\t\t$_ .= $HTML->head($countries[\"values\"][$country_key], 3);\n\n\t\t\t\t\tforeach($price_groups[\"uid\"] as $index => $price_group_uid) {\n\t\t\t\t\t\t$price = ($this->item[\"price\"][0] && isset($this->item[\"price\"][0][$country_id][$price_group_uid])) ? $this->item[\"price\"][0][$country_id][$price_group_uid] : \"\";\n\t\t\t\t\t\t$_ .= $HTML->input($price_groups[\"values\"][$index], \"prices[$country_id][$price_group_uid]\", $price);\n\t\t\t\t\t}\n\n\t\t\t\t\t$_ .= $HTML->separator();\n\t\t\t\t$_ .= '</div>';\n\n\t\t\t}\n\t\t}\n\n\t\t$_ .= '</div>';\n\n\t\t$_ .= $HTML->smartButton($this->translate(\"Cancel\"), false, \"prices_cancel\", \"fleft key:esc\");\n\t\t$_ .= $HTML->smartButton($this->translate(\"Save\"), false, \"prices_update\", \"fright key:s\");\n\n\t\t$_ .= '</div>';\n\n\t\treturn $_;\n\t}", "public function pricingUpdate(Request $request, $id)\n {\n $list = $request->input('list');\n $price = Pricing::find($id);\n\n if ($request->hasFile('image')) {\n $this->validate($request, [\n 'image' => 'image|required|mimes:png,svg'\n ]);\n $imageOld = DB::table('pricings')->where('id', $id)->first();\n\n //upload it\n $image = $request->file('image')->store('content/pricing');\n Storage::delete($imageOld->image);\n $data=array('image'=>$image);\n DB::table('pricings')->where('id', $id)->update($data);\n\n // session()->flash('success', 'La sección fue actualizada con la imagen');\n // return redirect()->back();\n\n }\n elseif($request->has('items')) {\n $items = $request->input('items');\n\n $data= array('item'=>$items);\n\n DB::table('pricing_items')->where('id', $id)->update($data);\n\n session()->flash('success', 'La Tabla ha sido actualizada');\n //redirect\n return redirect()->back();\n\n }\n\n\n else {\n $title = $request->input('title');\n $recurrence = $request->input('recurrence');\n $price = $request->input('price');\n $button = $request->input('button');\n $link = $request->input('link');\n $back_color = $request->input('back_color');\n $data=array('title'=>$title,\n 'recurrence'=>$recurrence,\n 'price'=>$price,\n 'button'=>$button,\n 'link'=>$link,\n 'back_color'=>$back_color);\n DB::table('pricings')->where('id', $id)->update($data);\n\n session()->flash('success', 'La Tabla ha sido actualizada');\n //redirect\n return redirect()->back();\n }\n }", "function setPrice( $value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->Price = $value;\n setType( $this->Price, \"double\" );\n }", "function uds_pricing_process()\n{\n\tglobal $uds_pricing_general_options;\n//\td($_POST);\n//\tdelete_option(UDS_PRICING_OPTION);\n\tif(isset($_POST['uds_pricing_nonce']) && wp_verify_nonce($_POST['uds_pricing_nonce'], 'uds-pricing-nonce')) {\n\t\t$name = $_POST['uds-pricing-name'];\n\t\t$name_orig = $_POST['uds_pricing_name_original'];\n\t\t\n\t\tif(empty($name)) {\n\t\t\treturn new WP_Error(\"uds_pricing_table_name_empty\", \"Table name can not be empty\");\n\t\t}\n\t\t\n\t\t$pricing_tables = maybe_unserialize(get_option(UDS_PRICING_OPTION, array()));\n\t\tif(in_array($name, array_keys($pricing_tables)) && $name != $name_orig) {\n\t\t\treturn new WP_Error(\"uds_pricing_table_name_taken\", \"There already is a table named &quot;\".$name.\"&quot;\");\n\t\t}\n\t\t\n\t\t$pricing_table = $pricing_tables[$name_orig];\n\t\tif(empty($pricing_table)) $pricing_table = array();\n\t\t\n\t\tforeach($uds_pricing_general_options as $key => $option) {\n\t\t\t$pricing_table[$key] = $_POST['uds-pricing-'.$key];\n\t\t}\n\t\t\n\t\t$pricing_table['properties'] = array();\n\t\tforeach($_POST['labels'] as $key => $label) {\n\t\t\tif($label == \"\") continue;\n\t\t\t$pricing_table['properties'][$label] = $_POST['types'][$key];\n\t\t}\n\n\t\tunset($pricing_tables[$name_orig]);\n\t\t$pricing_tables[$pricing_table['name']] = $pricing_table;\n\t\tupdate_option(UDS_PRICING_OPTION, serialize($pricing_tables));\n\t\t\n\t\tif($name_orig == '' || $name_orig != $name) {\n\t\t\twp_redirect('admin.php?page=uds_pricing_structure&uds_pricing_edit='.urlencode($name));\n\t\t}\n\t}\n}", "Function pricing_purchasing($int_contact_id, \r\n $int_productID,\r\n $bl_update,\r\n $formname,\r\n $int_higher_contactID = FALSE) //, $date_start, $date_end, $int_type)\r\n{\r\n global $db_iwex;\r\n $return_var = FALSE;\r\n // get the staus of the edit_button\r\n $bl_edit_prices = edit_button();\r\n //get the status of the show_old button\r\n $bl_show = GetSetFormVar('show_old', TRUE, TRUE);\r\n\r\n // set query stuff for showing old prices or not\r\n if ($bl_show) {\r\n $str_old = \"\";\r\n } else {\r\n $str_old = \"AND (DATEDIFF(end_date,NOW()) >= 0 OR end_date = '0000-00-00') \";\r\n }\r\n\r\n if ($int_productID || $int_contact_id) {\r\n // what if a contactID is given\r\n $condition = '';\r\n $int_higher_contactID = FALSE;\r\n $higher_level_pricing = FALSE;\r\n $update_condition = FALSE;\r\n if ($int_contact_id) {\r\n $int_higher_contactID = GetField(\"SELECT MainContactID FROM branches WHERE BrancheContactID = '$int_contact_id'\");\r\n // if there is a higher level pricing, include it in the query\r\n if ($int_higher_contactID) $higher_level_pricing = \"OR pricing_purchase.ContactID = '$int_higher_contactID'\";\r\n $condition = \" WHERE ((pricing_purchase.ContactID = '$int_contact_id' $higher_level_pricing) $str_old)\";\r\n $update_condition = \" WHERE (pricing_purchase.ContactID = '$int_contact_id')\";\r\n $column = \"Product\"; //in case of contactID show products\r\n $descr_column = \"ProductName\";\r\n $table = \"current_product_list\";\r\n $search_list = SQL_SEARCH_PRODUCTS_LIST;\r\n $str_where = \"ContactID = $int_contact_id\";\r\n } else if ($int_productID) {\r\n $condition = \" WHERE current_product_list.ProductID = '$int_productID' $str_old\";\r\n $column = \"Contact\"; //in case of ProductID show Contacts\r\n $descr_column = \"CompanyName\";\r\n $table = \"contacts\";\r\n $search_list = SQL_SEARCH_CUSTOMER_LIST;\r\n $str_where = \"productID= '$int_productID'\";\r\n }\r\n $pricing_sql_base = \"SELECT pricing_purchase.*, ValutaName ,pricing_purchase.productID as ProductID, ProductName, CompanyName,\r\n\t\t\t\t\t\t\t\t\t\t created, emcreat.FirstName AS CreatBy, modified ,emmodby.FirstName AS ChangedBy\r\n\t\t\t\t\t FROM pricing_purchase \r\n\t\t\t\t\t\tINNER JOIN current_product_list ON pricing_purchase.productID = current_product_list.ProductID\r\n\t\t\t\t\t\tLEFT JOIN contacts ON pricing_purchase.ContactID = contacts.ContactID\r\n\t\t\t\t\t\tLEFT JOIN employees emcreat ON emcreat.EmployeeID = created_by\r\n\t\t\t \t\t\tLEFT JOIN employees emmodby ON emmodby.EmployeeID = modified_by\r\n\t\t\t\t\t\tLEFT JOIN valuta ON pricing_purchase.currencyid = ValutaID\";\r\n $pricing_sql = $pricing_sql_base . \"$condition ORDER BY \" . $column . \"ID ASC, start_date DESC, start_number ASC, purchase_price ASC;\";\r\n $update_pricing_sql = $pricing_sql_base . \"$update_condition ORDER BY \" . $column . \"ID ASC, start_date DESC, start_number ASC, purchase_price ASC;\";\r\n //echo $pricing_sql;\r\n if ($bl_update) {\r\n $str_id_new = isset($_POST[$column.\"IDnew\"]) ? $_POST[$column.\"IDnew\"] : FALSE;\r\n // first check if we have a new record to submit\r\n if ($str_id_new === '0'\r\n ||\r\n $str_id_new <> '') {\r\n $str_id_new = $str_id_new == ALL_INPUT_WILDCARD ? '0' : $str_id_new; // Make possible to select * for all.\r\n ${\"is_\".$column.\"ID\"} = GetField(\"SELECT \".$column.\"ID FROM $table WHERE \".$column.\"ID='$str_id_new'\");\r\n if (${\"is_\".$column.\"ID\"}\r\n ||\r\n $str_id_new === '0') {\r\n if ($_POST[\"amount_new\"]) {\r\n $amount = $_POST[\"amount_new\"];\r\n } else {\r\n $amount = GetProductPrice(\r\n $int_productID ? $int_productID : $_POST[\"ProductIDnew\"],\r\n 1,\r\n $int_contact_id,\r\n date('Y-m-d'),\r\n $int_price_type\r\n );\r\n }\r\n $sql_insert = \"INSERT INTO pricing_purchase SET\r\n\t\t\t\t\t\tpurchase_price = '$amount',\";\r\n if ($int_contact_id) {\r\n $sql_insert .= \"ContactID = '$int_contact_id',\r\n\t\t\t\t\t\t\t\t\t\tproductID = '$str_id_new',\";\r\n } else if ($int_productID) {\r\n $sql_insert .= \"ContactID = '$str_id_new',\r\n\t\t\t\t\t\t\t\t\t\tproductID = '$int_productID',\";\r\n }\r\n $start_nr = $_POST[\"start_number_new\"] ? $_POST[\"start_number_new\"] : 1;\r\n $sql_insert .= \"start_number = '\" . $start_nr . \"', \";\r\n $sql_insert .= \"end_number = '\" . $_POST[\"end_number_new\"] . \"',\";\r\n $sql_insert .= \"start_date = '\" . $_POST[\"start_date_new\"] . \"',\";\r\n $sql_insert .= \"created_by = '\" . $GLOBALS[\"employee_id\"] . \"',\";\r\n $sql_insert .= \"created = '\" . date(DATEFORMAT_LONG) . \"'\";\r\n //echo $sql_insert;\r\n $db_iwex->query($sql_insert);\r\n $just_inserted = $db_iwex->lastinserted();\r\n } else {\r\n echo strtoupper($_POST[$column.\"IDnew\"]) . \" not a valid $column ID<BR>\";\r\n }\r\n }\r\n $sql_upd = 'Select';\r\n // now update all fields that have their updaterecordID set\r\n if ($qry_prices = $db_iwex->query($update_pricing_sql)) {\r\n while ($obj = mysql_fetch_object($qry_prices)) {\r\n if (isset($_POST[$column.\"ID$obj->recordID\"])\r\n &&\r\n (!$_POST[\"delete\".$obj->recordID]\r\n &&\r\n (\r\n $_POST[\"update\".$obj->recordID]==='1'\r\n ||\r\n $_POST[\"start_date\".$obj->recordID]<>$_POST[\"laststart_date\".$obj->recordID]\r\n ||\r\n $_POST[\"end_date\".$obj->recordID]<>$_POST[\"lastend_date\".$obj->recordID]\r\n ||\r\n $_POST[\"currency$obj->recordID\"]<>$_POST[\"lastcurrency$obj->recordID\"]\r\n )\r\n )\r\n ) {\r\n $sql_upd = \"UPDATE pricing_purchase SET\r\n\t\t\t\t\t\t\tpurchase_price = '\". $_POST[\"amount$obj->recordID\"] . \"',\";\r\n if ($int_contact_id) {\r\n $sql_upd .= \"ContactID = '$int_contact_id',\r\n\t\t\t\t\t\t\t\t\t\t\tproductID = '\". $_POST[\"ProductID$obj->recordID\"] . \"',\";\r\n } else if ($int_productID) {\r\n $sql_upd .= \"ContactID = '\". $_POST[\"ContactID$obj->recordID\"] . \"',\r\n\t\t\t\t\t\t\t\t\t\t\tproductID = '$int_productID',\";\r\n }\r\n $sql_upd .= \"\r\n\t\t\t\t\t\t\tstart_date = '\". $_POST[\"start_date$obj->recordID\"] . \"',\r\n\t\t\t\t\t\t\tend_date = '\". $_POST[\"end_date$obj->recordID\"] . \"',\r\n\t\t\t\t\t\t\tstart_number = '\". $_POST[\"start_number$obj->recordID\"] . \"',\r\n\t\t\t\t\t\t\tend_number = '\". $_POST[\"end_number$obj->recordID\"] . \"',\r\n\t\t\t\t\t\t\tcurrencyid = '\". $_POST[\"currency$obj->recordID\"] . \"',\r\n\t\t\t\t\t\t\tmodified = '\" . date(DATEFORMAT_LONG) . \"',\r\n\t\t\t\t\t\t\tmodified_by = '\" . $GLOBALS[\"employee_id\"] . \"'\r\n\t\t\t\t\t\t\tWHERE recordID = '$obj->recordID'\";\r\n $db_iwex->query($sql_upd);\r\n } else if (isset($_POST[\"delete\".$obj->recordID])\r\n &&\r\n $_POST[\"delete\".$obj->recordID]) {\r\n // delete the price record\r\n $sql_upd = \"DELETE FROM pricing_purchase WHERE recordID = '$obj->recordID'\";\r\n if ($sql_upd) $db_iwex->query($sql_upd);\r\n // make previous record open ended\r\n\r\n }\r\n $sql_upd = '';\r\n }\r\n mysql_free_result($qry_prices);\r\n }\r\n }\r\n // start the displaying of the table\r\n $str_button_disable = \"DISABLED\";\r\n if (isset ($GLOBALS[\"waccess_s\"])) $str_button_disable = \"\";\r\n\r\n // show table to explain the colors\r\n if ($int_contact_id) {\r\n $return_var .= \"<table border=0>\\n\r\n\t\t\t\t\t<tr>\\n\r\n\t\t\t\t\t\t<td bgcolor=\".QOUTE_BGCOLOR.\">Own Special Pricing</td>\\n\r\n\t\t\t\t\t\t<td bgcolor=\".OPENORDER_BGCOLOR.\">\r\n\t\t\t\t\t\t<A HREF='\" . CONTACTS . \"?custid=$int_higher_contactID' TARGET='_new' \"\r\n .ShowShortContactInfo($int_contact_id)\r\n .\">Special Prices from Higher level</A></td>\\n\r\n\t\t\t\t\t</tr>\\n\r\n\t\t\t\t</table>\\n\";\r\n }\r\n //show control buttons\r\n // edit toggle button\r\n $return_var .= edit_button ('waccess_s', $formname);\r\n // show old values toggle button\r\n $return_var .= button('show_old',\r\n $bl_show,\r\n 'Show Old',\r\n 'Hide Old',\r\n $formname,\r\n !$bl_edit_prices);\r\n // now start the table\r\n $return_var .= \"<TABLE BORDER=\\\"0\\\" CELLPADDING=\\\"1\\\" CELLSPACING=\\\"0\\\" class=\\\"blockbody\\\" width=\\\"100%\\\">\\n\";\r\n $return_var .= \"<TR>\\n\";\r\n $return_var .= \"<TH>\" . $column . \"ID</TH>\";\r\n $return_var .= \"<TH>$descr_column</TH>\r\n\t\t\t\t\t\t<TH>purchase price</TH>\r\n\t\t\t\t\t\t<TH>Currency</TH>\r\n\t\t\t\t\t\t<TH WIDTH=90>start date</TH>\r\n\t\t\t\t\t\t<TH WIDTH=90>end date</TH>\r\n\t\t\t\t\t\t<TH>Creaded By</TH>\r\n\t\t\t\t\t\t<TH>Modified By</TH>\r\n\t\t\t\t\t\t<TH>min number</TH>\r\n\t\t\t\t\t\t<TH>max number</TH>\r\n\t\t\t\t\t\t<TH>Option</TH>\";\r\n $return_var .= \"</TR>\";\r\n\r\n //set edit enabler\r\n if (!$bl_edit_prices) {\r\n $edit_str = \"DISABLED\" ;\r\n } else {\r\n $edit_str = \"\";\r\n // first a new one, but only if we are editing\r\n $return_var .= \"<TD><INPUT $edit_str TYPE='text' SIZE='4' NAME='\" . $column . \"IDnew'></TD><TD>\";\r\n $return_var .= GetRecordIdInputField($search_list, \"ID\", $column.\"New\", $formname . \".\" . $column . \"IDnew\", \"$column\", 10, \"\", 3).\"</TD>\r\n\t\t\t\t\t\t<TD><INPUT $edit_str TYPE='text' SIZE='8' NAME='amount_new'></TD>\r\n\t\t\t\t\t\t<TD></TD>\r\n\t\t\t\t\t\t<TD><INPUT $edit_str TYPE='text' SIZE='10' NAME='start_date_new'></TD>\r\n\t\t\t\t\t\t<TD></TD>\r\n\t\t\t\t\t\t<TD></TD>\r\n\t\t\t\t\t\t<TD></TD>\r\n\t\t\t\t\t\t<TD><INPUT $edit_str TYPE='text' SIZE='4' NAME='start_number_new'></TD>\r\n\t\t\t\t\t\t<TD><INPUT $edit_str TYPE='text' SIZE='4' NAME='end_number_new'></TD>\";\r\n $return_var .= \"</TR>\\n\";\r\n }\r\n //then edit existing ones\r\n $qry_prices = $db_iwex->query($pricing_sql);\r\n while ($obj = mysql_fetch_object($qry_prices)) {\r\n // change color and behaviour based on own pricing or Higher level related contact- pricing\r\n $str_del = \"\";\r\n if ($obj->ContactID == $int_higher_contactID\r\n &&\r\n $obj->ContactID) {\r\n $str_bgcolor = \"BGCOLOR='\".OPENORDER_BGCOLOR.\"'\";\r\n $str_edit = \"DISABLED\";\r\n } else {\r\n if ($obj->end_date=='0000-00-00'\r\n ||\r\n strtotime($obj->end_date) >= strtotime(date('Y-m-d'))) {\r\n $str_bgcolor = \"BGCOLOR='\".QOUTE_BGCOLOR.\"'\";\r\n if (!$edit_str) {// only if we are editing current stuff show the delete image\r\n $str_del = \"<INPUT TYPE='hidden' NAME='delete\".$obj->recordID.\"'>\r\n\t\t\t\t\t\t\t<IMG SRC=\".IMAGES_URL.\"delete.png WIDTH='10' \r\n\t\t\t\t\t\t\tonclick=\\\"document.$formname.delete\".$obj->recordID.\".value='1';\r\n\t\t\t\t\t\t\tdocument.$formname.update_var.value='1';\r\n\t\t\t\t\t\t\tdocument.$formname.submit()\\\"\r\n\t\t\t\t\t\t\tonchange=\\\"document.$formname.update\" . $obj->recordID . \".value='1';\\\">\";\r\n }\r\n $str_edit = \"\";\r\n } else {\r\n $str_bgcolor = \"BGCOLOR='\".OTHER_BGCOLOR.\"'\";\r\n $str_edit = \"\";\r\n }\r\n }\r\n // make sure the disabled state from the edit button is also respected\r\n $str_edit || $edit_str ? $str_edit = \"DISABLED\" : $str_edit = \"\";\r\n\r\n // enable catalog checkbox\r\n $enable_checkbox = TRUE;\r\n\r\n\r\n //first column ProductID or ContactID\r\n $return_var .= \"<TR $str_bgcolor><TD><INPUT $str_edit TYPE='text'\r\n\t\t\t\t\t\t\t\t\tSIZE='4' \r\n\t\t\t\t\t\t\t\t\tNAME='\" . $column.\"ID\" . $obj->recordID . \"' \r\n\t\t\t\t\t\t\t\t\tVALUE='\" . $obj->{$column.\"ID\"} . \"'\r\n\t\t\t\t\t\t\t\t\tonchange=\\\"document.$formname.update\" . $obj->recordID . \".value='1';\\\">\r\n $str_del\";\r\n $return_var .= \"</TD><TD>\". $obj->$descr_column . \"</TD>\";\r\n $return_var .= \"<TD><INPUT $str_edit TYPE='text' SIZE='8' NAME='amount\".$obj->recordID.\"' VALUE='\".$obj->purchase_price.\"'\r\n\t\t\t\t\t\t\tonchange=\\\"document.$formname.update\" . $obj->recordID . \".value='1';\\\"></TD>\r\n\t\t\t\t<TD>\".makelistbox('SELECT ValutaID, ValutaName FROM valuta ORDER by ValutaName',\r\n \"currency$obj->recordID\",\r\n 'ValutaID',\r\n 'ValutaName',\r\n $obj->currencyid,\r\n FALSE,\r\n FALSE,\r\n $str_edit).\"\r\n\t\t\t\t\t<INPUT TYPE='hidden' SIZE='10' NAME='lastcurrency\".$obj->recordID.\"' VALUE='$obj->currencyid'></TD>\t\r\n\t\t\t\t<TD><INPUT $str_edit TYPE='text' SIZE='10' NAME='start_date\".$obj->recordID.\"' VALUE='$obj->start_date'\r\n\t\t\t\t\tonfocus=\\\"document.$formname.update\" . $obj->recordID . \".value='1';\\\">\r\n\t\t\t\t\t<INPUT TYPE='hidden' SIZE='10' NAME='laststart_date\".$obj->recordID.\"' VALUE='$obj->start_date'>\r\n \". Add_Calendar($formname.\".start_date\".$obj->recordID) . \"</TD>\r\n\t\t\t\t<TD><INPUT $str_edit TYPE='text' SIZE='10' NAME='end_date\".$obj->recordID.\"' VALUE='$obj->end_date'\r\n\t\t\t\t\tonfocus=\\\"document.$formname.update\" . $obj->recordID . \".value='1';\\\">\r\n\t\t\t\t\t<INPUT TYPE='hidden' SIZE='10' NAME='lastend_date\".$obj->recordID.\"' VALUE='$obj->end_date'>\r\n \". Add_Calendar($formname.\".end_date\".$obj->recordID) . \"</TD></TD>\r\n\t\t\t\t<TD>$obj->CreatBy</TD>\r\n\t\t\t\t<TD>$obj->ChangedBy</TD>\r\n\t\t\t\t<TD><INPUT $str_edit TYPE='text' SIZE='4' NAME='start_number\".$obj->recordID.\"' VALUE='$obj->start_number'\r\n\t\t\t\t\t\tonchange=\\\"document.$formname.update\" . $obj->recordID . \".value='1';\\\">\r\n\t\t\t\t</TD>\r\n\t\t\t\t<TD><INPUT $str_edit TYPE='text' SIZE='4' NAME='end_number\".$obj->recordID.\"' VALUE='$obj->end_number'\r\n\t\t\t\t\t\tonchange=\\\"document.$formname.update\" . $obj->recordID . \".value='1';\\\">\r\n\t\t\t\t\t<INPUT $str_edit TYPE='hidden' NAME='update\" . $obj->recordID . \"'>\r\n\t\t\t\t</TD>\";\r\n $str_insert_link = \"\";\r\n if ($obj->end_date == '0000-00-00') {\r\n $str_insert_link = \"<INPUT $str_edit TYPE='button' VALUE='new price'\r\n\t\t\t\t\t\tonclick=\\\"document.$formname.update_var.value='1';\r\n\t\t\t\t\t\tif(new_date=prompt('date?', '\" . date(\"Y-m-d\") . \"'))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// set this date to yesterday\r\n\t\t\t\t\t\t\tary_date = new_date.match('(\\.{4})-(\\.{2})-(\\.{2})'); //('\\d+-\\d+-\\d+');\r\n\t\t\t\t\t\t\tdate_given = new Date(ary_date[1],ary_date[2],ary_date[3]);\r\n\t\t\t\t\t\t\tyesterdayDate = date_given.getDate() -1 ;\r\n\t\t\t\t\t\t\tdate_given.setDate( yesterdayDate );\r\n\t\t\t\t\t\t\tstr_yestterday = date_given.getFullYear();\r\n\t\t\t\t\t\t\tstr_yestterday += '-';\r\n\t\t\t\t\t\t\tstr_yestterday += date_given.getMonth();\r\n\t\t\t\t\t\t\tstr_yestterday += '-';\r\n\t\t\t\t\t\t\tstr_yestterday += date_given.getDate();\r\n\t\t\t\t\t\t\t// fill in new values\r\n\t\t\t\t\t\t\tdocument.$formname.end_date\".$obj->recordID.\".value = str_yestterday;\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tdocument.$formname.update\" . $obj->recordID . \".value='1';\r\n\t\t\t\t\t\t\t//document.$formname.str_recordID.value='\" . $obj->recordID . \"';\r\n\t\t\t\t\t\t\tdocument.$formname.\" . $column . \"IDnew.value=document.$formname.\" . $column.\"ID\" . $obj->recordID . \".value;\r\n\t\t\t\t\t\t\tdocument.$formname.amount_new.value=document.$formname.amount\".$obj->recordID.\".value;\r\n\t\t\t\t\t\t\tdocument.$formname.start_date_new.value=new_date;\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tdocument.$formname.start_number_new.value=document.$formname.start_number\".$obj->recordID.\".value;\r\n\t\t\t\t\t\t\tdocument.$formname.end_number_new.value=document.$formname.end_number\".$obj->recordID.\".value;\r\n\t\t\t\t\t\t\tdocument.$formname.submit();\r\n\t\t\t\t\t\t};\\\">\";\r\n }\r\n $return_var .= \"<TD>$str_insert_link&nbsp;</TD>\";\r\n $return_var .= \"</TR>\\n\";\r\n }\r\n $return_var .= \" </td>\\n</TR>\\n\";\r\n $return_var .= \"</table>\";\r\n mysql_free_result($qry_prices);\r\n }\r\n Return $return_var;\r\n}", "public function update(): void\n {\n $this->updateQuality();\n $this->updateSellIn();\n $this->expiresAfterSale();\n }", "Function pricing_sales($int_contact_id, \r\n $int_productID,\r\n $bl_update,\r\n $formname,\r\n $int_higher_contactID = FALSE) {\r\n global $db_iwex;\r\n $return_var = FALSE;\r\n // get the staus of the edit_button\r\n $bl_edit_prices = edit_button();\r\n //get the status of the show_old button\r\n $bl_show = GetSetFormVar('show_old', TRUE, TRUE);\r\n\r\n // set query stuff for showing old prices or not\r\n if ($bl_show) {\r\n $str_old = \"\";\r\n } else {\r\n $str_old = \"AND (DATEDIFF(end_date,NOW()) >=-1 OR end_date = '0000-00-00') \";\r\n }\r\n\r\n if ($int_productID || $int_contact_id) {\r\n // what if a contactID is given\r\n $condition = '';\r\n $int_higher_contactID = FALSE;\r\n $higher_level_pricing = FALSE;\r\n $update_condition = FALSE;\r\n if ($int_contact_id) {\r\n $int_higher_contactID = GetField(\"SELECT MainContactID FROM branches WHERE BrancheContactID = '$int_contact_id'\");\r\n if ($int_higher_contactID) $higher_level_pricing = \"OR pricing.ContactID = '$int_higher_contactID'\";\r\n $condition = \" WHERE ((pricing.ContactID = '$int_contact_id' $higher_level_pricing) $str_old)\";\r\n $update_condition = \" WHERE (pricing.ContactID = '$int_contact_id')\";\r\n $column = \"Product\"; //in case of contactID show products\r\n $descr_column = \"ProductName\";\r\n $table = \"current_product_list\";\r\n $search_list = SQL_SEARCH_PRODUCTS_LIST;\r\n $str_where = \"ContactID = $int_contact_id\";\r\n } else if ($int_productID) {\r\n $condition = \" WHERE current_product_list.ProductID = '$int_productID' $str_old\";\r\n $column = \"Contact\"; //in case of ProductID show Contacts\r\n $descr_column = \"CompanyName\";\r\n $table = \"contacts\";\r\n $search_list = SQL_SEARCH_CUSTOMER_LIST;\r\n $str_where = \"productID= '$int_productID'\";\r\n }\r\n $pricing_sql_base = \"SELECT pricing.*, ValutaName ,pricing.productID as ProductID, ProductName, CompanyName,\r\n\t\t\t\t\t\t\t\t\t\t created, emcreat.FirstName AS CreatBy, \r\n\t\t\t\t\t\t\t\t\t\t CONCAT_WS(' ', emcreat.FirstName, emcreat.middlename, emcreat.LastName) AS CreatByfull, \r\n\t\t\t\t\t\t\t\t\t\t modified, emmodby.FirstName AS ChangedBy,\r\n\t\t\t\t\t\t\t\t\t\t CONCAT_WS(' ', emmodby.FirstName, emmodby.middlename, emmodby.LastName) AS ModByfull\r\n\t\t\t\t\t FROM pricing \r\n\t\t\t\t\t\tINNER JOIN current_product_list ON pricing.productID = current_product_list.ProductID\r\n\t\t\t\t\t\tLEFT JOIN contacts ON pricing.ContactID = contacts.ContactID\r\n\t\t\t\t\t\tLEFT JOIN employees emcreat ON emcreat.EmployeeID = created_by\r\n\t\t\t \t\t\tLEFT JOIN employees emmodby ON emmodby.EmployeeID = modified_by\r\n\t\t\t\t\t\tLEFT JOIN valuta ON pricing.currencyid = ValutaID\";\r\n $pricing_sql = $pricing_sql_base . \"$condition ORDER BY \" . $column . \"ID ASC, start_date DESC, start_number ASC, amount ASC;\";\r\n $update_pricing_sql = $pricing_sql_base . \"$update_condition ORDER BY \" . $column . \"ID ASC, start_date DESC, start_number ASC, amount ASC;\";\r\n //echo $pricing_sql;\r\n if ($bl_update) {\r\n $str_id_new = isset($_POST[$column.\"IDnew\"]) ? $_POST[$column.\"IDnew\"] : FALSE;\r\n // first check if we have a new record to submit\r\n if ($str_id_new === '0'\r\n ||\r\n $str_id_new <> '') {\r\n $str_id_new = $str_id_new == ALL_INPUT_WILDCARD ? '0' : $str_id_new; // Make possible to select * for all.\r\n echo ${\"is_\".$column.\"ID\"} = GetField(\"SELECT \".$column.\"ID FROM $table WHERE \".$column.\"ID='$str_id_new'\");\r\n if (${\"is_\".$column.\"ID\"}\r\n ||\r\n $str_id_new === '0') {\r\n if ($_POST[\"amount_new\"]) {\r\n $amount = $_POST[\"amount_new\"];\r\n } else {\r\n $amount = FALSE;\r\n if ($_POST[\"margin_new\"]) {\r\n $amount = CalculateSalesPriceWithMargin($int_productID ? $int_productID : $_POST[\"ProductIDnew\"],\r\n $_POST[\"start_number_new\"] ? $_POST[\"start_number_new\"] : 1,\r\n $_POST[\"margin_new\"],\r\n $_POST[\"start_date_new\"],\r\n $_POST[\"currency_new\"]);\r\n }\r\n if (!$amount) {\r\n $amount = GetSpecialProductPrice(\r\n $int_productID ? $int_productID : $_POST[\"ProductIDnew\"],\r\n 1,\r\n $int_contact_id,\r\n date_create(),\r\n PRICING_TYPE_SALE,\r\n OWN_COMPANYID );\r\n }\r\n }\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t$sql_insert = \"INSERT INTO pricing SET\r\n\t\t\t\t\t\tamount = '$amount',\";\r\n\t\t\t\t\tif ($int_contact_id) {\r\n\t\t\t\t\t\t$sql_insert .= \"ContactID = '$int_contact_id', \r\n\t\t\t\t\t\t\t\t\t\tproductID = '$str_id_new',\";\r\n\t\t\t\t\t} else if ($int_productID) {\r\n\t\t\t\t\t\t$sql_insert .= \"ContactID = '$str_id_new', \r\n\t\t\t\t\t\t\t\t\t\tproductID = '$int_productID', \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$start_nr = $_POST[\"start_number_new\"] ? $_POST[\"start_number_new\"] : 1;\r\n\t\t\t\t\t$sql_insert .= \"start_number = '\" . $start_nr . \"', \";\r\n\t\t\t\t\t$sql_insert .= \"end_number = '\" . $_POST[\"end_number_new\"] . \"', \";\r\n\t\t\t\t\t$sql_insert .= \"start_date = '\" . $_POST[\"start_date_new\"] . \"', \";\r\n\t\t\t\t\t$sql_insert .= \"created_by = '\" . $GLOBALS[\"employee_id\"] . \"', \";\r\n\t\t\t\t\t$sql_insert .= \"created = '\" . date(DATEFORMAT_LONG) . \"' \";\r\n\t\t\t//echo $sql_insert;\r\n\t\t\t\t\t$db_iwex->query($sql_insert);\r\n\t\t\t\t\t$just_inserted = $db_iwex->lastinserted();\r\n\t\t\t\t\t */\r\n $just_inserted = update_price($int_productID ? $int_productID : $str_id_new,\r\n $amount,\r\n $_POST[\"currency_new\"],\r\n $_POST[\"start_date_new\"],\r\n $_POST[\"end_date_new\"],\r\n $_POST[\"start_number_new\"] ? $_POST[\"start_number_new\"] : 1,\r\n $_POST[\"end_number_new\"],\r\n $int_contact_id ? $int_contact_id : $str_id_new);\r\n } else {\r\n echo strtoupper($_POST[$column.\"IDnew\"]) . \" not a valid $column ID<BR>\";\r\n }\r\n }\r\n $sql_upd = 'Select';\r\n // now update all fields that have their updaterecordID set\r\n if ($qry_prices = $db_iwex->query($update_pricing_sql)) {\r\n while ($obj = mysql_fetch_object($qry_prices)) {\r\n if (isset($_POST[$column.\"ID$obj->recordID\"])\r\n &&\r\n (!$_POST[\"delete\".$obj->recordID]\r\n &&\r\n (\r\n $_POST[\"update\".$obj->recordID]==='1'\r\n ||\r\n $_POST[\"start_date\".$obj->recordID]<>$_POST[\"laststart_date\".$obj->recordID]\r\n ||\r\n $_POST[\"end_date\".$obj->recordID]<>$_POST[\"lastend_date\".$obj->recordID]\r\n ||\r\n $_POST[\"currency$obj->recordID\"]<>$_POST[\"lastcurrency$obj->recordID\"]\r\n )\r\n )\r\n ) {\r\n //echo \"currency: \" . $_POST[\"currency$obj->recordID\"];\r\n $amount = FALSE;\r\n if ($_POST[\"margin$obj->recordID\"]\r\n &&\r\n $_POST[\"margin$obj->recordID\"] != $_POST[\"lastmargin\".$obj->recordID]) {\r\n $amount = CalculateSalesPriceWithMargin($int_productID ? $int_productID : $_POST[\"ProductIDnew\"],\r\n $_POST[\"start_number$obj->recordID\"],\r\n $_POST[\"margin$obj->recordID\"],\r\n $_POST[\"start_date$obj->recordID\"],\r\n $_POST[\"currency$obj->recordID\"]);\r\n }\r\n if (!$amount) {\r\n $amount = $_POST[\"amount$obj->recordID\"];\r\n }\r\n $just_inserted = update_price($int_productID ? $int_productID : $_POST[\"ProductID$obj->recordID\"],\r\n $amount,\r\n $_POST[\"currency$obj->recordID\"],\r\n $_POST[\"start_date\".$obj->recordID],\r\n $_POST[\"end_date\".$obj->recordID],\r\n $_POST[\"start_number$obj->recordID\"],\r\n $_POST[\"end_number$obj->recordID\"],\r\n $int_contact_id ? $int_contact_id : $_POST[\"ContactID$obj->recordID\"]);\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t$sql_upd = \"UPDATE pricing SET \r\n\t\t\t\t\t\t\tamount = '\". $_POST[\"amount$obj->recordID\"] . \"',\";\r\n\t\t\t\t\t\tif ($int_contact_id) {\r\n\t\t\t\t\t\t\t$sql_upd .= \"ContactID = '$int_contact_id', \r\n\t\t\t\t\t\t\t\t\t\t\tproductID = '\". $_POST[\"ProductID$obj->recordID\"] . \"',\";\r\n\t\t\t\t\t\t} else if ($int_productID) {\r\n\t\t\t\t\t\t\t$sql_upd .= \"ContactID = '\". $_POST[\"ContactID$obj->recordID\"] . \"', \r\n\t\t\t\t\t\t\t\t\t\t\tproductID = '$int_productID',\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$sql_upd .= \"\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tstart_date = '\". $_POST[\"start_date$obj->recordID\"] . \"',\r\n\t\t\t\t\t\t\tend_date = '\". $_POST[\"end_date$obj->recordID\"] . \"',\r\n\t\t\t\t\t\t\tstart_number = '\". $_POST[\"start_number$obj->recordID\"] . \"',\r\n\t\t\t\t\t\t\tend_number = '\". $_POST[\"end_number$obj->recordID\"] . \"',\r\n\t\t\t\t\t\t\tcurrencyid = '\". $_POST[\"currency$obj->recordID\"] . \"',\r\n\t\t\t\t\t\t\tmodified = '\" . date(DATEFORMAT_LONG) . \"',\r\n\t\t\t\t\t\t\tmodified_by = '\" . $GLOBALS[\"employee_id\"] . \"'\r\n\t\t\t\t\t\t\tWHERE recordID = '$obj->recordID'\";\r\n\t\t\t\t\t\t$db_iwex->query($sql_upd);\r\n\t\t\t\t\t\t */\r\n } else if (isset($_POST[\"delete\".$obj->recordID])\r\n &&\r\n $_POST[\"delete\".$obj->recordID]) {\r\n $sql_upd = \"DELETE FROM pricing WHERE recordID = '$obj->recordID'\";\r\n if ($sql_upd) $db_iwex->query($sql_upd);\r\n }\r\n $sql_upd = '';\r\n }\r\n mysql_free_result($qry_prices);\r\n }\r\n }\r\n // start the displaying of the table\r\n $str_button_disable = \"DISABLED\";\r\n if (isset ($GLOBALS[\"waccess_s\"])) $str_button_disable = \"\";\r\n\r\n // show table to explain the colors\r\n if ($int_contact_id) {\r\n $return_var .= \"<table border=0>\\n\r\n\t\t\t\t\t<tr>\\n\r\n\t\t\t\t\t\t<td bgcolor=\".QOUTE_BGCOLOR.\">Own Special Pricing</td>\\n\r\n\t\t\t\t\t\t<td bgcolor=\".OPENORDER_BGCOLOR.\">\r\n\t\t\t\t\t\t<A HREF='\" . CONTACTS . \"?custid=$int_higher_contactID' TARGET='_new' \"\r\n .ShowShortContactInfo($int_contact_id)\r\n .\">Special Prices from Higher level</A></td>\\n\r\n\t\t\t\t\t</tr>\\n\r\n\t\t\t\t</table>\\n\";\r\n }\r\n //show control buttons\r\n // edit toggle button\r\n $return_var .= edit_button ('waccess_s', $formname);\r\n // show old values toggle button\r\n $return_var .= button('show_old',\r\n $bl_show,\r\n 'Show Old',\r\n 'Hide Old',\r\n $formname,\r\n !$bl_edit_prices);\r\n // now start the table\r\n $return_var .= \"<TABLE BORDER=\\\"0\\\" CELLPADDING=\\\"1\\\" CELLSPACING=\\\"0\\\" class=\\\"blockbody\\\" width=\\\"100%\\\">\\n\";\r\n $return_var .= \"<TR>\\n\";\r\n $return_var .= \"<TH>\" . $column . \"ID</TH>\";\r\n $return_var .= \"<TH>$descr_column</TH>\r\n\t\t\t\t\t\t<TH>sales price</TH>\r\n\t\t\t\t\t\t<TH>Currency</TH>\r\n\t\t\t\t\t\t<TH WIDTH='60'>%</TH>\r\n\t\t\t\t\t\t<TH WIDTH=90>start date</TH>\r\n\t\t\t\t\t\t<TH WIDTH=90>end date</TH>\r\n\t\t\t\t\t\t<TH>Creaded By</TH>\r\n\t\t\t\t\t\t<TH>Modified By</TH>\r\n\t\t\t\t\t\t<TH>min number</TH>\r\n\t\t\t\t\t\t<TH>max number</TH>\r\n\t\t\t\t\t\t<TH>Option</TH>\r\n\t\t\t\t\t\t<TH>Catalog</TH>\";\r\n $return_var .= \"</TR>\";\r\n\r\n //set edit enabler\r\n if (!$bl_edit_prices) {\r\n $edit_str = \"DISABLED\" ;\r\n } else {\r\n $edit_str = \"\";\r\n // first a new one, but only if we are editing\r\n $return_var .= \"<TD><INPUT $edit_str TYPE='text' SIZE='4' NAME='\" . $column . \"IDnew'></TD><TD>\";\r\n $return_var .= GetRecordIdInputField($search_list, \"ID\", $column.\"New\", $formname . \".\" . $column . \"IDnew\", \"$column\", 10, \"\", 3).\"</TD>\r\n\t\t\t\t\t\t<TD><INPUT $edit_str TYPE='text' SIZE='8' NAME='amount_new'></TD>\r\n\t\t\t\t\t\t<TD>\".makelistbox('SELECT ValutaID, ValutaName FROM valuta ORDER by ValutaName',\r\n \"currency_new\",\r\n 'ValutaID',\r\n 'ValutaName',\r\n DB_CURRENCY_DEFAULT,\r\n FALSE,\r\n FALSE,\r\n $edit_str).\"</TD>\r\n\t\t\t\t\t\t<TD><INPUT $edit_str TYPE='text' SIZE='4' NAME='margin_new'></TD>\r\n\t\t\t\t\t\t<TD><INPUT $edit_str TYPE='text' SIZE='10' NAME='start_date_new'>\"\r\n . Add_Calendar($formname.\".start_date_new\") . \"</TD>\r\n\t\t\t\t\t\t<TD><INPUT $edit_str TYPE='text' SIZE='10' NAME='end_date_new'>\"\r\n . Add_Calendar($formname.\".end_date_new\") . \"</TD>\r\n\t\t\t\t\t\t<TD></TD>\r\n\t\t\t\t\t\t<TD></TD>\r\n\t\t\t\t\t\t<TD><INPUT $edit_str TYPE='text' SIZE='4' NAME='start_number_new'></TD>\r\n\t\t\t\t\t\t<TD><INPUT $edit_str TYPE='text' SIZE='4' NAME='end_number_new'></TD>\r\n\t\t\t\t\t\t<TD></TD>\";\r\n $return_var .= \"</TR>\\n\";\r\n }\r\n //then edit existing ones\r\n $qry_prices = $db_iwex->query($pricing_sql);\r\n while ($obj = mysql_fetch_object($qry_prices)) {\r\n // change color and behaviour based on own pricing or Higher level related contact- pricing\r\n if ($obj->ContactID == $int_higher_contactID\r\n &&\r\n $obj->ContactID) {\r\n $str_bgcolor = \"BGCOLOR='\".OPENORDER_BGCOLOR.\"'\";\r\n $str_edit = \"DISABLED\";\r\n } else {\r\n // color the old stuff different\r\n if ($obj->end_date=='0000-00-00'\r\n ||\r\n strtotime($obj->end_date) >= strtotime(date('Y-m-d'))) {\t// current stuff\r\n $str_bgcolor = \"BGCOLOR='\".QOUTE_BGCOLOR.\"'\";\r\n $str_edit = \"\";\r\n $check_date = date(\"Y-m-d\");\r\n } else { //old stuff\r\n $str_bgcolor = \"BGCOLOR='\".OTHER_BGCOLOR.\"'\";\r\n $str_edit = \"\";\r\n $check_date = $obj->start_date;\r\n }\r\n }\r\n //if we are looking at sales pricing calculate margin\r\n $margin = CalcProductMargin($obj->ProductID,\r\n $obj->amount,\r\n ($obj->start_number > 1 ? $obj->start_number : 1),\r\n $check_date) . \" %\"; //check against the end date\r\n\r\n // make sure the disabled state from the edit button is also respected\r\n $str_edit || $edit_str ? $str_edit = \"DISABLED\" : $str_edit = \"\";\r\n\r\n //if the date of the price is endless or later than today show the delete button\r\n // future development: this should check whether this price has ever been used, if so, delete does not appear!\r\n if (($obj->end_date=='0000-00-00'\r\n ||\r\n strtotime($obj->end_date) >= strtotime(date('Y-m-d')))\r\n &&\r\n !$str_edit) {\r\n $str_del = \"<INPUT TYPE='hidden' NAME='delete\".$obj->recordID.\"'>\r\n\t\t\t\t\t<IMG SRC=\".IMAGES_URL.\"delete.png WIDTH='10' \r\n\t\t\t\t\tonclick=\\\"document.$formname.delete\".$obj->recordID.\".value='1';\r\n\t\t\t\t\tdocument.$formname.update_var.value='1';\r\n\t\t\t\t\tdocument.$formname.submit()\\\"\r\n\t\t\t\t\tonchange=\\\"document.$formname.update\" . $obj->recordID . \".value='1';\\\">\";\r\n $str_edit = \"\";\r\n // enable catalog checkbox\r\n $enable_checkbox = TRUE;\r\n } else {\r\n // empty the delet string\r\n $str_del = \"\";\r\n // disable editing if it's an old price!\r\n $str_edit = \"DISABLED\";\r\n // also disable catalog checkbox\r\n $enable_checkbox = FALSE;\r\n }\r\n\r\n //first column ProductID or ContactID\r\n $return_var .= \"<TR $str_bgcolor><TD><INPUT $str_edit TYPE='text'\r\n\t\t\t\t\t\t\t\t\tSIZE='4' \r\n\t\t\t\t\t\t\t\t\tNAME='\" . $column.\"ID\" . $obj->recordID . \"' \r\n\t\t\t\t\t\t\t\t\tVALUE='\" . $obj->{$column.\"ID\"} . \"'\r\n\t\t\t\t\t\t\t\t\tonchange=\\\"document.$formname.update\" . $obj->recordID . \".value='1';\\\">\r\n $str_del\";\r\n $return_var .= \"</TD><TD>\". $obj->$descr_column . \"</TD>\";\r\n $return_var .= \"<TD><INPUT $str_edit TYPE='text' SIZE='8' NAME='amount\".$obj->recordID.\"' VALUE='\". $obj->amount .\"'\r\n\t\t\t\t\t\t\tonchange=\\\"document.$formname.update\" . $obj->recordID . \".value='1';\\\"></TD>\r\n\t\t\t\t<TD>\".makelistbox('SELECT ValutaID, ValutaName FROM valuta ORDER by ValutaName',\r\n \"currency$obj->recordID\",\r\n 'ValutaID',\r\n 'ValutaName',\r\n $obj->currencyid,\r\n FALSE,\r\n FALSE,\r\n $str_edit).\"\r\n\t\t\t\t\t<INPUT TYPE='hidden' SIZE='10' NAME='lastcurrency\".$obj->recordID.\"' VALUE='$obj->currencyid'></TD>\r\n\t\t\t\t<TD\" . ShowOnMouseOverText(\"Margin calculation date: $check_date\") . \">\r\n\t\t\t\t\t<INPUT $str_edit TYPE='text' SIZE='5' NAME='margin\".$obj->recordID.\"' VALUE='$margin' onfocus=\\\"document.$formname.update\" . $obj->recordID . \".value='1';\\\">\r\n\t\t\t\t\t<INPUT TYPE='hidden' SIZE='10' NAME='lastmargin\".$obj->recordID.\"' VALUE='$margin'>\r\n\t\t\t\t</TD>\t\r\n\t\t\t\t<TD><INPUT $str_edit TYPE='text' SIZE='10' NAME='start_date\".$obj->recordID.\"' VALUE='$obj->start_date'\r\n\t\t\t\t\tonfocus=\\\"document.$formname.update\" . $obj->recordID . \".value='1';\\\">\r\n\t\t\t\t\t<INPUT TYPE='hidden' SIZE='10' NAME='laststart_date\".$obj->recordID.\"' VALUE='$obj->start_date'>\r\n \". Add_Calendar($formname.\".start_date\".$obj->recordID) . \"</TD>\r\n\t\t\t\t<TD><INPUT $str_edit TYPE='text' SIZE='10' NAME='end_date\".$obj->recordID.\"' VALUE='$obj->end_date'\r\n\t\t\t\t\tonfocus=\\\"document.$formname.update\" . $obj->recordID . \".value='1';\\\">\r\n\t\t\t\t\t<INPUT TYPE='hidden' SIZE='10' NAME='lastend_date\".$obj->recordID.\"' VALUE='$obj->end_date'>\r\n \". Add_Calendar($formname.\".end_date\".$obj->recordID) . \"</TD></TD>\r\n\t\t\t\t<TD \".ShowOnMouseOverText(\"$obj->CreatByfull<br>$obj->created\").\">$obj->CreatBy</TD>\r\n\t\t\t\t<TD \".ShowOnMouseOverText(\"$obj->ModByfull<br>$obj->modified\").\">$obj->ChangedBy</TD>\r\n\t\t\t\t<TD><INPUT $str_edit TYPE='text' SIZE='4' NAME='start_number\".$obj->recordID.\"' VALUE='$obj->start_number'\r\n\t\t\t\t\t\tonchange=\\\"document.$formname.update\" . $obj->recordID . \".value='1';\\\">\r\n\t\t\t\t</TD>\r\n\t\t\t\t<TD><INPUT $str_edit TYPE='text' SIZE='4' NAME='end_number\".$obj->recordID.\"' VALUE='$obj->end_number'\r\n\t\t\t\t\t\tonchange=\\\"document.$formname.update\" . $obj->recordID . \".value='1';\\\">\r\n\t\t\t\t\t<INPUT $str_edit TYPE='hidden' NAME='update\" . $obj->recordID . \"'>\r\n\t\t\t\t</TD>\";\r\n $str_insert_link = \"\";\r\n if ($obj->end_date == '0000-00-00') {\r\n $str_insert_link = \"<INPUT $str_edit TYPE='button' VALUE='new price'\r\n\t\t\t\t\t\tonclick=\\\"document.$formname.update_var.value='1';\r\n\t\t\t\t\t\tif(new_date=prompt('date?', '\" . date(\"Y-m-d\") . \"'))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// set this date to yesterday\r\n\t\t\t\t\t\t\tary_date = new_date.match('(\\.{4})-(\\.{2})-(\\.{2})'); //('\\d+-\\d+-\\d+');\r\n\t\t\t\t\t\t\tdate_given = new Date(ary_date[1],ary_date[2],ary_date[3]);\r\n\t\t\t\t\t\t\tyesterdayDate = date_given.getDate() -1 ;\r\n\t\t\t\t\t\t\tdate_given.setDate( yesterdayDate );\r\n\t\t\t\t\t\t\tstr_yestterday = date_given.getFullYear();\r\n\t\t\t\t\t\t\tstr_yestterday += '-';\r\n\t\t\t\t\t\t\tstr_yestterday += date_given.getMonth();\r\n\t\t\t\t\t\t\tstr_yestterday += '-';\r\n\t\t\t\t\t\t\tstr_yestterday += date_given.getDate();\r\n\t\t\t\t\t\t\t// fill in new values\r\n\t\t\t\t\t\t\t//document.$formname.end_date\".$obj->recordID.\".value = str_yestterday;\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//document.$formname.update\" . $obj->recordID . \".value='1';\r\n\t\t\t\t\t\t\t//document.$formname.str_recordID.value='\" . $obj->recordID . \"';\r\n\t\t\t\t\t\t\tdocument.$formname.\" . $column . \"IDnew.value=document.$formname.\" . $column.\"ID\" . $obj->recordID . \".value;\r\n\t\t\t\t\t\t\tdocument.$formname.amount_new.value=document.$formname.amount\".$obj->recordID.\".value;\r\n\t\t\t\t\t\t\tdocument.$formname.start_date_new.value=new_date;\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tdocument.$formname.start_number_new.value=document.$formname.start_number\".$obj->recordID.\".value;\r\n\t\t\t\t\t\t\tdocument.$formname.end_number_new.value=document.$formname.end_number\".$obj->recordID.\".value;\r\n\t\t\t\t\t\t\tdocument.$formname.submit();\r\n\t\t\t\t\t\t};\\\">\";\r\n }\r\n $return_var .= \"<TD>$str_insert_link&nbsp;</TD>\";\r\n // now show if this is in the catalog\r\n $return_var .= \"<TD>\" . MakeCheckbox(\"in_catalog\".$obj->recordID,\r\n catalog($obj->ContactID, $obj->ProductID, \"in_catalog\".$obj->recordID, FALSE),\r\n $enable_checkbox,\r\n FALSE,\r\n $formname,\r\n $auto_submit=TRUE) . \"</TD>\";\r\n $return_var .= \"</TR>\\n\";\r\n }\r\n $return_var .= \" </td>\\n</TR>\\n\";\r\n $return_var .= \"</table>\";\r\n mysql_free_result($qry_prices);\r\n }\r\n Return $return_var;\r\n}", "public function setProductPrice($product_price){\n $this->product_price = $product_price;\n }", "public function updateFieldsPersonalization()\n\t{\n\t\tConfiguration::updateValue('PS_MR_SHOP_NAME', Tools::getValue('Expe_ad1'));\n\t\t$this->_html .= '<div class=\"conf confirm\"><img src=\"'._PS_ADMIN_IMG_.'/ok.gif\" alt=\"\" /> '.$this->l('Settings updated').'</div>';\t\t\n\t}", "function setPrice($price)\n {\n $this->price = $price;\n }", "public function getPricing()\n {\n // get current quantity as its the basis for pricing\n $quantity = $this->quantity;\n\n // Get pricing but maintain original unitPrice (only if post-CASS certification quantity drop is less than 10%),\n $adjustments = $this->quantity_adjustment + $this->count_adjustment;\n if ($adjustments < 0) {\n $originalQuantity = 0;\n $originalQuantity = $this->itemAddressFiles()->sum('count');\n $originalQuantity += $this->mail_to_me;\n if ((($originalQuantity + $adjustments) / $originalQuantity) > 0.90) { // (less than 10%)\n $quantity = $originalQuantity;\n }\n }\n\n // Get pricing based on quantity.\n // If quantity is less than minimum quantity required (only if post-CASS certification),\n // then use the minimum quantity required to retrieve pricing\n if ((\n $this->quantity_adjustment != 0 || $this->count_adjustment != 0) &&\n $this->quantity < $this->getMinimumQuantity()\n ) {\n $quantity = $this->getMinimumQuantity();\n }\n\n // Pricing date is based on submission date or now.\n $pricingDate = (!is_null($this->date_submitted) ? $this->date_submitted : time());\n\n if (!is_null($this->product_id) && !is_null($this->product)) {\n $newPricing = $this->product->getPricing(\n $quantity, $pricingDate,\n $this->invoice->getBaseSiteId()\n );\n $oldPricing = $this->getProductPrice();\n // TODO: refactor this pricing history section, it really shouldn't belong in this method\n if (!is_null($newPricing)) {\n $insert = true;\n if (!is_null($oldPricing) && $newPricing->id == $oldPricing->product_price_id) {\n $insert = false;\n }\n if ($insert) {\n try {\n InvoiceItemProductPrice::firstOrCreate(\n [\n 'invoice_item_id' => $this->id,\n 'product_price_id' => $newPricing->id,\n 'date_created' => date('Y-m-d H:i:s', time()),\n 'is_active' => 1\n ]\n );\n } catch (QueryException $e) {\n // TODO: fix this hack (e.g. why do we need integrity constraint on this table )\n if (strpos($e->getMessage(), 'Duplicate entry') === false) {\n throw $e;\n } else {\n Logger::error($e->getMessage());\n }\n }\n\n if (!is_null($oldPricing)) {\n $oldPricing->is_active = 0;\n $oldPricing->save();\n }\n }\n }\n\n return $newPricing;\n }\n if (!is_null($this->data_product_id) && $this->data_product_id != 0) {\n return $this->dataProduct->getPricing($pricingDate, $this->invoice->site_id);\n }\n if (!is_null($this->line_item_id) && $this->line_item_id != 0) {\n return $this->line_item->getPricing($pricingDate, $this->invoice->getBaseSiteId());\n }\n if ($this->isAdHocLineItem() && $this->unit_price) {\n return (object)array('price' => $this->unit_price);\n }\n return null;\n }", "protected function setPricing($display) {\r\n\t\t\tswitch($display) {\r\n\t\t\t\tcase 0 : $this->_pricing = 'emptyStore';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1 : $this->_pricing = 'newStore';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2 : $this->_pricing = 'greenStore';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3 : $this->_pricing = 'completeStore';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault: $this->_pricing = 'emptyStore';\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}", "protected function doActionSetSalePrice()\n {\n $form = new \\XLite\\Module\\CDev\\Sale\\View\\Form\\SaleSelectedDialog();\n $form->getRequestData();\n\n if ($form->getValidationMessage()) {\n \\XLite\\Core\\TopMessage::addError($form->getValidationMessage());\n } elseif (!$this->getSelected() && $ids = $this->getActionProductsIds()) {\n $qb = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Product')->createQueryBuilder();\n $alias = $qb->getMainAlias();\n $qb->update('\\XLite\\Model\\Product', $alias)\n ->andWhere($qb->expr()->in(\"{$alias}.product_id\", $ids));\n\n foreach ($this->getUpdateInfoElement() as $key => $value) {\n $qb->set(\"{$alias}.{$key}\", \":{$key}\")\n ->setParameter($key, $value);\n }\n\n $qb->execute();\n\n \\XLite\\Core\\TopMessage::addInfo('Products information has been successfully updated');\n } else {\n \\XLite\\Core\\Database::getRepo('\\XLite\\Model\\Product')->updateInBatchById($this->getUpdateInfo());\n \\XLite\\Core\\TopMessage::addInfo('Products information has been successfully updated');\n }\n\n $this->setReturnURL($this->buildURL('product_list', '', ['mode' => 'search']));\n }", "public function update(Request $request, PricingCheck $pricingCheck)\n {\n //\n }", "function setItem_price($price){\n $this->item_price = $price;\n }", "public function edit(Price $price)\n {\n //\n }", "public function edit(Price $price)\n {\n //\n }", "public function product_update_post()\n\t\t\t\t{\n\t\t\t\t}", "public function update_field() {\n\n\t\t//init controller data\n\t\t$this->extensions->hk_InitData($this, __FUNCTION__);\n\n\t\tif (!$this->user->canModify('listing_grid/product')) {\n\t\t\t$error = new AError('');\n\t\t\treturn $error->toJSONResponse('NO_PERMISSIONS_402',\n\t\t\t\tarray( 'error_text' => sprintf($this->language->get('error_permission_modify'), 'listing_grid/product'),\n\t\t\t\t\t'reset_value' => true\n\t\t\t\t));\n\t\t}\n\n\t\t$this->loadLanguage('catalog/product');\n\n\t\t$this->loadModel('catalog/product');\n\t\tif (isset($this->request->get['id'])) {\n\t\t\t//request sent from edit form. ID in url\n\t\t\tforeach ($this->request->post as $key => $value) {\n\t\t\t\t$err = $this->_validateField($key, $value);\n\t\t\t\tif (!empty($err)) {\n\t\t\t\t\t$error = new AError('');\n\t\t\t\t\treturn $error->toJSONResponse('VALIDATION_ERROR_406', array( 'error_text' => $err ));\n\t\t\t\t}\n if($key=='date_available'){\n $value = dateDisplay2ISO($value);\n }\n $data = array( $key => $value );\n\t\t\t\t$this->model_catalog_product->updateProduct($this->request->get['id'], $data);\n\t\t\t\t$this->model_catalog_product->updateProductLinks($this->request->get['id'], $data);\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\n\t\t//request sent from jGrid. ID is key of array\n\t\t$fields = array( 'product_id', 'product_description', /* 'model',*//* 'price',*//* 'call_to_order', *//* 'quantity',*/ 'status' );\n\t\tforeach ($fields as $f) {\n\t\t\tif (isset($this->request->post[ $f ]))\n\t\t\t\tforeach ($this->request->post[ $f ] as $k => $v) {\n\t\t\t\t\t$err = $this->_validateField($f, $v);\n\t\t\t\t\tif (!empty($err)) {\n\t\t\t\t\t\t$error = new AError('');\n\t\t\t\t\t\treturn $error->toJSONResponse('VALIDATION_ERROR_406', array( 'error_text' => $err ));\n\t\t\t\t\t}\n\t\t\t\t\t$this->model_catalog_product->updateProduct($k, array( $f => $v ));\n\t\t\t\t}\n\t\t}\n\n\t\t//update controller data\n\t\t$this->extensions->hk_UpdateData($this, __FUNCTION__);\n\t}", "function update_promo() {\n\tconnect_to_db(DB_SERVER, DB_UN, DB_PWD, DB_NAME);\n\n\t$price = 0;\n\n\t$promo_code = mysql_real_escape_string($_POST['promoCode']);\n\t$promo_name = mysql_real_escape_string($_POST['promoName']);\n\t$promo_description = mysql_real_escape_string($_POST['promoDesc']);\n\t$promo_type = mysql_real_escape_string($_POST['promoType']);\n\t$promo_amount = mysql_real_escape_string($_POST['promoAmount']);\n\n\t// first we grab the pre-existing entry and reapply amounts to the stored item values\n\t$statement_getAmount = \"select PromotionItem.ItemNumber, Item.FullRetailPrice, Promotion.AmountOff, Promotion.PromoType from Promotion, PromotionItem, Item where (Item.ItemNumber=PromotionItem.ItemNumber) AND (Promotion.PromoCode = PromotionItem.PromoCode) AND Promotion.PromoCode='$promo_code'\";\n\t$returnResult = mysql_query($statement_getAmount);\n\n\t// next we grab the PromotionItem table and reapply the sale price.\n\t// this is then recalculated after the edit has been made.\n\t// should've resulted in a 1 output query, any more then the schema must broken. Any less, we skip this step\n\tif(mysql_num_rows($returnResult) > 0) {\n\t\twhile($the_row = mysql_fetch_assoc($returnResult)) {\n\t\t\t// run loop evaluating prices\n\t\t\t$myAmount = $the_row['AmountOff'];\n\t\t\t$myType \t= $the_row['PromoType'];\n\t\t\t$myNumber\t= $the_row['ItemNumber'];\t// was leading to an infamous bug where it would simply grab the first number since were table hopping.\n\t\t\t$myRetail = $the_row['FullRetailPrice'];\t// part two of the glitch, reapply the previous price. If 0 then the number could've been negative, lets fix that\n\n\t\t\t$statement_getSalePrice = \"select SalePrice from PromotionItem where PromoCode='$promo_code' and ItemNumber='$myNumber'\";\n\t\t\t$returnResultItem = mysql_query($statement_getSalePrice);\n\n\t\t\t$the_row_item = mysql_fetch_array($returnResultItem);\n\t\t\t$myPrice\t= $the_row_item['SalePrice'];\n\n\t\t\t$price = recalculatePrice($myAmount, $myType, $myPrice, $myRetail);\n\n\t\t\t// calculate new price\n\t\t\t$new_price = calculatePrice($promo_amount, $promo_type, $price);\n\t\t\t\t//display_result(\"Recalc $price, Calc $new_price values Amount $myAmount, Type $myType, Price $myPrice, FullRetail $myRetail, Promo Amount $promo_amount, Promo Type $promo_type\");\n\n\t\t\t// new price achieved, now add it back into the Promotion Item database\n\t\t\t$update_statement = \"update PromotionItem set SalePrice='$new_price' where PromoCode='$promo_code' AND ItemNumber='$myNumber'\";\n\t\t\t$update_result = mysql_query($update_statement);\n\t\t}\n\t}\n\n\t$promo_amount = applyDecimal($promo_amount);\n\n\t// append string\n\t$appendString=\"\";\n\n\t// setup string\n\tif($promo_code != '')\t\t\t$appendString .= \"PromoCode='$promo_code', \";\n\tif($promo_name != '') $appendString .= \"Name='$promo_name', \";\n\tif($promo_description != '') $appendString .= \"Description='$promo_description', \";\n\tif($promo_type != '') $appendString .= \"PromoType='$promo_type', \";\n\tif($promo_amount != '') $appendString .= \"AmountOff='$promo_amount', \";\n\n\t$appendString = str_lreplace(\",\",\"\",$appendString);\n\t// create the statement\n\t$insertStatement = \"update Promotion set $appendString where PromoCode='$promo_code';\";\n\n\t$result = mysql_query($insertStatement);\n\n\t$message = \"\";\n\n\tif(!$result) {\n\t\t$message = \"Error in updating promo: $promo_code: \". mysql_error();\n\t} else {\n\t\t$message = \"Promotion Successfully Updated for PromoCode: $promo_code.\";\n\t}\n\n\tdisplay_result($message);\n}", "function commerce_product_pre_calculation_settings_form($form, &$form_state) {\n // Count the number of rows in the price pre-calculation table.\n $query = db_select('commerce_calculated_price')\n ->fields('commerce_calculated_price', array('created'))\n ->condition('module', 'commerce_product_pricing')\n ->condition('entity_type', 'commerce_product')\n ->condition('field_name', 'commerce_price')\n ->execute();\n\n $count = $query->rowCount();\n\n // If there are rows in the table or price pre-calculation is enabled, show\n // the management fieldset with its action buttons.\n if ($count > 0 || variable_get('commerce_product_sell_price_pre_calculation', 'disabled') != 'disabled') {\n // Build a description for the fieldset indicating how many rows are in the\n // table and when they were last processed.\n $description = format_plural($count,\n t('There is 1 product sell price in the calculated price table.'),\n t('There are @count product sell prices in the calculated price table.'));\n\n // If there are prices, add the timestamp for the last calculation.\n if ($count > 0) {\n $description .= ' ' . t('The last calculation occured on @date.', array('@date' => format_date($query->fetchField(), 'short')));\n }\n\n $form['database'] = array(\n '#type' => 'fieldset',\n '#title' => t('Manage calculated prices'),\n '#description' => '<p>' . $description . '</p>',\n );\n\n if ($count > 0) {\n $form['database']['delete'] = array(\n '#type' => 'submit',\n '#value' => t('Delete product sell prices'),\n );\n }\n else {\n $form['database']['batch_calculate'] = array(\n '#type' => 'submit',\n '#value' => t('Batch calculate prices now'),\n );\n }\n }\n\n $form['commerce_product_sell_price_pre_calculation'] = array(\n '#type' => 'radios',\n '#title' => t('Sell price pre-calculation method'),\n '#description' => t('If pre-calculation is disabled, code that integrates calculated prices into queries and price displays will ignore any existing calculated prices.'),\n '#options' => array(\n 'disabled' => t('Disabled'),\n 'manual_batch' => t('Manual batch calculation'),\n\n // TODO: Support automated re-calculation when Rules or Products that have\n // pre-calculated prices are updated.\n // 'automated_batch' => t('Manual batch pre-calculation with automated updates'),\n ),\n '#default_value' => variable_get('commerce_product_sell_price_pre_calculation', 'disabled'),\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save configuration'),\n );\n\n return $form;\n}", "public function update(Request $request, $id)\n {\n //validation\n $messages = array(\n 'purchase_price.required' => 'Purchase Price is Required.',\n );\n $this->validate($request, array(\n 'purchase_price' => 'required|numeric', \n ),$messages);\n\n // store in the database\n $purchase = Purchase::find($id);\n\n $purchase->purchase_price = $request->purchase_price;\n\n $purchase->save();\n\n //add purchase price to store table as well\n $store = Store::find($id);\n $store->purchase_price = $request->purchase_price;\n $store->save();\n\n return redirect('/purchase')->with('status', 'Product Purchase Price Has Been Added !');\n }", "public function update(UpdateInvoicesRequest $request, $id)\n {\n if (! Gate::allows('invoice_edit')) {\n return prepareBlockUserMessage();\n }\n $invoice = Invoice::findOrFail($id);\n // dd( $request->all() );\n $products_details = getProductDetails( $request );\n\n $tax_format = $request->tax_format;\n $discount_format = $request->discount_format;\n\n $products_details['discount_format'] = $discount_format;\n $products_details['tax_format'] = $tax_format;\n \n // These are product values.\n $grand_total = ! empty( $products_details['grand_total'] ) ? $products_details['grand_total'] : 0;\n $products_amount = ! empty( $products_details['products_amount'] ) ? $products_details['products_amount'] : 0;\n $total_tax = ! empty( $products_details['total_tax'] ) ? $products_details['total_tax'] : 0;\n $total_discount = ! empty( $products_details['total_discount'] ) ? $products_details['total_discount'] : 0;\n\n // Calculation of Cart Tax.\n $tax_id = $request->tax_id;\n $cart_tax = 0; \n if ( $tax_id > 0 ) { \n $invoice->setTaxIdAttribute( $tax_id );\n $tax = $invoice->tax()->first();\n $rate = 0;\n $rate_type = 'percent';\n if ( $tax ) {\n $rate = $tax->rate;\n $rate_type = $tax->rate_type;\n }\n $products_details['cart_tax_rate'] = $rate;\n $products_details['cart_tax_rate_type'] = $rate_type;\n\n if ( $rate > 0 ) {\n if ( 'before_tax' === $tax_format ) {\n if ( 'percent' === $rate_type ) {\n $cart_tax = ( $products_amount * $rate) / 100;\n } else {\n $cart_tax = $rate;\n } \n } else {\n $new_amount = $products_amount + $total_tax;\n if ( 'percent' === $rate_type ) {\n $cart_tax = ( $new_amount * $rate) / 100;\n } else {\n $cart_tax = $rate;\n }\n }\n } \n }\n\n // Let us calculate Cart Discount\n $cart_discount = 0;\n $discount_id = $request->discount_id;\n if ( $discount_id > 0 ) {\n $invoice->setDiscountIdAttribute( $discount_id );\n $discount = $invoice->discount()->first();\n\n $rate = 0;\n $rate_type = 'percent';\n if ( $discount ) {\n $rate = $discount->discount;\n $rate_type = $discount->discount_type;\n }\n $products_details['cart_discount_rate'] = $rate;\n $products_details['cart_discount_rate_type'] = $rate_type;\n if ( $rate > 0 ) {\n if ( 'before_tax' === $tax_format ) {\n if ( 'percent' === $rate_type ) {\n $cart_discount = ( $products_amount * $rate) / 100;\n } else {\n $cart_discount = $rate;\n } \n } else {\n $new_amount = $products_amount + $total_tax;\n if ( 'percent' === $rate_type ) {\n $cart_discount = ( $new_amount * $rate) / 100;\n } else {\n $cart_discount = $rate;\n }\n }\n } \n }\n\n $products_details['cart_tax'] = $cart_tax;\n $products_details['cart_discount'] = $cart_discount;\n $amount_payable = $grand_total + $cart_tax - $cart_discount;\n $products_details['amount_payable'] = $amount_payable;\n\n // if there are transactions for this customer. Currency selection may disable, so we need to get it from customer profile.\n $currency_id = $request->currency_id;\n if ( empty( $currency_id ) ) {\n $currency_id = getDefaultCurrency( 'id', $request->customer_id );\n }\n\n // If products module disabled! lets take amount from user input!!\n if ( empty( $amount_payable ) && $request->has('amount') ) {\n $amount_payable = $request->amount;\n }\n\n $addtional = array(\n 'products' => json_encode( $products_details ),\n 'amount' => $amount_payable,\n 'currency_id' => $currency_id,\n );\n\n $invoice_no = $request->invoice_no;\n if ( empty( $invoice_no ) ) {\n $invoice_no = getNextNumber();\n }\n \n $addtional['invoice_no'] = $invoice_no;\n\n $request->request->add( $addtional ); //add additonal / Changed values to the request object.\n\n $date_set = getCurrentDateFormat();\n\n $additional = array( \n 'invoice_date' => ! empty( $request->invoice_date ) ? Carbon::createFromFormat($date_set, $request->invoice_date)->format('Y-m-d') : NULL,\n 'invoice_due_date' => ! empty( $request->invoice_due_date ) ? Carbon::createFromFormat($date_set, $request->invoice_due_date)->format('Y-m-d') : NULL,\n ); \n $request->request->add( $additional ); \n\n if ( isDemo() ) {\n return prepareBlockUserMessage( 'info', 'crud_disabled' );\n } \n\n\n $invoice->update($request->all());\n\n \n\n $products_sync = ! empty( $products_details['products_sync'] ) ? $products_details['products_sync'] : array();\n $invoice->invoice_products()->sync( $products_sync );\n\n $products_sync = ! empty( $products_details['products_sync_tasks'] ) ? $products_details['products_sync_tasks'] : array();\n $invoice->invoice_products_tasks()->sync( $products_sync );\n\n $products_sync = ! empty( $products_details['products_sync_expenses'] ) ? $products_details['products_sync_expenses'] : array();\n $invoice->invoice_products_expenses()->sync( $products_sync );\n\n $this->insertHistory( array('id' => $invoice->id, 'comments' => 'invoice-updated', 'operation_type' => 'crud' ) );\n\n $invoice->allowed_paymodes()->sync(array_filter((array)$request->input('allowed_paymodes')));\n\n $invoice->update_invoice_status( $invoice->id );\n\n $customer = $invoice->customer()->first();\n if ( ! empty( $request->btnsavesend ) && $customer && 'Published' === $invoice->status ) {\n // Notification to user\n $logo = getSetting( 'site_logo', 'site_settings' );\n $templatedata = array(\n 'client_name' => $customer->name,\n 'content' => 'Invoice has been created',\n 'invoice_url' => route( 'admin.invoices.preview', [ 'slug' => $invoice->slug ] ),\n 'invoice_no' => $invoice->invoice_no,\n 'invoice_date' => digiDate( $invoice->invoice_date ),\n 'invoice_amount' => digiCurrency($invoice->amount,$invoice->currency_id),\n 'invoice_due_date' => digiDate( $invoice->invoice_due_date ),\n 'title' => $invoice->title,\n 'address' => $invoice->address,\n 'reference' => $invoice->reference,\n 'invoice_notes' => $invoice->invoice_notes,\n 'customer_id' => $invoice->customer_id,\n 'currency_id' => $invoice->currency_id,\n 'tax_id' => $invoice->tax_id,\n 'discount_id' => $invoice->discount_id,\n 'paymentstatus' => $invoice->paymentstatus,\n 'created_by_id' => $invoice->created_by_id,\n 'products' => productshtml( $invoice->id ),\n\n 'site_address' => getSetting( 'site_address', 'site_settings'),\n 'site_phone' => getSetting( 'site_phone', 'site_settings'),\n 'site_email' => getSetting( 'contact_email', 'site_settings'), \n 'site_title' => getSetting( 'site_title', 'site_settings'),\n 'logo' => asset( 'uploads/settings/' . $logo ),\n 'date' => digiTodayDate(),\n 'site_url' => env('APP_URL'),\n );\n\n if ( $invoice->customer->name ) {\n $templatedata['customer_id'] = $invoice->customer->name;\n }\n \n if ( $invoice->currency->name ) {\n $templatedata['currency_id'] = $invoice->currency->name;\n }\n \n if ( $invoice->tax->name ) {\n $templatedata['tax_id'] = $invoice->tax->name;\n }\n \n if ( $invoice->discount->name ) {\n $data['discount_id'] = $invoice->discount->name;\n }\n \n $createduser = \\App\\User::find( $invoice->created_by_id );\n if ( $createduser ) {\n $data['created_by_id'] = $createduser->name;\n }\n\n $data = [\n \"action\" => \"Created\",\n \"crud_name\" => \"User\",\n 'template' => 'invoice-created',\n 'model' => 'App\\Invoices',\n 'data' => $templatedata,\n ];\n $customer->notify(new QA_EmailNotification($data));\n\n $this->insertHistory( array('id' => $invoice->id, 'comments' => 'invoice-updated', 'operation_type' => 'email' ) );\n }\n\n flashMessage( 'success', 'update');\n\n if ( ! empty( $request->btnsavemanage ) ) {\n return redirect( 'admin/invoices/' . $invoice->id );\n } else {\n return redirect()->route('admin.invoices.index');\n }\n }", "public function actionUpdateProductBuyBoxPrice()\n {\n $userData = User::find()->andWhere(['IS NOT', 'u_mws_seller_id', null])->all();\n\n foreach ($userData as $user) {\n $productData = FbaAllListingData::find()->andWhere(['created_by' => $user->u_id])->all();\n $skuData = AppliedRepriserRule::find()->select(['arr_sku'])->where(['arr_user_id' => $userData->u_id])->column();\n\n foreach ($productData as $product) {\n $productBuyBox = \\Yii::$app->api->getProductCompetitivePrice($product->seller_sku);\n $product->buybox_price = $productBuyBox;\n\n if(in_array($product->seller_sku, $skuData)) {\n $magicPrice = \\Yii::$app->api->getMagicRepricerPrice($product->seller_sku, $productBuyBox, $product->repricing_min_price, $product->repricing_max_price, $product->repricing_rule_id);\n if($magicPrice) {\n $product->repricing_cost_price = $magicPrice;\n }\n }\n\n if ($product->save(false)) {\n echo $product->asin1 . \" is Updated.\";\n }\n sleep(2);\n }\n sleep(1);\n }\n }", "public static function onAfterUpdate(ORM\\Event $event): void\n\t{\n\t\tModel\\Price::clearSettings();\n\t}", "public function edit()\r\n\r\n {\r\n\r\n $this->page_title->push(lang('menu_products_add'));\r\n\r\n $this->data['pagetitle'] = $this->page_title->show();\r\n\r\n\r\n /* Breadcrumbs :: Common */\r\n\r\n $this->breadcrumbs->unshift(1, lang('menu_products_add'), 'admin/setup/product/edit');\r\n\r\n\r\n /* Breadcrumbs */\r\n\r\n $this->data['breadcrumb'] = $this->breadcrumbs->show();\r\n\r\n\r\n /* Data */\r\n\r\n $this->data['error'] = NULL;\r\n\r\n $this->data['charset'] = 'utf-8';\r\n\r\n $this->data['form_url'] = 'admin/setup/product/update';\r\n\r\n\r\n /* Load Template */\r\n\r\n $this->template->admin_render('admin/products/edit', $this->data);\r\n\r\n\r\n }", "function price( )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n return $this->Price;\n }", "public function editAction()\n {\n $this->_title($this->__('Request price'))\n ->_title($this->__('Manage request price'));\n\n // 1. Instance RP model\n// /* @var $model Test_Requestprice_Model_Requestprice */\n $model = Mage::getModel('test_requestprice/requestprice');\n\n //2. Id ID exists check it and load data\n $reqpriceId = $this->getRequest()->getParam('id');\n if ($reqpriceId) {\n $model->load($reqpriceId);\n\n if (!$model->getId()) {\n $this->_getSession()->addError(\n Mage::helper('test_requestprice')->__('Request price item does not exist.')\n );\n return $this->_redirect('*/*/');\n }\n // prepare title\n $this->_title($model->getTitle());\n $breadCrumb = Mage::helper('test_requestprice')->__('Edit Item');\n } else {\n $this->_title(Mage::helper('test_requestprice')->__('New Item'));\n $breadCrumb = Mage::helper('test_requestprice')->__('New Item');\n }\n // init breadcrumbs\n $this->_initAction()->_addBreadcrumb($breadCrumb, $breadCrumb);\n\n // 3. Set entered data if there was an error during save\n $data = Mage::getSingleton('adminhtml/session')->getFormData(true);\n if (!empty($data)) {\n $model->addData($data);\n }\n\n // 4. Register model to use later in blocks\n Mage::register('requestprice_item', $model);\n\n // 5. Render layout\n $this->renderLayout();\n }", "function es_display_custom_quickedit_product() {\n ?>\n\t<br class=\"clear\" />\n\t<h4>Custom Fields</h4>\n\t<label>\n\t\t<span class=\"title\"><?php _e( 'Member Price', 'woocommerce' ); ?></span>\n\t\t<span class=\"input-text-wrap\">\n\t\t\t<input type=\"text\" name=\"member_price\" class=\"text wc_input_price\" value=\"\">\n\t\t</span>\n\t</label>\n\t<br class=\"clear\" />\n <?php\n}", "public function update(Request $request)\n {\n $user = $request->user();\n \n $currentCompany = $user->currentCompany();\n\n $supplier = Supplier::findOrFail($request->supplier);\n $st1 ='';\n if ($request->hasFile('attachment')) {\n $limage = $request->attachment;\n $limage_new_name = time().$limage->getClientOriginalName();\n $st1= $limage->move('assets/images', $limage_new_name);\n }\n // dd($price);\n // Update the Expense\n $supplier->update([\n 'name' => $request->name,\n 'email' => $request->email,\n 'company' => $request->company,\n 'phone' =>$request->phone,\n 'company_id' => $currentCompany->id,\n 'display_name' => $request->display_name,\n 'website' => $request->website,\n 'address' => $request->address,\n 'state' => $request->state,\n 'city' => $request->city,\n 'country' => $request->country,\n 'pin_code' =>$request->pin_code,\n 'billing_rate' => $request->billing_rate,\n 'pan_number' => $request->pan_number,\n 'attachment' => $st1,\n 'tds_entity' => $request->tds_entity,\n 'tds_section' => $request->tds_section,\n 'notes' => $request->notes,\n 'balance' => $request->balance,\n 'balance_date' => $request->balance_date,\n 'account_number' =>$request->account_number,\n 'gst_type' => $request->gst_type,\n 'gstin' => $request->gstin,\n 'tax_reg_number' => $request->tax_reg_number,\n 'effective_date' => $request->effective_date,\n ]);\n\n session()->flash('alert-success', __('messages.product_updated'));\n return redirect()->route('suppliers', ['company_uid' => $currentCompany->uid]);\n }", "public function update()\r\n {\r\n\r\n $this->load->helper(array('form'));\r\n\r\n\r\n /* Load form validation library */\r\n\r\n $this->load->library('form_validation');\r\n\r\n\r\n /* Set validation rule for name field in the form */\r\n\r\n $this->form_validation->set_rules('cicdn', 'CICDN', 'required');\r\n\r\n\r\n if ($this->form_validation->run() == FALSE) {\r\n\r\n header(\"Location: {$_SERVER['HTTP_REFERER']}\");\r\n\r\n exit;\r\n\r\n } else {\r\n\r\n $data = $_REQUEST;\r\n\r\n $this->products->change($data);\r\n\r\n redirect('admin/setup/products', 'location', 301);\r\n\r\n }\r\n\r\n }", "function editTierPrice()\n\t{\n\t\t$id=(int)$_GET['prodid'];\n\t\tif(is_int($id))\n\t\t{\n\t\t\t$sql='SELECT * FROM msrp_by_quantity_table WHERE product_id ='.$id;\n\t\t\t$obj= new Bin_Query();\n\t\t\t$obj->executeQuery($sql);\n\t\t\treturn Display_DManageProducts::editTierPrice($obj->records);\n\t\t}\n\t}", "function save_variation_settings_fields( $post_id ) {\n // Text Field\n $text_field = $_POST['_xxl_pricing'][ $post_id ];\n if( ! empty( $text_field ) ) {\n update_post_meta( $post_id, '_xxl_pricing', esc_attr( $text_field ) );\n }\n}", "protected function calculatePrices()\n {\n }", "public function paid()\n {\n $this->paidAmount = $this->price;\n }", "public static function update()\n {\n if (self::checkIfSpecifiedTimePassed()) {\n DB::table('apimo_properties')->truncate();\n self::addOrEditPropertiesToDB(self::getAllRealEstate('properties'));\n }\n }", "public function update(Request $request, Price $price)\n {\n //\n }", "public function update(Request $request, Price $price)\n {\n //\n }", "public function update(Request $request, $id)\n {\n //\n $request->validate([\n\n 'service_name' => 'required',\n 'category_id' => 'required',\n 'price' => 'required',\n 'schoolyear' => 'required',\n 'semester' => 'required',\n 'status' => 'required'\n ]);\n\n //$pricing = $request->user()->pricing()->whereId($id)->update($request->all());\n \n $pricing = \\DB::table('pricings') ->where('id', $id) ->limit(1)->update($request->all()); \n\n return response()->json([\n \n 'pricing' => $pricing,\n 'message' => 'CCFC Pricings has been updated'\n ]);\n }", "public function getPricing() {\r\n\t\t\treturn $this->_pricing;\r\n\t\t}", "public function setPrice($newPurchase_price)\n {\n if(!is_numeric($newPurchase_price))\n {\n return \"The price has to be numeric\";\n }\n else\n {\n //Checking if price is empty\n if($newPurchase_price == \"\")\n {\n return \"Please enter the price. It can not be empty.\";\n }\n else\n {\n //Checking if price is a positive number\n if($newPurchase_price < PRICE_MIN)\n {\n return \"The price has to be a positive number\";\n }\n else\n {\n //Checking if price exceeds the maximum predefined\n if($newPurchase_price > PRICE_MAX)\n {\n return \"The price can not be higher than \" . PRICE_MAX . \"$.\";\n }\n //Successful passed the validation\n else\n {\n $this->purchase_price = number_format($newPurchase_price, PRICE_PRECISION); \n return \"\";\n\n }\n }\n }\n } \n }", "function setPrice($classId, $price) {\r\n $data['classPrice'] = $price;\r\n $this->db->where('id', $classId);\r\n $this->db->update('class', $data);\r\n }", "public function ajax_paypal_price() {\n\t\tglobal $wpdb;\n\n\t\tif ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'visual_form_builder_paypal_price' ) {\n\t\t\t$form_id = absint( $_REQUEST['form_id'] );\n\t\t\t$field_id = absint( $_REQUEST['field_id'] );\n\n\t\t\t$fields = $wpdb->get_results( $wpdb->prepare( \"SELECT * FROM $this->field_table_name WHERE form_id = %d AND field_id = %d\", $form_id, $field_id ) );\n\t\t\t$paypal_price_field = unserialize( $wpdb->get_var( $wpdb->prepare( \"SELECT form_paypal_field_price FROM $this->form_table_name WHERE form_id = %d\", $form_id ) ) );\n\n\t\t\t$price_option = '';\n\n\t\t\tforeach ( $fields as $field ) {\n\t\t\t\t// If a text input field, only display a message\n\t\t\t\tif ( in_array( $field->field_type, array( 'text', 'currency' ) ) )\n\t\t\t\t\t$price_option = '<p>Amount Based on User Input</p>';\n\t\t\t\t// If field has options, let user assign prices to inputs\n\t\t\t\telseif ( in_array( $field->field_type, array( 'select', 'radio', 'checkbox' ) ) ) {\n\t\t\t\t\t$options = ( is_array( unserialize( $field->field_options ) ) ) ? unserialize( $field->field_options ) : explode( ',', unserialize( $field->field_options ) );\n\n\t\t\t\t\t// Loop through each option and output\n\t\t\t\t\tforeach ( $options as $option => $value ) {\n\t\t\t\t\t\t$price_field_amount = ( isset( $paypal_price_field['prices'] ) ) ? stripslashes( $paypal_price_field['prices'][$option]['amount'] ) : '';\n\n\t\t\t\t\t\t$price_option .= sprintf(\n\t\t\t\t\t\t\t'<p class=\"description description-wide\"><label>%1$s<input class=\"widefat required\" type=\"text\" value=\"%2$s\" name=\"form_paypal_field_price[prices][%3$d][amount]\" /></label><br></p>',\n\t\t\t\t\t\t\tesc_attr( stripslashes( $value ) ),\n\t\t\t\t\t\t\t$price_field_amount,\n\t\t\t\t\t\t\t$option\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\techo sprintf( '<input type=\"hidden\" name=\"form_paypal_field_price[prices][%1$d][id]\" value=\"%2$s\" />', $option, esc_attr( stripslashes( $value ) ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Store the name as vfb-field_key-field_id for comparison when setting up PayPal form redirection\n\t\t\t\techo sprintf( '<input type=\"hidden\" name=\"form_paypal_field_price[name]\" value=\"vfb-%d\" />', $field->field_id );\n\t\t\t}\n\n\t\t\techo $price_option;\n\t\t}\n\n\t\tdie(1);\n\t}", "public function edit(PrizeType $prizeType)\n {\n //\n }", "public function edit($id)\n {\n $order = auth()->user()->sales()->where('id',$id)->with('product.currency','product.country','product.city','messages')->firstOrFail();\n if ($order->product->price_type == 'marketwise'){\n $cryptoprices = new CryptoPrices;\n $usprice = round($cryptoprices->getCryptoCurrencyInformation($order->product->currency->english)['price_usd']);\n $order->product->price = round($usprice*$order->product->price_currency->rate*((100+$order->product->profit)/100));\n }\n return view('user.mycustomers.edit', compact('order'));\n }", "function beforeSave(){\n\t\t\t// Get the rate\n\t\t\t$rate = 1 / $this->_getRate();\n\n\t\t\t// Convert it back to USD\n\t\t\tif(!empty($this->data['Product']['rrp'])){\n\t\t\t\t$this->data['Product']['rrp'] = $this->data['Product']['rrp'] * $rate;\n\t\t\t}\n\n\t\t\tif(!empty($this->data['Product']['start_price'])){\n\t\t\t\t$this->data['Product']['start_price'] \t= $this->data['Product']['start_price'] * $rate;\n\t\t\t}\n\n\t\t\tif(!empty($this->data['Product']['delivery_cost'])){\n\t\t\t\t$this->data['Product']['delivery_cost'] = $this->data['Product']['delivery_cost'] * $rate;\n\t\t\t}\n\n\t\t\tif(!empty($this->data['Product']['fixed_price'])){\n\t\t\t\t$this->data['Product']['fixed_price'] \t= $this->data['Product']['fixed_price'] * $rate;\n\t\t\t}\n\n\t\t\tif(!empty($this->data['Product']['minimum_price'])){\n\t\t\t\t$this->data['Product']['minimum_price'] = $this->data['Product']['minimum_price'] * $rate;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}", "public function testUpdatePackingPlanCustomFields()\n {\n }", "public function getUpdateProductData();", "private function updateProductDiscount(\n ProductInterface $product,\n Request $request\n ): void {\n $discountPercent = $request->request->get('discount_percent') !== '' ? (float) $request->request->get('discount_percent') : null;\n $discountLimitType = $request->request->get('discount_limit_type') !== '' ? $request->request->get('discount_limit_type') : null;\n $discountFromDate = $request->request->get('discount_from_date') !== '' ? $request->request->get('discount_from_date') : null;\n $discountToDate = $request->request->get('discount_to_date') !== '' ? $request->request->get('discount_to_date') : null;\n\n $variants = $product->getVariants();\n foreach ($variants as $variant) {\n // Variant to change\n $variantPricing = $variant->getChannelPricings()->first();\n\n // Change percent\n if ($discountPercent !== null) {\n $variantPricing->setDiscount($discountPercent / 100);\n }\n\n // Continue if no change type\n if ($discountLimitType === self::LIMIT_NO_CHANGE) {\n continue;\n }\n // Discount type\n $variantPricing->setDiscountLimitType($discountLimitType === self::LIMIT_NONE ? null : $discountLimitType);\n\n // Date type discount\n if ($discountLimitType === self::LIMIT_DATETIME) {\n if ($discountFromDate && $discountToDate) {\n $dateFrom = \\DateTime::createFromFormat('Y-m-d', $discountFromDate);\n $dateTo = \\DateTime::createFromFormat('Y-m-d', $discountToDate);\n\n $variantPricing->setDiscountFrom($dateFrom);\n $variantPricing->setDiscountTo($dateTo);\n }\n\n if ($discountFromDate && !$discountToDate) {\n $dateFrom = \\DateTime::createFromFormat('Y-m-d', $discountFromDate);\n\n $variantPricing->setDiscountFrom($dateFrom);\n $variantPricing->setDiscountTo(null);\n }\n\n if (!$discountFromDate && $discountToDate) {\n $dateTo = \\DateTime::createFromFormat('Y-m-d', $discountToDate);\n\n $variantPricing->setDiscountFrom(null);\n $variantPricing->setDiscountTo($dateTo);\n }\n }\n }\n }", "public function edit(DeliveryPrice $deliveryPrice)\n {\n //\n }", "public function edit(DeliveryPrice $deliveryPrice)\n {\n //\n }", "function uds_pricing_process_products()\n{\n\tglobal $uds_pricing_column_options;\n\n\tif(!empty($_POST['uds_pricing_products_nonce']) && wp_verify_nonce($_POST['uds_pricing_products_nonce'], 'uds-pricing-products-nonce')) {\n\t\t//d($_POST);\n\t\t$pricing_tables = maybe_unserialize(get_option(UDS_PRICING_OPTION, array()));\n\t\t$table_name = $_GET['uds_pricing_edit'];\n\t\t$pricing_table = $pricing_tables[$table_name];\n\t\t\n\t\tif(empty($pricing_table)) {\n\t\t\treturn new WP_Error(\"uds_pricing_table_nonexistent\", \"This pricing table does not exist!\");\n\t\t}\n\t\t\n\t\t$pricing_table['no-featured'] = $_POST['uds-no-featured'] == 'on' ? true : false ;\n\t\t\n\t\t$products = $pricing_table['products'];\n\t\tif(empty($products)) $products = array();\n\t\t\n\t\t$options = $uds_pricing_column_options;\n\t\tforeach($options as $option_name => $option) {\n\t\t\tif($option_name == 'uds-featured') continue;\n\t\t\tforeach($_POST[$option_name] as $key => $value) {\n\t\t\t\t$products[$key][$option_name] = $value;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// process featured\n\t\tforeach($products as $key => $product) {\n\t\t\tif($key == $_POST['uds-featured']) {\n\t\t\t\t$products[$key][$option_name] = true;\n\t\t\t} else {\n\t\t\t\t$products[$key][$option_name] = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//d($products);\n\t\t$purge = array();\n\t\tforeach($pricing_table['properties'] as $name => $type) {\n\t\t\tforeach($products as $key => $product) {\n\t\t\t\tif($product['uds-name'] == \"\") $purge[] = $key;\n\t\t\t\t//$post_name = str_replace(' ', '_', $name);\n\t\t\t\t$post_name = sanitize_title_with_dashes($name);\n\t\t\t\tif(isset($_POST[$post_name][$key])) {\n\t\t\t\t\t$products[$key]['properties'][$name] = $_POST[$post_name][$key];\n\t\t\t\t} else {\n\t\t\t\t\t$products[$key]['properties'][$name] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tforeach($purge as $key) {\n\t\t\tunset($products[$key]);\n\t\t}\n\t\t\n\t\t//d($products);\n\t\t$pricing_table['products'] = $products;\n\t\t$pricing_tables[$table_name] = $pricing_table;\n\t\tupdate_option(UDS_PRICING_OPTION, maybe_serialize($pricing_tables));\n\t}\n}", "Function update_price($int_productID,\r\n $flt_amount,\r\n $int_currency_id,\r\n $start_date,\r\n $end_date = FALSE,\r\n $min_quantity = 1,\r\n $max_quantity = 0,\r\n $int_contact_id = FALSE) {\r\n global $db_iwex;\r\n //echo \" update_price curr: \" . $int_currency_id;\r\n // Check if there is a record that can be updated.\r\n $int_current_price = GetField(\"SELECT recordID\r\n\t\t\t\t\t\t\t\t FROM pricing\r\n\t\t\t\t\t\t\t\t WHERE productID = '$int_productID'\r\n\t\t\t\t\t\t\t\t\t\tAND currencyid = '$int_currency_id'\r\n\t\t\t\t\t\t\t\t\t\tAND start_number = '$min_quantity'\r\n\t\t\t\t\t\t\t\t\t\tAND end_number = '$max_quantity'\r\n\t\t\t\t\t\t\t\t\t\tAND start_date = '$start_date'\r\n\t\t\t\t\t\t\t\t\t\tAND (end_date >= NOW() OR end_date = '0000-00-00')\r\n\t\t\t\t\t\t\t\t\t\tAND ContactID = $int_contact_id\");\r\n // When there is an old price that matches it.\r\n $str_sql = \"SELECT recordID\r\n\t\t\t\tFROM pricing \r\n\t\t\t\tWHERE ProductID = '$int_productID' \r\n\t\t\t\t\tAND currencyid = '$int_currency_id'\r\n\t\t\t\t\tAND ContactID='$int_contact_id'\r\n\t\t\t\t\tAND (start_date <= '$start_date' || isnull(start_date) || start_date=0) \r\n\t\t\t\t\tAND (end_date >= \".($end_date && $end_date != \"0000-00-00\" ? \"'$end_date'\" : \"NOW()\").\" || isnull(end_date) || end_date=0)\r\n\t\t\t\t\tAND (start_number <= '$min_quantity' || isnull(start_number) || start_number=0)\r\n\t\t\t\t\tAND (\".($max_quantity ? \"end_number >= '$max_quantity' ||\" : \"\").\" isnull(end_number) || end_number=0)\";\r\n $int_record_id = GetField($str_sql);\r\n\r\n $bl_record_used = $int_current_price ? SalesPriceUsedInOrder($int_current_price) : FALSE;\r\n\r\n // When there is an other record that also matches this new price set it valid to the today -1 day.\r\n if ($int_record_id != $int_current_price\r\n &&\r\n $int_record_id\r\n ) {\r\n EndOldSalesPrice($start_date, $int_record_id);\r\n }\r\n\r\n if ($bl_record_used) {\r\n EndOldSalesPrice($start_date, $int_current_price);\r\n $int_current_price = FALSE;\r\n }\r\n\r\n if (!$int_current_price) { // Create a new record.\r\n $sql = \"INSERT INTO\";\r\n // New records are started today when false or 0;\r\n $start_date = !$start_date || $start_date == \"0000-00-00\" ? date(DATEFORMAT_LONG) : $start_date;\r\n $sql_where = \", created_by = '\" . $GLOBALS[\"employee_id\"] . \"', created = '\".date(DATEFORMAT_LONG) . \"'\";\r\n } else {\r\n $sql = \"UPDATE\";\r\n $sql_where = \", modified_by = '\" . $GLOBALS[\"employee_id\"] . \"', modified = '\".date(DATEFORMAT_LONG) . \"'\r\n\t\t\t\t\t WHERE recordID = $int_current_price\";\r\n\r\n }\r\n $sql .= \" pricing SET amount = '$flt_amount',\r\n \t\t\t\t\t\t currencyid = '$int_currency_id',\r\n\t\t\t\t\t\t ContactID = '$int_contact_id', \r\n\t\t\t\t\t\t productID = '$int_productID', \r\n\t\t\t\t\t\t start_number = '$min_quantity',\r\n\t\t\t\t\t\t end_number = '$max_quantity', \r\n\t\t\t\t\t\t start_date = '$start_date' \";\r\n if ($end_date) $sql .= \", end_date = '$end_date'\";\r\n\r\n //echo $sql.$sql_where;\r\n $db_iwex->query($sql.$sql_where);\r\n\r\n return $int_current_price ? $int_current_price : $db_iwex->lastinserted();\r\n}", "public function pricing() { \n $data['page'] = 'Pricing';\n $data['page_title'] = 'Pricing';\n $data['page_module'] = 'setting';\n $price_list= $this->Setting_Model-> getPurchaseTransactionById($this->session->userdata('user_id'));\n for($i=0;$i<count($price_list);$i++){\n\t\t\tif($price_list[$i]->stock_group_id == 3){\n\t\t\t\tif($price_list[$i]->category_id == 13){\n\t\t\t\t\t$price_list[$i]->product_name = $this->Masterdata_Model->getFarmImplementsModelById($price_list[$i]->sub_category_id, $price_list[$i]->product_id)->name.\" - \".$price_list[$i]->classification;\n\t\t\t\t} else {\n\t\t\t\t\t$price_list[$i]->product_name = $this->Masterdata_Model->getProductByCategoryAndSubcategory($price_list[$i]->category_id, $price_list[$i]->sub_category_id, $price_list[$i]->product_id)->name.\" - \".$price_list[$i]->classification;\n\t\t\t\t}\t\t\t\t\n\t\t\t} else if($price_list[$i]->stock_group_id == 2){\n $price_list[$i]->product_name = $this->Masterdata_Model->cropNameById($price_list[$i]->category_id, $price_list[$i]->sub_category_id, $price_list[$i]->product_id)->name.\" - \".$price_list[$i]->classification;\n\t\t\t} else {\t\t\t\t\t\t\t\t\n\t\t\t\tif($price_list[$i]->category_id == 3 || $price_list[$i]->category_id == 4 || $price_list[$i]->category_id == 5){\n\t\t\t\t\t$price_list[$i]->product_name = $this->Masterdata_Model->brandListBySuppliersById($price_list[$i]->category_id, $price_list[$i]->sub_category_id, $price_list[$i]->product_id)->name.\" - \".$price_list[$i]->classification;\n\t\t\t\t} else {\n\t\t\t\t\t$price_list[$i]->product_name = $this->Masterdata_Model->getProductByCategoryAndSubcategory($price_list[$i]->category_id, $price_list[$i]->sub_category_id, $price_list[$i]->product_id)->name.\" - \".$price_list[$i]->classification;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}\n $data['price_list']=$price_list;\n $this->load->view('setting/pricinglist', $data); \t \n\t}", "public function updateTaskPricesAndValues()\n\t{\n\t $tasks = Auth::user()->assigned_tasks();\n foreach($tasks as $task)\n {\n if(false) $task = new Task();\n $price = $task->getPrice();\n if($price > 0) continue;\n $task->setPrice($this->base_price);\n $task->save();\n \t\t}\n\n\t}", "function edit_builder_price($id = null) {\n\n if( $this->request->is('post') || $this->request->is('put') ) {\n if( $this->Item->save($this->request->data) ) {\n $this->redirect(array( 'action' => 'builder_price', $this->request->data['Item']['id'] ));\n }\n else {\n $this->Session->setFlash(__('The item could not be saved. Please, try again.'), 'default', array( 'class' => 'text-error' ));\n }\n }\n $item = $this->Item->find('first', array( 'conditions' => array( 'Item.id' => $id ) ));\n\n $this->set(compact('item'));\n }", "public function getProductPrice(){\n return $this->product_price;\n }", "function atcf_theme_custom_variable_pricing() {\n\tif ( ! current_theme_supports( 'appthemer-crowdfunding' ) )\n\t\treturn;\n\n\tadd_action( 'init', 'atcf_theme_variable_pricing' );\n}", "function ciniki_sapos_invoiceUpdatePrices($ciniki, $tnid, $invoice_id, $args) {\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQuery');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashIDQuery');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectUpdate');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'sapos', 'private', 'itemCalcAmount');\n\n //\n // Get the items from the invoice that have an object defined\n //\n $strsql = \"SELECT id, object, object_id, price_id, quantity, \"\n . \"unit_amount, unit_discount_amount, unit_discount_percentage, unit_preorder_amount \"\n . \"FROM ciniki_sapos_invoice_items \"\n . \"WHERE invoice_id = '\" . ciniki_core_dbQuote($ciniki, $invoice_id) . \"' \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.sapos', 'item');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['rows']) ) {\n // No items to update\n return array('stat'=>'ok');\n }\n $items = $rc['rows'];\n\n //\n // Update the item prices\n //\n foreach($items as $item) {\n //\n // Get the new price for the object\n //\n if( $item['object'] != '' && $item['object_id'] != '' ) {\n list($pkg,$mod,$obj) = explode('.', $item['object']);\n $rc = ciniki_core_loadMethod($ciniki, $pkg, $mod, 'sapos', 'itemLookup');\n if( $rc['stat'] == 'ok' ) {\n $fn = $rc['function_call'];\n $rc = $fn($ciniki, $tnid, array(\n 'object'=>$item['object'],\n 'object_id'=>$item['object_id'],\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['item']) ) {\n if( $rc['item']['price_id'] != $item['price_id'] ) {\n $update_args['price_id'] = $rc['item']['price_id'];\n }\n if( $rc['item']['unit_amount'] != $item['unit_amount'] ) {\n $update_args['unit_amount'] = $rc['item']['unit_amount'];\n }\n if( $rc['item']['unit_discount_amount'] > 0\n && $rc['item']['unit_discount_amount'] != $item['unit_discount_amount'] ) {\n $update_args['unit_discount_amount'] = $rc['item']['unit_discount_amount'];\n }\n if( $rc['item']['unit_discount_percentage'] > 0 \n && $rc['item']['unit_discount_percentage'] != $item['unit_discount_percentage'] ) {\n $update_args['unit_discount_percentage'] = $rc['item']['unit_discount_percentage'];\n }\n if( $rc['item']['unit_preorder_amount'] > 0 \n && $rc['item']['unit_preorder_amount'] != $item['unit_preorder_amount'] ) {\n $update_args['unit_preorder_amount'] = $rc['item']['unit_preorder_amount'];\n }\n }\n }\n }\n\n //\n // Calculate new item totals\n //\n $rc = ciniki_sapos_itemCalcAmount($ciniki, array(\n 'quantity'=>$item['quantity'],\n 'unit_amount'=>(isset($update_args['unit_amount'])?$update_args['unit_amount']:$item['unit_amount']),\n 'unit_discount_amount'=>(isset($update_args['unit_discount_amount'])?$update_args['unit_discount_amount']:$item['unit_discount_amount']),\n 'unit_discount_percentage'=>(isset($update_args['unit_discount_percentage'])?$update_args['unit_discount_percentage']:$item['unit_discount_percentage']),\n 'unit_preorder_amount'=>(isset($update_args['unit_preorder_amount'])?$update_args['unit_preorder_amount']:$item['unit_preorder_amount']),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $update_args['subtotal_amount'] = $rc['subtotal'];\n $update_args['discount_amount'] = $rc['discount'];\n $update_args['total_amount'] = $rc['total'];\n\n //\n // Update the item \n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectUpdate');\n $rc = ciniki_core_objectUpdate($ciniki, $tnid, 'ciniki.sapos.invoice_item', \n $item['id'], $update_args, 0x04);\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.sapos');\n return $rc;\n }\n }\n\n\n\n return array('stat'=>'ok');\n}", "public function update(Request $request, PrizeType $prizeType)\n {\n //\n }", "function commerce_product_pre_calculation_settings_form_submit($form, &$form_state) {\n $values = $form_state['values'];\n\n // Save variables on the form regardless of the button pressed.\n variable_set('commerce_product_sell_price_pre_calculation', $values['commerce_product_sell_price_pre_calculation']);\n\n // React to the management buttons if they were used to submit the form.\n\n // TODO: Update the API to actually support a batch pre-calculation instead\n // of doing them all at once now.\n if (!empty($values['batch_calculate']) && $values['op'] == $values['batch_calculate']) {\n commerce_product_pre_calculate_sell_prices();\n }\n\n // TODO: Expand the API to allow for deletion of pre-calculated prices and\n // get this query the heck out of here.\n if (!empty($values['delete']) && $values['op'] == $values['delete']) {\n db_delete('commerce_calculated_price')\n ->condition('module', 'commerce_product_pricing')\n ->condition('entity_type', 'commerce_product')\n ->condition('field_name', 'commerce_price')\n ->execute();\n }\n}", "public function update(CreatePricePanelRequest $request, $id)\n {\n //Edit the price panel\n $price = PriceModel::find($id) ;\n\n $price->name = $request->input('name') ;\n $price->amount = $request->input('amount') ;\n $price->mileage = $request->input('mileage');\n $price->special = $request->input('special');\n\n\n $price->save();\n\n\n return Redirect::to('admin/price');\n }", "public function updateCart()\n {\n $this->total = CartFcd::subtotal();\n $this->content = CartFcd::content();\n }", "public function scalePrices($product)\n {\n \n // Get the configurable Id\n $configurableId = $this->getConfigurableId($product);\n \n // Check we actually have a configurable product\n if ($configurableId > 0)\n {\n // Get the configurable product and associated base price\n // Please note the price will not be the actual configurable, price but the cheapest price from all the simple products\n $configurableProduct = Mage::getSingleton(\"catalog/Product\")->load($configurableId);\n $configurablePrice = $configurableProduct->getPrice();\n \n // Get current attribute data\n $configurableAttributesData = $configurableProduct->getTypeInstance()->getConfigurableAttributesAsArray();\n $configurableProductsData = array();\n \n // We need to identify the attribute name and Id\n $prodAttrName = $this->getAttributeName($configurableProduct);\n $prodAttrId = $this->getAttributeId($prodAttrName);\n \n // Get associates simple products\n $associatedProducts = $configurableProduct->getTypeInstance()->getUsedProducts();\n foreach ($associatedProducts as $prodList)\n {\n // For each associated simple product gather the data and calculate the extra fixed price\n $prodId = $prodList->getId();\n $prodAttrLabel = $prodList->getAttributeText($prodAttrName);\n $prodAttrValueIndex = $prodList[$prodAttrName];\n $prodScalePrice = $prodList['price'] - $configurablePrice;\n \n $productData = array(\n 'label' => $prodAttrLabel,\n 'attribute_id' => $prodAttrId,\n 'value_index' => $prodAttrValueIndex,\n 'pricing_value' => $prodScalePrice,\n 'is_percent' => '0'\n );\n $configurableProductsData[$prodId] = $productData;\n $configurableAttributesData[0]['values'][] = $productData;\n }\n \n $configurableProduct->setConfigurableProductsData($configurableProductsData);\n $configurableProduct->setConfigurableAttributesData($configurableAttributesData);\n $configurableProduct->setCanSaveConfigurableAttributes(true);\n Mage::log($configurableProductsData, null, 'configurableProductsData.log', true);\n Mage::log($configurableAttributesData, null, 'configurableAttributesData.log', true);\n \n try\n {\n $configurableProduct->save(); \n }\n catch (Exception $e)\n {\n $this->_debug($e->getMessage());\n }\n \n } \n }", "public function update(){\n $this->product->id = $_POST['id'];\n $this->product->name = $_POST['name'];\n $this->product->price = $_POST['price'];\n $this->product->description = $_POST['description'];\n $this->product->category_id = $_POST['category_id'];\n\n\n\n // update the product\n if($this->product->update()){\n header(\"Refresh:2\");\n echo \"<div class=\\\"alert alert-success alert-dismissable\\\">\";\n echo \"<button type=\\\"button\\\" class=\\\"close\\\" data-dismiss=\\\"alert\\\" aria-hidden=\\\"true\\\">&times;</button>\";\n echo \"Product was updated.\";\n echo \"</div>\";\n }\n\n // if unable to update the product, tell the user\n else{\n echo \"<div class=\\\"alert alert-danger alert-dismissable\\\">\";\n echo \"<button type=\\\"button\\\" class=\\\"close\\\" data-dismiss=\\\"alert\\\" aria-hidden=\\\"true\\\">&times;</button>\";\n echo \"Unable to update product.\";\n echo \"</div>\";\n }\n }", "public function setPrice($price)\n {\n $this->price = $price;\n }", "public function getProductPrice()\n {\n }", "function editProperties()\n\t{\n\t\tglobal $ilAccess;\n\t\tglobal $tpl, $ilTabs;\n\n\t\t$ilTabs->activateTab(\"properties\");\n\t\t\n\t\t$save = ((strcmp($this->ctrl->getCmd(), \"saveProperties\") == 0)) ? true : false;\n\n\t\tinclude_once(\"./Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$form = new ilPropertyFormGUI();\n\t\t$form->setFormAction($this->ctrl->getFormAction($this, 'properties'));\n\t\t$form->setTitle($this->lng->txt(\"properties\"));\n\t\t$form->setMultipart(false);\n\t\t$form->setId(\"properties\");\n\n\t\t// online\n\t\t$online = new ilCheckboxInputGUI($this->txt(\"mpl_online_property\"), \"online\");\n\t\tif(ilObjMatchMemoPool::_lookupPairCount($this->object->getId()) < ilObjMatchMemoPool::MIN_PAIRS_NUM)\n\t\t{\n\t\t\t$online->setInfo(implode('<br />', array(\n\t\t\t\t$this->txt(\"mpl_online_property_description\"),\n\t\t\t\t'<span style=\"color:red\">' . $this->txt(\"cannot_set_online_not_enough_pairs\") . '</span>'\n\t\t\t)));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$online->setInfo($this->txt(\"mpl_online_property_description\"));\n\t\t}\n\t\t$online->setChecked($this->object->online);\n\t\t$form->addItem($online);\n\n\t\t// add entry to navigation history\n\t\tif ($ilAccess->checkAccess(\"write\", \"\", $_GET[\"ref_id\"])) $form->addCommandButton(\"saveProperties\", $this->lng->txt(\"save\"));\n\n\t\tif ($save)\n\t\t{\n\t\t\t$form->checkInput();\n\t\t}\n\t\t$this->tpl->setVariable(\"ADM_CONTENT\", $form->getHTML());\n\t}", "public function testUpdatePayslip()\n {\n }", "public function index()\n {\n return view('updateIndex/pricing')\n ->with('pricing_sections', PricingSection::all())\n ->with('pricings', Pricing::all())\n ->with('orders', Order::orderBy('order')->get());\n }", "public function get_prices()\n\t{\n\t\t$product_price_old = 0;\n\t\t$product_price_sale = 0;\n\t\t$price = 0;\n\t\t$eco = 0;\n\t\t$taxes = 0;\n\t\t$dataoc = isset($this->request->post['dataoc']) ? $this->request->post['dataoc'] : '';\n\n\t\tif (!empty($dataoc)) {\n\t\t\t$dataoc = str_replace('&quot;', '\"', $dataoc);\n\t\t\t$json = @json_decode($dataoc, true);\n\t\t\t$product_quantity = isset($json['quantity']) ? $json['quantity'] : 0;\n\t\t\t$product_id_oc = isset($json['product_id_oc']) ? $json['product_id_oc'] : 0;\n\t\t\tif ($product_id_oc == 0) $product_id_oc = isset($json['_product_id_oc']) ? $json['_product_id_oc'] : 0;\n\n\t\t\t// get options\n\t\t\t$options = isset($json['option_oc']) ? $json['option_oc'] : array();\n\t\t\tforeach ($options as $key => $value) {\n\t\t\t\tif ($value == null || empty($value)) unset($options[$key]);\n\t\t\t}\n\n\t\t\t// get all options of product\n\t\t\t$options_temp = $this->get_options_oc($product_id_oc);\n\n\t\t\t// Calc price for ajax\n\t\t\tforeach ($options_temp as $value) {\n\t\t\t\tforeach ($options as $k => $option_val) {\n\t\t\t\t\tif ($k == $value['product_option_id']) {\n\t\t\t\t\t\tif ($value['type'] == 'checkbox' && is_array($option_val) && count($option_val) > 0) {\n\t\t\t\t\t\t\tforeach ($option_val as $val) {\n\t\t\t\t\t\t\t\tforeach ($value['product_option_value'] as $op) {\n\t\t\t\t\t\t\t\t\t// calc price\n\t\t\t\t\t\t\t\t\tif ($val == $op['product_option_value_id']) {\n\t\t\t\t\t\t\t\t\t\tif ($op['price_prefix'] == $this->minus) $price -= isset($op['price_no_tax']) ? $op['price_no_tax'] : 0;\n\t\t\t\t\t\t\t\t\t\telse $price += isset($op['price_no_tax']) ? $op['price_no_tax'] : 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} elseif ($value['type'] == 'radio' || $value['type'] == 'select') {\n\t\t\t\t\t\t\tforeach ($value['product_option_value'] as $op) {\n\t\t\t\t\t\t\t\tif ($option_val == $op['product_option_value_id']) {\n\t\t\t\t\t\t\t\t\tif ($op['price_prefix'] == $this->minus) $price -= isset($op['price_no_tax']) ? $op['price_no_tax'] : 0;\n\t\t\t\t\t\t\t\t\telse $price += isset($op['price_no_tax']) ? $op['price_no_tax'] : 0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// the others have not price, so don't need calc\n\t\t\t\t\t}\n\t\t\t\t\t// if not same -> return.\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$product_prices = $this->get_product_price($product_id_oc, $product_quantity);\n\t\t\t$product_price_old = isset($product_prices['price_old']) ? $product_prices['price_old'] : 0;\n\t\t\t$product_price_sale = isset($product_prices['price_sale']) ? $product_prices['price_sale'] : 0;\n\t\t\t$enable_taxes = $this->config->get('tshirtecommerce_allow_taxes');\n\t\t\tif ($enable_taxes === null || $enable_taxes == 1) {\n\t\t\t\t$taxes = isset($product_prices['taxes']) ? $product_prices['taxes'] : 0;\n\t\t\t\t$eco = isset($product_prices['eco']) ? $product_prices['eco'] : 0;\n\t\t\t} else {\n\t\t\t\t$taxes = 0;\n\t\t\t\t$eco = 0;\n\t\t\t}\n\t\t\t\n\t\t} // do nothing when empty/blank\n\n\t\t// return price for ajax\n\t\techo @json_encode(array(\n\t\t\t'price' => $price, \n\t\t\t'price_old' => $product_price_old, \n\t\t\t'price_sale' => $product_price_sale, \n\t\t\t'taxes' => $taxes,\n\t\t\t'eco' => $eco\n\t\t));\n\t\treturn;\n\t}", "public function SetPanelSettings()\n\t{\n\t\t$this->productClass = GetClass('ISC_PRODUCT');\n\t\t$this->db = $GLOBALS['ISC_CLASS_DB'];\n\n\t\tif(!empty($_SESSION['ProductErrorMessage'])) {\n\t\t\tFlashMessage($_SESSION['ProductErrorMessage'], 'error');\n\t\t}\n\t\t$GLOBALS['ProductDetailFlashMessages'] = GetFlashMessageBoxes();\n\n\t\t$GLOBALS['ProductName'] = isc_html_escape($this->productClass->GetProductName());\n\t\t$GLOBALS['ProductNamedBy'] = $this->productClass->GetProductNamedBy();\n\t\t$GLOBALS['ProductId'] = $this->productClass->GetProductId();\n\t\t$GLOBALS['ProductPrice'] = '';\n\t\t\n\t\t$funnyDesc = $this->productClass->GetFunnyDesc();\n\t\tif(!empty($funnyDesc)) {\n\t\t\t$GLOBALS['FunnyDescription'] = $funnyDesc;\n\t\t} else {\n\t\t\t$GLOBALS['ShowFunnyDescription'] = \"display:none;\";\n\t\t}\n\n\t\tif(isset($_SESSION['ProductErrorMessage']) && $_SESSION['ProductErrorMessage']!='') {\n\t\t\t$GLOBALS['HideProductErrorMessage']='';\n\t\t\t$GLOBALS['ProductErrorMessage']=$_SESSION['ProductErrorMessage'];\n\t\t\tunset($_SESSION['ProductErrorMessage']);\n\t\t}\n\n\t\t$product = $this->productClass->getProduct();\n\t\t\n\t\t// We've got a lot to do on this page, so to make it easier to follow,\n\t\t// everything is broken down in to smaller functions.\n\t\t$this->SetProductImages();\n\t\t$this->SetPricingDetails();\n\n\t\tif (GetConfig('ShowAddThisLink')) {\n\t\t\t$GLOBALS['AddThisLink'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet('AddThisLink');\n\t\t}\n\t}", "public function setPrice(float $price) : void\n {\n $this->set('price', $price, 'products');\n }", "public function setPriceOnProductPage(Varien_Event_Observer $observer)\n {\n $moduleName = Mage::app()->getRequest()->getModuleName();\n $actionName = Mage::app()->getRequest()->getActionName();\n $controllerName = Mage::app()->getRequest()->getControllerName();\n\n $frontName = Mage::getConfig()->getNode('frontend/routers/bundlecreatorplus/args/frontName');\n\n // Only for bcp/product/view pages\n if ($frontName != $moduleName || $controllerName != 'product' || $actionName != 'view') {\n return $this;\n }\n\n $item = Mage::helper('bundlecreatorplus')->getPackageSession()->getActiveItem();\n $itemOption = Mage::helper('bundlecreatorplus')->getOptionByProductId(\n $item->getId(),\n $observer->getEvent()->getProduct()->getId()\n );\n $overridePrice = $itemOption->getOverridePrice();\n $price = $item->getPrice();\n\n // Fixed price\n if (Mage::helper('bundlecreatorplus')->isPackagePriceFixed()) {\n if(is_numeric($itemOption->getOverridePrice())) {\n $finalPrice = $overridePrice + $price;\n } else {\n $finalPrice = $price;\n }\n\n $observer->getEvent()->getProduct()->setFinalPrice($finalPrice);\n $observer->getEvent()->getProduct()->setPrice($finalPrice);\n\n } else {\n if(is_numeric($itemOption->getOverridePrice())) {\n $observer->getEvent()->getProduct()->setFinalPrice($overridePrice);\n $observer->getEvent()->getProduct()->setPrice($overridePrice);\n }\n }\n \n return $this;\n }", "public function pricing()\n {\n $navbar = NavBar::first();\n $pricing = Pricing::first();\n $testimonial = TestimonialHead::first();\n $prices = SinglePrice::all();\n $testimonials = Testimonial::all();\n return view('pages.home.pricing' , compact('pricing' , 'prices' , 'navbar' , 'testimonial' , 'testimonials'));\n }", "public function update(Request $request, $cp)\n {\n $mileage_type = request('mileage_type');\n\n if($mileage_type == \"1\" || $mileage_type == \"2\"){\n\n $product = Cp::findOrFail($cp);\n $product->surveyor_name = request('surveyor_name');\n $product->surveyor_lastName = request('surveyor_lastName');\n $product->structure_name = request('structure_name');\n $product->structure_location = request('structure_location');\n $product->structure_number = request('structure_number');\n\n if ($mileage_type == \"1\"){\n $product->mileageMiles = (int) request('mileage');\n } else if ($mileage_type == \"2\"){\n $product->mileageYards = (int) request('mileage');\n }\n\n $product->update();\n Session::flash('message', 'Successfully updated cp!');\n return Redirect::to('cps');\n }\n }", "public function testSetPriceProduct()\n {\n $product = new Product();\n $value = 10.99;\n $product->setPrice($value);\n $this->assertEquals($value, $product->getPrice());\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'name' => 'required|unique:prices,name,' . $id,\n 'order' => 'required|unique:prices,order,' . $id\n ]);\n if ($validator->fails()) {\n $message = '';\n foreach ($validator->errors()->all() as $error) {\n $message .= $error . ' | ';\n }\n Session::flash('message', $message);\n Session::flash('alert-class', 'alert-error');\n return Redirect::back()->withInput();\n }\n\n $dataUser = Auth::user();\n $price = Price::find($id);\n $price->name = Input::get('name');\n $price->pct = Input::get('pct');\n $price->pct_min = Input::get('pct_min');\n $price->amount = Input::get('amount');\n $price->amount_min = Input::get('amount_min');\n $price->cant_min = Input::get('cant_min');\n $price->cant_max = Input::get('cant_max');\n $price->date_min = Input::get('date_min');\n $price->date_max = Input::get('date_max');\n $price->order = Input::get('order');\n $price->main = Input::get('main');\n $price->active = Input::get('active');\n $price->updated_by = $dataUser->id;\n $price->save();\n\n $price->pagos()->sync($request->input('pagos', []));\n $price->items()->sync($request->input('items', []));\n\n\n Session::flash('message', 'Precio actualizado correctamente');\n return Redirect::to('prices');\n }", "public function setPaid()\n {\n $this->update([\n 'status' => self::STATUS_PAID,\n 'paid_date' => Carbon::now(),\n ]);\n }", "public function pricing()\n {\n return view('pages.example_pages.pricing');\n }", "public function update(Request $request, Product_option $product_option)\n {\n //\n }", "public function setPrice()\n {\n $price = $this->price;\n $outFix = $this->outFix;\n $outPer = $this->outPer;\n $inPer = $this->inPer;\n $inFix = $this->inFix;\n $flag = $this->flagInOut;\n if ($price < 1) {\n $sumIn = $outFix > 0 ? 1 + $outFix : 1; //outFix\n $sumIn = $outPer > 0 ? $sumIn + ($sumIn * $outPer / 100) : $sumIn; //outPer\n $sumIn = $sumIn / $price; // price\n $sumIn = $inFix > 0 ? $sumIn + $inFix : $sumIn;// inFix\n $ss = $sumIn * $inPer / 100;\n $sumIn = $inPer > 0 ? $sumIn + $ss : $sumIn;\n $this->in = $this->format_amount($sumIn);\n $this->out = $flag ? 1 : 0;\n } else {\n $val = $inFix > 0 ? 1 - $inFix : 1;\n $val = $inPer > 0 ? $val - $val * ($inPer / 100) : $val;\n $sumOut = $price * $val;\n $sumOut = $outFix > 0 ? $sumOut - $outFix : $sumOut;\n $sumOut = $outPer > 0 ? $sumOut - $outPer / 100 * $sumOut : $sumOut;\n $this->out = $this->format_amount($sumOut);\n $this->in = $flag ? 1 : 0;\n }\n $this->price = (float)$price;\n }", "public function testUpdateSuperfund()\n {\n }", "public function update()\n {\n // $this->validate($request, [\n\t\t// \t'Company_Name' => 'required'\n\t\t// ]);\n // $requestData = $request->all();\n \n // $setting = Setting::findOrFail($id);\n // $setting->update($requestData);\n\n // Session::flash('flash_message', 'Setting updated!');\n\n // return redirect('invoice');\n }", "public function setPrice($value)\n {\n $this->price = $value;\n $this->recalculate();\n }" ]
[ "0.68430704", "0.68157333", "0.6764425", "0.67298573", "0.6607594", "0.6414073", "0.6236079", "0.6221465", "0.6185648", "0.6138873", "0.6100062", "0.60785323", "0.6005486", "0.6000712", "0.5997405", "0.599604", "0.59807956", "0.5956066", "0.5949354", "0.59248626", "0.59095114", "0.59070593", "0.58967835", "0.5824679", "0.58007526", "0.57958233", "0.5788963", "0.5788024", "0.57580256", "0.57505006", "0.5741977", "0.5741977", "0.5740591", "0.57396215", "0.5731023", "0.57219976", "0.5674721", "0.5673551", "0.56692004", "0.5665251", "0.5651521", "0.5651452", "0.56433004", "0.56341696", "0.5630436", "0.5615371", "0.56103694", "0.55979365", "0.5588631", "0.55850166", "0.5576856", "0.55694", "0.55694", "0.55690086", "0.55610836", "0.5544352", "0.5539454", "0.55344754", "0.5532528", "0.55323124", "0.5515949", "0.5515258", "0.5510642", "0.55084753", "0.54990053", "0.54990053", "0.5498942", "0.5486924", "0.5484043", "0.54817915", "0.54784054", "0.54688126", "0.5468588", "0.54633087", "0.54606", "0.54452235", "0.5444151", "0.54340327", "0.54292023", "0.5428197", "0.54263026", "0.54150164", "0.54148823", "0.54127145", "0.54092103", "0.5405531", "0.54047394", "0.5404333", "0.5400615", "0.5383665", "0.5368501", "0.53665173", "0.53587043", "0.5348749", "0.53454936", "0.53452414", "0.53417724", "0.533517", "0.5332727", "0.5331313" ]
0.68624085
0
This method will be called to add new features to the property if the features already exists for the property, it will not be created at all
public function addFeatures(Request $request) { Log::info($request->all()); //validate $validator = Validator::make($request->all(), [ 'property_id' => "required", 'ids' => 'required' ], [ "property_id.required" => "Invalid Request, Incomplete Parameter" ])->validate(); $property = Property::find($request->property_id); if(is_null($property)) { return redirect()->back()->with("error", "Property Not Found"); } $idsArray = preg_split("/[,]/", $request->ids); array_pop($idsArray); //deletes the last'',' Log::info("idsArray "); Log::info($idsArray); $superArray = []; foreach ($idsArray as $key => $value) { //create it when it's not there already for the property PropertyFeature::firstOrCreate([ "property_id" => $property->id, "feature_id" => $value ]); } return redirect()->back()->with("success", "Property Features Updated Successfully"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addFeatures(\\iface\\Feature $value){\n return $this->_add(1, $value);\n }", "public static function customCollection()\n\t{\n // recupera as features encontradas\n $features = Arr::flatten(parent::$collection);\n // limpa a collection\n parent::$collection = [];\n // realimenta a collection\n foreach ($features as $feature) {\n parent::$collection[$feature] = true;\n }\n\t}", "public function setFeature(Feature $feature)\n\t{\n\t\t$this->features[] = $feature;\n\t}", "public function hasFeatures(){\n return $this->_has(1);\n }", "protected function registerFeature() {\r\n //add feature\r\n $capability = aam_Core_ConfigPress::getParam(\r\n 'aam.feature.' . self::FEATURE_ID . '.capability', \r\n 'administrator'\r\n );\r\n\r\n //makre sure that current user has access to current Extension. This is \r\n //mandatory check and should be obeyed by all developers\r\n if (current_user_can($capability)) {\r\n //register the Extension's javascript\r\n add_action('admin_print_scripts', array($this, 'printScripts'));\r\n //register the Extension's stylesheet\r\n add_action('admin_print_styles', array($this, 'printStyles'));\r\n //register the Feature\r\n aam_View_Collection::registerFeature((object) array(\r\n //uid is mandatory and this should be the unique ID\r\n 'uid' => self::FEATURE_ID,\r\n //Extension Position is the list of AAM features. This works\r\n //the same way as WordPress Admin Menu\r\n 'position' => 150,\r\n //Extension's Title\r\n 'title' => __('Feature Example', 'aam'),\r\n //Define what subjects can see the Extenion's UI. AAM is based on \r\n //idea of Subjects (Blog, Role, User & Visitor) and Objects (Post, \r\n //Term, Event, Menu etc). This property defines what Subjects are\r\n //allowed to see this feature. So as Example if you click on Visitor\r\n //(on the Control Manager) you will not find Menu or Metabox Features.\r\n //This is because any visitor of your website does not have access to\r\n //backend so there is no need to show these features.\r\n 'subjects' => array(\r\n aam_Control_Subject_Role::UID,\r\n aam_Control_Subject_User::UID,\r\n aam_Control_Subject_Visitor::UID\r\n ),\r\n //Reference to Extension's Controller. Make sure that if your \r\n //Extension display any UI, the controller property contains the \r\n //instance of the Extenion's Controller and Controller has function\r\n //content. See aam_View_Manager::retrieveFeatures function for more\r\n //information\r\n 'controller' => $this\r\n ));\r\n }\r\n }", "public static function featuresByProperty($id)\n {\n $query = PropertyFeature::select('feature_id AS id')->where('property_id', '=', $id);\n // cria uma collection com pagination para montar o grid\n parent::handleAlltoArray($query);\n // efetua o tratamento no collection\n static::customCollection();\n\n\t\treturn parent::$collection ?? PropertyFeature::class;\n }", "public function set_features( $features ) {\n $f = explode( ',', $features );\n foreach ( $f as $feature ) {\n $feature = trim( $feature );\n $this->features[$feature] = true;\n }\n }", "public function __construct(Feature $feature)\r\n {\r\n $this->feature=$feature;\r\n }", "public function hasFeature(){\n return true;\n }", "abstract protected function getFeatures();", "public function brokenAddFeature(ECommerceFeature $feature)\n {\n $this->features[] = $feature;\n }", "public function setFeature(string $feature): void;", "public function add_feature($id)\n {\n \t//$product = ProductImage::find($id);\n $products = Product::where('id','=', $id)->first();\n $productFeatures = FeatureGroup::where('category_id','=',$products->category_id)->where('status','=',1)->get();\n $productFeaturesvalue = ProductFeature::where('product_id','=', $id)->get();\n \n $featureArr = array();\n\n //->toArray()\n \n foreach($productFeaturesvalue as $feature){\n \n if($feature['type'] == 'multiselect' ){\n $featureArr[$feature['feature_id']][] = $feature['feature_value_id'];\n }else if($feature['type'] == 'text' ){\n $featureArr[$feature['feature_id']] = $feature['value'];\n }else{\n $featureArr[$feature['feature_id']] = $feature['feature_value_id'];\n }\n \n }\n \n\n //echo '<pre>';print_r($featureArr);die;\n\t\treturn view('admin.products.add_feature',[\"id\" => $id, \"productFeatures\" => $productFeatures,\"featureArr\" =>$featureArr]);\n }", "function ff_register_feature_flag( $feature )\n\t{\n\t\tff_FeatureFlags::getInstance()->addFeature( $feature );\n\t}", "public function __construct() {\n\n\t\t$this->feature_columns = MY_Features::get_feature_list();\n\n\t\t$feature_fields = array_keys($this->feature_columns);\n\n\t\t$post_fields = array(\n \tself::$checkbox_post_meta_date,\n \tself::$checkbox_post_meta_author,\n \tself::$checkbox_post_box_author,\n \tself::$checkbox_post_comments,\n \tself::$checkbox_post_meta_categories,\n \tself::$checkbox_post_meta_tags,\n \tself::$checkbox_post_related,\n );\n $this->post_fields = array_merge($post_fields,$feature_fields);\n\n $page_fields = array(\n \tself::$checkbox_post_meta_date,\n \tself::$checkbox_post_meta_author,\n \tself::$checkbox_post_box_author,\n \tself::$checkbox_post_comments,\n );\n $this->page_fields = array_merge($page_fields,$feature_fields);\n\t\t\n\t\tadd_action('add_meta_boxes', array($this,'add_meta_boxes'));\n\t\tadd_action('save_post', array($this,'save'));\n\t}", "public function setFeatures($features): self\n {\n return $this->setParameter('features', $features);\n }", "public static function makeFeatured($propertyId) {\n\t\t$property = Property::model ()->findByPk ( $propertyId );\n\t\tif ($property) {\n\t\t\t$property->featured = 1;\n\t\t\treturn $property->save ();\n\t\t} else\n\t\treturn false;\n\n\t}", "function property_features_taxonomy() {\n\n\t\t$name = __( 'Features', 'wp_listings' );\n\t\t$singular_name = __( 'Feature', 'wp_listings' );\n\n\t\treturn array(\n\t\t\t'features' => array(\n\t\t\t\t'labels' => array(\n\t\t\t\t\t'name'\t\t\t\t\t=> strip_tags( $name ),\n\t\t\t\t\t'singular_name' \t\t=> strip_tags( $singular_name ),\n\t\t\t\t\t'menu_name'\t\t\t\t=> strip_tags( $name ),\n\n\t\t\t\t\t'search_items'\t\t\t=> sprintf( __( 'Search %s', 'wp_listings' ), strip_tags( $name ) ),\n\t\t\t\t\t'popular_items'\t\t\t=> sprintf( __( 'Popular %s', 'wp_listings' ), strip_tags( $name ) ),\n\t\t\t\t\t'all_items'\t\t\t\t=> sprintf( __( 'All %s', 'wp_listings' ), strip_tags( $name ) ),\n\t\t\t\t\t'edit_item'\t\t\t\t=> sprintf( __( 'Edit %s', 'wp_listings' ), strip_tags( $singular_name ) ),\n\t\t\t\t\t'update_item'\t\t\t=> sprintf( __( 'Update %s', 'wp_listings' ), strip_tags( $singular_name ) ),\n\t\t\t\t\t'add_new_item'\t\t\t=> sprintf( __( 'Add New %s', 'wp_listings' ), strip_tags( $singular_name ) ),\n\t\t\t\t\t'new_item_name'\t\t\t=> sprintf( __( 'New %s Name', 'wp_listings' ), strip_tags( $singular_name ) ),\n\t\t\t\t\t'add_or_remove_items'\t=> sprintf( __( 'Add or Remove %s', 'wp_listings' ), strip_tags( $name ) ),\n\t\t\t\t\t'choose_from_most_used'\t=> sprintf( __( 'Choose from the most used %s', 'wp_listings' ), strip_tags( $name ) )\n\t\t\t\t),\n\t\t\t\t'hierarchical' => 0,\n\t\t\t\t'rewrite' => array( __( 'features', 'wp_listings' ), 'with_front' => false ),\n\t\t\t\t'editable' => 0\n\t\t\t)\n\t\t);\n\n\t}", "public function product_features()\n {\n return $this->belongsToMany('App\\Models\\ProductFeature', 'feature_product');\n }", "public function add()\n {\n \t$productFeatureAttributes = array();\n $category_list = Category::where('status','=', 1)->where('parent_id','=', 7)->get();\n $productFeatures = ProductFeature::where('status','=', 1)->get();\n $product_featureAttributes = ProductFeatureAttribute::with('productFeature')->where('status','=', 1)->get()->toArray();\n foreach ($product_featureAttributes as $key => $value) {\n $productFeatureAttributes[$value['product_feature_id']][] = $value;\n }\n\n //echo '<pre>';print_r($productFeatureAttributes);die;\n\n return view('admin.products.add',[\"category_list\" => $category_list,\"productFeatures\" => $productFeatures,\"productFeatureAttributes\" => $productFeatureAttributes]);\n }", "public function store(Request $request)\n {\n $data = $request->validate([\n 'address' => ['required', 'string'],\n 'type' => ['required', 'string'],\n 'bedrooms' => ['required', 'integer'],\n 'bathrooms' => ['required', 'integer'],\n 'half_bathrooms' => ['required', 'integer'],\n 'space' => ['required', 'integer', 'min:10', 'max:1000'],\n 'description' => ['min:10', 'max:500'],\n 'pets_allowed' => ['required', 'Boolean'],\n 'available_at' => ['required', 'Date', 'after:today'],\n 'rental_period_in_months' => ['required', 'min:1', 'max:60'],\n 'monthly_rent' => ['required', 'integer', 'min:50', 'max:500000'],\n 'features' => ['required', 'array'],\n 'features.*' => [Rule::exists('features', 'id')]\n ]);\n\n\n $property = auth()->user()->properties()->create(\n Arr::except($data, ['features'])\n );\n\n\n $property->attachImages($request->images);\n\n $property->features()->attach($request->features);\n\n return redirect(route('my-properties.index'), 201);\n }", "public function features()\n {\n return $this->hasMany('App\\Feature');\n }", "public function addProperty(Entities\\Devices\\Properties\\Property $property): void\n\t{\n\t\tif (!$this->properties->contains($property)) {\n\t\t\t// ...and assign it to collection\n\t\t\t$this->properties->add($property);\n\t\t}\n\t}", "public function load_supported_features()\n {\n $root = $this->module_roots['dir'];\n // load plugin constants/data\n require_once $root . 'classes/constants.php';\n $custom_plugin_data = new Constants( $this->module_roots );\n // echo \"<pre>\";\n // print_r($custom_plugin_data);\n // echo \"</pre>\";\n // links on the main plugin index page\n require_once $root . 'classes/utility.php';\n $utility = new Utility( $this->module_roots, $custom_plugin_data );\n $plugin_data = get_plugin_data( $this->module_roots['file'], false, false );\n // data to pass to certain classes\n $new_features_json = Utility::get_new_features_json();\n $new_features_arr = Utility::filter_and_decode_json( $new_features_json );\n // functionality for free version only\n $path = $root . 'classes/hooks.php';\n \n if ( file_exists( $path ) ) {\n require_once $path;\n new Hooks( $this->module_roots );\n }\n \n // enqueue plugin scripts\n require_once $root . 'classes/enqueue-scripts.php';\n new Enqueue_Scripts(\n $this->module_roots,\n $new_features_arr,\n $plugin_data,\n $custom_plugin_data\n );\n // plugin settings pages\n require_once $root . 'classes/settings.php';\n new Settings(\n $this->module_roots,\n $plugin_data,\n $custom_plugin_data,\n $utility\n );\n require_once $root . 'classes/settings-new-features.php';\n new New_Features_Settings(\n $this->module_roots,\n $new_features_arr,\n $plugin_data,\n $custom_plugin_data,\n $utility\n );\n require_once $root . 'classes/settings-welcome.php';\n new Welcome_Settings(\n $this->module_roots,\n $plugin_data,\n $custom_plugin_data,\n $utility\n );\n // register blocks\n require_once $root . 'classes/register-blocks.php';\n new Register_Blocks( $this->module_roots );\n // [svg-flag] shortcode\n require_once $root . 'classes/shortcodes/shortcodes.php';\n new Shortcodes( $this->module_roots, $custom_plugin_data );\n // links on the main plugin index page\n require_once $root . 'classes/links.php';\n new Flags_Links(\n $this->module_roots,\n $plugin_data,\n $custom_plugin_data,\n $utility\n );\n // run upgrade routine when plugin updated to new version\n require_once $root . 'classes/upgrade.php';\n new Flags_Upgrade( $this->module_roots, $custom_plugin_data );\n // localize plugin\n require_once $root . 'classes/localize.php';\n new Localize( $this->module_roots );\n }", "function imbaf_properties_create_add_fields(){\n ?>\n <div class=\"form-field\">\n <label for=\"term_meta[imbaf_property_type]\">Typ</label>\n\n <select name=\"term_meta[imbaf_property_type]\">\n\n <?php\n\n foreach($this -> property_types as $property){\n\n ?> <option style=\"width:100%;\" value=\"<?php echo $property['value']; ?>\"><?php echo $property['label']; ?></option> <?php\n\n }\n\n\n ?>\n </select>\n\n <p class=\"description\"><?php _e('Vergleichswert-Typ','imb_affiliate'); ?></p>\n\n\n\n <label for=\"term_meta[imbaf_property_icon]\">Icon</label>\n <input type=\"text\" name=\"term_meta[imbaf_property_icon]\">\n\n <p class=\"description\"><?php _e('Font Awesome Icon','imb_affiliate'); ?></p>\n\n\n <label for=\"term_meta[imbaf_property_prefix]\"><?php _e('Präfix','imb_affiliate'); ?></label>\n <input type=\"text\" name=\"term_meta[imbaf_property_prefix]\">\n\n <p class=\"description\"><?php _e('Vorgestellter Wert (ca.)','imb_affiliate'); ?></p>\n\n <label for=\"term_meta[imbaf_property_suffix]\"><?php _e('Suffix','imb_affiliate'); ?></label>\n <input type=\"text\" name=\"term_meta[imbaf_property_suffix]\">\n <p class=\"description\"><?php _e('Nachgestellter Wert (z.B. kg, MhZ etc.)','imb_affiliate'); ?></p>\n\n\n\n </div>\n <?php\n\n\n }", "public function set_features (array $features) {\n $this->features = $features;\n }", "public function addAllFeatures()\n {\n $this->features['all'] = true;\n return $this;\n }", "public function getLevelFeatures(&$features)\n {\n }", "function upgrade_addWebservicesFeature()\r\n{\r\n global $_TABLES;\r\n\r\n $ft_id = DB_getItem($_TABLES['features'], 'ft_id',\r\n \"ft_name = 'webservices.atompub'\");\r\n $grp_id = DB_getItem($_TABLES['groups'], 'grp_id',\r\n \"grp_name = 'Webservices Users'\");\r\n $rootgrp = DB_getItem($_TABLES['groups'], 'grp_id', \"grp_name = 'Root'\");\r\n\r\n if (($grp_id > 0) && ($ft_id > 0)) {\r\n // add 'webservices.atompub' feature to 'Webservices Users' group\r\n DB_query(\"INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES ($ft_id, $grp_id)\");\r\n\r\n // make 'Root' members a member of 'Webservices Users'\r\n if ($rootgrp > 0) {\r\n DB_query(\"INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES ($grp_id, NULL, $rootgrp)\");\r\n }\r\n }\r\n}", "public function _json_index_features()\n\t{\n\t\tif ($this->_check_media_type())\n\t\t{\n\t\t\t$features = Event::$data;\n\t\t\t$results = ORM::Factory('actionable')->find_all()->as_array();\n\n\t\t\t$actionables = array();\n\t\t\tforeach($results as $actionable)\n\t\t\t{\n\t\t\t\t$actionables[$actionable->incident_id] = $actionable;\n\t\t\t}\n\n\t\t\tforeach($features as $key => $feature)\n\t\t\t{\n\t\t\t\t$incident_id = $feature['properties']['id'];\n\t\t\t\tif ($actionables[$incident_id])\n\t\t\t\t{\n\t\t\t\t\t$feature['properties']['actionable'] = $actionables[$incident_id]->status();\n\t\t\t\t\t$feature['properties']['strokecolor'] = $actionables[$incident_id]->color();\n\t\t\t\t\t$feature['properties']['strokeopacity'] = 0.5;\n\t\t\t\t\t$feature['properties']['strokewidth'] = 5;\n\t\t\t\t\t$feature['properties']['radius'] = Kohana::config('map.marker_radius')*2.5;\n\t\t\t\t\t$feature['properties']['icon'] = '';\n\t\t\t\t\t$features[$key] = $feature;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tEvent::$data = $features;\n\t\t}\n\t}", "public function set_feature($feature_name) {\n $this->feature=ucwords($feature_name);\n }", "public function _json_index_features()\n\t{\n\t\tif ($this->_check_media_type())\n\t\t{\n\t\t\t$features = Event::$data;\n\t\t\t$results = ORM::Factory('actionable')->find_all()->as_array();\n\t\t\t\n\t\t\t$actionables = array();\n\t\t\tforeach($results as $actionable)\n\t\t\t{\n\t\t\t\t$actionables[$actionable->incident_id] = $actionable;\n\t\t\t}\n\t\t\t\n\t\t\tforeach($features as $key => $feature)\n\t\t\t{\n\t\t\t\t$incident_id = $feature['properties']['id'];\n\t\t\t\tif ($actionables[$incident_id])\n\t\t\t\t{\n\t\t\t\t\t$feature['properties']['actionable'] = $actionables[$incident_id]->status();\n\t\t\t\t\t$feature['properties']['strokecolor'] = $actionables[$incident_id]->color();\n\t\t\t\t\t$feature['properties']['strokeopacity'] = 0.5;\n\t\t\t\t\t$feature['properties']['strokewidth'] = 5;\n\t\t\t\t\t$feature['properties']['radius'] = Kohana::config('map.marker_radius')*2.5;\n\t\t\t\t\t$feature['properties']['icon'] = '';\n\t\t\t\t\t$features[$key] = $feature;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tEvent::$data = $features;\n\t\t}\n\t}", "public function initMutateProperty()\n {\n foreach ( $this->initMutateProperties as $property ) {\n $this->mutateProperties[ $property ] = $this->{$property};\n }\n $this->view->addParams( [\n 'mutateProperties' => $this->mutateProperties\n ] );\n }", "public function getCustomFeatures()\n {\n return $this->custom_features;\n }", "public function getCustomFeatures()\n {\n return $this->custom_features;\n }", "protected function migrateFeatureManager() {\n\t\tif ( empty( $this->oldOptions['modules']['aiosp_feature_manager_options'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( empty( $this->oldOptions['modules']['aiosp_feature_manager_options']['aiosp_feature_manager_enable_opengraph'] ) ) {\n\t\t\taioseo()->options->social->facebook->general->enable = false;\n\t\t\taioseo()->options->social->twitter->general->enable = false;\n\t\t}\n\n\t\tif ( empty( $this->oldOptions['modules']['aiosp_feature_manager_options']['aiosp_feature_manager_enable_sitemap'] ) ) {\n\t\t\taioseo()->options->sitemap->general->enable = false;\n\t\t\taioseo()->options->sitemap->rss->enable = false;\n\t\t}\n\n\t\tif ( ! empty( $this->oldOptions['modules']['aiosp_feature_manager_options']['aiosp_feature_manager_enable_robots'] ) ) {\n\t\t\taioseo()->options->tools->robots->enable = true;\n\t\t}\n\t}", "public function save_feature_value(Request $request)\n {\n //echo '<pre>';print_r($request->request);\n $productFeatureValueArr = array();\n $i = 0;\n foreach($request->products as $productKey => $productFeature){\n $getFeatureArr = $this->getFeatureArr($productKey);\n if(is_array($productFeature)){\n \n foreach($productFeature as $value){\n $productFeatureValueArr[$i]['ProductFeature']['product_id'] = $request->product_id;\n $productFeatureValueArr[$i]['ProductFeature']['feature_id'] = $productKey;\n $productFeatureValueArr[$i]['ProductFeature']['feature_value_id'] = $value;\n $productFeatureValueArr[$i]['ProductFeature']['type'] = (!empty($getFeatureArr)?$getFeatureArr['type']:''); \n $productFeatureValueArr[$i]['ProductFeature']['value'] = $this->getFeatureValueByID($value); \n $i++;\n }\n \n }else{\n $productFeatureValueArr[$i]['ProductFeature']['product_id'] = $request->product_id;\n $productFeatureValueArr[$i]['ProductFeature']['feature_id'] = $productKey;\n $productFeatureValueArr[$i]['ProductFeature']['feature_value_id'] = (!empty($getFeatureArr)?(($getFeatureArr['type']=='text')?0:$productFeature):''); \n $productFeatureValueArr[$i]['ProductFeature']['type'] = (!empty($getFeatureArr)?$getFeatureArr['type']:''); \n $productFeatureValueArr[$i]['ProductFeature']['value'] = (!empty($getFeatureArr)?(($getFeatureArr['type']=='text')?$productFeature:$this->getFeatureValueByID($productFeature)):''); \n $i++;\n\n }\n } \n\n \n if (!empty($productFeatureValueArr)) {\n\n DB::table('product_features')->where('product_id', $request->product_id)->delete(); \n \n foreach($productFeatureValueArr as $value){\n $productFeature = new ProductFeature;\n \n $productFeature->product_id = $value['ProductFeature']['product_id'];\n $productFeature->feature_id = $value['ProductFeature']['feature_id'];\n $productFeature->feature_value_id = $value['ProductFeature']['feature_value_id'];\n $productFeature->type = $value['ProductFeature']['type'];\n $productFeature->value = $value['ProductFeature']['value'];\n \n \n $productFeature->save();\n }\n }\n\n\n return \\Redirect::to('admin/products');\n\n }", "public function store(Request $request)\n {\n //dd($request->all());\n $request->validate([\n 'name' => 'required|min:4',\n 'unit_id' => 'required',\n 'price' => 'required',\n 'category_id' =>'required'\n ]);\n $authuser = Auth::user();\n $features= $request->feature;\n // dd($features);\n $article = $authuser->farmer()->first()->articles()->create($request->all());\n //dodaje cechy do artykułu\n // dd($features);\n $article->features()->attach($features);\n // $authuser->farmer()->first()->articles()->features()->first()->attach($features);\n return redirect()->route('farmer.artimages.create',$article->id);\n }", "public function get_features() {\n return $this->features;\n }", "public function offsetSet($index, $newval)\n\t{\n\t\tif (!($newval instanceof Feature)) {\n\t\t\tthrow new FeatureCollectionException('The value being added to the collection is not a feature.');\n\t\t}\n\n\t\t$class_name = $newval->getClassName();\n\t\tif (array_search($class_name, $this->added_features) !== false) {\n\t\t\treturn; // Don't add the feature.\n\t\t}\n\n\t\t// Resolve the dependencies of the feature.\n\t\t$this->resolveDependencies($newval);\n\n\t\t// Set the configuration for the feature if it exists.\n\t\tif (!empty($this->settings['features'][$class_name])) {\n\t\t\t$newval->setConfiguration($this->settings['features'][$class_name]);\n\t\t}\n\t\t$newval->feature_collection = $this;\n\n\t\t$this->added_features[$index] = $class_name;\n\n\t\tparent::offsetSet($index, $newval);\n\t}", "public function addMetaboxes() {}", "protected function addCustomFieldset()\n {\n $this->meta = array_merge_recursive(\n $this->meta,\n [\n static::NOTE_FIELD_INDEX => $this->getFieldsetConfig(),\n ]\n );\n }", "function createProperty();", "protected function _add($property, $value): void {\n if (property_exists($this, $property)) {\n $this->{$property}[] = $value;\n } else {\n $this->_properties[$property][] = $value;\n }\n }", "public function enable($feature)\n {\n if (!$this->storage) {\n throw new \\RuntimeException('FeatureService : no storage defined');\n }\n $this->storage->setFeatureEnabled($feature, true);\n\n }", "function BuildFeatureQueryOptions($classDef)\n{\n $query = new MgFeatureQueryOptions();\n $geomPropName = $classDef->GetDefaultGeometryPropertyName(); \n $propertyList = $classDef->GetProperties(); \n\n for ($i = 0; $i < $propertyList->GetCount(); $i++) \n {\n $propertyDef = $propertyList->GetItem($i); \n $property = $propertyList->GetItem($i)->GetName(); \n\n if (($property != $geomPropName) && ($propertyDef->GetPropertyType() == MgFeaturePropertyType::DataProperty)) \n { \n $propertyType = $propertyList->GetItem($i)->GetDataType(); \n switch ($propertyType) { \n case MgPropertyType::Boolean: \n $query->AddFeatureProperty($property); \n break; \n case MgPropertyType::Byte: \n $query->AddFeatureProperty($property); \n break; \n case MgPropertyType::DateTime: \n $query->AddFeatureProperty($property); \n break; \n case MgPropertyType::Single: \n $query->AddFeatureProperty($property); \n break; \n case MgPropertyType::Double: \n $query->AddFeatureProperty($property); \n break; \n case MgPropertyType::Int16: \n $query->AddFeatureProperty($property); \n break; \n case MgPropertyType::Int32: \n $query->AddFeatureProperty($property); \n break; \n case MgPropertyType::Int64: \n $query->AddFeatureProperty($property); \n break; \n case MgPropertyType::String: \n $query->AddFeatureProperty($property); \n break; \n }\n } else if ($property == $geomPropName){ \n $query->AddFeatureProperty($property); \n } \n }\n return $query;\n}", "public function addFeature(FeatureInterface $feature)\n {\n $name = $feature->getName();\n if (isset($this->features[$name])) {\n throw new FeatureToggleHandlerException('Feature ' . $name . ' already registered');\n }\n\n $this->features[$name] = $feature;\n }", "public function __construct(Collection $features)\n {\n $this->features = $features;\n\n $this->bedroomOptions = [\n [\n 'title' => 'Studio',\n 'value' => 'studio'\n ],\n [\n 'title' => '1',\n 'value' => 1\n ],\n [\n 'title' => '2',\n 'value' => 2\n ],\n [\n 'title' => '3',\n 'value' => 3\n ],\n [\n 'title' => '4+',\n 'value' => 4\n ],\n ];\n\n $this->bathroomOptions = [\n [\n 'title' => '1+',\n 'value' => 1\n ],\n [\n 'title' => '2+',\n 'value' => 2\n ],\n [\n 'title' => '3+',\n 'value' => 3\n ],\n [\n 'title' => '4+',\n 'value' => 4\n ],\n [\n 'title' => '5+',\n 'value' => 5\n ],\n ];\n\n $this->sortOptions = [\n [\n 'title' => 'relevance',\n 'value' => 'relevance'\n ],\n [\n 'title' => 'posted at',\n 'value' => 'created_at'\n ],\n [\n 'title' => 'low price',\n 'value' => 'low_price'\n ],\n [\n 'title' => 'high price',\n 'value' => 'high_price'\n ],\n ];\n\n $this->additionalFilters = [\n [\n 'sectionName' => 'Type',\n 'name' => 'build_type',\n 'inputType' => 'checkbox',\n 'values' => ['Apartment','Condo','House','Room','Other']\n ],\n [\n 'sectionName' => 'Lease Length',\n 'inputType' => 'checkbox',\n 'name' => 'lease_length',\n 'values' => ['long_term','short_term']\n ],\n [\n 'sectionName' => 'Buildings',\n 'inputType' => 'radio',\n 'name' => 'Building',\n 'values' => ['show_building','only_Building','Hide_building']\n ],\n ];\n }", "protected function add_features() {\n\n\t\tregister_nav_menus( array(\n\t\t\t'primary' => esc_html__( 'Primary', 'superiocity' ),\n\t\t) );\n\n\t\tadd_theme_support( 'title-tag' );\n\n\t\t/*\n\t\t * Switch default core markup for search form, comment form, and comments\n\t\t * to output valid HTML5.\n\t\t */\n\t\tadd_theme_support( 'html5', array(\n\t\t\t'search-form',\n\t\t\t'comment-form',\n\t\t\t'comment-list',\n\t\t\t'gallery',\n\t\t\t'caption',\n\t\t) );\n\t}", "private function processAdditionalFeatures(array $features)\n {\n // feature reference every time. This is so that we can share features that are\n // imported with common content, and to avoid storing duplicate features when\n // importing the same QTI content multiple times.\n $updatedFeatures = [];\n foreach ($features as $feature) {\n $featureDataHash = sha1(json_encode($feature->to_array()['data']));\n\n // TODO: Review whether refs need to be deduped by item. Reason - while it\n // is desirable to share passages between items, it may not be desirable to\n // share all types of features between items.\n $feature->set_reference($featureDataHash);\n $updatedFeatures[$feature->get_reference()] = $feature;\n }\n\n return $updatedFeatures;\n }", "function enrol_profilefield_supports($feature) {\n switch ($feature) {\n case ENROL_RESTORE_TYPE:\n return ENROL_RESTORE_EXACT;\n\n default:\n return null;\n }\n}", "public function getItemDataFields(){\n if(is_null($this->features)){\n $features = array_merge(\n \t\t$this->getFeatures(),\n \t\t$this->getFilters(),\n \t\t$this->getWeightFeatures()\n ); \n \n $this->features = array_map(function($f){\n return (!is_array($f)) ? [$f] : $f;\n }, $features); \n }\n return $this->features;\n }", "function cpotheme_metadata_features()\n{\n $cpotheme_data = array();\n\n $cpotheme_data[] = array(\n 'name' => 'feature_icon',\n 'std' => '',\n 'label' => 'Feature Icon',\n 'desc' => 'Sets an icon to be used as the featured image. If an icon is specified, it will replace the normal thumbnail.',\n 'type' => 'select',\n 'option' => cpotheme_metadata_icons(),\n 'class' => 'fontawesome'\n );\n\n return $cpotheme_data;\n}", "function save_features($product_id)\n\t{\n\t\t$features = $this->features_model->all_features();\n\t\t\n\t\tif($features->num_rows() > 0)\n\t\t{\n\t\t\t$feature = $features->result();\n\t\t\t\n\t\t\tforeach($feature as $feat)\n\t\t\t{\n\t\t\t\t$feature_id = $feat->feature_id;\n\t\t\t\t\n\t\t\t\tif(isset($_SESSION['name'.$feature_id]))\n\t\t\t\t{\n\t\t\t\t\t$total_features = count($_SESSION['name'.$feature_id]);\n\t\t\t\t\t\n\t\t\t\t\tif($total_features > 0)\n\t\t\t\t\t{\t\n\t\t\t\t\t\tfor($r = 0; $r < $total_features; $r++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(isset($_SESSION['name'.$feature_id][$r]))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$name = $_SESSION['name'.$feature_id][$r];\n\t\t\t\t\t\t\t\t$quantity = $_SESSION['quantity'.$feature_id][$r];\n\t\t\t\t\t\t\t\t$price = $_SESSION['price'.$feature_id][$r];\n\t\t\t\t\t\t\t\t$image = $_SESSION['image'.$feature_id][$r];\n\t\t\t\t\t\t\t\t$thumb = $_SESSION['thumb'.$feature_id][$r];\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$data = array(\n\t\t\t\t\t\t\t\t\t\t'feature_id'=>$feature_id,\n\t\t\t\t\t\t\t\t\t\t'product_id'=>$product_id,\n\t\t\t\t\t\t\t\t\t\t'feature_value'=>$name,\n\t\t\t\t\t\t\t\t\t\t'quantity'=>$quantity,\n\t\t\t\t\t\t\t\t\t\t'price'=>$price,\n\t\t\t\t\t\t\t\t\t\t'image'=>$image,\n\t\t\t\t\t\t\t\t\t\t'thumb'=>$thumb\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->db->insert('product_feature', $data);\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\tsession_unset();\n\t\treturn TRUE;\n\t}", "public function hasFeature($feature);", "public function canAddFieldsToPaletteAfterExistingOnes() {}", "public function hasFeature ($feature, $version) {}", "function cpotheme_metadata_themefeature_options()\n{\n $cpotheme_data = array();\n\n $cpotheme_data[] = array(\n 'name' => 'feature_image',\n 'std' => '',\n 'label' => 'Feature Image',\n 'desc' => '',\n 'type' => 'upload'\n );\n\n $cpotheme_data[] = array(\n 'name' => 'feature_premium',\n 'std' => '',\n 'label' => 'Premium Feature',\n 'desc' => '',\n 'type' => 'checkbox'\n );\n\n return $cpotheme_data;\n}", "public function updatePropertyIndex ()\n {\n $new_properties_table = array();\n\n foreach ( $this as $declaration ) {\n\n $name = $declaration->property;\n\n if ( isset( $new_properties_table[ $name ] ) ) {\n $new_properties_table[ $name ]++;\n }\n else {\n $new_properties_table[ $name ] = 1;\n }\n }\n $this->properties = $new_properties_table;\n }", "private function completeImportProduct()\n {\n if (!empty($this->data['new_features'])) {\n $feature_types_model = $this->getModel('typeFeatures');\n /**\n * @var shopTypeFeaturesModel $feature_types_model\n */\n foreach ($this->data['new_features'] as $feature) {\n if (!empty($feature['types'])) {\n $feature_types_model->updateByFeature($feature['id'], $feature['types'], false);\n }\n }\n }\n $this->fixSkuName();\n }", "public function update() {\n\t\t// When loaded, fully sync the property array.\n\t\tif ($this->loadedSettings !== false) {\n\t\t\t$properties = array();\n\t\t\t$ownProperties = $this->bean->ownProperty;\n\t\t\tforeach ($this->properties as $k => $v) {\n\t\t\t\t$found = false;\n\t\t\t\tforeach ($ownProperties as $property) {\n\t\t\t\t\tif ($property->name === $k) {\n\t\t\t\t\t\t$property->value = $v;\n\t\t\t\t\t\t$found = true;\n\t\t\t\t\t\t$properties[] = $property;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!$found) {\n\t\t\t\t\t$property = R::dispense('property');\n\t\t\t\t\t$property->name = $k;\n\t\t\t\t\t$property->value = $v;\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->bean->ownProperty = $properties;\n\t\t\t// When loaded, only add and modify properties, but do not delete any\n\t\t} elseif (!empty($this->properties)) {\n\t\t\t$ownProperties = $this->bean->ownProperty;\n\t\t\tforeach ($this->properties as $k => $v) {\n\t\t\t\t$found = false;\n\t\t\t\tforeach ($ownProperties as $property) {\n\t\t\t\t\tif ($property->name === $k) {\n\t\t\t\t\t\t$property->value = $v;\n\t\t\t\t\t\t$found = true;\n\t\t\t\t\t\t$this->bean->ownProperty[$property->id] = $property;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!$found) {\n\t\t\t\t\t$property = R::dispense('property');\n\t\t\t\t\t$property->name = $k;\n\t\t\t\t\t$property->value = $v;\n\t\t\t\t\t$this->bean->ownProperty[] = $property;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function addProperty(Property $property)\n {\n $this->properties[(string)$property->getFqsen()] = $property;\n }", "protected function initializeFeatureFlags(): void\n {\n }", "public function store(PropertyRequest $request)\n {\n $property=Property::create([\n 'cost'=>$request->cost,\n 'type_id'=>$request->type,\n 'reference'=>$request->reference,\n 'room'=>$request->room,\n 'bathroom'=>$request->bathroom,\n 'map'=>$request->map,\n 'user_id'=>Auth::user()->id,\n 'region_id'=>$request->region,\n 'area'=>$request->area,\n 'type'=>$request->display\n ]);\n $propertyId=$property->id;\n PropertyDescription::create([\n 'name'=>$request->descEn,\n 'lang'=>'en',\n 'property_id'=>$propertyId\n ]);\n PropertyDescription::create([\n 'name'=>$request->descAr,\n 'lang'=>'ar',\n 'property_id'=>$propertyId\n ]);\n PropertyHeader::create([\n 'name'=>$request->headerEn,\n 'lang'=>'en',\n 'property_id'=>$propertyId\n ]);\n PropertyHeader::create([\n 'name'=>$request->headerAr,\n 'lang'=>'ar',\n 'property_id'=>$propertyId\n ]);\n PropertyLabel::create([\n 'name'=>$request->labelEn,\n 'lang'=>'en',\n 'property_id'=>$propertyId\n ]);\n PropertyLabel::create([\n 'name'=>$request->labelAr,\n 'lang'=>'ar',\n 'property_id'=>$propertyId\n ]);\n $packages=Input::get('feature');\n $property->feature()->attach($packages);\n $destinationPath=\"uploads/\";\n if($files=$request->file('Images'))\n {\n \tforeach($files as $file)\n {\n \t $name=$file->getClientOriginalName();\n \t $file->move($destinationPath,$file->getClientOriginalName());\n \t $img=new PropertyImage;\n \t $img->property_id=$propertyId;\n \t $img->path=$destinationPath.$file->getClientOriginalName();\n \t $img->save();\n \t}\n }\n\n return redirect()->route('property.index');\n }", "protected function _initFeatureSwitch()\n\t{\n\t\t$cfgPath = $this->getOption('configPath');\n\t\t$config = new Zend_Config_Ini($cfgPath . 'features.ini', APPLICATION_ENV);\n\n\t\tZend_Registry::set('features', $config->toArray());\n\t}", "public function getProvidedFeatures();", "public function testOrgApacheSlingFeatureflagsImplConfiguredFeature()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/org.apache.sling.featureflags.impl.ConfiguredFeature';\n\n $crawler = $client->request('POST', $path);\n }", "function alreadyHas($file) {\n $res = false;\n if (strlen($this->id) && !is_numeric($this->id)) {\n if (in_array($this->id, $file->listFeatures())) {\n $res = $file->getFeature($this->id);\n } else $res = false;\n }\n else {\n foreach ($file->getFeatures() as $f) {\n if ($this->isMe($f)) {\n $res = $f;\n break;\n }\n }\n }\n return $res;\n }", "public function addEntries($features)\n {\n for ($i = 0, $l = count($features); $i < $l; $i++) {\n $this->addEntry($features[$i]->toArray());\n }\n }", "public function addPropertyValues(Property $property) {\r\n foreach ($property->getPropertyValues() as $propertyValue) {\r\n $property->addPropertyValue($propertyValue);\r\n }\r\n }", "public function supports($feature) { return true; }", "function load($manager)\n {\n $feature1 = new Feature();\n $feature1->setType('size');\n $feature1->setName('20x20');\n $feature1->setSearchTerm('size');\n\n $feature2 = new Feature();\n $feature2->setType('weight');\n $feature2->setName('31');\n $feature2->setSearchTerm('weight');\n\n $feature3 = new Feature();\n $feature3->setType('pages');\n $feature3->setName('230');\n $feature3->setSearchTerm('pages');\n\n $o_gr = new OptionGroup();\n $o_gr->setName(\"color\");\n $o_gr->setRequired(1);\n $o_gr->setDisplay('my');\n\n\n $opt = new Option();\n $opt->setType('color');\n $opt->setValue('white');\n\n $opt2 = new Option();\n $opt2->setType('color');\n $opt2->setValue('green');\n\n\n $o_gr->addOption($opt);\n $o_gr->addOption($opt2);\n\n /** @var $pm \\Jeka\\ShopBundle\\Document\\ProductManager */\n $pm = $this->container->get('vespolina.product_manager');\n\n $prod = $pm->createProduct();\n $prod->setPrice(110.2);\n $prod->setName('Test product');\n $prod->setDescription('Test product\\'s description');\n $prod->addCategories($this->getReference('cat_1_1_1'));\n $prod->addImages($this->getReference('image_1'));\n $prod->addImages($this->getReference('image_2'));\n $prod->addImages($this->getReference('image_3'));\n $prod->setSlug('test-product');\n $prod->setType(Product::PHYSICAL);\n\n $prod->addOptionGroup($o_gr);\n\n $prod->addFeature($feature1);\n $prod->addFeature($feature2);\n $prod->addFeature($feature3);\n\n $manager->persist($prod);\n\n $feature1->setName('23x10');\n $feature2->setName('9');\n $feature3->setName('114');\n\n $prod1 = $pm->createProduct();\n $prod1->setPrice(55.99);\n $prod1->setName('Бутылка пива');\n $prod1->setSlug('butilka-piva');\n\n $prod1->setDescription('Описание товара');\n $prod1->addCategories($this->getReference('cat_1_1_1'));\n $prod1->addImages($this->getReference('image_2'));\n $prod1->addImages($this->getReference('image_3'));\n $prod1->addImages($this->getReference('image_4'));\n $prod1->setType(Product::PHYSICAL);\n// $prod1->addFeature($feature1);\n// $prod1->addFeature($feature2);\n// $prod1->addFeature($feature3);\n\n $manager->persist($prod1);\n\n\n $feature1->setName('30x50');\n $feature2->setName('19');\n $feature3->setName('184');\n\n $prod2 = $pm->createProduct();\n $prod2->setPrice(1250);\n $prod2->setName('Фотоальбом');\n $prod2->setSlug('fotoalbom');\n $prod2->setDescription('Описание товара2');\n $prod2->addCategories($this->getReference('cat_1_1_1'));\n $prod2->addCategories($this->getReference('cat_1_1_2'));\n $prod2->addImages($this->getReference('image_3'));\n $prod2->addImages($this->getReference('image_4'));\n $prod2->addImages($this->getReference('image_5'));\n $prod2->setType(Product::PHYSICAL);\n\n// $prod2->addFeature($feature1);\n// $prod2->addFeature($feature2);\n// $prod2->addFeature($feature3);\n\n $manager->persist($prod2);\n\n\n $prod3 = $pm->createProduct();\n $prod3->setName('Доставка курьером');\n $prod3->setSlug('courier-delivery');\n $prod3->setType(Product::SERVICE|Product::UNIQUE);\n $prod3->setPrice('200');\n $prod3->addCategories($this->getReference('cat_1_2'));\n// $prod->addImages($this->getReference('image_5'));\n// $prod->addImages($this->getReference('image_6'));\n// $prod->addImages($this->getReference('image_7'));\n $manager->persist($prod3);\n\n $manager->flush();\n }", "public function store(FeatureRequest $request)\n {\n if (Gate::denies('features.create')) {\n abort(403);\n }\n\n $data = $request->except(['_token', '_method']);\n\n $result = $this->featureService->add($data);\n\n if (is_array($result) && !empty($result['error'])) {\n return back()->with($result);\n }\n \n return redirect(route('admin.features.index'));\n }", "function addProperty($name, $value) {\r\n\r\n\t\t$propertyName = 'set'.ucfirst($name);\r\n\t\t\r\n\t\t// XML boolean needs to be converted\r\n\t\tif( strtolower($value) == 'true') {\r\n\t\t\t$value = True;\r\n\t\t} elseif(strtolower($value) == 'false') {\r\n\t\t\t$value = False;\r\n\t\t}\r\n\r\n\r\n\t\t// Set methods on the PlugIn driver class ($this->className, $this->key)\r\n\t\t// Eg: <plug-in ... key=\"SMARTY_PLUGIN\" .../> maps to $this->setKey(\"SMARTY_PLUGIN\")\r\n\t\tif( method_exists( $this, $propertyName) ) {\r\n\t\t\t$this->$propertyName($value);\r\n\t\t} else {\r\n\t\t\t// Set properties in the PlugIn class.\r\n\t\t\t// Check for a set-property element, and try to set the class variable directly\r\n\t\t\t// Eg: <set-property property=\"force_compile\" value=\"true\"/>\r\n\t\t\t$plugInVars = get_class_vars( get_class($this->plugIn) );\t\t\r\n\r\n\t\t\tif( array_key_exists($name, $plugInVars) ) {\r\n\t\t\t\t$p =& $this->plugIn;\r\n\t\t\t\t$p->$name = $value;\r\n\t\t\t} else {\r\n\t\t\t\t\r\n\t\t\t\t$driverName = ucfirst(get_class($this));\t\t\t\t\r\n\t\t\t\tprint 'Error: '.$driverName.'->addProperty(): Method: '.\r\n\t\t\t\t\t\t$propertyName.\" not found<br>\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public function promo_feature_method()\n {\n \n }", "public function update(Request $request, Features $features)\n {\n $request->validate([\n \"titrefeatures\" => \"required\",\n \"soustitrefeatures\" => \"required\",\n \"imgfeature1\" => \"required\",\n \"titrefeature1\" => \"required\",\n \"descriptionfeature1\" => \"required\",\n \"item1feature1\" => \"required\",\n \"item2feature1\" => \"required\",\n \"item3feature1\" => \"required\",\n \"imgfeature2\" => \"required\",\n \"titrefeature2\" => \"required\",\n \"descriptionfeature2\" => \"required\",\n \"textfeature2\" => \"required\",\n \"imgfeature3\" => \"required\",\n \"titrefeature3\" => \"required\",\n \"descriptionfeature3\" => \"required\",\n \"item1feature3\" => \"required\",\n \"item2feature3\" => \"required\",\n \"item3feature3\" => \"required\",\n \"imgfeature4\" => \"required\",\n \"titrefeature4\" => \"required\",\n \"descriptionfeature4\" => \"required\",\n \"textfeature4\" => \"required\"\n ]);\n\n $features->titrefeatures = $request->titrefeatures;\n $features->soustitrefeatures = $request->soustitrefeatures;\n $features->imgfeature1 = $request->imgfeature1;\n $features->titrefeature1 = $request->titrefeature1;\n $features->descriptionfeature1 = $request->descriptionfeature1;\n $features->item1feature1 = $request->item1feature1;\n $features->item2feature1 = $request->item2feature1;\n $features->item3feature1 = $request->item3feature1;\n $features->imgfeature2 = $request->imgfeature2;\n $features->titrefeature2 = $request->titrefeature2;\n $features->descriptionfeature2 = $request->descriptionfeature2;\n $features->textfeature2 = $request->textfeature2;\n $features->imgfeature3 = $request->imgfeature3;\n $features->titrefeature3 = $request->titrefeature3;\n $features->descriptionfeature3 = $request->descriptionfeature3;\n $features->item1feature3 = $request->item1feature3;\n $features->item2feature3 = $request->item2feature3;\n $features->item3feature3 = $request->item3feature3;\n $features->imgfeature4 = $request->imgfeature4;\n $features->titrefeature4 = $request->titrefeature4;\n $features->descriptionfeature4 = $request->descriptionfeature4;\n $features->textfeature4 = $request->textfeature4;\n\n $features->save();\n return redirect()->route('features.all')->with('message', 'Informations modifié avec succès.');\n \n }", "public static function add(string $name, FeatureInterface $feature)\n {\n static::getStorage()->add($name, clone($feature));\n }", "function add_training_fields( $training_detail_id, $training_detail) {\r\n if ( $training_detail->post_type == 'training_show' ) {\r\n // Store data in post meta table if present in post data\r\n if ( isset( $_POST['training_name'] ) && $_POST['training_name'] != '' ) {\r\n update_post_meta( $training_detail_id, 'training_name', $_POST['training_name'] );\r\n }\r\n\r\n }\r\n}", "public function theme_features() {\n\n\t\t// We do not need template overrides this time.\n\t\tadd_theme_support( 'woocommerce' );\n\t}", "public function create(FeatureRequest $request)\n { \n $user = Auth::guard()->setToken(request()->bearerToken())->getUser();\n $credentials = $request->only(['name', 'description']);\n $feature = new Feature($credentials);\n $feature = $user->featureCreatedBy()->save($feature);\n return $this->success($feature);\n }", "public function addColumn(Property $property);", "public function store(Request $request)\n {\n $this->help->checkPermission(Auth::user()->id, \"features-manage\");\n if ($request->title == null)\n return redirect('features/create')->withInput()->withErrors(['کاربر گرامی ، وارد کردن عنوان اجباری می باشد.']);\n if ($features = Features::where('title', $request->title)->first())\n return redirect('features/create')->withInput()->withErrors(['کاربر گرامی ،عنوان تکراری می باشد.']);\n Features::create([\n 'type_app_id' => Auth::user()->type_app_id,\n 'group_features_id' => $request->input('group_features_id'),\n 'title' => $request->title,\n 'description' => $request->description,\n ]);\n return redirect('features/create')->with('success', 'کاربر گرامی ، اطلاعات با موفقیت ثبت شد.');\n }", "public function edit_features($EncryptFeaturedID = null) {\n $merchantId = $this->Session->read('merchantId');\n $featuredID = $this->Encryption->decode($EncryptFeaturedID);\n $this->loadModel('Size');\n $featuredDetail = $this->StoreFeaturedSection->findById($featuredID, array('id', 'featured_name', 'is_active'));\n if ($this->request->is(array('post', 'put'))) {\n $this->request->data = $this->Common->trimValue($this->request->data);\n $this->request->data['StoreFeaturedSection']['id'] = $featuredID;\n $conditions = array('LOWER(featured_name)' => strtolower($this->request->data['StoreFeaturedSection']['featured_name']), 'id !=' => $featuredID, 'merchant_id' => $merchantId, 'is_deleted' => 0);\n $isUniqueName = $this->StoreFeaturedSection->find('count', array('conditions' => $conditions));\n if ($isUniqueName == 0) {\n $this->StoreFeaturedSection->save($this->request->data);\n $this->Session->setFlash(__(\"Updated Successfully .\"), 'alert_success');\n $this->redirect(array('controller' => 'hqfeatures', 'action' => 'index'));\n } else {\n $this->Session->setFlash(__(\"Feature name already exists\"), 'alert_failed');\n }\n }\n $this->request->data = $featuredDetail;\n $this->loadModel('FeaturedItem');\n $this->loadModel('Item');\n $this->FeaturedItem->bindModel(\n array(\n 'belongsTo' => array(\n 'Item' => array(\n 'className' => 'Item',\n 'foreignKey' => 'item_id',\n 'conditions' => array('Item.is_deleted' => 0, 'Item.is_active' => 1),\n 'fields' => array('id', 'name', 'category_id'),\n 'type' => 'INNER'\n )\n )\n ), false\n );\n $this->Item->bindModel(\n array(\n 'belongsTo' => array(\n 'Category' => array(\n 'className' => 'Category',\n 'foreignKey' => 'category_id',\n 'conditions' => array('Category.is_deleted' => 0, 'Category.is_active' => 1),\n 'fields' => array('id', 'name'),\n 'type' => 'INNER'\n )\n )\n ), false\n );\n $this->paginate = array('recursive' => 2, 'conditions' => array('FeaturedItem.store_featured_section_id' => $featuredID, 'FeaturedItem.is_active' => 1, 'FeaturedItem.is_deleted' => 0), 'fields' => array('FeaturedItem.id', 'FeaturedItem.item_id', 'FeaturedItem.position'), 'order' => array('FeaturedItem.position' => 'ASC'));\n $featuredItemDetail = $this->paginate('FeaturedItem');\n $this->set('list', $featuredItemDetail);\n $this->set('featuredID', $featuredID);\n }", "public function create()\n {\n $types=Type::all();\n $regions=Region::all();\n $feature=Feature::all();\n return view('admin.property.create',compact('types','regions','feature'));\n }", "public static function workflowFeatures();", "public function set_default_uultra_features()\r\n\t{\r\n\t\t$tabs = $this->uultra_get_default_modules_array();\r\n\t\t\t\t\r\n\t\t/*User Profile Front Navigator*/\t\t\r\n\t\t$tabs_front_nav = \t$this->uultra_get_default_front_profile_nav_array();\t\t\t\r\n\t\t\t\t\t\r\n\t\t//these are the default modules of UU Pro\r\n\t\tupdate_option('userultra_default_user_features', $tabs );\t\r\n\t\t\t\r\n\t\t$this->mDefaultUserFeatures =$tabs;\r\n\t\t$this->mDefaultFrontNavigatorLinks =$tabs_front_nav;\r\n\t\t\r\n\t\t//USED TO BUILD MENUES ONLY - set the cutomized options available as menu options in the user's backend only if already not set\r\n\t\tif (!get_option('userultra_default_user_features_custom')) \r\n\t\t{\r\n\t\t\t$modules_custom = get_option('userultra_default_user_features_added_admin');\r\n\t\t\tif(is_array($modules_custom))\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t $tabs = $tabs +$modules_custom;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t}\t\t\t\r\n\t\t\tupdate_option('userultra_default_user_features_custom', $tabs );\r\n\t\t}\r\n\t\t\r\n\t\t//USED TO BUILD FRONT PROFILE NAVIGATOR ONLY \t\t\r\n\t\tif (!get_option('userultra_default_user_profile_front_navigator')) \r\n\t\t{\t\t\t\r\n\t\t\tupdate_option('userultra_default_user_profile_front_navigator', $tabs_front_nav );\r\n\t\t}\r\n\t\t\r\n\t}", "function ff_activate_feature( $feature )\n\t{\n\t\tff_FeatureFlags::getInstance()->getFeature( $feature )->globalEnable();\n\t}", "function stal_woo_single_add_theme_supports() {\n\t\t// Add featured image zoom functionality on product single page\n\t\t$is_zoom_enabled = stal_get_post_value_through_levels( 'qodef_woo_single_enable_image_zoom' ) !== 'no';\n\n\t\tif ( $is_zoom_enabled ) {\n\t\t\tadd_theme_support( 'wc-product-gallery-zoom' );\n\t\t}\n\n\t\t// Add photo swipe lightbox functionality on product single images page\n\t\t$is_photo_swipe_enabled = stal_get_post_value_through_levels( 'qodef_woo_single_enable_image_lightbox' ) === 'photo-swipe';\n\n\t\tif ( $is_photo_swipe_enabled ) {\n\t\t\tadd_theme_support( 'wc-product-gallery-lightbox' );\n\t\t}\n\t}", "public function canAddFieldsToPaletteBeforeExistingOnes() {}", "abstract protected function getWeightFeatures();", "public function canAddFieldsToPaletteAfterNotExistingOnes() {}", "public function productSpecialFeatures(SpecialFeaturesRequest $request, Product $product)\n {\n $product = $this->product->find($product->id);\n $product->features = json_encode($request->features);\n $product->features_description = json_encode($request->features_description);\n $product->status = 'Pending';\n $product->save();\n return ['success'=> true];\n }", "public function create()\n {\n $this->help->checkPermission(Auth::user()->id, \"features-manage\");\n $data['groupFeaturesInfo'] = GroupFeatures::all();\n return view('admin.features.create', $data);\n }", "function BuildProperty($PropNode)\n {\n $objProp = new clsProperty();\n\n foreach ($PropNode->children() as $PropChild)\n {\n switch ($PropChild->getName())\n {\n case \"ID\":\n $objProp->ID = $PropChild;\n break;\n case \"Name\":\n $objProp->Name = $PropChild;\n break;\n case \"Address\":\n $objProp->Address = $PropChild;\n break;\n case \"City\":\n $objProp->City = $PropChild;\n break;\n case \"State\":\n $objProp->State = $PropChild;\n break;\n case \"Zip\":\n $objProp->Zip = $PropChild;\n break;\n case \"Phone\":\n $objProp->Phone = $PropChild;\n break;\n case \"Email\" :\n $objProp->Email = $PropChild;\n break;\n case \"Maint\":\n $objProp->Maint = $PropChild;\n break;\n case \"WebSite\":\n $objProp->WebSite = $PropChild;\n break;\n case \"Desc\" :\n $objProp->Desc = $PropChild;\n break;\n case \"Amenities\":\n $objProp->Amenities = explode(\"--\",$PropChild);\n break;\n case \"Highlights\" :\n $objProp->Highlights = $PropChild;\n break;\n case \"Coupon\" :\n $objProp->Coupon = $PropChild;\n break;\n case \"Vtour\" :\n $objProp->Vtour = $PropChild;\n break;\n case \"MainPic\" :\n $objProp->MainPic = $PropChild;\n break;\n case \"SubPic1\" :\n case \"SubPic2\" :\n case \"SubPic3\" :\n case \"SubPic4\" :\n case \"SubPic5\" :\n array_push($objProp->SubPics, $PropChild) ;\n break;\n case \"OneBedLowPrices\" :\n case \"TwoBedLowPrices\" :\n case \"ThreeBedLowPrices\" :\n case \"FourBedLowPrices\" :\n\n array_push($objProp->BedLowPrices,$PropChild) ;\n // or die(\" Error Creating BedLowPrices object \");\n break;\n\n case \"UnitTypes\" :\n\n $objProp->Units = $this->BuildUnit($objProp->Units,$PropChild);\n // die(\" Error Creating Unit object \") ;\n\n break;\n case \"ReportRoster\" :\n \n\n $objProp->Reports = $this->BuildReport($objProp->Reports,$PropChild) ;\n // or die (\" Error Creating Report object \") ;\n break;\n }\n\n }\n\n return $objProp;\n\n\n }", "function aggiornaFaveFeatured(){\n\t \n\tglobal $wpdb;\n\t$metas = array();\n\t$key = '_id_cometa';\n\t\n if( !empty( $key ) ){\n\t\t\n\t\t$qry = $wpdb->prepare( \n\t\t\t\t\"SELECT post_id, meta_value \n\t\t\t\tFROM {$wpdb->postmeta} \n\t\t\t\tWHERE meta_key = '%s'\", \n\t\t\t\t$key\n\t\t\t);\n\n\t\t$res = $wpdb->get_results( $qry );\n\t\t\n\t\tif($res){\n\t\t\t\n\t\t\t\n\t\t\tforeach ( $res as $r ) {\n\t\t\t\t$post_id = $r->post_id;\n\t\t\t\t\n\t\t\t\t// recupero se c'è valore fave_featured\n\t\t\t\t$featured = get_post_meta( $post_id, 'fave_featured', true );\n\t\t\t\t\n\t\t\t\tif($featured == ''){\n\t\t\t\t\t\n\t\t\t\t\t$result = add_post_meta($post_id, 'fave_featured', '0');\n\t\t\t\t\t\n\t\t\t\t\t$msg = $post_id.\" non aveva fave_featured, ora l'ho inserito. Result: \";\n\t\t\t\t\t$msg .= var_export($result, true);\n\t\t\t\t\tcc_import_immobili_error_log($msg);\n\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\n\t\t}\n\t\t\n\t}\t \n\t \n }", "public static function removeFeatured($propertyId) {\n\t\t$property = Property::model ()->findByPk ( $propertyId );\n\t\tif ($property) {\n\t\t\t$property->featured = 0;\n\t\t\treturn $property->save ();\n\t\t} else\n\t\treturn false;\n\n\t}", "private function mapProperties(): void\n {\n $this->properties = Collect::keyBy($this->collection->getProperties()->getValues(), 'identifier');\n }", "public function saveProperties(){\n\n\t\t$props = $_POST['properties'];\n\t\t$props = $this->sanitizeProperties( $props );\n\t\t$props = apply_filters( 'chef_sections_save_column_properties', $props, $this );\n\n\t\tdo_action( 'chef_sections_before_column_save', $this );\n\n\t\t$saved = update_post_meta(\n\t\t\t$this->post_id,\n\t\t\t'_column_props_'.$this->fullId,\n\t\t\t$props\n\t\t);\n\n\t\tdo_action( 'chef_sections_after_column_save', $this );\n\n\t\t//set the new properties in this class\n\t\t$this->properties = $props;\n\t\treturn $saved;\n\t}", "function intInsertProductFeatureData($sql)\n {\n // $sql = $this->getInsertUpdateSql(\"PRODUCT_FEATURE\",array_keys($insert_param),array_values($insert_param));\n // echo $sql.\"<br>\";\n $feature_id = $this->insertSelect($sql);\n $this->cache->searchDeleteKeys($this->productKey.\"_feature\");\n return $feature_id;\n }", "public function getRequiredFeatures();" ]
[ "0.61995745", "0.57590413", "0.57353187", "0.57074875", "0.5681652", "0.564757", "0.5640176", "0.5635975", "0.5563456", "0.5554418", "0.55422723", "0.55403256", "0.5521432", "0.5475551", "0.54207385", "0.5413157", "0.54047537", "0.5402976", "0.5398632", "0.53951234", "0.5386929", "0.5361471", "0.5349058", "0.5307548", "0.5299092", "0.528752", "0.52748716", "0.5221135", "0.52145666", "0.52024037", "0.5188077", "0.51830286", "0.5157312", "0.5145672", "0.5145672", "0.5116534", "0.51126", "0.51082414", "0.51075816", "0.50874805", "0.50544286", "0.5053999", "0.50389284", "0.5037622", "0.5024472", "0.5021393", "0.5013737", "0.50087464", "0.500864", "0.49679208", "0.49666387", "0.49620074", "0.4951095", "0.49497542", "0.49416438", "0.49375153", "0.49372178", "0.49312112", "0.49198803", "0.49167132", "0.48996145", "0.4897683", "0.4891373", "0.4889184", "0.48873073", "0.4879647", "0.48612237", "0.48559505", "0.48442465", "0.48424193", "0.48403162", "0.48371568", "0.48349926", "0.4833047", "0.4831313", "0.48255375", "0.4808735", "0.4801918", "0.48017374", "0.48009145", "0.47981566", "0.47916967", "0.47910672", "0.4784578", "0.47828877", "0.47758785", "0.47705388", "0.4763352", "0.4761605", "0.47612578", "0.4752262", "0.47499925", "0.47484022", "0.47358873", "0.473559", "0.47349566", "0.47346804", "0.4734525", "0.47261488", "0.4725931" ]
0.59007484
1
Gets as deleteFilter Indicates that a client defined filter has to be deleted.
public function getDeleteFilter() { return $this->deleteFilter; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDeleteFilter($deleteFilter)\n {\n $this->deleteFilter = $deleteFilter;\n return $this;\n }", "public function filterDeleted()\n {\n $owner = $this->getOwner();\n if (!$this->_withDeleted) {\n $criteria = $owner->getDbCriteria();\n $column = $owner->getDbConnection()->quoteColumnName($owner->getTableAlias() . '.' . $this->deletedFlagField);\n if (strpos($criteria->condition, $column) === false) { // 判断是否加入\n $criteria->addCondition($column . '!=' . CDbCriteria::PARAM_PREFIX . CDbCriteria::$paramCount);\n $criteria->params[CDbCriteria::PARAM_PREFIX . CDbCriteria::$paramCount++] = $this->deletedFlag;\n }\n }\n $this->_withDeleted = false;\n return $owner;\n }", "function alm_filters_deleted(){\n\t \tif(isset($_GET['delete_filter'])) {\n\t\t\t\t$deleted_filter = $_GET['delete_filter'];\n\t\t\t\t// Confirm option exists\n\t\t\t\t$is_delete = get_option(ALM_FILTERS_PREFIX .$_GET['delete_filter']);\n\t\t\t\tif(!empty($is_delete)){\n\t\t\t\t\tdelete_option(ALM_FILTERS_PREFIX .$_GET['delete_filter']);\n\t\t\t\t\t$message = '<strong>'. $deleted_filter .'</strong> '. __('filter was successfully deleted', 'ajax-load-more-filters');\n\t\t\t\t\t$this->alm_filters_add_admin_notice($message, 'ajax-load-more-filters');\n\t\t\t\t}\n\t\t\t}\n \t}", "public function getDeleteFlag()\r\n {\r\n return $this->deleteFlag;\r\n }", "public function deleteFilter($id) {\n return parent::delete($id);\n }", "public function getIsDeleted();", "public function getAllowDelete($value=''){\t\t\n\t\treturn $this->allow_delete;\n\t}", "public function getFilter()\n {\n return $this->get(self::FILTER);\n }", "public function getIsDelete()\n {\n return $this->getMethod() === 'DELETE';\n }", "public function isDeleted()\r\n\t{\r\n\t\treturn $this->getValue(\"f_deleted\");\r\n\t}", "protected function getFilter()\n {\n return $this->filter;\n }", "public function getIsDeleted()\n {\n return $this->isDeleted;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getIsDeletedRecord() {\n return $this->_deleted;\n }", "function getFilter() {\n\t\treturn $this->_filter;\n\t}", "public function getFilter()\n {\n return($this->options['filter']);\n }", "function getFilter()\n\t{\n\t\treturn $this->_filter;\n\t}", "public function getFilter()\n\t{\n\t\treturn $this->filter;\n\t}", "public function getFilter()\n {\n return $this->filterComposite;\n }", "protected function getFilter()\n {\n return $this->getSettingsValue('filter');\n }", "public function filters()\n {\n $filters = array(\n 'postOnly + delete',\n );\n\n return CMap::mergeArray($filters, parent::filters());\n }", "public function filters()\n {\n $filters = array(\n 'postOnly + delete',\n );\n\n return CMap::mergeArray($filters, parent::filters());\n }", "public function getDelete()\n {\n return $this->readOneof(5);\n }", "public function getFilter();", "public function getFilter();", "public function isDelete() {\n return $this->method == 'DELETE';\n }", "public function getWhereClauseForEnabledFieldsIncludesDeletedCheckInBackend() {}", "public function getSoftDelete()\n {\n return $this->soft_delete;\n }", "public function getSoftDelete()\n {\n return $this->soft_delete;\n }", "public function getSoftDelete()\n {\n return $this->soft_delete;\n }", "public function getSoftDelete()\n {\n return $this->soft_delete;\n }", "public function isDeleted()\n {\n return $this->deleted;\n }", "public function isDeleted()\n {\n return $this->deleted;\n }", "public function isDeleted()\n {\n return $this->deleted;\n }", "public function isDeleted()\n {\n return $this->deleted;\n }", "public function isDeleted()\n {\n return $this->deleted;\n }", "public function isDeleted()\n {\n return $this->deleted;\n }", "public function isDeleted()\n {\n return $this->deleted;\n }", "public function isDeleted()\n {\n return $this->deleted;\n }", "public function isDeleted()\n {\n return $this->deleted;\n }", "public function isDeleted()\n {\n return $this->deleted;\n }", "public function isDeleted()\n {\n return $this->deleted;\n }", "public function isDeleted()\n {\n return $this->deleted;\n }", "public function isDeleted()\n {\n return $this->deleted;\n }", "public function isDeleted()\n {\n return $this->deleted;\n }", "public function isDelete()\n {\n return $this->isMethod('DELETE');\n }", "public function isDelete()\n {\n return $this->isMethod('DELETE');\n }", "public function isDelete(){\n\t\treturn (strtoupper($this->getHeader('REQUEST_METHOD'))=='DELETE')? true : false;\n\t}", "public function getDeleteAction(): string {\n return $this->deleteAction;\n }", "public function getDeleted();", "public function filterByDeleted($deleted = null, $comparison = null)\n {\n if (is_string($deleted)) {\n $deleted = in_array(strtolower($deleted), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;\n }\n\n return $this->addUsingAlias(RefundsPeer::DELETED, $deleted, $comparison);\n }", "public function filters() {\n\n return array(\n 'accessControl', // perform access control for CRUD operations\n 'postOnly + delete' // we only allow deletion via POST request\n );\n }", "public function getFilter(){ }", "public function filterByDeleted($deleted = null, $comparison = null)\n\t{\n\t\tif (is_string($deleted)) {\n\t\t\t$deleted = in_array(strtolower($deleted), array('false', 'off', '-', 'no', 'n', '0')) ? false : true;\n\t\t}\n\t\treturn $this->addUsingAlias(UserPeer::DELETED, $deleted, $comparison);\n\t}", "public function isDelete()\n {\n return $this->getMethod() === 'DELETE';\n }", "public function getOnDelete(): string;", "public function getDeleted()\n {\n return $this->deleted;\n }", "public function isRecipientDelete() {\n\t\treturn $this -> data['r_delete'];\n\t}", "protected static function is_deleted(): mixed\n\t{\n\t\treturn self::$query->is_deleted;\n\t}", "public function filters()\n {\n return array(\n 'accessControl', // perform access control for CRUD operations\n 'postOnly + delete', // we only allow deletion via POST request\n );\n }", "public function isDelete()\n\t{\n\t\treturn $this->httpMethod() == self::MethodDelete;\n\t}", "public function getDeleted()\n {\n return $this->Deleted;\n }", "public function isDelete() {\n if($this->method === 'DELETE') {\n return true;\n } else {\n return false;\n }\n }", "public function getDeleted() {\n\t\treturn $this->deleted;\n\t}", "public function getDeleted() {\n\t\treturn $this->deleted;\n\t}", "public function isDeleted()\n\t{\n\t\treturn $this->deleted;\n\t}", "function getStatusFilter() {\n return $this->getAdditionalProperty('payment_status_filter', self::STATUS_FILTER);\n }", "public function isDeleted() {\n\t\treturn $this->deleted;\n\t}", "public function getFilter(): string;", "public function isDelete() {\n return $this->method == self::METHOD_DELETE;\n }", "public function isDelete()\n {\n return ($this->getMethod() == 'DELETE') ? true : false;\n }", "protected function getFilterProperty()\n {\n return null;\n }", "public function isDeleteable()\n {\n return $this->_isDeleteable;\n }", "public function filters() {\n\t\treturn array(\n\t\t\t'accessControl', // perform access control for CRUD operations\n\t\t\t'postOnly + delete', // we only allow deletion via POST request\n\t\t);\n\t}", "public function isDelete()\n {\n return $this->method === self::METHOD_DELETE;\n }", "public function get_deleted() {\n return $this->deleted;\n }", "function delete() {\n \tif($this->active_filter->isNew()) {\n \t $this->httpError(HTTP_ERR_NOT_FOUND);\n \t} // if\n \t\n \tif(!$this->active_filter->canEdit($this->logged_user)) {\n \t $this->httpError(HTTP_ERR_FORBIDDEN);\n \t} // if\n \t\n \tif($this->request->isSubmitted()) {\n \t $delete = $this->active_filter->delete();\n \t if($delete && !is_error($delete)) {\n \t flash_success(\"Filter ':name' has been deleted\", array('name' => $this->active_filter->getName()));\n \t } else {\n \t flash_error(\"Failed to delete ':name' filter\", array('name' => $this->active_filter->getName()));\n \t } // if\n \t $this->redirectTo('assignments');\n \t} // if\n }", "public function getDelete()\n {\n if (array_key_exists(\"delete\", $this->_propDict)) {\n return $this->_propDict[\"delete\"];\n } else {\n return null;\n }\n }", "public function getOnDeleteAction()\n\t{\n\t\treturn $this->on_delete;\n\t}", "public function getCanDeleteProperty()\n {\n return $this->deleteConfirm === $this->staff->email;\n }", "private function GetDeleted()\n\t\t{\n\t\t\treturn $this->deleted;\n\t\t}", "public function filterByDeleted($deleted = null, $comparison = null)\n\t{\n\t\tif (is_string($deleted)) {\n\t\t\t$deleted = in_array(strtolower($deleted), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;\n\t\t}\n\t\treturn $this->addUsingAlias(Oops_Db_AddressPeer::DELETED, $deleted, $comparison);\n\t}", "public function getRecordingFilter()\n {\n return $this->recordingFilter;\n }", "function was_filter_forced() {\r\n\r\n\t\treturn parent::$forced_filter;\r\n\r\n\t}" ]
[ "0.6830434", "0.62440896", "0.594549", "0.5823477", "0.5771991", "0.5718605", "0.570719", "0.5645988", "0.5638006", "0.56221944", "0.5621123", "0.561526", "0.5610027", "0.5610027", "0.5610027", "0.5610027", "0.5610027", "0.5610027", "0.5610027", "0.5610027", "0.5610027", "0.5610027", "0.5610027", "0.5610027", "0.5610027", "0.5610027", "0.5610027", "0.5610027", "0.5610027", "0.56025314", "0.5600248", "0.5557034", "0.55500805", "0.5540999", "0.54752713", "0.5446221", "0.5441333", "0.5441333", "0.54328877", "0.5404595", "0.5404595", "0.5404507", "0.5402738", "0.53922015", "0.53922015", "0.53922015", "0.53922015", "0.53420764", "0.53420764", "0.53420764", "0.53420764", "0.53420764", "0.53420764", "0.53420764", "0.53420764", "0.53420764", "0.53420764", "0.53420764", "0.53420764", "0.53420764", "0.53420764", "0.53312", "0.53312", "0.5312173", "0.52950907", "0.5281426", "0.5277402", "0.527425", "0.524773", "0.5244253", "0.5240788", "0.52373195", "0.52308255", "0.52290905", "0.52232015", "0.52194047", "0.52079576", "0.519588", "0.51944363", "0.518947", "0.518947", "0.5189021", "0.51840496", "0.5181511", "0.51810855", "0.51775765", "0.5173437", "0.5172167", "0.5170122", "0.51700693", "0.5162464", "0.5161342", "0.5134462", "0.5122985", "0.51217765", "0.51181936", "0.51056814", "0.5105301", "0.5100044", "0.50934994" ]
0.84103584
0
Sets a new deleteFilter Indicates that a client defined filter has to be deleted.
public function setDeleteFilter($deleteFilter) { $this->deleteFilter = $deleteFilter; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDeleteFilter()\n {\n return $this->deleteFilter;\n }", "public function setFilter(string $filter);", "public function setFilter($filter){ }", "function alm_filters_deleted(){\n\t \tif(isset($_GET['delete_filter'])) {\n\t\t\t\t$deleted_filter = $_GET['delete_filter'];\n\t\t\t\t// Confirm option exists\n\t\t\t\t$is_delete = get_option(ALM_FILTERS_PREFIX .$_GET['delete_filter']);\n\t\t\t\tif(!empty($is_delete)){\n\t\t\t\t\tdelete_option(ALM_FILTERS_PREFIX .$_GET['delete_filter']);\n\t\t\t\t\t$message = '<strong>'. $deleted_filter .'</strong> '. __('filter was successfully deleted', 'ajax-load-more-filters');\n\t\t\t\t\t$this->alm_filters_add_admin_notice($message, 'ajax-load-more-filters');\n\t\t\t\t}\n\t\t\t}\n \t}", "function setFilter($filter) {\n\t\t$this->_filter = $filter;\n\t}", "public function deleteFilter($id) {\n return parent::delete($id);\n }", "public function setFilter(&$var)\n {\n GPBUtil::checkMessage($var, \\Google\\Datastore\\V1beta3\\Filter::class);\n $this->filter = $var;\n }", "public function setDeleted(): void\n {\n $this->attributes['mode'] = 'delete';\n }", "protected function setFilter(array $filter) {\n $this->filter = array_flip($filter);\n }", "public function setFilter($filter) : self\n {\n $this->initialized['filter'] = true;\n $this->filter = $filter;\n return $this;\n }", "public function filterDeleted()\n {\n $owner = $this->getOwner();\n if (!$this->_withDeleted) {\n $criteria = $owner->getDbCriteria();\n $column = $owner->getDbConnection()->quoteColumnName($owner->getTableAlias() . '.' . $this->deletedFlagField);\n if (strpos($criteria->condition, $column) === false) { // 判断是否加入\n $criteria->addCondition($column . '!=' . CDbCriteria::PARAM_PREFIX . CDbCriteria::$paramCount);\n $criteria->params[CDbCriteria::PARAM_PREFIX . CDbCriteria::$paramCount++] = $this->deletedFlag;\n }\n }\n $this->_withDeleted = false;\n return $owner;\n }", "public function delete(array $filter, array $deleteOptions = [])\n {\n // Set statement of bulk object\n $bulk = $this->getBulk();\n $bulk->delete($filter, $deleteOptions);\n\n try {\n $response = $this->getInstance()->executeBulkWrite(\n $this->getParam('database') . '.' . $this->getCollection(),\n $bulk,\n $this->getWrite()\n );\n\n } catch (BulkWriteException $e) {\n new Exception('Unable to write in database');\n }\n\n return $response ?? false;\n }", "public function setFilter(array $filter)\n {\n return $this->setArgs(['filter' => $filter]);\n }", "public function setFilter(BaseOperator $filter)\n {\n $this->filter = $filter;\n }", "public function filterByDeleted($deleted = null, $comparison = null)\n {\n if (is_string($deleted)) {\n $deleted = in_array(strtolower($deleted), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;\n }\n\n return $this->addUsingAlias(RefundsPeer::DELETED, $deleted, $comparison);\n }", "public function setFilter($filter)\n {\n $this->filter = $filter;\n\n return $this;\n }", "public function setDeleteFlag($deleteFlag)\r\n {\r\n $this->deleteFlag = $this->parseBoolean($deleteFlag);\r\n\r\n return $this;\r\n }", "public function filterByDeleted($deleted = null, $comparison = null)\n\t{\n\t\tif (is_string($deleted)) {\n\t\t\t$deleted = in_array(strtolower($deleted), array('false', 'off', '-', 'no', 'n', '0')) ? false : true;\n\t\t}\n\t\treturn $this->addUsingAlias(UserPeer::DELETED, $deleted, $comparison);\n\t}", "public function setDeleted($deleted = TRUE)\n {\n $this->deleted = (bool) $deleted;\n }", "protected function setFilter(callable $filter)\n {\n $this->filter = $filter;\n\n return $this;\n }", "public function filterByDeleted($deleted = null, $comparison = null)\n\t{\n\t\tif (is_string($deleted)) {\n\t\t\t$deleted = in_array(strtolower($deleted), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;\n\t\t}\n\t\treturn $this->addUsingAlias(Oops_Db_AddressPeer::DELETED, $deleted, $comparison);\n\t}", "public function setFilter($arrFilter);", "public function destroy(Filter $filter)\n {\n //\n }", "public function setFilter(array $filter)\n {\n $model = $this->getModel();\n $model->setFilter($filter);\n }", "public function setFilters($filters)\n {\n $this->filters = $filters;\n }", "function delete() {\n \tif($this->active_filter->isNew()) {\n \t $this->httpError(HTTP_ERR_NOT_FOUND);\n \t} // if\n \t\n \tif(!$this->active_filter->canEdit($this->logged_user)) {\n \t $this->httpError(HTTP_ERR_FORBIDDEN);\n \t} // if\n \t\n \tif($this->request->isSubmitted()) {\n \t $delete = $this->active_filter->delete();\n \t if($delete && !is_error($delete)) {\n \t flash_success(\"Filter ':name' has been deleted\", array('name' => $this->active_filter->getName()));\n \t } else {\n \t flash_error(\"Failed to delete ':name' filter\", array('name' => $this->active_filter->getName()));\n \t } // if\n \t $this->redirectTo('assignments');\n \t} // if\n }", "public function setdeleted($v)\n {\n if ($v !== null) {\n if (is_string($v)) {\n $v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;\n } else {\n $v = (boolean) $v;\n }\n }\n\n if ($this->deleted !== $v) {\n $this->deleted = $v;\n $this->modifiedColumns[] = ActionTypePeer::DELETED;\n }\n\n\n return $this;\n }", "public function setDelete($val)\n {\n $this->_propDict[\"delete\"] = $val;\n return $this;\n }", "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "public function setFilter($filter)\n {\n $filters = array();\n parse_str($filter, $filters);\n foreach ($filters as $key => $val) {\n $this->addFilter($key, $val);\n }\n \n return $this;\n }", "public function setFilter($var)\n {\n GPBUtil::checkString($var, True);\n $this->filter = $var;\n\n return $this;\n }", "public function setFilter($var)\n {\n GPBUtil::checkString($var, True);\n $this->filter = $var;\n\n return $this;\n }", "public function setFilter($var)\n {\n GPBUtil::checkString($var, True);\n $this->filter = $var;\n\n return $this;\n }", "public function setFilter($var)\n {\n GPBUtil::checkString($var, True);\n $this->filter = $var;\n\n return $this;\n }", "public function setFilter($var)\n {\n GPBUtil::checkString($var, True);\n $this->filter = $var;\n\n return $this;\n }", "public function setFilter($var)\n {\n GPBUtil::checkString($var, True);\n $this->filter = $var;\n\n return $this;\n }", "public function deleteFilter($id, Factory $factory, Database $database) {\r\n $repository = $factory->getFilter();\r\n $transaction = $database->getTransaction()->begin(__FUNCTION__);\r\n\r\n try {\r\n $repository->delete($id);\r\n $transaction->commit(__FUNCTION__);\r\n } catch (Database\\Exception $exc) {\r\n $transaction->rollBack();\r\n throw $exc;\r\n }\r\n\r\n return true;\r\n }", "public function setFilters($filters)\n\t{\n\t\t$this->filters = $filters;\n\t}", "public function setFilter($var)\n {\n GPBUtil::checkString($var, False);\n $this->filter = $var;\n $this->has_filter = true;\n\n return $this;\n }", "public function setFilter($var)\n {\n GPBUtil::checkString($var, False);\n $this->filter = $var;\n $this->has_filter = true;\n\n return $this;\n }", "public function setDeleted() {}", "public function setFilter($filter)\n {\n if (is_array($filter)) {\n $filter = new Filter($filter);\n }\n\n if ($filter instanceof Filter) {\n $this->filter = $filter;\n\n return $this;\n }\n\n throw new InvalidArgumentException('The filter must be an instance of '.Filter::class.' or a keyed array');\n }", "public function setFilter($filter)\n {\n if($filter==self::FILTER_ALL or\n $filter==self::FILTER_ACCESSIBLE or\n $filter==self::FILTER_PUBLIC) $this->options['filter']=$filter;\n\n if($this->options['userMode']==self::USER_MODE_PUBLIC and\n !($this->options['filter']==self::FILTER_ACCESSIBLE or $this->options['filter']==self::FILTER_PUBLIC)) $this->options['filter']==self::FILTER_ACCESSIBLE;\n\n return($this->options['filter']);\n }", "private function setFilters($filters)\n {\n $this->filters = $filters;\n }", "public function setIsDeletedRecord($value) {\n $this->_deleted = $value;\n }", "public function setFilters($filters = false)\n {\n ($filters && ($this->filters = $filters));\n }", "public function setFilter($filter)\n {\n $validFilters = self::NO_FILTER |\n self::FILTER_NONE | self::FILTER_SUB |\n self::FILTER_UP | self::FILTER_AVG |\n self::FILTER_PAETH | self::ALL_FILTERS;\n\n $filter = $filter & $validFilters;\n\n $this->filter = (integer) $filter;\n\n return $this;\n }", "public function setFilterType($types) {\n $this->_filterType = $types;\n }", "public function setFilters($filters)\r\n\t{\r\n\t\t$this->_filters=$filters;\r\n\t}", "public function createFilter();", "public static function deleteByFilter(PDO $db, $filter, $and=true) {\n\t\tif (!($filter instanceof DFCInterface)) {\n\t\t\t$filter=new DFCAggregate($filter, $and);\n\t\t}\n\t\tif (0==count($filter)) {\n\t\t\tthrow new InvalidArgumentException('refusing to delete without filter'); // just comment out this line if you are brave\n\t\t}\n\t\t$sql='DELETE FROM `factuurmaand`'\n\t\t. self::buildSqlWhere($filter, $and, false, true);\n\t\t$stmt=self::prepareStatement($db, $sql);\n\t\tself::bindValuesForFilter($stmt, $filter);\n\t\t$affected=$stmt->execute();\n\t\tif (false===$affected) {\n\t\t\t$stmt->closeCursor();\n\t\t\tthrow new Exception($stmt->errorCode() . ':' . var_export($stmt->errorInfo(), true), 0);\n\t\t}\n\t\t$stmt->closeCursor();\n\t\treturn $affected;\n\t}", "public function setScopeFilter($scope);", "public function setRecordingFilter($recordingFilter)\n {\n $this->recordingFilter = $recordingFilter;\n }", "public function setFiltros($filtros)\n {\n $this->filtros = $filtros;\n }", "public function setMatchDeleted($matchDeleted)\n {\n $this->_matchDeleted = (bool) $matchDeleted;\n\n return $this;\n }", "public static function deleteByFilter(PDO $db, $filter, $and=true) {\n\t\tif (!($filter instanceof DFCInterface)) {\n\t\t\t$filter=new DFCAggregate($filter, $and);\n\t\t}\n\t\tif (0==count($filter)) {\n\t\t\tthrow new InvalidArgumentException('refusing to delete without filter'); // just comment out this line if you are brave\n\t\t}\n\t\t$sql='DELETE FROM `tchat`'\n\t\t. self::buildSqlWhere($filter, $and, false, true);\n\t\t$stmt=self::prepareStatement($db, $sql);\n\t\tself::bindValuesForFilter($stmt, $filter);\n\t\t$affected=$stmt->execute();\n\t\tif (false===$affected) {\n\t\t\t$stmt->closeCursor();\n\t\t\tthrow new Exception($stmt->errorCode() . ':' . var_export($stmt->errorInfo(), true), 0);\n\t\t}\n\t\t$stmt->closeCursor();\n\t\treturn $affected;\n\t}", "public function setIsDeleted($isDeleted)\n {\n $this->isDeleted = $isDeleted;\n return $this;\n }", "public function setIsDeleted($isDeleted)\n {\n $this->isDeleted = $isDeleted;\n return $this;\n }", "public function setIsDeleted($isDeleted)\n {\n $this->isDeleted = $isDeleted;\n return $this;\n }", "public function setIsDeleted($isDeleted)\n {\n $this->isDeleted = $isDeleted;\n return $this;\n }", "public function setIsDeleted($isDeleted)\n {\n $this->isDeleted = $isDeleted;\n return $this;\n }", "public function setIsDeleted($isDeleted)\n {\n $this->isDeleted = $isDeleted;\n return $this;\n }", "public function setIsDeleted($isDeleted)\n {\n $this->isDeleted = $isDeleted;\n return $this;\n }", "public function setAdditionalFilter($dataProvider, $filter);", "public function testSoftDeleteableFilter(): void\n {\n $filter = $this->dm->getFilterCollection()->getFilter(self::SOFT_DELETEABLE_FILTER_NAME);\n static::assertInstanceOf(SoftDeleteableFilter::class, $filter);\n $filter->disableForDocument(self::USER_CLASS);\n\n $repo = $this->dm->getRepository(self::USER_CLASS);\n\n $newUser = new User();\n $username = 'test_user';\n $newUser->setUsername($username);\n $this->dm->persist($newUser);\n $this->dm->flush();\n\n $user = $repo->findOneBy(['username' => $username]);\n\n static::assertNull($user->getDeletedAt());\n $this->dm->remove($user);\n $this->dm->flush();\n\n $user = $repo->findOneBy(['username' => $username]);\n\n static::assertNotNull($user->getDeletedAt());\n\n $filter->enableForDocument(self::USER_CLASS);\n\n $user = $repo->findOneBy(['username' => $username]);\n static::assertNull($user);\n }", "public function SetFilters (array $filters = []);", "public function setFilters( array $filters )\n {\n $this->filters = $filters;\n }", "public function addFilter(DFilter $filter) {\n\t\t$this->filters[] = $filter;\n\t}", "public function setFilter(\\FilterIterator $filter)\n\t{\n\t\t$this->filter = $filter;\n\t}", "public function removeFilter($filter)\n {\n if (strpos($filter, 'iPhorm_Filter_') === false) {\n $filter = 'iPhorm_Filter_' . ucfirst($filter);\n }\n\n if (array_key_exists($filter, $this->_filters)) {\n unset($this->_filters[$filter]);\n }\n }", "public function filterBySoftDelete($softDelete = null, $comparison = null)\n {\n if (is_array($softDelete)) {\n $useMinMax = false;\n if (isset($softDelete['min'])) {\n $this->addUsingAlias(AnakPeer::SOFT_DELETE, $softDelete['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($softDelete['max'])) {\n $this->addUsingAlias(AnakPeer::SOFT_DELETE, $softDelete['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AnakPeer::SOFT_DELETE, $softDelete, $comparison);\n }", "private function setDeleteType($deleteType) {\n if ($deleteType === null) {\n $deleteType = self::TYPE_MOVE_TO_DELETED_ITEMS;\n } else if ($deleteType != self::TYPE_HARD_DELETE && $deleteType != self::TYPE_SOFT_DELETE && $deleteType != self::TYPE_MOVE_TO_DELETED_ITEMS) {\n throw new InvalidArgumentException('Provided delete type is not valid');\n }\n\n $this->DeleteType = $deleteType;\n }", "public function set_deleted($deleted) {\n $this->deleted = $deleted ? true : false;\n }", "private function setCustomRequestDelete()\n {\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'DELETE');\n\n $this->setPostFields();\n }", "protected function configureDatagridFilters(DatagridMapper $filter): void\r\n {\r\n $filter\r\n ->add('expediente')\r\n ->add('cotizacion')\r\n ->add('personaNif')\r\n ->add('oficina')\r\n ->add('horizontal')\r\n ->add('vertical')\r\n ->add('missatge')\r\n ->add('nivel')\r\n ->add('updatedAt')\r\n ->add('createdAt')\r\n ->add('active')\r\n ->add('deleted')\r\n ->add('deletedBy')\r\n ->add('deletedAt');\r\n }", "public function setIsDeleted(bool $isDeleted): self;", "public function setIsDeleted($bool);", "public function addFilter(callable $filter);", "public function filter($filter)\n {\n }", "public function set_is_deleted( $is_deleted ) { // Declare \\Markguyver\\LivefyreImporter\\Data\\Livefyre\\Is_Deleted->set_is_deleted() function\n\t\t\t$this->is_deleted = $this->validate_boolean( $is_deleted );\n\t\t}", "public function disableDeleteClause() {}", "public function delete($deleteParam = NULL){\n $this->debugBacktrace();\n $this->queryType= \"delete\";\n $this->deleteParam = $deleteParam;\n return $this;\n }", "public function setDeleted(bool $deleted): self\n {\n\n $this->deleted = $deleted;\n\n return $this;\n\n }", "protected function setFilter($aFilter)\n {\n // Set filter stuff from configuration.\n if (true === isset($aFilter['Directory'])) {\n foreach ($aFilter['Directory'] as $sDirectory) {\n $this->oObjectFilter->addDirectoryToFilter($sDirectory);\n }\n }\n\n if (true === isset($aFilter['Files'])) {\n foreach ($aFilter['Files'] as $sFile) {\n $this->oObjectFilter->addFileToFilter($sFile);\n }\n }\n\n if (true === isset($aFilter['WhiteListDirectories'])) {\n foreach ($aFilter['WhiteListDirectories'] as $sDirectory) {\n $this->oObjectFilter->addDirectoryToWhiteList($sDirectory);\n }\n }\n\n if (true === isset($aFilter['WhiteListFiles'])) {\n foreach ($aFilter['WhiteListFiles'] as $sFile) {\n $this->oObjectFilter->addFileToWhiteList($sFile);\n }\n }\n }", "protected function setFilter($aFilter)\n {\n // Set filter stuff from configuration.\n if (true === isset($aFilter['Directory'])) {\n foreach ($aFilter['Directory'] as $sDirectory) {\n $this->oObjectFilter->addDirectoryToFilter($sDirectory);\n }\n }\n\n if (true === isset($aFilter['Files'])) {\n foreach ($aFilter['Files'] as $sFile) {\n $this->oObjectFilter->addFileToFilter($sFile);\n }\n }\n\n if (true === isset($aFilter['WhiteListDirectories'])) {\n foreach ($aFilter['WhiteListDirectories'] as $sDirectory) {\n $this->oObjectFilter->addDirectoryToWhiteList($sDirectory);\n }\n }\n\n if (true === isset($aFilter['WhiteListFiles'])) {\n foreach ($aFilter['WhiteListFiles'] as $sFile) {\n $this->oObjectFilter->addFileToWhiteList($sFile);\n }\n }\n }", "public function setFulfillmentChannelFilter($filter)\n {\n if ($filter == 'AFN' || $filter == 'MFN') {\n $this->options['FulfillmentChannel.Channel.1'] = $filter;\n } else if (is_null($filter)) {\n unset($this->options['FulfillmentChannel.Channel.1']);\n } else {\n return false;\n }\n }", "public function setFilter(Elastica_Filter_Abstract $filter)\n {\n return $this->_setFacetParam('filter', $filter->toArray());\n }", "public function setDeleted($value)\n {\n return $this->set('Deleted', $value);\n }", "public function setDeleted($deleted) {\n\t\t$this->deleted = $deleted;\n\t}" ]
[ "0.66005456", "0.5509006", "0.54547924", "0.5427314", "0.53733385", "0.5347185", "0.5263824", "0.51702267", "0.50573516", "0.50025105", "0.49644238", "0.4883031", "0.48772648", "0.48612165", "0.48581144", "0.4849801", "0.4849665", "0.4832452", "0.48290065", "0.4812893", "0.48090345", "0.48026457", "0.47929898", "0.4788941", "0.47859216", "0.47588852", "0.4744028", "0.47413576", "0.47305718", "0.47305718", "0.47305718", "0.47305718", "0.47305718", "0.47305718", "0.47305718", "0.47305718", "0.47305718", "0.47305718", "0.47305718", "0.47305718", "0.47285712", "0.4707797", "0.4707797", "0.4707797", "0.4707797", "0.4707797", "0.4707797", "0.46963966", "0.46833697", "0.46721244", "0.46721244", "0.46540338", "0.464364", "0.46361518", "0.4628068", "0.46270108", "0.46203044", "0.46042028", "0.45797402", "0.4567629", "0.45649213", "0.4556582", "0.4552432", "0.45513934", "0.4530686", "0.45275867", "0.45225924", "0.45209333", "0.45209333", "0.45209333", "0.45209333", "0.45209333", "0.45209333", "0.45209333", "0.45159736", "0.45100975", "0.45084977", "0.45079732", "0.45040086", "0.44964975", "0.4474877", "0.44741997", "0.44724533", "0.44609404", "0.4454576", "0.44539556", "0.4453529", "0.44506517", "0.44504997", "0.44490683", "0.44476685", "0.4443679", "0.44428885", "0.44235823", "0.44191447", "0.44191447", "0.44188452", "0.44185442", "0.44151968", "0.44107214" ]
0.73296773
0
Gets as filterOperationApproved Indicates that a client defined filter was either stored or deleted successfully.
public function getFilterOperationApproved() { return $this->filterOperationApproved; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setFilterOperationApproved($filterOperationApproved)\n {\n $this->filterOperationApproved = $filterOperationApproved;\n return $this;\n }", "protected function getFilterStatus()\n {\n }", "public function getApproved(Filter $filter): Collection;", "function getStatusFilter() {\n return $this->getAdditionalProperty('payment_status_filter', self::STATUS_FILTER);\n }", "public function getIsApproved()\n {\n return $this->is_approved;\n }", "public function getFilter();", "public function getFilter();", "public function getApproved()\n {\n return $this->approved;\n }", "public function getShowInFilter()\n\t{\n\t\treturn $this->showInFilter;\n\t}", "public function getFilter()\n {\n return $this->filterComposite;\n }", "public function isApproved()\n {\n return $this->approved;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilter()\n {\n return $this->filter;\n }", "public function getFilterResponse();", "public function scopeIsApproved() {\n return $this->where('state_pol', 4);\n }", "public function getFilter()\n {\n return $this->get(self::FILTER);\n }", "function getFilter() {\n\t\treturn $this->_filter;\n\t}", "function getFilter()\n\t{\n\t\treturn $this->_filter;\n\t}", "public function getFilter()\n\t{\n\t\treturn $this->filter;\n\t}", "protected function getFilter()\n {\n return $this->filter;\n }", "public function getFilter(){ }", "public function getDeleteFilter()\n {\n return $this->deleteFilter;\n }", "public static function getBitValueForApprovedStatus()\n {\n return static::getBitValue(static::APPROVED);\n }", "public function getApproved() {\n\t\treturn $this->approved == 1;\n\t}", "public function addActiveFilter()\n {\n return $this->addFieldToFilter('status', 1);\n }", "public function getFilter(): string;", "public function get_approved()\n\t{\n\t\treturn $this->approved_array;\n\t}", "function status(){\n return ($this -> is_approved())?\"Approved\":\"Unapproved\";\n }", "public function getFilter()\n {\n return($this->options['filter']);\n }", "protected function getFilter()\n {\n return $this->getSettingsValue('filter');\n }", "public function filters()\r\n {\r\n return array(\r\n 'accessControl', // perform access control for CRUD operations\r\n );\r\n }", "function getCompanyFilter() {\n return $this->getAdditionalProperty('company_filter', self::CLIENT_FILTER_ANYBODY);\n }", "public function getOnboardingFilter() {\n\n return (bool) $this->onboarding_filter;\n\n }", "public function filters()\n {\n return array( 'accessControl' ); // perform access control for CRUD operations\n }", "public function getFilter(): array\n {\n return $this->filter;\n }", "public function getFilter(): array\n {\n return $this->filter;\n }", "public function filters()\r\n\t{\r\n\t\treturn array(\r\n\t\t\t'rights', // perform access control for CRUD operations\r\n\t\t);\r\n\t}", "function was_filter_forced() {\r\n\r\n\t\treturn parent::$forced_filter;\r\n\r\n\t}", "public function getPendingApproval(Filter $filter): Collection;", "public function filters()\n\t{\n\t\treturn array(\n\t\t\t'rights', // perform access control for CRUD operations\n\t\t);\n\t}", "public function getCompositeFilter()\n {\n return $this->readOneof(1);\n }", "public function filters() \n {\n return array(\n 'accessControl', // perform access control for CRUD operations\n );\n }", "public function approved()\n {\n return $this->where('comment_approved', 1);\n }", "public function hasFilter() {\n return $this->_has(1);\n }", "public function isApproved(): bool;", "public function getFilterValue(): string;", "public function getPropertyFilter()\n {\n return $this->readOneof(2);\n }", "public function getFilters() \n {\n return $this->filters;\n }", "function setStatusFilter($value) {\n return $this->setAdditionalProperty('payment_status_filter', $value);\n }", "public static function getApprovedOptions()\n\t{\n\t\t// Build the filter options.\n\t\t$options = array();\n\t\t$options[] = Html::select('option', '0', Lang::txt('COM_MEMBERS_UNAPPROVED'));\n\t\t$options[] = Html::select('option', '1', Lang::txt('COM_MEMBERS_APPROVED_MANUALLY'));\n\t\t$options[] = Html::select('option', '2', Lang::txt('COM_MEMBERS_APPROVED_AUTOMATICALLY'));\n\n\t\treturn $options;\n\t}", "public function getFilterClass()\n {\n return 'XorAppointmentFilter';\n }", "public function isFilterable(): bool;", "public function filters()\n\t{\n\t\treturn array(\n\t\t\t'accessControl', // perform access control for CRUD operations\n\t\t);\n\t}", "public function filters()\n\t{\n\t\treturn array(\n\t\t\t'accessControl', // perform access control for CRUD operations\n\t\t);\n\t}", "public function createFilter();", "public function hasFilter(): bool;", "public function createFilter()\n\t{\n\t\treturn $this->controller->createFilter();\n\t}", "public function getFilters()\r\n {\r\n return $this->filters;\r\n }", "public function filters() {\n return array(\"accessControl\");\n }", "public function approve(Filter $filter)\n {\n return Validator::make($filter->toArray(), [\n 'title' => 'required|min:15',\n 'status' => 'in:verify',\n ]);\n\n }", "public function filters()\n {\n $filters = array(\n 'postOnly + delete',\n );\n\n return CMap::mergeArray($filters, parent::filters());\n }", "public function filters()\n {\n $filters = array(\n 'postOnly + delete',\n );\n\n return CMap::mergeArray($filters, parent::filters());\n }", "public function getFilterCapabilities()\n\t{\n\t\treturn $this->getHandler()->getFilterCapabilities();\n\t}", "protected function getFilters() {\n return $this->getUser()->getAttribute(viewLeaveEntitlementsAction::FILTERS_ATTRIBUTE_NAME, array(), 'leave');\n }", "public function isApproved()\n {\n\n return false;\n }", "function GetFilter ( )\n{\n\treturn $this->FilterExp();\n}", "protected function getFilter() {\n\t\t$conditions = $this->getConditions();\n\t\treturn $conditions;\n\t}", "public function get_filtering()\r\n\t{\r\n\t\treturn $this->filtering->get_value();\r\n\t}", "public function filterable()\n {\n return true;\n }", "function isApproved() {\n return $this->getStatus() == UserpointsTransaction::STATUS_APPROVED;\n }", "public function accepted()\n {\n return $this->_accepted;\n }", "protected function getInternalFilter()\n {\n return $this->getSettingsValue('internal_filter');\n }", "public function addOrderStatusFilter() {\r\n return $this;\r\n }", "function getDateApproved() {\n\t\treturn $this->getData('dateApproved');\n\t}", "public function getFilters();", "public function getDateFilterVisibility()\n {\n return $this->_dateFilterVisibility;\n }", "public function getFilters()\n {\n return $this->filters;\n }", "public function getFilters()\n {\n return $this->filters;\n }", "public function getFilters()\n {\n return $this->filters;\n }", "public function getFilters()\n {\n return $this->filters;\n }", "public function getFilters()\n {\n return $this->filters;\n }", "public function getFilters()\n {\n return $this->filters;\n }", "public function getFilters()\n {\n return $this->filters;\n }", "public function getFilters()\n {\n return $this->filters;\n }", "public function getFilters()\n {\n return $this->filters;\n }" ]
[ "0.6984814", "0.6470359", "0.63011914", "0.62001854", "0.5822388", "0.5698878", "0.5698878", "0.5688255", "0.5598923", "0.556423", "0.55439013", "0.55411315", "0.55411315", "0.55411315", "0.55411315", "0.55411315", "0.55411315", "0.55411315", "0.55411315", "0.55411315", "0.55411315", "0.55411315", "0.55411315", "0.55411315", "0.55411315", "0.55411315", "0.55411315", "0.55411315", "0.5533458", "0.5529508", "0.55056924", "0.5476177", "0.546064", "0.544777", "0.54443896", "0.5429404", "0.54237103", "0.5415701", "0.5321255", "0.53109956", "0.5309866", "0.52768344", "0.52247304", "0.5220441", "0.5210855", "0.51995957", "0.5179926", "0.5167756", "0.51659304", "0.5162253", "0.5162253", "0.5158172", "0.5148905", "0.5144618", "0.511712", "0.51100016", "0.51025325", "0.50994384", "0.50918055", "0.50809985", "0.5070907", "0.5052334", "0.5049419", "0.5045704", "0.50412333", "0.50399065", "0.50359225", "0.5033085", "0.5033085", "0.5026597", "0.501057", "0.4998876", "0.498934", "0.49791992", "0.4971636", "0.4970553", "0.4970553", "0.49624333", "0.4949735", "0.4945813", "0.4945206", "0.49302003", "0.49289617", "0.49285468", "0.49235797", "0.4907918", "0.48745975", "0.48707166", "0.48689532", "0.4866926", "0.48616624", "0.48610127", "0.48610127", "0.48610127", "0.48610127", "0.48610127", "0.48610127", "0.48610127", "0.48610127", "0.48610127" ]
0.838592
0
Sets a new filterOperationApproved Indicates that a client defined filter was either stored or deleted successfully.
public function setFilterOperationApproved($filterOperationApproved) { $this->filterOperationApproved = $filterOperationApproved; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFilterOperationApproved()\n {\n return $this->filterOperationApproved;\n }", "public function setApproved($approved)\n {\n $this->approved = $approved;\n\n return $this;\n }", "public function enable( FilterInterface $filter, array $config = array(), $default = NULL );", "protected function _setApprovedFlag()\n {\n $user = $this->getUser();\n\n if (!empty($user['id'])) {\n $settings = $this->getSettings();\n if ($settings['enable_listings_approval']) {\n return 0;\n }\n else if ($user['listing_approval']) {\n return 0;\n }\n }\n\n return 1;\n }", "public function setApproved($bool)\r\n {\r\n $this->isApproved = $bool;\r\n }", "function setStatusFilter($value) {\n return $this->setAdditionalProperty('payment_status_filter', $value);\n }", "public function addFilter(callable $filter);", "public function setMatchApproved(int $newMatchApproved) : void {\n\t\t// check if input is valid\n\t\tif ($newMatchApproved > 1 || $newMatchApproved < 0) {\n\t\t\tthrow(new \\RangeException(\"Match Approved Value is invalid\"));\n\t\t}\n\t\t//store new value on server\n\t\t$this->matchApproved = $newMatchApproved;\n\t}", "protected function markApproved( )\r\n {\r\n $this->_sessie->registerApproved( $this );\r\n }", "public function setIsApproved($is_approved)\n {\n $this->is_approved = $is_approved;\n\n return $this;\n }", "protected function addApproved(Builder $builder)\n {\n $builder->macro('approved', function (Builder $builder) {\n $model = $builder->getModel();\n\n $this->remove($builder, $model);\n\n $builder->where($model->getQualifiedStatusColumn(), '=', Status::APPROVED);\n\n return $builder;\n });\n }", "protected function setFilterHandler(string $operator, callable $handler): void\n {\n $this->filterHandlers[$operator] = $handler;\n }", "public function setFilter($filter){ }", "public function getApproved(Filter $filter): Collection;", "public function setFilter($arrFilter);", "public function markApproved()\n {\n $this->IsSpam = false;\n $this->Moderated = true;\n $this->write();\n $this->extend('afterMarkApproved');\n }", "protected function setFilter(callable $filter)\n {\n $this->filter = $filter;\n\n return $this;\n }", "public function setAdditionalFilter($dataProvider, $filter);", "public function callback($approved);", "public function setFilter(string $filter);", "public function addFilterCodes( \\Aimeos\\MW\\Criteria\\Iface $filter, array $codes );", "function setFilter($filter) {\n\t\t$this->_filter = $filter;\n\t}", "public function SetApproved($comment_id, $approved=1) //SD322\n {\n global $DB;\n\n if(Is_Valid_Number($comment_id, 0, 1,99999999))\n {\n $DB->result_type = MYSQL_ASSOC;\n $comment = $DB->query_first('SELECT commentid, objectid, pluginid FROM {comments}'.\n ' WHERE commentid = %d',\n $comment_id);\n if(!empty($comment['commentid']))\n {\n $DB->query(\"UPDATE {comments} SET approved = %d WHERE commentid = %d\",\n (empty($approved) ? 0 : 1), $comment_id);\n $this->UpdateCommentsCount($comment['pluginid'], $comment['objectid']);\n return true;\n }\n }\n return false;\n\n }", "public function createFilter();", "public function addFilter(ProjectFilterInterface $filter)\n {\n $this->filters[] = $filter;\n }", "function setCompanyFilter($value) {\n return $this->setAdditionalProperty('company_filter', $value);\n }", "function setDateApproved($dateApproved) {\n\t\treturn $this->setData('dateApproved', $dateApproved);\n\t}", "public function setFilter(?WorkbookFilter $value): void {\n $this->getBackingStore()->set('filter', $value);\n }", "public function setFiltersAttribute($value) {\n $this->attributes['filters'] = json_encode($value);\n }", "protected function addFilter(array $filter) {\n $this->filter = array_merge($this->filter, array_flip($filter));\n }", "public function approve( $approver )\r\n {\r\n $this->markApproved( );\r\n $this->_systemFields->setApproved( $approver );\r\n }", "public function setOnboardingFilter(bool $onboarding_filter) {\n $this->onboarding_filter = (int) $onboarding_filter;\n\n }", "function acf_enable_filters($filters = array())\n{\n}", "public function injectFilterCollectionFactory(\\Searchperience\\Api\\Client\\Domain\\Enrichment\\Filters\\FilterCollectionFactory $filterCollectionFactory) {\n\t\t$this->filterCollectionFactory = $filterCollectionFactory;\n\t}", "public function addFilter(\\NMC\\Migration\\FilterInterface $filter)\n {\n $this->filters[] = $filter;\n }", "public function addFilter($filter) {\n $this->filters[] = $filter;\n $this->rewind();\n }", "public function setFilter(BaseOperator $filter)\n {\n $this->filter = $filter;\n }", "protected function _addOrderStatusFilter($collection, $filterData) {\n return $this;\n }", "public function addTestCaseFilter(TestCaseFilter $filter): void\n {\n $this->testCaseFilters[] = $filter;\n }", "public function addFilter ($callback) {\n $this->filter = $callback;\n\n return $this;\n }", "public function setStatusAccepted()\n {\n $this->status = 'ACCEPTED';\n\n return $this;\n }", "public function approve(Filter $filter)\n {\n return Validator::make($filter->toArray(), [\n 'title' => 'required|min:15',\n 'status' => 'in:verify',\n ]);\n\n }", "public function setAssignmentFilterId(?string $value): void {\n $this->getBackingStore()->set('assignmentFilterId', $value);\n }", "public function setFilters($filters = false)\n {\n ($filters && ($this->filters = $filters));\n }", "protected function getFilterStatus()\n {\n }", "public function scopeIsApproved() {\n return $this->where('state_pol', 4);\n }", "public function setIsWorkflowFilterable($isWorkflowFilterable)\n {\n $this->isWorkflowFilterable = $isWorkflowFilterable;\n return $this;\n }", "public function SetFilters (array $filters = []);", "public function addFilters()\n {\n }", "public function addActiveFilter()\n {\n return $this->addFieldToFilter('status', 1);\n }", "public function beforeFeature($filter, $callback)\n {\n $this->hooks['feature.before'][] = array($filter, $callback);\n }", "public function setFilters($filters)\r\n\t{\r\n\t\t$this->_filters=$filters;\r\n\t}", "public function addFilter($filter) {\n\t\tif (!is_callable($filter)) {\n\t\t\tthrow new \\Exception('addFilter must be callable');\n\t\t}\n\n\t\t$this->rules[$this->rule]['filters'][] = $filter;\n\n\t\treturn $this;\n\t}", "private function setFilters($filters)\n {\n $this->filters = $filters;\n }", "public function add_filter( $hook, $callback, $priority = 10, $accepted_args = 1 ) {\n\t\t$this->filters[] = compact( 'hook', 'callback', 'priority', 'accepted_args' );\n\t}", "public function setFilters($filters)\n {\n $this->filters = $filters;\n }", "public function setIsApiFilterable($isApiFilterable)\n {\n $this->isApiFilterable = $isApiFilterable;\n return $this;\n }", "protected function setFilter(array $filter) {\n $this->filter = array_flip($filter);\n }", "function acf_set_filters($filters = array())\n{\n}", "public function testAddFilterConditionDefault(): void\n {\n // setup\n $where = [\n '1 = 2'\n ];\n unset($_GET['filter']);\n\n // test body\n $result = \\Mezon\\Filter::addFilterCondition($where);\n\n // assertions\n $this->assertEquals('1 = 2', $result[0]);\n $this->assertCount(1, $result);\n }", "function filterByStatus($value) {\n $this->setStatusFilter(self::STATUS_FILTER_SELECTED);\n $this->setAdditionalProperty('payment_status_selected', $value);\n }", "public function setProductApproval($productApproval, $product, $productData, $productId) {\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance ();\n $product = $objectManager->create ( 'Magento\\Catalog\\Model\\Product' )->load ( $productId );\n if ($productApproval == 1) {\n $product->setStatus ( 1 );\n $product->setProductApproval(1);\n \n } else {\n $product->setProductApproval ( 0 );\n $product->setStatus(2);\n }\n \n $product->save();\n }", "public function addOrderStatusFilter() {\r\n return $this;\r\n }", "public function setFilter($filter) : self\n {\n $this->initialized['filter'] = true;\n $this->filter = $filter;\n return $this;\n }", "public function setFilterable(bool $filterable=true): self;", "private static function _SetUserAsApproved(string $username): bool {\r\n \r\n $db = DbClass::getInstance();\r\n \r\n $sql = 'UPDATE users SET is_approved=1 WHERE username=:username AND is_blocked=0';\r\n $data = ['username' => $username];\r\n \r\n $result = $db->singleQueryRetResult($sql, $data);\r\n \r\n return $result;\r\n }", "public function setFilter(\\FilterIterator $filter)\n\t{\n\t\t$this->filter = $filter;\n\t}", "public static function setApprovedById($id)\n {\n \t//if (!self::isAdmin()) return redirect('/');\n \t\n \t$tearms = array(\n \t\t'isapproved' => 1\n \t);\n \tself::updateByIds($terms, array($id));\n \t\n \t//return redirect('/post/'.$id);\n }", "public function setFilter(&$var)\n {\n GPBUtil::checkMessage($var, \\Google\\Datastore\\V1beta3\\Filter::class);\n $this->filter = $var;\n }", "public function setFilters($project_id, $filters)\n {\n $this->sessionStorage->filters[$project_id] = $filters;\n }", "public function setFilters($filters)\n\t{\n\t\t$this->filters = $filters;\n\t}", "public function when(\\Closure $callback)\n {\n $this->_filter = $callback;\n\n return $this;\n }", "public function addTestCaseMethodFilter(TestCaseMethodFilter $filter): void\n {\n $this->testCaseMethodFilters[] = $filter;\n }", "public function testAddFilter()\n {\n $this->todo('stub');\n }", "public function scopeIsApproved($builder, $approved = true)\n {\n if ($approved == null) {\n return $builder;\n }\n return $builder->where('approved', $approved);\n }", "public function addFilterFactory(FilterFactoryInterface $filterFactory)\n {\n $this->factories[] = $filterFactory;\n }", "public function setFilter(Elastica_Filter_Abstract $filter)\n {\n return $this->_setFacetParam('filter', $filter->toArray());\n }", "protected function addApprove(Builder $builder)\n {\n $builder->macro('approve', function (Builder $builder, $id = null) {\n $builder->withAnyStatus();\n return $this->updateModerationStatus($builder, $id, Status::APPROVED);\n });\n }", "public function addFilter(string $name, callable $callback, int $priority = 100, int $params = 1);", "public function actionSetFilter()\n {\n $filter = $this->module->filter;\n\n //make css class for checkbox\n foreach ($filter as $key => $property) {\n if (isset($property['class'])) {\n if (is_array($property['class'])) {\n $filter[$key]['class'] = implode(' ', $property['class']);\n }\n } else {\n $filter[$key]['class'] = '';\n }\n }\n\n //set value for js ajax variable\n $useAjax = $this->module->useAjax ? 'true' : 'false';\n\n return $this->renderPartial('filter-list', ['filter' => $filter, 'useAjax' => $useAjax]);\n }", "public function edit(Filter $filter)\n {\n //\n }", "public function setFilter($filter)\n {\n $validFilters = self::NO_FILTER |\n self::FILTER_NONE | self::FILTER_SUB |\n self::FILTER_UP | self::FILTER_AVG |\n self::FILTER_PAETH | self::ALL_FILTERS;\n\n $filter = $filter & $validFilters;\n\n $this->filter = (integer) $filter;\n\n return $this;\n }", "public function setFilter(bool $filter): AssetInterface\n {\n }", "protected function setFilter($aFilter)\n {\n // Set filter stuff from configuration.\n if (true === isset($aFilter['Directory'])) {\n foreach ($aFilter['Directory'] as $sDirectory) {\n $this->oObjectFilter->addDirectoryToFilter($sDirectory);\n }\n }\n\n if (true === isset($aFilter['Files'])) {\n foreach ($aFilter['Files'] as $sFile) {\n $this->oObjectFilter->addFileToFilter($sFile);\n }\n }\n\n if (true === isset($aFilter['WhiteListDirectories'])) {\n foreach ($aFilter['WhiteListDirectories'] as $sDirectory) {\n $this->oObjectFilter->addDirectoryToWhiteList($sDirectory);\n }\n }\n\n if (true === isset($aFilter['WhiteListFiles'])) {\n foreach ($aFilter['WhiteListFiles'] as $sFile) {\n $this->oObjectFilter->addFileToWhiteList($sFile);\n }\n }\n }", "protected function setFilter($aFilter)\n {\n // Set filter stuff from configuration.\n if (true === isset($aFilter['Directory'])) {\n foreach ($aFilter['Directory'] as $sDirectory) {\n $this->oObjectFilter->addDirectoryToFilter($sDirectory);\n }\n }\n\n if (true === isset($aFilter['Files'])) {\n foreach ($aFilter['Files'] as $sFile) {\n $this->oObjectFilter->addFileToFilter($sFile);\n }\n }\n\n if (true === isset($aFilter['WhiteListDirectories'])) {\n foreach ($aFilter['WhiteListDirectories'] as $sDirectory) {\n $this->oObjectFilter->addDirectoryToWhiteList($sDirectory);\n }\n }\n\n if (true === isset($aFilter['WhiteListFiles'])) {\n foreach ($aFilter['WhiteListFiles'] as $sFile) {\n $this->oObjectFilter->addFileToWhiteList($sFile);\n }\n }\n }", "public function setAssignmentFilterType(?DeviceAndAppManagementAssignmentFilterType $value): void {\n $this->getBackingStore()->set('assignmentFilterType', $value);\n }", "public function setAssignmentFilterType(?DeviceAndAppManagementAssignmentFilterType $value): void {\n $this->getBackingStore()->set('assignmentFilterType', $value);\n }", "public function isApproved()\n {\n return $this->approved;\n }", "public function getIsApproved()\n {\n return $this->is_approved;\n }", "public function setFilter($rowId, $header = false, callable $callback = null, $data = [])\n {\n $this->config->setFilter($rowId, $header, $callback, $data);\n }", "public function setFilter($rowId, $header = false, callable $callback = null, $data = [])\n {\n if (!isset($this->filters[$header][$rowId])) {\n $this->filters[$header][$rowId] = [];\n }\n\n $filter = [\n 'callable' => $callback,\n 'data' => $data,\n ];\n\n $this->filters[$header][$rowId][] = $filter;\n }", "public function getApprovedAttribute($approved)\n {\n if ($approved == 1)\n {\n return \"<span class=\\\"label label-success\\\">Approved</span>\";\n } else {\n return \"<span class=\\\"label label-danger\\\">Declined</span>\";\n }\n }", "public function addFilterByRevoked($flag)\n {\n $this->addFilter('main_table.revoked', (int) $flag, 'public');\n return $this;\n }", "public function alm_filters_updated(){\n\t \tif( isset( $_GET[\"filter_updated\"] ) ) {\n\t\t \t$this->alm_filters_add_admin_notice('<i class=\"fa fa-check-square\" style=\"color: #46b450\";></i>&nbsp; '.__('Filter successfully updated.', 'ajax-load-more-filters'), 'success');\n\t\t }\n\t }", "public function setFilter($filter)\n {\n if($filter==self::FILTER_ALL or\n $filter==self::FILTER_ACCESSIBLE or\n $filter==self::FILTER_PUBLIC) $this->options['filter']=$filter;\n\n if($this->options['userMode']==self::USER_MODE_PUBLIC and\n !($this->options['filter']==self::FILTER_ACCESSIBLE or $this->options['filter']==self::FILTER_PUBLIC)) $this->options['filter']==self::FILTER_ACCESSIBLE;\n\n return($this->options['filter']);\n }", "function beforeFilter() {\r\n $this->Auth->mapActions(\r\n array(\r\n 'create' => array('index', 'save_api', 'setGeneralOption'),\r\n )\r\n );\r\n parent::beforeFilter();\r\n }", "public function addFilter(DFilter $filter) {\n\t\t$this->filters[] = $filter;\n\t}", "public function updateChangeApproved($changeId, $approved) {\n if ($approved == null) {\n $approved = \"NULL\";\n } else if ($approved == true) {\n $approved = \"TRUE\";\n } else {\n $approved = \"FALSE\";\n }\n\n $this->query(\"UPDATE Changes SET approved=$approved WHERE id=$changeId\");\n }", "public function testPutChangeFilterValue() {\n $data = ['nid' => 1, 'delta' => 0];\n $filter = Filter::fromArray(['test' => 'unchanged', 'type' => 'test']);\n $r1 = new Redirect(['label' => 'First', 'filters' => [$filter]] + $data);\n $r1->save();\n\n $fakenode = (object) ['nid' => 1];\n $endpoint = new Endpoint($fakenode, 0);\n\n $data = $endpoint->get();\n $data['redirects'][0]['filters'][0]['test'] = 'changed';\n $new_data = $endpoint->put($data);\n $this->assertEqual($data, $new_data);\n }", "public function setFilterField($filterField)\n {\n $this->addFilterField($filterField);\n }" ]
[ "0.62396383", "0.52762145", "0.5208865", "0.5204036", "0.52015895", "0.5195404", "0.5065239", "0.5055884", "0.50375956", "0.50305444", "0.50298804", "0.5004777", "0.50019604", "0.49949902", "0.49583828", "0.4934602", "0.49284792", "0.48539025", "0.4835113", "0.48198298", "0.47324267", "0.47289136", "0.47244123", "0.46537378", "0.46185145", "0.45960343", "0.45469016", "0.45409268", "0.4465776", "0.44518644", "0.4436614", "0.44362423", "0.4429671", "0.43948862", "0.43927923", "0.43892956", "0.43882376", "0.43863866", "0.43840906", "0.43817744", "0.4374914", "0.43701622", "0.43506986", "0.43495706", "0.43482044", "0.434717", "0.43397164", "0.4337272", "0.4325021", "0.43177617", "0.4313968", "0.43129346", "0.4308401", "0.43061537", "0.43047944", "0.43040434", "0.4294091", "0.42894796", "0.4289288", "0.42874265", "0.42750743", "0.42570382", "0.42565158", "0.4255567", "0.42493835", "0.42491797", "0.42465112", "0.42302537", "0.4228912", "0.42160055", "0.42147437", "0.42136747", "0.4197526", "0.419038", "0.41863927", "0.4184216", "0.41837603", "0.41812184", "0.41805813", "0.4179514", "0.41780865", "0.41743186", "0.41719368", "0.41701737", "0.41701737", "0.41680032", "0.41680032", "0.41671425", "0.41642487", "0.41618532", "0.41612792", "0.41592458", "0.41507486", "0.41463315", "0.4142113", "0.41401094", "0.41367257", "0.41324475", "0.41284814", "0.4126984" ]
0.7903269
0
Gets as keyFilterReference The unique key identifier of a supplier applied filter.
public function getKeyFilterReference() { return $this->keyFilterReference; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFilterKey(){\n\t\treturn $this->_filterKey;\n\t}", "public function key()\n {\n return key($this->_filters);\n }", "public static function getSelectedFilterKey(): string\n {\n return self::$selectedFilterKey;\n }", "public function onGetFilterKey_result()\n\t{\n\t\tif (!isset($this->filterKey))\n\t\t{\n\t\t\t$this->onGetFilterKey();\n\t\t}\n\t\treturn $this->filterKey;\n\t}", "public function onGetFilterKey()\n\t{\n\t\t$this->filterKey = JString::strtolower(str_ireplace('PlgFabrik_List', '', get_class($this)));\n\t\treturn $this->filterKey;\n\t}", "public function getSupplierId()\n {\n return isset($this->feedbackFields['supplier_id']) ? $this->feedbackFields['supplier_id'] : null;\n }", "public function setKeyFilterReference($keyFilterReference)\n {\n $this->keyFilterReference = $keyFilterReference;\n return $this;\n }", "public function getFieldKeyForConduit() {\n return $this->getFieldKey();\n }", "public function getReferenceKey()\n\t{\n\t\treturn $this->reference_id;\n\t}", "public function getKeyField()\n {\n $class = get_class($this);\n $parts = explode('\\\\', $class);\n $name = $parts[count($parts)-1];\n return strtolower($name) . '_id';\n }", "public function key()\n\t\t{\n\t\t\treturn key($this->source);\n\t\t}", "public function getKeyCatalogueReference()\n {\n return $this->keyCatalogueReference;\n }", "public static function key_filter($key_filter) {\n\t\t$collection = new static::$_collection_class();\n\t\t$mapred = new \\RiakMapReduce(static::client());\n\t\t$mapred->inputs = array(\n\t\t\t'bucket' => static::$_bucket_name,\n\t\t\t'key_filters' => array($key_filter)\n\t\t);\n\t\t$links = $mapred->run();\n\t\tforeach($links as $link) {\n\t\t\t$r = $link->get();\n\t\t\t$collection->push(static::from($r));\n\t\t}\n\t\treturn $collection;\n\t}", "public function getSourceKey() {\n return $this->sourceKey;\n }", "public function getKey()\n {\n return $this->getId();\n }", "public function getKeyField()\n {\n return $this->_key;\n }", "public function getIdKey();", "function SqlKeyFilter() {\n\t\treturn \"`IDXDAFTAR` = @IDXDAFTAR@\";\n\t}", "public function key()\n\t{\n\t\tif (empty($this->key) && !empty($this->definition->primary))\n\t\t{\n\t\t\t$keys = array_values(\n\t\t\t\tarray_filter(\n\t\t\t\t\tpreg_split('~[\\s,]+~', $this->definition->primary)\n\t\t\t\t)\n\t\t\t);\n\t\t\t$keys = array_map(\n\t\t\t\tfunction ($key) {\n\t\t\t\t\treturn Normalise::toVariable($key);\n\t\t\t\t},\n\t\t\t\t$keys\n\t\t\t);\n\n\t\t\t$this->key = count($keys) > 1 ? $keys : array_shift($keys);\n\t\t}\n\n\t\tif (empty($this->key) && $this->has('id'))\n\t\t{\n\t\t\t$this->key = 'id';\n\t\t}\n\n\t\treturn $this->key;\n\t}", "function SqlKeyFilter() {\n\t\treturn \"`C_EVENT_ID` = @C_EVENT_ID@\";\n\t}", "public function getResourceKey()\n {\n return $this->resourceKey;\n }", "public function getSupplier($_ID)\n {\n return $this->getUnique(\"suppliers\", $_ID);\n }", "public function getKey(): string\n {\n return $this->resque->getKey(self::KEY . $this->statistic);\n }", "public function getKey()\n {\n return $this->id;\n }", "protected function getHashKey()\n {\n return $this->getHashKeyForId($this->getId());\n }", "public function getExistenceCompareKey()\n {\n return $this->getQualifiedForeignKeyName();\n }", "public function get_key() {\n\t\treturn c27()->class2file( static::class );\n\t}", "public function getKey() {\n\t\treturn $this -> key;\n\t}", "public function get_field_key() {\n\t\treturn $this->get_field_attr( 'field_key' );\n\t}", "public function key()\n {\n return $this->getKey($this->getCursor());\n }", "public function key() {\r\n return key($this->collection);\r\n }", "public function getCandidateKey()\n {\n return $this->candidateKey;\n }", "public function key()\n {\n return key($this->collection);\n }", "public static function getKey();", "public static function getKey();", "protected function key()\n {\n $value = $this->keyVal();\n return key($value);\n }", "public function getKey()\n {\n return $this->__key;\n }", "public function getTempstoreKey();", "public function getKey()\n {\n return $this->__get(\"key\");\n }", "protected function _getKeyClassName() {}", "protected function _getKeyClassName() {}", "public function getKey()\n {\n if (is_null($this->key)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_KEY);\n if (is_null($data)) {\n return null;\n }\n $this->key = (string) $data;\n }\n\n return $this->key;\n }", "public function getKey()\n {\n if (is_null($this->key)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_KEY);\n if (is_null($data)) {\n return null;\n }\n $this->key = (string) $data;\n }\n\n return $this->key;\n }", "public function getKey()\n {\n if (is_null($this->key)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_KEY);\n if (is_null($data)) {\n return null;\n }\n $this->key = (string) $data;\n }\n\n return $this->key;\n }", "public function getIdKey()\n {\n\n if (is_null($this->idKey))\n $this->idKey = BuizCore::uniqKey();\n\n return $this->idKey;\n\n }", "public function getKey()\n {\n return $this->getAttribute($this->getKeyName());\n }", "public function getKey()\n {\n return $this->getAttribute($this->getKeyName());\n }", "public function getASupplier($supplier_id);", "public function key()\n {\n return $this->keys[$this->iterator];\n }", "function _hkm_filter_build_unique_id( $hook_name, $callback, $priority ) {\n\tif ( is_string( $callback ) ) {\n\t\treturn $callback;\n\t}\n\t \n\n\tif ( is_object( $callback ) ) {\n\t\t// Closures are currently implemented as objects.\n\t\t$callback = array( $callback, '' );\n\t} else {\n\t\t$callback = (array) $callback;\n\t}\n\n\tif ( is_object( $callback[0] ) ) {\n\t\t// Object class calling.\n\t\treturn spl_object_hash( $callback[0] ) . $callback[1];\n\t} elseif ( is_string( $callback[0] ) ) {\n\t\t// Static calling.\n\t\treturn $callback[0] . '::' . $callback[1];\n\t}\n}", "public function key() \n {\n return key($this->dispatchables);\n }", "public function key()\n {\n return key($this->entities);\n }", "public function getStoreFrontId();", "public function getCacheKey()\n {\n return md5('SprainCurrencyConverter_' . $this->getName() . $this->baseCurrency . $this->targetCurrency);\n }", "public function getKey() {}", "public function getKey() {}", "public function filterBySupplierReference($supplierReference = null, $comparison = null)\n\t{\n\t\tif (null === $comparison) {\n\t\t\tif (is_array($supplierReference)) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t} elseif (preg_match('/[\\%\\*]/', $supplierReference)) {\n\t\t\t\t$supplierReference = str_replace('*', '%', $supplierReference);\n\t\t\t\t$comparison = Criteria::LIKE;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(Oops_Db_ProductPeer::SUPPLIER_REFERENCE, $supplierReference, $comparison);\n\t}", "public function getIdentificationKey() {\n\t\tif ($this->hasIdentification() === false) {\n\t\t\tthrow new Exception('resource has no identification yet');\n\t\t}\n\t\t\n\t\treturn $this->type.'|'.$this->primaryId();\n\t}", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "final public function getContextKey() {\n if (null === $this->_context_key) {\n $chunks = explode('_', str_replace('\\\\', '_', get_class($this)), 5);\n $this->_context_key = strtolower($chunks[3]);\n }\n return strtolower($this->_context_key);\n }", "public function getKey()\n\t{\n\t\treturn $this->key;\n\t}", "public function getKey()\n\t{\n\t\treturn $this->key;\n\t}", "public function getKey()\n\t{\n\t\treturn $this->key;\n\t}", "public function getKey()\n\t{\n\t\treturn $this->key;\n\t}", "public function getKey()\n\t{\n\t\treturn $this->key;\n\t}", "public function id()\n {\n return $this->resource->getKey();\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->key;\n }" ]
[ "0.6761874", "0.6245413", "0.62109077", "0.6030534", "0.59840685", "0.58636916", "0.5846539", "0.57216066", "0.57053804", "0.5455456", "0.5313955", "0.5270656", "0.5252126", "0.52237964", "0.521088", "0.5204774", "0.51935375", "0.519162", "0.5164629", "0.5160807", "0.51568013", "0.51378644", "0.51332045", "0.5133163", "0.5132335", "0.5053736", "0.50137395", "0.5010233", "0.49958262", "0.49918067", "0.49644697", "0.49597597", "0.49394128", "0.49379197", "0.49379197", "0.49316108", "0.4925179", "0.49247628", "0.49180523", "0.49173364", "0.49173364", "0.49150056", "0.49150056", "0.49150056", "0.4906542", "0.48944327", "0.48944327", "0.4890857", "0.48893988", "0.48704073", "0.48685402", "0.48634598", "0.48588577", "0.48391482", "0.48385414", "0.48385414", "0.48368713", "0.48365852", "0.483593", "0.483593", "0.483593", "0.483593", "0.483593", "0.483593", "0.483593", "0.483593", "0.483593", "0.483593", "0.483593", "0.483593", "0.483593", "0.483593", "0.483593", "0.483593", "0.483593", "0.483593", "0.483593", "0.483593", "0.48329493", "0.48299584", "0.48299584", "0.48299584", "0.48299584", "0.48299584", "0.4828021", "0.48252895", "0.48252895", "0.48252895", "0.48252895", "0.48252895", "0.48252895", "0.48252895", "0.48252895", "0.48252895", "0.48252895", "0.48252895", "0.48252895", "0.48252895", "0.48252895", "0.48252895" ]
0.7804184
0
Sets a new keyFilterReference The unique key identifier of a supplier applied filter.
public function setKeyFilterReference($keyFilterReference) { $this->keyFilterReference = $keyFilterReference; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getKeyFilterReference()\n {\n return $this->keyFilterReference;\n }", "public function setFilterKey($key,$value,$operator='='){\n\t\t$this->_filterKey[$key] = array('value'=>$value,'operator'=>$operator);\n\t\treturn $this;\n\t}", "public static function key_filter($key_filter) {\n\t\t$collection = new static::$_collection_class();\n\t\t$mapred = new \\RiakMapReduce(static::client());\n\t\t$mapred->inputs = array(\n\t\t\t'bucket' => static::$_bucket_name,\n\t\t\t'key_filters' => array($key_filter)\n\t\t);\n\t\t$links = $mapred->run();\n\t\tforeach($links as $link) {\n\t\t\t$r = $link->get();\n\t\t\t$collection->push(static::from($r));\n\t\t}\n\t\treturn $collection;\n\t}", "public function addFilter(Swift_StreamFilter $filter, $key);", "public function setRenameKeyFilter($renameKeyFilter)\n {\n $this->renameKeyFilter = $renameKeyFilter;\n return $this;\n }", "public function getFilterKey(){\n\t\treturn $this->_filterKey;\n\t}", "public function setFilterSource($filterName, $dataSource, $key, $val, $bind = \"db\") {\r\n $this->crudFilterSource[$filterName] = array(\"dataSource\" => $dataSource,\r\n \"key\" => $key,\r\n \"val\" => $val,\r\n \"bind\" => $bind);\r\n return $this;\r\n }", "function setFilter($filter) {\n\t\t$this->_filter = $filter;\n\t}", "public function setFilter(\\FilterIterator $filter)\n\t{\n\t\t$this->filter = $filter;\n\t}", "public function init(\\Engine\\Crud\\Grid\\Filter $filter, $key)\r\n\t{\r\n\t\t$this->_gridFilter = $filter;\r\n\t\t$this->_key = $key;\r\n\t\tif ($this->_name === null) {\r\n\t\t $this->_name = $key;\r\n\t\t}\r\n $this->_init();\r\n $this->_initFilters();\r\n $this->_initHelpers();\r\n\t\t\r\n\t\treturn $this;\r\n\t}", "public function add_filter($filter, $key = NULL)\n\t{\n\t\tif (!empty($key))\n\t\t{\n\t\t\t$this->filters[$key] = $filter;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->filters[] = $filter;\n\t\t}\n\t}", "public function addFilter($keyName)\n {\n if (!$keyName instanceof Filter\\FilterInterface) {\n $keyName = new Filter($keyName);\n }\n\n $this->parameterFilters[] = $keyName;\n return $this;\n }", "public function setKeyCatalogueReference($keyCatalogueReference)\n {\n $this->keyCatalogueReference = $keyCatalogueReference;\n return $this;\n }", "public function setAssignmentFilterId(?string $value): void {\n $this->getBackingStore()->set('assignmentFilterId', $value);\n }", "public function setCacheKey($key, $cleanName = true)\n {\n if ($cleanName) {\n $key = preg_replace('/[^\\da-z]/i', '', $key);\n }\n\n if (!empty($key)) {\n $this->cacheKey = $key;\n }\n }", "public function setFilter($filter){ }", "protected static function loadSelectedFilterKey()\n {\n self::$selectedFilterKey = $GLOBALS['TSFE']->fe_user->getKey('ses', 'selectedFilterKey');\n }", "private function processFilterReference($filterReference)\n {\n foreach ($filterReference as $key => $value) {\n $this->cleanFilter($value['ref']);\n if (!isset($this->requestData['filters'][$value['ref']])) {\n unset($filterReference[$key]);\n }\n }\n return $filterReference;\n }", "public function setFilter(string $filter);", "public function setSupplierId($supplierId)\n {\n $this->feedbackFields['supplier_id'] = $supplierId;\n }", "abstract public function setPolicyKey($devId, $key);", "public function onGetFilterKey()\n\t{\n\t\t$this->filterKey = JString::strtolower(str_ireplace('PlgFabrik_List', '', get_class($this)));\n\t\treturn $this->filterKey;\n\t}", "public function setKeyField($keyField) {\n\t\t$this->keyField = $keyField;\n\t}", "protected function setFilter(callable $filter)\n {\n $this->filter = $filter;\n\n return $this;\n }", "public function setKey($key)\n {\n $this->_key = $key;\n return $this;\n }", "public function setIdKey($idKey);", "public function filterBySupplierReference($supplierReference = null, $comparison = null)\n\t{\n\t\tif (null === $comparison) {\n\t\t\tif (is_array($supplierReference)) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t} elseif (preg_match('/[\\%\\*]/', $supplierReference)) {\n\t\t\t\t$supplierReference = str_replace('*', '%', $supplierReference);\n\t\t\t\t$comparison = Criteria::LIKE;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(Oops_Db_ProductPeer::SUPPLIER_REFERENCE, $supplierReference, $comparison);\n\t}", "public function setKey($key);", "public function removeFilter($key);", "public function setKey($var)\n {\n GPBUtil::checkString($var, True);\n $this->key = $var;\n\n return $this;\n }", "public function setKey($var)\n {\n GPBUtil::checkString($var, True);\n $this->key = $var;\n\n return $this;\n }", "public function setKey($var)\n {\n GPBUtil::checkString($var, True);\n $this->key = $var;\n\n return $this;\n }", "public function setKey($var)\n {\n GPBUtil::checkString($var, True);\n $this->key = $var;\n\n return $this;\n }", "public function assignRef($key, &$val='', $filter=JResearchFilter::NO_FILTER, array $config=array())\r\n {\r\n switch($filter)\r\n {\r\n case JResearchFilter::URL_ENCODE:\r\n $this->_filterUrlEncode($val);\r\n break;\r\n case JResearchFilter::HTML_ENTITIES:\r\n $this->_filterHtmlEntities($val);\r\n break;\r\n case JResearchFilter::OBJECT_XHTML_SAFE:\r\n $this->_filterObjectXHtmlSafe($val, $config);\r\n break;\r\n \r\n case JResearchFilter::ARRAY_OBJECT_XHTML_SAFE:\r\n \tif(is_array($val))\r\n \t\t$this->_filterArrayObjectXHtmlSafe($val, $config);\r\n \tbreak;\r\n \r\n case JResearchFilter::NO_FILTER:\r\n default:\r\n break;\r\n }\r\n \r\n return parent::assignRef($key, $val);\r\n }", "public function addFilters($keyNames)\n {\n array_map(array($this, 'addFilter'), $keyNames);\n\n return $this;\n }", "public function attachFilter($name = '', $filter) {\n $this->filters[$name] = new $filter;\n }", "public function setKey($var)\n {\n GPBUtil::checkString($var, False);\n $this->key = $var;\n\n return $this;\n }", "public function setKey($var)\n {\n GPBUtil::checkString($var, False);\n $this->key = $var;\n\n return $this;\n }", "public function setKey($var)\n {\n GPBUtil::checkString($var, False);\n $this->key = $var;\n\n return $this;\n }", "public function setFilenameFilter(FilterInterface $filter)\n {\n $this->filenameFilter = $filter;\n\n return $this;\n }", "public function setFilter($filter) : self\n {\n $this->initialized['filter'] = true;\n $this->filter = $filter;\n return $this;\n }", "public function setCacheKey(string $key): void;", "public function setFilter(Zend_Filter_Interface $filter)\n\t{\n\t\tself::$_filter = $filter;\n\t\treturn $this;\n\t}", "public function setKeyName($key);", "protected function setHashIndexKey(): void\n {\n $this->hashIndexKey = $this->index . (empty($this->indexType)\n ? self::HASH_INDEX_GLUE\n : (self::HASH_INDEX_GLUE . $this->indexType . self::HASH_INDEX_GLUE));\n }", "public function testFacetSourceFilterKeyOverride() {\n $facet_source = new FacetSource(['filter_key' => 'ab'], 'facets_facet_source');\n\n // Override the container with the new facet source.\n $storage = $this->createMock(EntityStorageInterface::class);\n $storage->expects($this->once())\n ->method('load')\n ->willReturn($facet_source);\n $em = $this->getMockBuilder(EntityTypeManagerInterface::class)\n ->disableOriginalConstructor()\n ->getMock();\n $em->expects($this->any())\n ->method('getStorage')\n ->willReturn($storage);\n\n $container = \\Drupal::getContainer();\n $container->set('entity_type.manager', $em);\n \\Drupal::setContainer($container);\n\n $facet = new Facet([], 'facets_facet');\n $facet->setFieldIdentifier('test');\n $facet->setFacetSourceId('facet_source__dummy');\n $facet->setUrlAlias('test');\n\n $request = new Request();\n $request->query->set('ab', []);\n\n $this->processor = new QueryString(['facet' => $facet], 'query_string', [], $request, $this->entityManager, $this->eventDispatcher, $this->urlGenerator);\n $results = $this->processor->buildUrls($facet, $this->originalResults);\n\n /** @var \\Drupal\\facets\\Result\\ResultInterface $r */\n foreach ($results as $r) {\n $this->assertInstanceOf(ResultInterface::class, $r);\n $this->assertEquals('route:test?ab%5B0%5D=test%3A' . $r->getRawValue(), $r->getUrl()->toUriString());\n }\n }", "public function setKey($key)\n {\n $this->_key = $key;\n }", "public function setClientKey($aCid, $aClientKey = '') {\n $lCid = intval($aCid);\n //update content\n if(!empty($aClientKey)) {\n $lSql = 'SELECT count(*) FROM `al_cms_ref_product` WHERE `content_id`='.esc($lCid).' AND `client_key`='.esc($aClientKey);\n $lCount = CCor_Qry::getInt($lSql);\n if($lCount < 1) { // insert reference\n $lSql = 'INSERT INTO `al_cms_ref_product` (`mand`, `content_id`, `client_key`) VALUES ('.intval(MID).', '.esc($lCid).', '.esc($aClientKey).')';\n CCor_Qry::exec($lSql);\n }\n }\n }", "public function setRecordingFilter($recordingFilter)\n {\n $this->recordingFilter = $recordingFilter;\n }", "public function setInputFilter(InputFilterInterface $inputFilter) {\r\n $this->_inputFilter = $inputFilter;\r\n }", "function SqlKeyFilter() {\n\t\treturn \"`IDXDAFTAR` = @IDXDAFTAR@\";\n\t}", "public function setKey(\\SetaPDF_Core_Type_Name $key) {}", "public static function setKey($key){\n\t\tself::$_key = $key;\n\t}", "public function setKey(string $key);", "public function setFilterByLineRef($filterByLineRef)\n {\n $this->filterByLineRef = $filterByLineRef;\n return $this;\n }", "protected function initFilter($key = '')\n {\n $filter = array();\n $clearCache = isset($this->piVars['clear_cache']) ? $this->piVars['clear_cache'] : GeneralUtility::_GP('clear_cache');\n // If cache is not cleared, retrieve cached filter\n if (empty($clearCache)) {\n if (empty($key)) {\n $key = 'default';\n }\n $cacheKey = $this->prefixId . '_filterCache_' . $key . '_' . $this->cObj->data['uid'] . '_' . $GLOBALS['TSFE']->id;\n $cache = $GLOBALS['TSFE']->fe_user->getKey('ses', $cacheKey);\n if (isset($cache)) {\n $filter = $cache;\n }\n }\n // Declare hook for extending the initialisation of the filter\n if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey]['extendInitFilter'])) {\n foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey]['extendInitFilter'] as $className) {\n $hookObject = GeneralUtility::getUserObj($className);\n $filter = $hookObject->extendInitFilter($filter, $this);\n }\n }\n return $filter;\n }", "public function setKey( $key )\r\n {\r\n $this->key = $key;\r\n }", "private function setRateLimiterKey()\n {\n $this->rateLimiterKey = sha1($this->formRequestClass . request()->ip());\n }", "public function setKey($var)\n {\n GPBUtil::checkInt64($var);\n $this->key = $var;\n\n return $this;\n }", "public function setKey($key = null) {\n\t\t$this->_key = $key;\n\t\treturn $this;\n\t}", "public function filterByKeyId($keyId = null, $comparison = null)\n {\n if (is_array($keyId)) {\n $useMinMax = false;\n if (isset($keyId['min'])) {\n $this->addUsingAlias(TranslationContentPeer::KEY_ID, $keyId['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($keyId['max'])) {\n $this->addUsingAlias(TranslationContentPeer::KEY_ID, $keyId['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(TranslationContentPeer::KEY_ID, $keyId, $comparison);\n }", "function setKey($key)\r\n {\r\n $this->key = $key;\r\n $this->changed = true;\r\n }", "public function addElasticaFilter($elasticaFilter, $key = null)\n {\n $key or $key = static::$elasticType;\n\n $this->elasticaFilters[$key] = $elasticaFilter;\n }", "public function reference_filter($expr)\n\t{\n\t\t$this->reference_filter = $expr;\n\t\treturn $this;\n\t}", "public function __construct(FilterInterface $filter)\n {\n $this->filter = $filter;\n $this->listIdentifier = $filter->getListIdentifier();\n }", "public function onGetFilterKey_result()\n\t{\n\t\tif (!isset($this->filterKey))\n\t\t{\n\t\t\t$this->onGetFilterKey();\n\t\t}\n\t\treturn $this->filterKey;\n\t}", "public function setReferenceKey(?string $value): void {\n $this->getBackingStore()->set('referenceKey', $value);\n }", "public function setKey($key)\n {\n $this->key = $key;\n return $this;\n }", "public function setReferenceId(?string $referenceId): void\n {\n $this->referenceId['value'] = $referenceId;\n }", "public function saveReference($key = null)\n {\n if (!is_null($this->hookReference)) {\n $this->hookReference->saveReference($key);\n $this->hookReference = null;\n return $this;\n }\n\n throw new \\Exception(\n 'No reference is available. Call this method only after you add any action/filter/ajax hook.'\n );\n }", "public function injectFilterCollectionFactory(\\Searchperience\\Api\\Client\\Domain\\Enrichment\\Filters\\FilterCollectionFactory $filterCollectionFactory) {\n\t\t$this->filterCollectionFactory = $filterCollectionFactory;\n\t}", "private function setIndexFilter($userId, $filter)\n {\n // There can only be one\n $this->removeIndexFilter($userId);\n\n // and actually add the index filter\n $filter['filtertype'] = 'index_filter';\n $this->_daoFactory->getUserFilterDao()->addFilter($userId, $filter);\n }", "public function setKey($key)\n {\n $this->key = $key;\n }", "public function setKey($key)\n {\n $this->key = $key;\n }", "public function setKey($key)\n {\n $this->key = $key;\n }", "public function useKey(string $key)\n {\n $this->key = $key;\n }", "function _activateFilterLevel( $objKey )\n {\n// FIXXME all filters that get registered before $tpl->setOption('filterLevel',x) will be lost !!!!\n// because of the following line!!!\n $this->_objectPool[$objKey]->unregisterFilter();\n $filterLevel = $this->_objectPool[$objKey]->getOption('filterLevel');\n if( $filterLevel > 0 )\n {\n require_once('HTML/Template/Xipe/Filter/TagLib.php');\n // pass the options used in the template class, so we set the same delimiters in the filter\n $tagLib = new HTML_Template_Xipe_Filter_TagLib($this->_objectPool[$objKey]->getOptions());\n $this->_objectPool[$objKey]->registerPrefilter(array(&$tagLib,'allPrefilters'),$filterLevel);\n\n require_once('HTML/Template/Xipe/Filter/Basic.php');\n $tplFilter = new HTML_Template_Xipe_Filter_Basic($this->_objectPool[$objKey]->getOptions());\n $this->_objectPool[$objKey]->registerPrefilter(array(&$tplFilter,'allPrefilters'),$filterLevel);\n $this->_objectPool[$objKey]->registerPostfilter(array(&$tplFilter,'allPostfilters'),$filterLevel);\n }\n }", "public function setWhereParameter($key, $value)\n {\n foreach ($this->filters as $filter) {\n if ($filter->hasParameter($key)) {\n $filter->setParameter($key, $value);\n }\n }\n }", "function SqlKeyFilter() {\n\t\treturn \"`C_EVENT_ID` = @C_EVENT_ID@\";\n\t}", "public function setPermissionSetId(?string $permissionSetId) : self\n {\n $this->initialized['permissionSetId'] = true;\n $this->permissionSetId = $permissionSetId;\n return $this;\n }", "public function addFilter(callable $filter);", "public function filterByIdSupplier($idSupplier = null, $comparison = null)\n\t{\n\t\tif (is_array($idSupplier)) {\n\t\t\t$useMinMax = false;\n\t\t\tif (isset($idSupplier['min'])) {\n\t\t\t\t$this->addUsingAlias(Oops_Db_ProductPeer::ID_SUPPLIER, $idSupplier['min'], Criteria::GREATER_EQUAL);\n\t\t\t\t$useMinMax = true;\n\t\t\t}\n\t\t\tif (isset($idSupplier['max'])) {\n\t\t\t\t$this->addUsingAlias(Oops_Db_ProductPeer::ID_SUPPLIER, $idSupplier['max'], Criteria::LESS_EQUAL);\n\t\t\t\t$useMinMax = true;\n\t\t\t}\n\t\t\tif ($useMinMax) {\n\t\t\t\treturn $this;\n\t\t\t}\n\t\t\tif (null === $comparison) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(Oops_Db_ProductPeer::ID_SUPPLIER, $idSupplier, $comparison);\n\t}", "function setFilename($key);", "public function setFileKey($fileKey = null)\n {\n // validation for constraint: string\n if (!is_null($fileKey) && !is_string($fileKey)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value, please provide a string, \"%s\" given', gettype($fileKey)), __LINE__);\n }\n if (is_null($fileKey) || (is_array($fileKey) && empty($fileKey))) {\n unset($this->FileKey);\n } else {\n $this->FileKey = $fileKey;\n }\n return $this;\n }", "private function _filter (Refiner $refiner) {\n\t\tif (isset ($this->_min) || isset ($this->_max))\n\t\t\t$refiner = new Refiner\\Filter ($refiner, new Filter\\Between ($this->_min, $this->_max));\n\n\n\t\tif (isset ($this->_totalMin) || isset ($this->_totalMax)) {\n\t\t\t$refiner = new Refiner\\Cache ($refiner);\n\t\t\t$filtered = new Refiner\\Filter (new Refiner\\Total ($refiner), new Filter\\Between ($this->_totalMin, $this->_totalMax));\n\n\t\t\t$fstamps = $filtered->getStamps ();\n\t\t\t$ids = array ();\n\n\t\t\t/* Figures out a list of stamp->id regardingly to the result of the filtration of the Total refiner */\n\t\t\tfor ($t = 0, $tc = count ($fstamps); $t < $tc; ++$t) {\n\t\t\t\t$ids[] = array ();\n\n\t\t\t\tfor ($i = 0, $c = count ($fstamps[$t]); $i < $c; ++$i)\n\t\t\t\t\t$ids[$t][$fstamps[$t][$i]->id] = true;\n\t\t\t}\n\n\t\t\t/* Makes a new filter by stamp->id for each thread of stamps (each dial produces it's own thread of stamps) */\n\t\t\tfor ($t = 0, $c = count ($ids); $t < $c; ++$t) {\n\t\t\t\t$refiner = new Refiner\\Filter ($refiner, new Filter\\Closure (null, function ($stamps) use ($ids, $t) {\n\t\t\t\t\t$result = array ();\n\t\t\t\t\tfor ($i = 0, $c = count ($stamps); $i < $c; ++$i) {\n\t\t\t\t\t\tif (isset ($ids[$t][$stamps[$i]->id]))\n\t\t\t\t\t\t\t$result[] = $stamps[$i];\n\t\t\t\t\t}\n\t\t\t\t\treturn $result;\n\t\t\t\t}), $t);\n\t\t\t}\n\t\t}\n\n\t\treturn $refiner;\n\t}", "public function setKey($key)\n {\n $this->key = $key;\n\n return $this;\n }", "public function setKey($key)\n {\n $this->key = $key;\n\n return $this;\n }", "public function setKey($key)\n {\n $this->key = $key;\n\n return $this;\n }", "public function registerFilter(Chainr_Filter $filter) {\n\t\t$this->filterChain->register($filter);\n\t}", "public function setKey($key)\n\t{\n\t\t$this->key = $key;\n\t}", "public function setKey($key)\n\t{\n\t\t$this->key = $key;\n\t}", "public function setKey($key)\n\t{\n\t\t$this->key = $key;\n\t}", "public function setAssocKey($fieldName)\n {\n \t$this->_assocKey = $fieldName;\n \treturn $this;\n }", "public function setFilter($filter)\n {\n $filters = array();\n parse_str($filter, $filters);\n foreach ($filters as $key => $val) {\n $this->addFilter($key, $val);\n }\n \n return $this;\n }", "public function setFilter($arrFilter);", "public function setCHashKeyFun(ModuleFunction $cHashKeyFun) {}", "protected function setFilterArray() {\n $primary_keys = getPrimaryKeys($this->table_name);\n foreach ($primary_keys as $pk) {\n if (isset($_GET[$pk])) {\n $this->filter[$pk] = Mysql::SQLValue($_GET[$pk]);\n }\n }\n }", "public function __construct(string $strKey)\r\n {\r\n $this->strKey = $strKey;\r\n }", "function _setAllFilters( $objKey )\n {\n $this->_activateFilterLevel($objKey);\n\n // add all pre and post filters, dont use references here, so the filters are each an instance of its own\n // this is necessary since the options might be changed by any xml-config!\n if( sizeof($this->_preFilters) )\n foreach( $this->_preFilters as $aFilter )\n $this->_objectPool[$objKey]->registerPrefilter($aFilter[0],$aFilter[1]);\n if( sizeof($this->_postFilters) )\n foreach( $this->_postFilters as $aFilter )\n $this->_objectPool[$objKey]->registerPostfilter($aFilter[0],$aFilter[1]);\n }", "public function provider($key);" ]
[ "0.63166285", "0.598563", "0.58239126", "0.5715501", "0.5542207", "0.5518431", "0.54787844", "0.5218697", "0.5175748", "0.5174462", "0.5164177", "0.51517725", "0.5140545", "0.5136364", "0.5038275", "0.5032707", "0.5028099", "0.50257206", "0.49938095", "0.4960543", "0.4957798", "0.49044818", "0.48697075", "0.48683786", "0.4827643", "0.47819313", "0.4777094", "0.47693726", "0.4754448", "0.47492987", "0.47492987", "0.47492987", "0.47492987", "0.47453117", "0.47392207", "0.4724706", "0.47203276", "0.47203276", "0.47203276", "0.47177553", "0.4711376", "0.47090802", "0.46871927", "0.46707395", "0.4667661", "0.46660718", "0.46560875", "0.46419412", "0.46316054", "0.46178645", "0.45953277", "0.45902535", "0.45727026", "0.45718852", "0.4562657", "0.45439863", "0.45395133", "0.45258865", "0.45239046", "0.4523417", "0.45152813", "0.451235", "0.45043647", "0.4502746", "0.45011875", "0.44996655", "0.44956297", "0.44912255", "0.44856316", "0.44833288", "0.448295", "0.44810063", "0.44806817", "0.44806817", "0.44806817", "0.4478524", "0.44712642", "0.4466743", "0.44661382", "0.44660836", "0.44577459", "0.44533703", "0.444793", "0.44335935", "0.4425895", "0.4419351", "0.4419351", "0.4419351", "0.4418415", "0.44168255", "0.44168255", "0.44168255", "0.4401876", "0.44018224", "0.43991798", "0.43903923", "0.43875965", "0.4387263", "0.4381182", "0.43778327" ]
0.7481508
0
Sets a new filterReferenceExtension
public function setFilterReferenceExtension(\Calcinai\Siri\Objects\Datex\ExtensionType $filterReferenceExtension) { $this->filterReferenceExtension = $filterReferenceExtension; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setFilter($filter){ }", "public function setFilter($extension, $filterName)\n\t{\n\t\tif (isset($this->filters[$extension]) && in_array($filterName, $this->filters[$extension])) {\n\t\t\treturn $this;\n\t\t}\n\t\t$this->filters[$extension][] = $filterName;\n\t\treturn $this;\n\t}", "public function reference_filter($expr)\n\t{\n\t\t$this->reference_filter = $expr;\n\t\treturn $this;\n\t}", "public function attachFilter($name = '', $filter) {\n $this->filters[$name] = new $filter;\n }", "function setFilter($filter) {\n\t\t$this->_filter = $filter;\n\t}", "protected function addReference()\n {\n $this->add(array(\n 'name' => 'reference',\n 'required' => true,\n 'filters' => array(\n array('name' => 'Zend\\Filter\\HtmlEntities'),\n array('name' => 'Zend\\Filter\\StringTrim'),\n array('name' => 'Zend\\Filter\\StripTags'),\n ),\n ));\n \n return $this;\n }", "public function setFilter(string $filter);", "public function setFilter($filter) : self\n {\n $this->initialized['filter'] = true;\n $this->filter = $filter;\n return $this;\n }", "public function setAdditionalFilter($dataProvider, $filter);", "public function addFilter(callable $filter);", "protected function setFilter(callable $filter)\n {\n $this->filter = $filter;\n\n return $this;\n }", "public function attachDefaultFilters() {\n\n /**\n * It's possible to extend what filters the content is subjected to.\n * By default, this is a URL filter, and a PATH filter. Other filters\n * can be implemented and attached if other conversions are also required.\n */\n $this->attachFilter('URL', 'TigerfishDTLReplaceHrefAndSrc');\n $this->filters['URL']->from($this->fromValue);\n $this->filters['URL']->to($this->toValue);\n $this->filters['URL']->relative($this->relative);\n $this->filters['URL']->https($this->https);\n $this->filters['URL']->debugMode($this->debug);\n\n $this->attachFilter('PATH', 'TigerfishDTLReplacePaths');\n $this->filters['PATH']->from($this->fromValue);\n $this->filters['PATH']->to($this->toValue);\n $this->filters['PATH']->relative($this->relative);\n $this->filters['PATH']->https($this->https);\n $this->filters['PATH']->debugMode($this->debug);\n\n }", "public function setExtension(?IExtension $extension): void\n {\n $this->extension = $extension;\n }", "public function setKeyFilterReference($keyFilterReference)\n {\n $this->keyFilterReference = $keyFilterReference;\n return $this;\n }", "public function setFilter(Zend_Filter_Interface $filter)\n\t{\n\t\tself::$_filter = $filter;\n\t\treturn $this;\n\t}", "public function setFilter($arrFilter);", "public function setFilter(\\FilterIterator $filter)\n\t{\n\t\t$this->filter = $filter;\n\t}", "public function setScopeFilter($scope);", "public function setFilter($filter)\n {\n $filters = array();\n parse_str($filter, $filters);\n foreach ($filters as $key => $val) {\n $this->addFilter($key, $val);\n }\n \n return $this;\n }", "public function setFilter($filter)\n {\n $this->filter = $filter;\n\n return $this;\n }", "public function setFilter(?WorkbookFilter $value): void {\n $this->getBackingStore()->set('filter', $value);\n }", "public function setFilter(BaseOperator $filter)\n {\n $this->filter = $filter;\n }", "function mgd_register_filter($name, $function)\n{\n $GLOBALS['midgard_filters'][\"x{$name}\"] = $function;\n}", "public function setExtension(array $extension)\n {\n $this->extension = $extension;\n return $this;\n }", "public function setExtension(array $extension)\n {\n $this->extension = $extension;\n return $this;\n }", "public function setExtension(array $extension)\n {\n $this->extension = $extension;\n return $this;\n }", "function setFilter($f) {\n\t\tif (!is_subclass_of($f, \"\\Library\\Database\\LinqEquality\")) {\n\t\t\tthrow new DBException(\"Must be a LINQ Equality\");\n\t\t} else {\n\t\t\t$f->setName(trim($this->getTable(),\"`\"));\n\t\t\t$this->filter = $f;\n\t\t}\n\t\treturn $this;\n\t}", "public function setFilter(bool $filter): AssetInterface\n {\n }", "public function assignRef($key, &$val='', $filter=JResearchFilter::NO_FILTER, array $config=array())\r\n {\r\n switch($filter)\r\n {\r\n case JResearchFilter::URL_ENCODE:\r\n $this->_filterUrlEncode($val);\r\n break;\r\n case JResearchFilter::HTML_ENTITIES:\r\n $this->_filterHtmlEntities($val);\r\n break;\r\n case JResearchFilter::OBJECT_XHTML_SAFE:\r\n $this->_filterObjectXHtmlSafe($val, $config);\r\n break;\r\n \r\n case JResearchFilter::ARRAY_OBJECT_XHTML_SAFE:\r\n \tif(is_array($val))\r\n \t\t$this->_filterArrayObjectXHtmlSafe($val, $config);\r\n \tbreak;\r\n \r\n case JResearchFilter::NO_FILTER:\r\n default:\r\n break;\r\n }\r\n \r\n return parent::assignRef($key, $val);\r\n }", "function acf_set_filters($filters = array())\n{\n}", "public function setExtensionAttributes(\n \\Magento\\InventorySourceSelectionApi\\Api\\Data\\ItemRequestExtensionInterface $extensionAttributes\n ): void;", "public function setFilters()\n {\n if (class_exists('Twig_SimpleFilter')) {\n $class = 'Twig_SimpleFilter';\n } else {\n $class = 'Twig\\TwigFilter';\n }\n\n $filter_merge_str = new $class('merge_str', function ($attrs, array $options = array()) {\n $key = $options[0];\n $value = $options[1];\n\n if (array_key_exists($key, $attrs)) {\n $attrs[$key] = implode(' ', [$value, $attrs[$key]]);\n } else {\n $attrs[$key] = $value;\n }\n\n return $attrs;\n }, array('is_variadic' => true));\n\n $this->twig->addFilter($filter_merge_str);\n }", "public function filter ($filter, array $options=[])\n {\n $this->filters[$filter] = $options;\n return $this;\n }", "public function addFilter($filter) {\n $this->filters[] = $filter;\n $this->rewind();\n }", "public function setFiltersAttribute($value) {\n $this->attributes['filters'] = json_encode($value);\n }", "public function registerFilter(Chainr_Filter $filter) {\n\t\t$this->filterChain->register($filter);\n\t}", "public function addFilters()\n {\n }", "function SetDefaultExtFilter(&$fld, $so1, $sv1, $sc, $so2, $sv2) {\n\t\t$fld->DefaultSearchValue = $sv1; // Default ext filter value 1\n\t\t$fld->DefaultSearchValue2 = $sv2; // Default ext filter value 2 (if operator 2 is enabled)\n\t\t$fld->DefaultSearchOperator = $so1; // Default search operator 1\n\t\t$fld->DefaultSearchOperator2 = $so2; // Default search operator 2 (if operator 2 is enabled)\n\t\t$fld->DefaultSearchCondition = $sc; // Default search condition (if operator 2 is enabled)\n\t}", "function SetDefaultExtFilter(&$fld, $so1, $sv1, $sc, $so2, $sv2) {\n\t\t$fld->DefaultSearchValue = $sv1; // Default ext filter value 1\n\t\t$fld->DefaultSearchValue2 = $sv2; // Default ext filter value 2 (if operator 2 is enabled)\n\t\t$fld->DefaultSearchOperator = $so1; // Default search operator 1\n\t\t$fld->DefaultSearchOperator2 = $so2; // Default search operator 2 (if operator 2 is enabled)\n\t\t$fld->DefaultSearchCondition = $sc; // Default search condition (if operator 2 is enabled)\n\t}", "public function enable( FilterInterface $filter, array $config = array(), $default = NULL );", "protected function registerFilterChain()\n\t{\n\t\t//filters\n\t\t$this->filters['deserial'] = 'deserializationFilter';\n\t\t$this->filters['batch'] = 'batchProcessFilter';\n\t\t$this->filters['serialize'] = 'serializationFilter';\n\t}", "private function setFilter()\n\t{\n\t\t// get filter values\n\t\t$this->filter['language'] = ($this->getParameter('language', 'array') != '') ? $this->getParameter('language', 'array') : BL::getWorkingLanguage();\n\t\t$this->filter['application'] = $this->getParameter('application');\n\t\t$this->filter['module'] = $this->getParameter('module');\n\t\t$this->filter['type'] = $this->getParameter('type', 'array');\n\t\t$this->filter['name'] = $this->getParameter('name');\n\t\t$this->filter['value'] = $this->getParameter('value');\n\n\t\t// build query for filter\n\t\t$this->filterQuery = BackendLocaleModel::buildURLQueryByFilter($this->filter);\n\t}", "public function register_filters() {\n\n\t\t}", "function modify_filters ($filter,$mods) \n{ \n $new_filter = array_merge($filter,$mods);\n return $new_filter;\n}", "protected function addFilter(array $filter) {\n $this->filter = array_merge($this->filter, array_flip($filter));\n }", "public function filter($filter)\n {\n $this->data['filter'] = $filter;\n\n return $this;\n }", "public function setExtension($ext);", "public function addFilter($type, $value);", "public function addFilter ($callback) {\n $this->filter = $callback;\n\n return $this;\n }", "public function setExtensionAttributes(\n \\Magento\\CompanyCredit\\Api\\Data\\CreditLimitExtensionInterface $extensionAttributes\n );", "protected function setFilter(array $filter) {\n $this->filter = array_flip($filter);\n }", "public function addFilter($filter) {\n\t\tif (!is_callable($filter)) {\n\t\t\tthrow new \\Exception('addFilter must be callable');\n\t\t}\n\n\t\t$this->rules[$this->rule]['filters'][] = $filter;\n\n\t\treturn $this;\n\t}", "public function setFilter($filter)\n {\n if (is_array($filter)) {\n $filter = new Filter($filter);\n }\n\n if ($filter instanceof Filter) {\n $this->filter = $filter;\n\n return $this;\n }\n\n throw new InvalidArgumentException('The filter must be an instance of '.Filter::class.' or a keyed array');\n }", "public function setFilenameFilter(FilterInterface $filter)\n {\n $this->filenameFilter = $filter;\n\n return $this;\n }", "public function setExtensionAttributes(\n \\Pugnet\\Weather\\Api\\Data\\WeatherExtensionInterface $extensionAttributes\n );", "public function __construct() {\n parent::__construct();\n $this->setOdataType('#microsoft.graph.extensionProperty');\n }", "protected function assignExtensionSettings() {}", "public function setExtensionAttributes(\n \\Affinity\\Catalogue\\Api\\Data\\CatalogueExtensionInterface $extensionAttributes\n );", "public function setExtensionAttributes(\\Magento\\Tax\\Api\\Data\\AppliedTaxExtensionInterface $extensionAttributes);", "public function setExtension($name, $list=array());", "public function addFilter(\\NMC\\Migration\\FilterInterface $filter)\n {\n $this->filters[] = $filter;\n }", "function filter(){\r\n\r\n return new BFilter();\r\n\r\n}", "function register($metatype, callable $filefilter) {\n\t\tstatic::$filefilters[$metatype] = $filefilter;\n\t}", "public function SetFilters (array $filters = []);", "public function __set($name, $value) \r\n {\r\n $this->filterFields[$name] = $value;\r\n }", "public function createFilter();", "public function configureReplicationFilter() {\n $filter['field_channel'] = [\n // Food.\n 'e4da9222-c270-43b7-abb9-2f83b1ad8716',\n ];\n $filter['field_tags'] = [\n // Quantum.\n '92af4c88-0b17-41be-b6d8-306766ae3377',\n // Cuba.\n '02c8cbd9-15b7-4231-b9ef-46c1ef37b233',\n ];\n\n Drupal::configFactory()\n ->getEditable('replication.replication_settings.contentpool')\n ->set('parameters.filter', $filter)\n ->save();\n }", "public function setExtension(string $extension): LoaderInterface\n {\n $this->extension = $extension;\n\n return $this;\n }", "function add_filters()\n {\n }", "function setFileFilter($regularExpression) {\n return $this;\n }", "protected function addFilter ()\n {\n global $database;\n\n if (defined('LEPTON_VERSION')) {\n // register the filter at LEPTON outputInterface\n if (! file_exists(WB_PATH . '/modules/output_interface/output_interface.php')) {\n throw new \\Exception('Missing LEPTON outputInterface, can\\'t register the kitFramework filter - installation is not complete!');\n } else {\n if (! function_exists('register_output_filter'))\n include_once (WB_PATH . '/modules/output_interface/output_interface.php');\n register_output_filter('kit_framework', 'kitFramework');\n }\n }\n elseif (defined('CAT_VERSION')) {\n // register the filter at the blackcatFilter\n require_once CAT_PATH.'/modules/blackcatFilter/filter.php';\n // first unregister to prevent trouble at re-install\n unregister_filter('kitCommands', 'kit_framework');\n // register the filter\n register_filter('kitCommands', 'kit_framework', 'Enable the usage of kitCommands within BlackCat');\n }\n else {\n if (version_compare(WB_VERSION, '2.8.3', '>=')) {\n // WebsiteBaker 2.8.3\n $filter_path = WB_PATH . '/modules/output_filter/index.php';\n } else {\n // all other WebsiteBaker versions\n $filter_path = WB_PATH . '/modules/output_filter/filter-routines.php';\n }\n if (file_exists($filter_path)) {\n if (! $this->websiteBakerIsPatched($filter_path)) {\n if (! $this->websiteBakerDoPatch($filter_path)) {\n throw new \\Exception('Failed to patch the WebsiteBaker output filter, please contact the support!');\n }\n }\n } else {\n throw new \\Exception('Can\\'t detect the correct method to patch the output filter, please contact the support!');\n }\n }\n return true;\n }", "public function setFilter(array $filter)\n {\n return $this->setArgs(['filter' => $filter]);\n }", "public function filterByReference($reference = null, $comparison = null)\n\t{\n\t\tif (null === $comparison) {\n\t\t\tif (is_array($reference)) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t} elseif (preg_match('/[\\%\\*]/', $reference)) {\n\t\t\t\t$reference = str_replace('*', '%', $reference);\n\t\t\t\t$comparison = Criteria::LIKE;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(Oops_Db_ProductPeer::REFERENCE, $reference, $comparison);\n\t}", "public final function setFilter($filter, $param = null)\n {\n $this->filter = $filter;\n\n if (isset($param) && is_array($param));\n $this->param = $param;\n\n return $this;\n }", "public function setFilter(array $filter)\n {\n $model = $this->getModel();\n $model->setFilter($filter);\n }", "public function __construct()\n {\n $this->extensions = collect();\n }", "public function setExtension(Extension $extension)\n {\n $this->extension = $extension;\n }", "public function setExtensionAttributes(\n \\Magento\\Directory\\Api\\Data\\RegionInformationExtensionInterface $extensionAttributes\n );", "function setReference($reference) {\n $this->checkChange();\n\n $this->reference = $reference;\n return $this;\n }", "public function filterByRef($ref = null, $comparison = null)\n\t{\n\t\tif (null === $comparison) {\n\t\t\tif (is_array($ref)) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t} elseif (preg_match('/[\\%\\*]/', $ref)) {\n\t\t\t\t$ref = str_replace('*', '%', $ref);\n\t\t\t\t$comparison = Criteria::LIKE;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(LpPeer::REF, $ref, $comparison);\n\t}", "public function setExtension($extension)\n {\n $this->_extension = $extension;\n }", "public function setExtension($extension)\n {\n $this->_extension = $extension;\n }", "public static function init() {\n\t\tadd_filter( 'attachment_fields_to_edit', array( self::$class_name, 'apply_filter_attachment_fields_to_edit' ), null, 2 );\n\n\t\t// Add the filter for saving the custom url field\n\t\tadd_filter( 'attachment_fields_to_save', array( self::$class_name, 'apply_filter_attachment_fields_to_save' ), null , 2 );\n\n\t\t// Add the filter for when the post_gallery is written out\n\t\tadd_filter( 'post_gallery', array( self::$class_name, 'apply_filter_post_gallery' ), 999, 2 );\n\n\n\t}", "public function replaceExtension(Stringable|string $extension): static\n {\n return new static($this->uri->withPath(HierarchicalPath::fromUri($this->uri)->withExtension($extension)->toString()));\n }", "public function setExtension($name, $baseVersion, $extensionLevel) {}", "public function setExtension($extension) {\n $this->_extension = $extension;\n }", "function acf_add_deprecated_filter($deprecated, $version, $replacement)\n{\n}", "public function setCatalogueReferenceExtension(\\Calcinai\\Siri\\Objects\\Datex\\ExtensionType $catalogueReferenceExtension)\n {\n $this->catalogueReferenceExtension = $catalogueReferenceExtension;\n return $this;\n }", "public function addFilter(DFilter $filter) {\n\t\t$this->filters[] = $filter;\n\t}", "function acf_enable_filter($name = '')\n{\n}", "function acf_enable_filters($filters = array())\n{\n}", "public function registerFilter(FilterInterface $filter)\n {\n array_unshift($this->filters, $filter);\n\n return $this;\n }", "public function filterByExtensions($extensions = null, $comparison = null)\n {\n if (is_object($extensions)) {\n $extensions = serialize($extensions);\n }\n\n return $this->addUsingAlias(RemoteHistoryContaoPeer::EXTENSIONS, $extensions, $comparison);\n }", "function wp_init_targeted_link_rel_filters()\n {\n }", "public function setFilter($filter)\n {\n $validFilters = self::NO_FILTER |\n self::FILTER_NONE | self::FILTER_SUB |\n self::FILTER_UP | self::FILTER_AVG |\n self::FILTER_PAETH | self::ALL_FILTERS;\n\n $filter = $filter & $validFilters;\n\n $this->filter = (integer) $filter;\n\n return $this;\n }", "public function addFilter($path, $filter)\n\t{\n\t\tif (! $this->filesRepository instanceof FilterableRepository)\n\t\t\tthrow new \\InvalidArgumentException('No filters allowed on given file repository');\n\n\t\tif (! is_array($filter))\n\t\t\t$filter = [$filter];\n\n\t\t$this->filesRepository->setFilter($path, $filter);\n\n\t\treturn $this;\n\t}", "public function addFilter(FilterInterface $filter) : void\n {\n $this->getLoader()->addFilter($filter);\n }", "public function setImageFilter($filter)\n {\n $this->imageFilter = $filter;\n return $this;\n }", "public function filter($filter) {\n $exists = array_search($filter, $this->filters, true);\n if ($exists === false) {\n $this->filters[] = $filter;\n }\n return $this;\n }", "function ApplyDefaultExtFilter(&$fld) {\n\t\t$fld->SearchValue = $fld->DefaultSearchValue;\n\t\t$fld->SearchValue2 = $fld->DefaultSearchValue2;\n\t\t$fld->SearchOperator = $fld->DefaultSearchOperator;\n\t\t$fld->SearchOperator2 = $fld->DefaultSearchOperator2;\n\t\t$fld->SearchCondition = $fld->DefaultSearchCondition;\n\t}" ]
[ "0.5960222", "0.591273", "0.5813022", "0.5742641", "0.57393473", "0.56935257", "0.5650696", "0.54920083", "0.5487053", "0.53326154", "0.5331065", "0.5282406", "0.519563", "0.5167404", "0.5155197", "0.51499355", "0.5143413", "0.51397234", "0.51138633", "0.5103506", "0.5083382", "0.5080989", "0.507222", "0.50487906", "0.50487906", "0.50487906", "0.5018841", "0.50157654", "0.5001724", "0.49847803", "0.49832368", "0.49717087", "0.49635115", "0.49337432", "0.49031305", "0.48914313", "0.48909837", "0.48865157", "0.48865157", "0.48786855", "0.487753", "0.48638174", "0.4862475", "0.48618972", "0.48595053", "0.48529404", "0.4840062", "0.4824725", "0.48245448", "0.4824314", "0.48218393", "0.4815477", "0.4805327", "0.47805762", "0.4774054", "0.47712654", "0.47667548", "0.47642878", "0.47627723", "0.47615474", "0.47601554", "0.47563842", "0.47506103", "0.47420985", "0.473844", "0.47379282", "0.4733413", "0.47323427", "0.4731562", "0.4731049", "0.47255838", "0.47204664", "0.47186193", "0.47140124", "0.47108966", "0.4708684", "0.4708178", "0.47021464", "0.46985608", "0.46874872", "0.46860352", "0.46860352", "0.4682013", "0.46758288", "0.46629155", "0.46530548", "0.46438816", "0.46355775", "0.46354932", "0.46340585", "0.463322", "0.46156934", "0.4614581", "0.4612447", "0.4612376", "0.46108934", "0.4605142", "0.4597602", "0.45940512", "0.45916283" ]
0.69410515
0
get all slider image
public function index(){ $data['sliders'] = $sliderInfo = DB::table('sliders')->orderBy('position', 'asc')->get(); return view('backend.pages.slider.index', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSlider_images()\n\t\t{\n\t\t\t$slider_images = $this->manage_content->getValue('slider_info','*');\n\t\t\tforeach($slider_images as $slider_image)\n\t\t\t{\n\t\t\t\tif($slider_image['slider_status'] == 1)\n\t\t\t\t{\n\t\t\t\t\techo '<a href=\"'.$slider_image[\"slider_link\"].'\"><img src=\"images/'.$slider_image[\"slider_image\"].'\" style=\"width:692px;height:210px;\"/></a>';\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function getPicturesInSlider(): PictureCollection;", "function get_images() \t{\n \t\treturn $this->getImages();\n \t}", "public function get_imgs(){\n\t\treturn $this->db->select()->from(\"slide\")->get()->result();\n\t}", "public function getImages()\n {\n $res=array();\n $this->objTable = new Model($this->getLangAndID['lang'].'_slide_image');\n $select = array('id','title','description','slide_id','src_link','order_by','avatar');\n $this->objTable->where('slide_id',$this->id);\n $this->objTable->where('idw',$this->idw);\n $data = $this->objTable->get(null,null,$select);\n \n return $data; \n }", "private function getSliderImages($params) {\n\n\t\t$images = array();\n\t\t$image = array();\n\n\t\tif ($params['images'] !== '') {\n\n\t\t\t$image_ids = explode(',', $params['images']);\n\n\t\t\tforeach ($image_ids as $id) {\n\n\t\t\t\t$img = wp_get_attachment_image_src($id, 'full');\n\t\t\t\t$img_thumb = wp_get_attachment_image_src($id, 'thumbnail');\n\n\t\t\t\t$image['url'] = $img[0];\n\t\t\t\t$image['width'] = $img[1];\n\t\t\t\t$image['height'] = $img[2];\n\t\t\t\t$image['title'] = get_the_title($id);\n\t\t\t\t$image['caption'] = get_post($id)->post_content;\n\t\t\t\t$image['thumb'] = $img_thumb[0];\n\n\t\t\t\t$images[] = $image;\n\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn $images;\n\n\t}", "public function get_images()\r\n\t\t{\r\n\t\t\t$images = $this->obj->result;\r\n\t\t\treturn $images;\r\n\t\t}", "function get_mediaImages()\n\t\t{\n\t\t\t$query = $this -> db -> get('MediaSlider');\n\n\n\t\t\treturn $query->result();\n\t\t}", "public function getSliderList()\n { \n $sliders = PageSlider::where('status', PageSlider::ACTIVE)->get();\n return $sliders;\n }", "public function get_images(){\n\t\treturn $this->images;\n\t}", "function get_slider() {\n $sql = \"SELECT * FROM slider\";\n $res = $this->mysqli->query($sql);\n $data = array();\n while ($row = $res->fetch_array(MYSQLI_ASSOC)) {\n $data[] = $row;\n }\n return $data;\n }", "public function getListImageSlider() {\n header('Access-Control-Allow-Origin: *');\n header(\"Access-Control-Allow-Credentials: true\");\n header('Content-Type: application/json; charset=utf-8');\n header(\"Access-Control-Allow-Methods: POST, GET, OPTIONS\");\n header('Access-Control-Allow-Headers \"Origin, X-Requested-With, Content-Type, Accept');\n $this->load->helper('directory');\n $list_image = directory_map('./media/slides');\n $aListImage = array();\n foreach ($list_image as $key => $sImage) {\n $aListImage[$key] = array(\n 'image_name' => str_replace('.jpg', '', $sImage),\n 'image_url' => base_url().'media/slides/'.$sImage\n );\n }\n\n echo json_encode($aListImage);\n die();\n }", "public function geAlltSliders()\n {\n $query = $this->db->get('slider');\n return $query->result();\n }", "function getImages() \t{\n \t\treturn $this->images_array;\n \t}", "public function getSlider()\n\t{\n\t\t\n\t\t $sliders = Slider::where('deleted_at' , null )->inRandomOrder()->where('active' , 'yes')->orderBY('id','desc')->take(5)->get() ;\n\t\t \n\t\t $data = array() ;\n\t\t foreach($sliders as $slider){\n\t\t\t $slideData = array(\n\t\t\t 'name_ar' => $slider->name_ar ,\n\t\t\t 'name_en' => $slider->name_en ,\n\t\t\t 'description_ar' => strip_tags($slider->description_ar) ,\n\t\t\t 'description_en' => strip_tags($slider->description_en) ,\n\t\t\t 'photo' => url('/public').$slider->photo , \t\t\t \n\t\t\t ) ;\n\t\t\t array_push($data ,$slideData ) ;\n\t\t\t \n\t\t }\n\t\t return response()->json([\n 'status' => 1,\n 'data' => $data , \t\t\t\t\n ]); \n \n\t}", "public function Images() {\n\t\treturn new ArrayList(array_filter([$this->Image()]));\n\t}", "public function images()\n {\n return get_field('images');\n }", "public static function get_all_sliders() {\n\t\treturn array_merge( self::get_layer_sliders(), self::get_rev_sliders() );\n\t}", "private function images()\n {\n return File::allFiles(public_path('img/gallery'));\n }", "public function getImages(){\n return $this->images;\n }", "private function fill_slider(){\n\t\tglobal $DB;\n\t\t$slides= \"SELECT * FROM {theme_archaius} ORDER BY position ASC\";\n\t $slides= $DB->get_records_sql($slides);\n\t return $slides;\n\t}", "public function getImages()\r\n {\r\n if (!isset($this->_images)) {\r\n $this->_images = [];\r\n for ($i=1; $i<=6; $i++) {\r\n if ($data = $this->getData('image' . $i)) {\r\n $image = $this->imageRepository->getById($data);\r\n if ($image->isActive()) {\r\n $this->_images[] = $image->getUrl();\r\n }\r\n }\r\n }\r\n }\r\n return $this->_images;\r\n }", "public function getImages()\n {\n return GalleryImage::get()->filter('ParentID', $this->AllChildren()->column('ID') ?: null);\n }", "public function index()\n {\n $sliders=Slider::get();\n return $sliders;\n }", "function get_featured_slider() {\n $sql = \"SELECT * FROM slider WHERE publish='1'\";\n $res = $this->mysqli->query($sql);\n $data = array();\n while ($row = $res->fetch_array(MYSQLI_ASSOC)) {\n $data[] = $row;\n }\n return $data;\n }", "function get_slider_item() {\n $picture = $this->db->order_by(\"act\", \"desc\")->get('slider');\n return $picture->result_array();\n }", "function wpbm_slider_images(){\n global $wpdb;\n include( 'inc/admin/wpbm-slider-image.php' );\n die();\n }", "public function getImages()\r\n {\r\n return $this->images;\r\n }", "public function getImages()\n {\n return $this->images;\n }", "public function getImages()\n {\n return $this->images;\n }", "public function getImages()\n {\n return $this->images;\n }", "public function getImages()\n {\n return $this->images;\n }", "public function getImages()\n {\n return $this->images;\n }", "public function getImages()\n {\n return $this->images;\n }", "public function getImages() {\n\t\treturn($this->images);\n\t}", "public function get_all_gallery_images() {\n\n\t\tcheck_ajax_referer( 'daylife-gallery-add-nonce', 'nonce' );\n\t\trequire_once( dirname( __FILE__ ) . '/class-wp-daylife-api.php' );\n\t\t$daylife = new WP_Daylife_API( get_option( 'daylife' ) );\n\n\t\t// Should be int but santize value as id can be bigger than maximum int value\n\t\t$gallery_id = sanitize_text_field( $_POST['gallery_id'] );\n\t\tif ( $gallery_id > 0 ) {\n\t\t\t$args['gallery_id'] = $gallery_id;\n\n\t\t\t$images = $daylife->get_gallery_by_id( $args );\n\n\t\t\tforeach ( $images as $image ) {\n\t\t\t\t$image_data[] = $image->url . '|' . $image->caption;\n\t\t\t}\n\t\t\techo json_encode( $image_data );\n\t\t}\n\t\tdie;\n\n\t}", "public function index()\n {\n $images = Slider::orderBy('position', 'asc')->get();\n return view('admin.slider-list', compact('images'));\n\n }", "public function getImages() {\n\t\tif($this->images === null) {\n\t\t\t$this->images = $this->getObjectManager()->get('Qinx\\Qxgallery\\Domain\\Repository\\ImageRepository')->findAll(array(\n\t\t\t\t'category' => $this\n\t\t\t));\n\t\t}\n\n\t\treturn $this->images;\n\t}", "public function allImages()\n {\n $query = \"SELECT DISTINCT image from blog_post \n WHERE deleted = 0\";\n\n $stmt = static::$dbh->query($query);\n\n $images = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n\n return $images;\n\n }", "public function index()\n {\n return ImageResource::collection(Image::all());\n }", "public function sliders()\n {\n $this->authCheck();\n\n $sliderData = DB::table('image_sliders')\n ->get();\n \n $sliders=view('admin.slider_list')\n ->with('sliderData',$sliderData);\n\n return view('admin.master')\n ->with('main_content',$sliders);\n }", "function civ_slider(){\n // to use in the WP_Query loop\n global $wpdb;\n $table_name = $wpdb->prefix . 'civ_slider';\n $slides = $wpdb->get_results( \"select * from $table_name order by img_order asc\", 'object');\n\n $f_slide = array();\n $num_slides = count($slides);\n\n foreach ($slides as $slide) {\n array_push($f_slide, $slide->post_id);\n }\n$args = array('post_type' => 'post',\n 'post__in' => $f_slide,\n 'orderby' => 'post__in',\n 'ignore_sticky_posts' => '1'\n);\n\n $slider = new WP_Query($args);\n\n\n while ( $slider->have_posts() ) :\n $slider->the_post(); ?> \n<?php \n //Get the Thumbnail URL\n $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), /*array( 720,405 ),*/ false, '' );\n ?>\n <div class=\"slide\" style=\"background-image:url('<?php echo $src[0]; ?>');\">\n <h2>\n <a href=\"<?php the_permalink(); ?>\">\n <?php the_title(); ?>\n </a>\n </h2>\n <span><?php the_excerpt(); ?></span>\n </div>\n <?php endwhile;\n $wpdb->flush();\nwp_reset_postdata();\n}", "public function index()\n {\n return Image::all();\n }", "function get_data_slider()\n\t\t{\n\t\t\t$query = $this->db->query(\"SELECT * FROM `slider`\");\n\t\t\n\t\t\t$indeks = 0;\n\t\t\t$result = array();\n\t\t\t\n\t\t\tforeach ($query->result_array() as $row)\n\t\t\t{\n\t\t\t\t$result[$indeks++] = $row;\n\t\t\t}\n\t\t\n\t\t\treturn $result;\n\t\t}", "public function getImages() : array\n\t{\n\t\treturn $this->images_list;\n\t}", "public function index()\n {\n $images = $this->images->all();\n\n return ImageResource::collection($images);\n }", "public function actionCarouselImages() {\n\n // # Cache result forever\n $cached = Cache::rememberForever( 'actionCarouselImages', function () {\n\n // # Conatiner init\n $container = [];\n\n // # Directory iterator\n $iterator = new \\DirectoryIterator( \"./images/carousel\" );\n\n // # Loop through files and dir\n foreach( $iterator as $item ) {\n\n // # Avoid dirs\n if( is_dir( $item ) ) {\n continue;\n }\n\n // # Get pathname\n $path = ltrim( $item->getPathname(), \".\" );\n $tmp[ 'src' ] = $path;\n $tmp[ 'thumb' ] = $path;\n $container[] = $tmp;\n }\n\n // # toJson\n return json_encode($container);\n });\n\n return response()->make( $cached );\n\n }", "public function index()\n {\n $sliders = PhotoSliders::all();\n return view('pages.manageSlider.slider_index',['sliders' => $sliders]);\n }", "public function index()\n {\n //get all slider images from database\n $allSliders = Slider::with('images')->get();\n\n return view('admin.slides.index')->with('allSliders', $allSliders);\n }", "public function images()\n {\n // Fetch all properties existing in the database\n $image = Image::all();\n\n // return list of properties;\n return $image;\n\n }", "function GetImages(){\n\t\t$this->MediaType = 'image/jpeg';\n\t\t$this->SetFileName();\n\t\treturn $this->get();\n\t}", "public function getImages() {\r\n\t\treturn $this->images === NULL ? array() : $this->images;\r\n\t}", "protected function fetchAllImages(){\n $this->fetchImagesInContent();\n $this->fetchFullTextImage();\n $this->fetchIntroImage();\n $this->fetchFirstImageInContent();\n }", "public function getImages(){\n\t\t@$dom = new DOMDocument();\n\t\t@$dom->loadHTML($this->html);\n\t\t$dom->preserveWhiteSpace = false;\n\t\t\n\t\t// Create DOMXpath and get images\n\t\t$xpath = new DOMXpath($dom);\n\t\t$imgs = $xpath->query(\"//img\");\n\t\t\n\t\t// Return array\n\t\t$ret = array();\n\t\t\n\t\t// Loop results and return\n\t\tfor ($i = 0; $i < $imgs->length; $i++) {\n\t\t\t$img = $imgs->item($i);\n\t\t\t$src = $img->getAttribute(\"src\");\n\t\t\t\n\t\t\t// Make sure it's a complete URL\n\t\t\t$src = self::filterUrl($src);\n\t\t\tif($src === false) continue;\n\t\t\t\n\t\t\tarray_push($ret, $src);\n\t\t}\n\t\t\n\t\treturn $ret;\n\t}", "public function index()\n {\n return view('admin.list.images', [\n 'pageImages' => Image::where('imageType', '=', 'page')->get(),\n 'backgroundImages' => Image::where('imageType', '=', 'background')->get()\n ]);\n }", "public function imagenes() {\n return $imagenes = ImagenesProducto::where('fk_producto',$this->codigo) -> orderBy('featured','desc') -> get(); //para mostrar las imagenes ordenadas por las destacada\n }", "protected function getSmallSlider()\n {\n return array(\n 'first' => $this->getUrlRange(1, $this->lastPage()),\n 'slider' => null,\n 'last' => null,\n );\n }", "public function get_slides_for_slider() {\n return $this->slides_to_include;\n }", "function wpsight_sylt_get_image_slider( $post_id = '', $args = array() ) {\n\t\n\t// If we have a post ID, get _gallery post meta\n\t\n\tif( ! is_array( $post_id ) ) {\n\t\n\t\t// Set default post ID\n \t\n \tif( ! $post_id )\n\t\t\t$post_id = get_the_ID();\n\t\t\n\t\t// Get gallery imgages\t\t\n\t\t$images = array_keys( get_post_meta( absint( $post_id ), '_gallery', true ) );\n\t\t\n\t\t// Set gallery ID\n\t\t$slider_id = 'wpsight-image-slider-' . absint( $post_id );\n\t\t\t\n\t// Else set array of image attachment IDs\n\t\n\t} else {\n\t\t\n\t\t$images = array_map( 'absint', $post_id );\n\t\t\n\t\t// Set gallery ID\n\t\t$slider_id = 'wpsight-image-slider-' . implode( '-', $images );\n\t\t\n\t}\n\t\n\t// If there are images, create the gallery\n\t\n\tif( $images ) {\n\t\t\n\t\t// Set some defaults\n\t\t\n\t\t$defaults = array(\n\t\t\t'class_slider' \t\t=> $slider_id . ' wpsight-image-slider',\n\t\t\t'class_item'\t \t\t=> 'wpsight-image-slider-item image fit',\n\t\t\t'thumbs_size' \t \t\t=> 'wpsight-half',\n\t\t\t'thumbs_caption' \t=> false,\n\t\t\t'thumbs_link'\t \t\t=> true,\t\t\t\n\t\t\t'slider_items'\t\t\t=> 2,\n\t\t\t'slider_slide_by'\t\t=> 2,\n\t\t\t'slider_margin'\t\t\t=> 20,\n\t\t\t'slider_stage_padding'\t=> 0,\n\t\t\t'slider_loop'\t\t\t=> true,\n\t\t\t'slider_nav'\t\t\t=> true,\n\t\t\t'slider_nav_text'\t\t=> '[\"&lsaquo;\",\"&rsaquo;\"]',\n\t\t\t'slider_dots'\t\t\t=> true,\n\t\t\t'slider_dots_each'\t\t=> false,\n\t\t\t'slider_autoplay'\t\t=> false,\n\t\t\t'slider_autoplay_time'\t=> 5000,\n\t\t\t'slider_overlay'\t\t=> '',\t\t\t\n\t\t\t'lightbox_size'\t \t\t=> 'wpsight-full',\n\t\t\t'lightbox_caption' \t\t=> true,\n\t\t\t'lightbox_prev_next' \t=> true,\n\t\t\t'lightbox_zoom'\t\t \t=> true,\n\t\t\t'lightbox_fullscreen' \t=> true,\n\t\t\t'lightbox_share'\t \t=> false,\n\t\t\t'lightbox_close'\t \t=> true,\n\t\t\t'lightbox_counter'\t \t=> true\n\t\t);\n\t\t\n\t\t// Merge args with defaults and apply filter\n\t\t$args = apply_filters( 'wpsight_sylt_get_image_slider_args', wp_parse_args( $args, $defaults ), $post_id, $args );\n\t\t\n\t\t// Sanitize gallery class\n\t\t\n\t\t$class_slider = ! is_array( $args['class_slider'] ) ? explode( ' ', $args['class_slider'] ) : $args['class_slider'];\t\t\n\t\t$class_slider = array_map( 'sanitize_html_class', $class_slider );\n\t\t$class_slider = implode( ' ', $class_slider );\n\t\t\n\t\t// Sanitize item class\n\t\t\n\t\t$class_item = ! is_array( $args['class_item'] ) ? explode( ' ', $args['class_item'] ) : $args['class_item'];\t\t\n\t\t$class_item = array_map( 'sanitize_html_class', $class_item );\n\t\t$class_item = implode( ' ', $class_item );\n\t\t\n\t\t// Check thumbnail size\n\t\t$args['thumbs_size'] = in_array( $args['thumbs_size'], get_intermediate_image_sizes() ) || 'full' == $args['thumbs_size'] ? $args['thumbs_size'] : 'post-thumbnail';\n\t\t\n\t\t// Check thumbnail caption\n\t\t$args['thumbs_caption'] = $args['thumbs_caption'] == true ? true : false;\n\t\t\n\t\t// Check thumbnail links\n\t\t$args['thumbs_link'] = $args['thumbs_link'] == true ? true : false;\n\t\t\n\t\t// Sanitize overlay\n\t\t$args['slider_overlay'] = is_array( $args['slider_overlay'] ) ? array_map( 'wp_kses_post', $args['slider_overlay'] ) : '';\n\t\t\n\t\t// Check lightbox size\n\t\t$args['lightbox_size'] = in_array( $args['lightbox_size'], get_intermediate_image_sizes() ) ? $args['lightbox_size'] : 'full';\n\t\t\n\t\t// Check thumbnail caption\n\t\t$args['lightbox_caption'] = $args['lightbox_caption'] == true ? true : false;\n\t\t\n\t\t// Check show prev_next\n\t\t$args['lightbox_prev_next'] = $args['lightbox_prev_next'] == true ? true : false;\n\t\t\n\t\t// Check show zoom\n\t\t$args['lightbox_zoom'] = $args['lightbox_zoom'] == true ? true : false;\n\t\t\n\t\t// Check show fullscreen toggle\n\t\t$args['lightbox_fullscreen'] = $args['lightbox_fullscreen'] == true ? true : false;\n\t\t\n\t\t// Check show sharing options\n\t\t$args['lightbox_share'] = $args['lightbox_share'] == true ? true : false;\n\t\t\n\t\t// Check show close button\n\t\t$args['lightbox_close'] = $args['lightbox_close'] == true ? true : false;\n\t\t\n\t\t// Check show close button\n\t\t$args['lightbox_counter'] = $args['lightbox_counter'] == true ? true : false;\n\t\t\n\t\t// Set counter\n\t\t$i = 0;\n\t\t\n\t\tob_start(); ?>\n\t\t\n\t\t<script type=\"text/javascript\">\n\t\t\tjQuery(document).ready(function($){\n \n\t\t\t $('.wpsight-image-slider').owlCarousel({\n\t\t\t\t\tresponsiveClass:\ttrue,\n\t\t\t\t responsive:{\n \t\t\t\t 0:{\n \t\t\t\t items:\t\t1,\n \t\t\t\t slideBy:\t1,\n \t\t\t\t dots: \t\tfalse\n \t\t\t\t },\n \t\t\t\t 981:{\n \t\t\t\t items: \t\t<?php echo absint( $args['slider_items'] ); ?>,\n\t\t\t\t\t\t\tslideBy:\t<?php echo absint( $args['slider_slide_by'] ); ?>\n \t\t\t\t }\n \t\t\t\t},\n\t\t\t\t\tmargin: \t\t\t<?php echo absint( $args['slider_margin'] ); ?>,\n\t\t\t\t stagePadding: \t\t<?php echo absint( $args['slider_stage_padding'] ); ?>,\n\t\t\t\t loop: \t\t\t\t<?php echo $args['slider_loop'] == true ? 'true' : 'false'; ?>,\n\t\t\t\t\tnav: \t\t\t\t<?php echo $args['slider_nav'] == true ? 'true' : 'false'; ?>,\n\t\t\t\t\tnavText:\t\t\t<?php echo strip_tags( $args['slider_nav_text'] ); ?>,\n\t\t\t\t\tdots:\t\t\t\t<?php echo $args['slider_dots'] == true ? 'true' : 'false'; ?>,\n\t\t\t\t\tdotsEach:\t\t\t<?php echo $args['slider_dots_each'] == true ? 'true' : 'false'; ?>,\n\t\t\t\t\tautoplay:\t\t\t<?php echo $args['slider_autoplay'] == true ? 'true' : 'false'; ?>,\n\t\t\t\t\tautoplayTimeout:\t<?php echo absint( $args['slider_autoplay_time'] ); ?>,\n\t\t\t\t\tautoplayHoverPause: true,\n\t\t\t\t\tnavContainer:\t\t'.wpsight-image-slider-arrows.clearfix',\n\t\t\t\t\tdotsContainer: \t\t'.wpsight-image-slider-dots',\n\t\t\t\t\tautoHeight:\t\t\tfalse\n\t\t\t });\n\t\t\t \n\t\t\t});\n\t\t</script>\n\t\t\n\t\t<div class=\"<?php echo $class_slider; ?>\" itemscope itemtype=\"http://schema.org/ImageGallery\">\n\t\t\n\t\t\t<?php foreach( $images as $image ) : ?>\n\t\t\t\n\t\t\t\t<?php\n\t\t\t\t\t$attachment \t= get_post( absint( $image ) );\n\t\t\t\t\t$attachment_src = wp_get_attachment_image_src( $attachment->ID, $args['lightbox_size'] );\n\t\t\t\t\t$thumbnail_src = wp_get_attachment_image_src( $attachment->ID, $args['thumbs_size'] );\n\t\t\t\t?>\n\t\t\t\t\n\t\t\t\t<?php if( $attachment !== NULL && $attachment->post_type == 'attachment' ) : ?>\n\t\t\t\t\t\n\t\t\t\t\t<div class=\"<?php echo $class_item; ?>\" itemprop=\"associatedMedia\" itemscope itemtype=\"http://schema.org/ImageObject\">\n\t\t\t\t\t\n\t\t\t\t\t\t<?php if( $args['thumbs_link'] === true ) : ?>\n\t\t\t\t\t\t<a href=\"<?php echo esc_url( $attachment_src[0] ); ?>\" itemprop=\"contentUrl\" data-size=\"<?php echo absint( $attachment_src[1] ); ?>x<?php echo absint( $attachment_src[2] ); ?>\" data-counter=\"<?php echo absint( $i ); ?>\">\n\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\n\t\t\t\t\t\t\t<span class=\"image\"><img src=\"<?php echo esc_url( $thumbnail_src[0] ); ?>\" itemprop=\"thumbnail\" alt=\"<?php echo esc_attr( get_post_meta( $attachment->ID, '_wp_attachment_image_alt', true ) ); ?>\" /></span>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<?php if( $attachment->post_content && $args['lightbox_caption'] === true ) : ?>\n\t\t\t\t\t\t\t<meta itemprop=\"title\" content=\"<?php echo esc_attr( $attachment->post_content ); ?>\">\n\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\n\t\t\t\t\t\t\t<meta itemprop=\"width\" content=\"<?php echo absint( $thumbnail_src[1] ); ?>\">\n\t\t\t\t\t\t\t<meta itemprop=\"height\" content=\"<?php echo absint( $thumbnail_src[2] ); ?>\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t<?php if( $args['thumbs_link'] === true ) : ?>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<?php if( $attachment->post_excerpt && $args['thumbs_caption'] === true ) : ?>\n\t\t\t\t\t\t<figcaption class=\"wpsight-image-slider-caption\" itemprop=\"caption description\"><?php echo $attachment->post_excerpt; ?></figcaption>\n\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<?php if( isset( $args['slider_overlay'][ $attachment->ID ] ) ) : ?>\n\t\t\t\t\t\t<div class=\"image-slider-overlay\">\n\t\t\t\t\t\t\t<?php echo $args['slider_overlay'][ $attachment->ID ]; ?>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\n\t\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<?php $i++; endif; ?>\n\t\t\t\t\t\t\n\t\t\t<?php endforeach; ?>\n\t\t\n\t\t</div>\n\t\t\n\t\t<?php if( $args['slider_nav'] || $args['slider_dots'] ) : ?>\n\t\t<div class=\"wpsight-image-slider-nav clearfix\">\n\t\t\t<?php if( $args['slider_nav'] ) : ?>\n\t\t\t<div class=\"wpsight-image-slider-arrows clearfix\"></div>\n\t\t\t<?php endif; ?>\n\t\t\t<?php if( $args['slider_dots'] ) : ?>\n\t\t\t<div class=\"wpsight-image-slider-dots\"></div>\n\t\t\t<?php endif; ?>\n\t\t</div>\n\t\t<?php endif;\n\t\t\n\t\t// Include Photoswipe lightbox markup, if active\n\t\t\n\t\tif( apply_filters( 'wpsight_sylt_photoswipe', true ) == true ) {\n\t\t\twpsight_sylt_image_slider_root( $args, $slider_id );\n\t\t\twpsight_sylt_image_slider_js( $args, $slider_id );\n\t\t}\n\t\n\t}\n\t\n}", "public function getAllImages() {\n\t\t$returnArr = array();\n\n\t\tforeach (File::allFiles($this->imageFolder) as $file) {\n\t\t\t$fileName = $file->getRelativePathName();\n\n\t\t\t$returnArr[] = url() . '/uploads/images/'.$fileName;\n\t\t}\n\n\t\treturn $returnArr;\n\t}", "function wpsight_sylt_get_image_slider_js( $args = array(), $slider_id ) {\n\t\n\tob_start(); ?>\n\t\n\t<script type=\"text/javascript\">\n\t\t(function($) {\n\t\t var $pswp = $('#<?php echo esc_attr( $slider_id ); ?>')[0];\n\t\t var image = [];\n\t\t\n\t\t $('.wpsight-image-slider').each( function() {\n\t\t var $pic = $(this),\n\t\t getItems = function() {\n\t\t var items = [];\n\t\t $pic.find('a').each(function() {\n\t\t var $href = $(this).attr('href'),\n\t\t $size = $(this).data('size').split('x'),\n\t\t $width = $size[0],\n\t\t $height = $size[1],\n\t\t $title = $(this).find('meta[itemprop=title]').attr('content');\n\t\t\n\t\t var item = {\n\t\t src : $href,\n\t\t w : $width,\n\t\t h : $height,\n\t\t title: $title\n\t\t }\n\t\t\n\t\t items.push(item);\n\t\t });\n\t\t return items;\n\t\t }\n\t\t\n\t\t var items = getItems();\n\t\t\n\t\t $.each(items, function(index, value) {\n\t\t image[index] = new Image();\n\t\t image[index].src = value['src'];\n\t\t });\n\t\t\n\t\t $pic.on('click', '.wpsight-image-slider-item a', function(event) {\n\t\t event.preventDefault();\n\t\t \n\t\t var $index = $(this).data('counter');\n\t\t \n\t\t var options = {\n\t\t index: $index,\n\t\t bgOpacity: 0.8,\n\t\t showHideOpacity: true\n\t\t }\n\t\t\n\t\t var lightBox = new PhotoSwipe($pswp, PhotoSwipeUI_Default, items, options);\n\t\t lightBox.init();\n\t\t });\n\t\t });\n\t\t})(jQuery);\n\t</script><?php\n\t\n\treturn apply_filters( 'wpsight_sylt_get_image_slider_js', ob_get_clean(), $args, $slider_id );\n\t\n}", "function lumo_slider(){\n\t\t$slides = new Lumo_Slider_Query();\n\n\t\tif( $slides->have_posts() ) :\n\t\t\t$display = \"\";\n\t\t\techo '<ul id=\"lumo-slider\">';\n\t\t\twhile( $slides->have_posts() ) : $slides->the_post();\n\t\t\t\t$slide_image = get_the_post_thumbnail(get_the_ID(), 'home-slider-image-lowrez');\n\t\t\t\t$slide_image_url = wp_get_attachment_url( get_post_thumbnail_id(get_the_ID(), 'home-slider-image') );\n\n\t\t\t\t$set_width_fullrez = sprintf('width=\"100%%\" data-fullrez=\"%s\"', esc_url($slide_image_url) );\n\n\t\t\t\t$slide_image = preg_replace('/width=\"\\d+\" +height=\"\\d+\"/', $set_width_fullrez, $slide_image);\n\n\t\t\t\techo '<li class=\"lumo-slide\" style=\"'.$display.'\">';\n\t\t\t\t\techo $slide_image;\n\t\t\t\t\techo '<div class=\"hero-placeholder\"></div>';\n\t\t\t\t\techo '<div class=\"hero\">';\n\t\t\t\t\t\t\techo '<h4 class=\"hero\">'.get_the_title().'</h4>';\n\t\t\t\t\t\t\tthe_content();\n\t\t\t\t\techo '</div>';\n\t\t\t\techo '</li>';\n\t\t\t\t$display = \" display:none; \";\n\t\t\tendwhile;\n\t\t\twp_reset_postdata();\n\t\t\techo '</ul>';\n\t\tendif;\n\t}", "public function index()\n {\n $photos = Slider::orderBy('id','DESC')->get();\n \n return view('admin.slider.index', compact('photos'));\n }", "public function index()\n {\n $image = Image::all();\n return $this->showAll($image);\n }", "public function getImageArray();", "function wpsight_sylt_image_slider( $post_id = '', $args = array() ) {\n\techo wpsight_sylt_get_image_slider( $post_id, $args );\n}", "public function findAllPhoto(){\n $query= $this->getEntityManager()\n ->createQuery(\"Select p FROM PidevFrontOfficeBundle:Galerie p ORDER BY p.idEvennement ASC\");\n return $query->getResult();\n }", "public function index()\n {\n return ImageEntity::all();\n }", "public function getSlides()\n {\n return Slide::all();\n }", "public function actionGalleryImages() {\n\n // # Cache result forever\n $cached = Cache::rememberForever( 'actionGalleryImages', function () {\n\n // # Conatiner init\n $container = [];\n\n // # Directory iterator\n $iterator = new \\DirectoryIterator( \"./images/gallery/images\" );\n\n // # Loop through files and dir\n foreach( $iterator as $item ) {\n\n // # Avoid dirs\n if( is_dir( $item ) ) {\n continue;\n }\n\n // # Get pathname\n $path = ltrim( $item->getPathname(), \".\" );\n $tmp[ 'src' ] = $path;\n $tmp[ 'thumb' ] = $path;\n $container[] = $tmp;\n }\n\n // # toJson\n return json_encode($container);\n });\n\n return response()->make( $cached );\n\n }", "public function get_img($img_id){\n\t\treturn $this->db->select()\n\t\t\t->from(\"slide\")\n\t\t\t->where(\"sli_id\",$img_id)\n\t\t\t->get()\n\t\t\t->row();\n\t}", "public function listImage()\n {\n $data = Image::all();\n return response()->json($data);\n return $this->showAll($image);\n }", "public function getPhotos();", "function get_post_galleries_images($post = 0)\n {\n }", "public function images()\n {\n return $this->morphMany(Image::class, 'model');\n }", "function ts_get_layer_slider_items_for_theme_options()\r\n{\r\n\tglobal $wpdb;\r\n\t\r\n\tif($wpdb->get_var(\"SHOW TABLES LIKE '\".$wpdb->prefix . \"layerslider'\") != $wpdb->prefix . \"layerslider\") {\r\n\t\treturn false;\r\n\t}\r\n\t\r\n // Get sliders\r\n $sliders = $wpdb->get_results( \"\r\n\t\tSELECT\r\n\t\t\t*\r\n\t\tFROM\r\n\t\t\t\".$wpdb->prefix . \"layerslider\r\n WHERE\r\n\t\t\tflag_hidden = '0' AND\r\n\t\t\tflag_deleted = '0'\r\n ORDER BY\r\n\t\t\tdate_c ASC\r\n\t\tLIMIT\r\n\t\t\t100\");\r\n \r\n // Iterate over the sliders\r\n\t$slider_items = array();\r\n\t\r\n foreach($sliders as $key => $item) {\r\n\t\t\r\n\t\t$slider_items[] = array(\r\n\t\t\t'value' => 'LayerSlider-'.$item -> id,\r\n\t\t\t'label' => 'LayerSlider - '.$item -> name,\r\n\t\t\t'src' => ''\r\n\t\t);\r\n\t}\r\n\treturn $slider_items;\r\n}", "public function getImages()\n {\n\t\t//TODO Image 2. What should our query builder do?\n\t\t// $data = ImageModel::???();\n\t\t$data = [];\n\t\treturn $this->sendResponse($data);\n }", "function get_image() {\n $sql = \"SELECT * FROM photos\";\n $res = $this->mysqli->query($sql);\n $data = array();\n while ($row = $res->fetch_array(MYSQLI_ASSOC)) {\n $data[] = $row;\n }\n return $data;\n }", "public static function loadFilterImages() {\n $dir = scandir('../img/effects');\n $bg_images = array();\n foreach ($dir as $file) {\n if ($file != \".\" && $file != \"..\") {\n if (file_exists(\"../img/effects/\" . $file)) {\n $currFileExt = pathinfo(\"../img/effects/\" . $file, 4);\n if ($currFileExt == \"jpg\" || $currFileExt == \"png\" || $currFileExt == \"gif\" || $currFileExt == \"jpeg\" || $currFileExt == \"bmp\") {\n $bg_images[] = $file;\n }\n }\n }\n }\n $curr_page = isset($_POST['curr_page']) ? intval($_POST['curr_page']) : 1;\n $max_bgs_per_page = 9;\n $offset = $curr_page * $max_bgs_per_page - $max_bgs_per_page;\n $slice = array_slice($bg_images, $offset, $max_bgs_per_page);\n echo json_encode($slice);\n }", "public function getImageList() {\n\t\t\treturn $this->imageList;\n\t\t}", "public function getAllPhotos();", "public function images()\n {\n return $this->morphMany(Image::class, 'imagetable');\n }", "public function images()\n {\n return $this->morphMany(Image::class, 'imagetable');\n }", "public function getImages()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('images');\n }", "function get_slider($tipo,$idioma_id)\r\n {\r\n $sql = \"select * from slide s, pagina_web p \r\n where s.pagina_id = p.pagina_id and p.idioma_id=\".$idioma_id.\" and s.slide_tipo=\".$tipo;\r\n \r\n $resultado = $this->db->query($sql)->result_array();\r\n return $resultado; \r\n \r\n }", "public function featimage()\n {\n $res = $this->db->get('feat_gallery')->result_array();\n\n // print_r($res);\n return $res;\n }", "public function getServerImagesPage($id)\n {\n return view('admin.sliders.images', ['slider' => $id]);\n }", "public function getPhotoUrls () {\n\t\t\n\t}", "final public function get_images() : array {\n Helper::load('files');\n\n return Files::get_files_in_dir($this->route);\n }", "function get_all_pics(){\n\t\t$all_pics = $this->db->get('pictures');\n\t\treturn $all_pics->result();\n\t}", "public function get_used_images(){\r $query = \"select `s`.`image` as `image` from `ct_services` as `s`\rUNION\rselect `sa`.`image` as `image` from `ct_services_addon` as `sa`\rUNION\rselect `setim`.`option_value` as `setimage` from `ct_settings` as `setim` where `option_name` = 'ct_company_logo'\";\r $result=mysqli_query($this->conn,$query);\r return $result;\r }", "public function getImagenesIndexCategorias(){\n foreach($this->indexContent as $content){\n //echo \"--------------------- Imagenes --------------<br>\";\n $vectorImagenes = array();\n $dom = new DOMDocument();\n $dom->loadHTML(\"$content\");\n $xpath = new DOMXPath($dom);\n $tag = \"div\";\n $class = \"home-category-box\";\n $consulta = \"//\".$tag.\"[@class='\".$class.\"']\";\n $resultados = $xpath->query($consulta);\n if ($resultados->length > 0){\n $contador = 0;\n foreach($resultados as $imagenes){\n if ($contador == 0){\n $todasImagenes = $imagenes->getElementsByTagName(\"img\");\n if ($todasImagenes->length > 0){\n foreach($todasImagenes as $imagen){\n $urlImagen = $imagen->getAttribute(\"src\");\n //echo \"url imagen categorias padre: \".$urlImagen.\"<br>\";\n array_push($vectorImagenes,$urlImagen);\n }\n }\n }\n $contador++;\n }\n }\n //echo \"--------------------- Fin Imagenes --------------<br>\";\n }\n return $vectorImagenes;\n }", "public function getAllImages()\n {\n $sql = \"\n\t\t\tSELECT A.*, B.tag_id, C.name tagName FROM images A\n\t\t\tLEFT JOIN tag_relationships B\n\t\t\tON A.id = B.image_id\n\t\t\tLEFT JOIN tags C\n\t\t\tON B.tag_id = C.id\n\t\t\tORDER BY A.name ASC\n\t\t\";\n\n $query = $this->db->prepare($sql);\n\n $query->execute();\n\n $result = $query->fetchAll();\n\n // index the images by id then add their tags\n foreach ($result as $image => $data) {\n if (isset($this->images[$data['id']])) {\n $this->images[$data['id']]['tags'][$data['tag_id']] = $data['tagName'];\n } else {\n $this->images[$data['id']] = [\n 'name' => $data['name'],\n 'url' => $data['url'],\n 'tags' => [$data['tag_id'] => $data['tagName']],\n ];\n }\n }\n return $this->images;\n }", "public function getMediaGalleryImages()\n {\n if(!$this->hasData('media_gallery_images') && is_array($this->getMediaGallery('images'))) {\n $images = new Varien_Data_Collection();\n foreach ($this->getMediaGallery('images') as $image) {\n if ($image['disabled']) {\n continue;\n }\n $image['url'] = $this->getMediaConfig()->getMediaUrl($image['file']);\n $image['id'] = isset($image['value_id']) ? $image['value_id'] : null;\n $image['path'] = $this->getMediaConfig()->getMediaPath($image['file']);\n $images->addItem(new Varien_Object($image));\n }\n $this->setData('media_gallery_images', $images);\n }\n\n return $this->getData('media_gallery_images');\n }", "public function images(){\n $images = DB::table('images')->simplePaginate(15);\n return view('admin.images')->with('images', $images);\n }", "public function images()\n {\n return $this->morphToMany(Image::class, 'model', 'model_has_images', 'model_id', 'image_id');\n }", "public function getSlider() {\n\t\treturn($this->slider);\n\t}", "public function getImages()\n {\n $url = str_replace(\"[:action]\", \"images\", self::ImgUrAPI_MINE_URL);\n $url = str_replace(\"[:user_id]\", $this->user_id, $url);\n $result = self::excuteHTTPSRequest($url, $this->accessToken);\n\n $_images = '';\n foreach ($result['data'] as $item) {\n $_img = new ImgUrImage();\n $_img->setAttributes($item);\n $_images[] = $_img;\n }\n\n return $_images;\n }", "private function getImages() {\n global $wpdb;\n $query = \"select * from `\" . $wpdb->prefix . \"roni_images` where image_status = 1;\";\n $results = $wpdb->get_results( $query );\n if( !empty( $results ) ) {\n return $results;\n }\n\n return false;\n }", "function show_images() {\n global $app;\n $images = new entities\\Image();\n $cursor = $images->getRange($app, 0);\n $posts = array();\n \n foreach ($cursor->toArray() as $post) {\n $posts[] = $post;\n }\n return $app['twig']->render('admin/admin_images.twig', array('images' => $posts));\n}", "function get_all_slide()\r\n {\r\n \r\n \r\n $slide = $this->db->query(\"\r\n SELECT\r\n *\r\n\r\n FROM\r\n slide \r\n\r\n ORDER BY `slide_id` DESC\r\n\r\n \")->result_array();\r\n\r\n return $slide;\r\n }" ]
[ "0.8106454", "0.7675217", "0.7391688", "0.7288753", "0.7241974", "0.700451", "0.6981837", "0.69620293", "0.6919534", "0.6901993", "0.68731964", "0.6873049", "0.6863281", "0.68365794", "0.6816364", "0.6791003", "0.6788382", "0.67839664", "0.6778838", "0.6757794", "0.6739646", "0.667266", "0.66503805", "0.6623338", "0.6617732", "0.66142863", "0.65981126", "0.6572476", "0.65119904", "0.65119904", "0.65119904", "0.65119904", "0.65119904", "0.65119904", "0.6505075", "0.64920974", "0.64915895", "0.6435959", "0.64306116", "0.64253443", "0.6415767", "0.6409263", "0.638787", "0.63865745", "0.63661546", "0.63532794", "0.63381606", "0.6315658", "0.62903416", "0.6249819", "0.62454695", "0.6231197", "0.622732", "0.6220492", "0.6220126", "0.62066734", "0.62009096", "0.61928844", "0.6180934", "0.61646676", "0.6158014", "0.6155888", "0.61488795", "0.6141817", "0.61202604", "0.611894", "0.6117998", "0.6117992", "0.6104192", "0.610265", "0.6097351", "0.6077545", "0.60710996", "0.60661286", "0.60630006", "0.6060517", "0.6051817", "0.6051078", "0.60494584", "0.60486996", "0.6034315", "0.6032754", "0.6032754", "0.6022742", "0.60166055", "0.6014323", "0.59986407", "0.5991486", "0.5990783", "0.5979151", "0.5978034", "0.59739673", "0.5971026", "0.5971022", "0.5953041", "0.5952384", "0.5951617", "0.59510106", "0.5950457", "0.5950333", "0.59437805" ]
0.0
-1
Logs in a user.
public function actionLogin() { $this->layout = 'main-login'; if (!\Yii::$app->user->isGuest) { if (!$this->funcionario) { $this->redirect(\yii\helpers\Url::to('index.php?r=estabelecimento/produto')); } else { $this->redirect(\yii\helpers\Url::to('index.php?r=estabelecimento/delivery-dx')); } return; } $model = new LoginForm(); $model->setScenario(LoginForm::SCENARIOESTABELECIMENTO); if ($model->load(Yii::$app->request->post()) && $model->loginCpfCnpj()) { return $this->goLogin(); } else { return $this->render('login', [ 'model' => $model, ]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loginUser() {\n self::$isLoggedIn = true;\n $this->session->setLoginSession(self::$storedUserId, self::$isLoggedIn);\n $this->session->setFlashMessage(1);\n }", "public function signInAction()\n {\n $userData = $this->manager->findOneBy(['username' => $this->httpParameters['login']]);\n\n //If no user were found, redirects\n if(empty($userData))\n {\n $this->response->redirect('/auth',HttpResponse::WRONG_LOGIN);\n }\n\n //Instantiates the user\n $user = new User($userData);\n\n //Checks if typed password matches user's password\n if($this->passwordMatch($this->httpParameters['loginPassword'],$user,'/auth'))\n {\n //Sets the user instance as a the new $_SESSION['user']\n $_SESSION['user'] = $user;\n\n $this->response->redirect('/admin');\n }\n }", "private function _logUserIn($inputs)\n\t{\n\t\tCraft::log('Logging in user.');\n\n\t\tif (craft()->userSession->login($inputs['username'], $inputs['password']))\n\t\t{\n\t\t\tCraft::log('User logged in successfully.');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tCraft::log('Could not log the user in.', LogLevel::Warning);\n\t\t}\n\t}", "public function it_logs_in_the_user()\n {\n $user = factory(User::class)->create([\n 'password' => '123123',\n ]);\n\n $this->browse(function ($browser) use ($user) {\n $browser->visit(new Login)\n ->type('@email', $user->email)\n ->type('@password', '123123')\n ->click('@submit')\n ->assertPathIs('/app');\n });\n }", "public function loginUser()\n {\n $request = new Request();\n\n $email = $request->input('email');\n $password = $request->input('password');\n\n // Check email\n if (!$email) {\n $this->showLoginForm(['Please enter email']);\n }\n // Check password\n if (!$password) {\n $this->showLoginForm(['Please enter password']);\n }\n\n // Check user exist and then password\n $user = $this->getUser($email);\n $password = md5($password);\n if (!$user || $password !== $user['password']) {\n $this->showLoginForm(['Error on login']);\n }\n\n // Save login details to cookies\n if (!defined('APP_USERS_COOKIES_EMAIL')\n || !defined('APP_USERS_COOKIES_PASSWORD')) {\n $this->showLoginForm(['Error on login']);\n }\n setcookie(APP_USERS_COOKIES_EMAIL, $email);\n setcookie(APP_USERS_COOKIES_PASSWORD, $password);\n\n // Redirect to endpoint\n header(\"Location: \" . self::ENDPOINTS['success_login']);\n }", "public function do_login()\n {\n $this->userObject = new User();\n\n // grab the uID of the person signing in\n $uid = $this->userObject->checkUser($_POST['user_email'], $_POST['user_password']);\n\n // if the uID exists\n if ($uid) {\n\n $this->set('message', 'You logged in!');\n\n // grab the array of user-data from the database\n $user = $this->userObject->getUser($uid);\n\n // leave out the password\n unset($user['password']);\n unset($user[4]);\n\n // if (strlen($_SESSION['redirect']i) > 0) { // basically, if someone types in the url with the funciton after,\n // // supposed to redirect people to the pages they want.\n // $view = $_SESSION['redirect'];\n // unset($_SESSION['redirect']);\n // header('Location: ' . BASE_URL . $view);\n\n // make the SESSION key 'user' and set it equal to the aray of user-data\n $_SESSION['user'] = $user;\n\n header('Location: /index.php/');\n\n } else {\n\n $this->set('error', 'Sorry! Looks like something might be messed up with your Username or Password! :p');\n }\n }", "public static function LogIn ($userName = '', $password = '');", "static function logIn($user) {\n if (isset($user)) {\n session_start();\n $_SESSION['userId'] = $user->id;\n }\n }", "public function login($user){\n if($user){\n $this->user_id = $_SESSION['userId'] = $user->userId;\n $this->logged_in = TRUE;\n }\n \n }", "public function login (){\n\t\t$user = $this->get_by(array(\n\t\t\t'email' => $this->input->post('email'),\n\t\t\t'password' => $this->hash($this->input->post('password')),\n\t\t\t), TRUE);\n\t\t\n\t\tif (count($user)) {\n\t\t\t// Log in user\n\t\t\t$data = array(\n\t\t\t\t'username' => $user->username,\n\t\t\t\t'email' => $user->email,\n\t\t\t\t'id' => $user->id,\n\t\t\t\t'loggedin' => TRUE,\n\t\t\t);\n\t\t\t$this->session->set_userdata($data);\n\t\t}\n\t\t}", "public function login($user){\n if($user){\n $this->user_id = $_SESSION['user_id'] = $user->id;\n $this->logged_in = true;\n }\n }", "protected function log_user_in($user)\n\t{\n\t\t$_SESSION['email'] = $user->email;\n\t\t$_SESSION['user_id'] = $user->id;\n\t\t$_SESSION['role_id'] = $user->role_id;\n\t\t\n\t\tunset($_SESSION['token']);\n\t}", "private function login() {\n //Look for this username in the database\n $params = array($this->auth_username);\n $sql = \"SELECT id, password, salt \n FROM user \n WHERE username = ? \n AND deleted = 0\";\n //If there is a User with this name\n if ($row = $this->db->fetch_array($sql, $params)) {\n //And if password matches\n if (password_verify($this->auth_password.$row[0] ['salt'], $row[0] ['password'])) {\n $params = array(\n session_id(), //Session ID\n $row[0] ['id'], //User ID\n self::ISLOGGEDIN, //Login Status\n time() //Timestamp for last action\n );\n $sql = \"INSERT INTO user_session (session_id, user_id, logged_in, last_action) \n VALUES (?,?,?,?)\";\n $this->db->query($sql, $params);\n header('Location: ' . $_SERVER['HTTP_REFERER']);\n //User now officially logged in\n }\n //If password doesn't match\n else {\n //Send user back to login with error\n $this->login_form(self::ERR_NOUSERFOUND);\n }\n }\n //If there isn't a User with this name\n else {\n //Send user back to login with error\n $this->login_form(self::ERR_NOUSERFOUND);\n }\n }", "public function login() {\r\n\r\n // signal any observers that the user has logged in\r\n $this->setState(\"login\");\r\n }", "public function actionLoginAsUser()\n {\n \t$user = UserAdmin::findOne(Yii::$app->request->get('id'));\n \tif ($user && Yii::$app->getRequest()->isPost)\n \t{\n \t\tYii::$app->user->login(UserAdminIdentity::findIdentity($user->id));\n \t\treturn $this->redirect([\"/admin/index/index\"]);\n \t}\n \t\n \t$this->layout = '@app/layouts/layout-popup-sm';\n \treturn $this->render('login-as-user', ['model' => $user]);\n }", "public function login($user){\r\n\t\t\t// database should find user based on username/password\r\n\t\t\tif($user){\r\n\t\t\t\t$this->user_id = $_SESSION['user_id'] = $user->id;\r\n\t\t\t\t$this->logged_in = true ;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "public function login()\n\t{\n\t\t//Compute the hash code of the password submited by user\n\t\t$user_password_hash = $this->passwordEncrypt($this->user_info['user_password']);\n\t\t\n\t\t//Do datebase query to get the hash code of the password\n\t\t$db = BFL_Database :: getInstance();\n\t\t$stmt = $db->factory('select `user_id`,`user_password` from '.DB_TABLE_USER.' WHERE `user_name` = :user_name');\n\t\t$stmt->bindParam(':user_name', $this->user_info['user_name']);\n\t\t$stmt->execute();\n\t\t$rs = $stmt->fetch();\n\t\tif (empty($rs))\n\t\t\tthrow new MDL_Exception_User_Passport('user_name');\n\t\t\n\t\tif ($rs['user_password'] != $user_password_hash)\n\t\t\tthrow new MDL_Exception_User_Passport('user_password');\n\n\t\t//Set user session\n\t\t$auth = BFL_ACL :: getInstance();\n\t\t$auth->setUserID($rs['user_id']);\n\t}", "public function login()\n {\n if(is_logged_in()) {\n redirect_to(url('thread/index'));\n }\n\n $user = new User;\n $page = Param::get('page_next', 'login');\n\n switch($page) {\n case 'login':\n break;\n\n case 'lobby':\n $user->username = Param::get('username');\n $user->password = Param::get('password');\n\n try {\n $user = $user->verify();\n $_SESSION['id'] = $user['id'];\n } catch (UserNotFoundException $e) {\n $page = 'login';\n }\n break;\n\n default:\n throw new UserNotFoundException(\"User not found\");\n }\n\n $this->set(get_defined_vars());\n $this->render($page);\n }", "public function login()\n\t{\n\t\t$mtg_login_failed = I18n::__('mtg_login_failed');\n\t\tR::selectDatabase('oxid');\n\t\t$sql = 'SELECT oxid, oxfname, oxlname FROM oxuser WHERE oxusername = ? AND oxactive = 1 AND oxpassword = MD5(CONCAT(?, UNHEX(oxpasssalt)))';\n\t\t$users = R::getAll($sql, array(\n\t\t\tFlight::request()->data->uname,\n\t\t\tFlight::request()->data->pw\n\t\t));\n\t\tR::selectDatabase('default');//before doing session stuff we have to return to db\n\t\tif ( ! empty($users) && count($users) == 1) {\n\t\t\t$_SESSION['oxuser'] = array(\n\t\t\t\t'id' => $users[0]['oxid'],\n\t\t\t\t'name' => $users[0]['oxfname'].' '.$users[0]['oxlname']\n\t\t\t);\n\t\t} else {\n\t\t\t$_SESSION['msg'] = $mtg_login_failed;\n\t\t}\n\t\t$this->redirect(Flight::request()->data->goto, true);\n\t}", "protected function login( )\r\n {\r\n $this->sendData( 'USER', $this->_nick, $this->_nick . ' ' . $this->_user . ' : ' . $this->_realName );\r\n \r\n $this->sendData( 'NICK', $this->_nick );\r\n \r\n $this->_loggedOn = true;\r\n }", "public function login()\n {\n if ($this->getCurrentUser()->get('id')) {\n $this->redirect($this->Auth->redirectUrl());\n }\n\n if ($user = $this->Auth->identify()) {\n $this->Auth->setUser($user);\n\n // set cookie\n if (!empty($this->getRequest()->getData('remember_me'))) {\n if ($CookieAuth = $this->Auth->getAuthenticate('Lil.Cookie')) {\n $CookieAuth->createCookie($this->getRequest()->getData());\n }\n }\n } else {\n if ($this->getRequest()->is('post') || env('PHP_AUTH_USER')) {\n $this->Flash->error(__d('lil', 'Invalid username or password, try again'));\n }\n }\n\n if ($this->getCurrentUser()->get('id')) {\n $redirect = $this->Auth->redirectUrl();\n $event = new Event('Lil.Auth.afterLogin', $this->Auth, [$redirect]);\n $this->getEventManager()->dispatch($event);\n\n return $this->redirect($redirect);\n }\n }", "protected function loginUser()\n {\n // Set login data for this user\n /** @var User $oUserModel */\n $oUserModel = Factory::model('User', Constants::MODULE_SLUG);\n $oUserModel->setLoginData($this->mfaUser->id);\n\n // If we're remembering this user set a cookie\n if ($this->remember) {\n $oUserModel->setRememberCookie(\n $this->mfaUser->id,\n $this->mfaUser->password,\n $this->mfaUser->email\n );\n }\n\n // Update their last login and increment their login count\n $oUserModel->updateLastLogin($this->mfaUser->id);\n\n // --------------------------------------------------------------------------\n\n // Generate an event for this log in\n createUserEvent('did_log_in', ['method' => $this->loginMethod], null, $this->mfaUser->id);\n\n // --------------------------------------------------------------------------\n\n // Say hello\n if ($this->mfaUser->last_login) {\n\n /** @var Config $oConfig */\n $oConfig = Factory::service('Config');\n\n $sLastLogin = $oConfig->item('authShowNicetimeOnLogin')\n ? niceTime(strtotime($this->mfaUser->last_login))\n : toUserDatetime($this->mfaUser->last_login);\n\n if ($oConfig->item('authShowLastIpOnLogin')) {\n $this->oUserFeedback->success(lang(\n 'auth_login_ok_welcome_with_ip',\n [\n $this->mfaUser->first_name,\n $sLastLogin,\n $this->mfaUser->last_ip,\n ]\n ));\n\n } else {\n $this->oUserFeedback->success(lang(\n 'auth_login_ok_welcome',\n [\n $this->mfaUser->first_name,\n $sLastLogin,\n ]\n ));\n }\n\n } else {\n $this->oUserFeedback->success(lang(\n 'auth_login_ok_welcome_notime',\n [\n $this->mfaUser->first_name,\n ]\n ));\n }\n\n // --------------------------------------------------------------------------\n\n // Delete the token we generated, it's no needed, eh!\n /** @var Authentication $oAuthService */\n $oAuthService = Factory::model('Authentication', Constants::MODULE_SLUG);\n $oAuthService->mfaTokenDelete($this->data['token']['id']);\n\n // --------------------------------------------------------------------------\n\n $sRedirectUrl = $this->returnTo != siteUrl() ? $this->returnTo : $this->mfaUser->group_homepage;\n redirect($sRedirectUrl);\n }", "function user_action_login($env, $vars) {\n $username = array_pop($vars['data']['username']);\n // We allow also using email for logging in.\n if (valid_email($username)) {\n $username = UserFactory::getUserFromField($env, 'email', $username);\n }\n\n // Initialize an user object.\n $tmp_user = new User($env, $username);\n // Attempt to log in the user.\n $login = $tmp_user->logIn(array_pop($vars['data']['password']));\n exit($login);\n}", "public function login($user) \n {\n $_SESSION['user_id'] = $user['id'];\n $_SESSION['is_logged_in'] = true;\n $_SESSION['time_logged_in'] = time();\n }", "public function log_login()\n {\n if (!$this->config->get('log_logins')) {\n return;\n }\n\n $user_name = $this->get_user_name();\n $user_id = $this->get_user_id();\n\n if (!$user_id) {\n return;\n }\n\n self::write_log('userlogins',\n sprintf('Successful login for %s (ID: %d) from %s in session %s',\n $user_name, $user_id, self::remote_ip(), session_id()));\n }", "public function login()\n {\n if ($this->UserManager_model->verifUser($_POST['user_id'], $_POST['user_password'])) {\n\n $arrUser = $this->UserManager_model->getUserByIdentifier($_POST['user_id']);\n $data = array();\n $objUser = new UserClass_model;\n $objUser->hydrate($arrUser);\n $data['objUser'] = $objUser;\n\n $user = array(\n 'user_id' => $objUser->getId(),\n 'user_pseudo' => $objUser->getPseudo(),\n 'user_img' => $objUser->getImg(),\n 'user_role' => $objUser->getRole(),\n );\n\n $this->session->set_userdata($user);\n redirect('/');\n } else {\n $this->signin(true);\n }\n }", "public function login($user)\n {\n if($user)\n {\n $this->user_id =$_SESSION['user_id'] = $user->user_id;\n $this->username=$_SESSION['username'] = $user->username;\n $this->user_status=$_SESSION['user_status']= $user->user_status;\n $this->logged_in=TRUE;\n }\n }", "public function login() {\r\n if (!empty($_POST)) {\r\n $username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);\r\n $password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\r\n\r\n $hash = hash('sha512', $password . Configuration::USER_SALT);\r\n unset($password);\r\n\r\n $user = UserModel::getByUsernameAndPasswordHash($username, $hash);\r\n unset($hash);\r\n\r\n if ($user) {\r\n Session::set('user_id', $user->user_id);\r\n Session::set('username', $username);\r\n Session::set('ip', filter_input(INPUT_SERVER, 'REMOTE_ADDR'));\r\n Session::set('ua', filter_input(INPUT_SERVER, 'HTTP_USER_AGENT', FILTER_SANITIZE_STRING));\r\n\r\n Misc::redirect('');\r\n } else {\r\n $this->set('message', 'Nisu dobri login parametri.');\r\n sleep(1);\r\n }\r\n }\r\n }", "public function Login(AuthUser $user) \n {\n $_SESSION[\"valid_login\"] = true;\n $_SESSION[\"user_id\"] = $user->id;\n }", "public static function logIn($userId)\r\n {\r\n (new Session())->set(static::$userIdField, $userId);\r\n }", "public function log_in()\n\t{\n\t\tif( isset( $_POST['user_login'] ) && wp_verify_nonce( $_POST['login_nonce'], 'login-nonce') ) \n\t\t{\n\t\t\t/** Error when no password enter */\n\t\t\tif( ! isset( $_POST['user_pass']) || $_POST['user_pass'] == '') {\n\t\t\t\t$this->system_message['error'][] = __('Please enter a password');\n\t\t\t\treturn false;\n\t\t\t}\n\t \t\t\n\t\t\t// this returns the user ID and other info from the user name\n\t\t\t$user = get_user_by('login', $_POST['user_login'] );\n \n\t\t\tif( ! $user ) \n\t\t\t{\t\t\t\t\n\t\t\t\t$this->system_message['error'][] = __('Invalid ID or password');\n\t\t\t\treturn false;\n\t\t\t}\n\t \n\t\t\t// check the user's login with their password\n\t\t\tif( ! wp_check_password( $_POST['user_pass'], $user->user_pass, $user->ID) ) {\n\t\t\t\t// if the password is incorrect for the specified user\n\t\t\t\t$this->system_message['error'][] = __('Invalid ID or password');\n\t\t\t}\n\t \n\t\t\t// only log the user in if there are no errors\n\t\t\tif( empty( $this->system_message['error'] )) \n\t\t\t{\n\t\t\t\twp_set_auth_cookie( $user->ID, false, true );\n\t\t\t\twp_set_current_user( $user->ID );\t\n\t\t\t\tdo_action('wp_login', $_POST['user_login']);\n\t \n\t\t\t\twp_redirect( home_url() ); exit;\n\t\t\t}\n\t\t}\n\t}", "public function login() {\r\n\t\t\r\n\t\t$back = $this->hybrid->get_back_url();\r\n\t\t$user_profile = $this->hybrid->auth();\r\n\t\t\r\n\t\t$email = $user_profile->emailVerified;\r\n\t\tif(!$email)\r\n\t\t\t$email = $user_profile->email;\r\n\t\t\r\n\t\tif(!$email)\r\n\t\t\t$this->hybrid->throw_error($this->ts(\"You don't have any email address associated with this account\"));\r\n\t\t\r\n\t\t/* check if user exists */\r\n\t\t$user = current($this->a_session->user->get(array(\"email\" => $email)));\r\n\t\tif(!$user) {\r\n\t\t\t/* create user */\r\n\t\t\t$uid = $this->hybrid->add_user($email, $user_profile);\r\n\t\t\t$user = current($this->a_session->user->get(array(\"id\" => $uid)));\r\n\t\t\t\r\n\t\t\tif(!$user)\r\n\t\t\t\t$this->wf->display_error(500, $this->ts(\"Error creating your account\"), true);\r\n\t\t}\r\n\t\t\r\n\t\t/* login user */\r\n\t\t$sessid = $this->hybrid->generate_session_id();\r\n\t\t$update = array(\r\n\t\t\t\"session_id\" => $sessid,\r\n\t\t\t\"session_time\" => time(),\r\n\t\t\t\"session_time_auth\" => time()\r\n\t\t);\r\n\t\t$this->a_session->user->modify($update, (int)$user[\"id\"]);\r\n\t\t$this->a_session->setcookie(\r\n\t\t\t$this->a_session->session_var,\r\n\t\t\t$sessid,\r\n\t\t\ttime() + $this->a_session->session_timeout\r\n\t\t);\r\n\t\t\r\n\t\t/* save hybridauth session */\r\n\t\t$this->a_session->check_session();\r\n\t\t$this->hybrid->save();\r\n\t\t\r\n\t\t/* redirect */\r\n\t\t$redirect_url = $this->wf->linker('/');\r\n\t\tif(isset($uid))\r\n\t\t\t$redirect_url = $this->wf->linker('/account/secure');\r\n\t\t$redirect_url = $back ? $back : $redirect_url;\r\n\t\t$this->wf->redirector($redirect_url);\r\n\t}", "private function logInSUUser()\n {\n $this->user= self::$kernel->getContainer()->get('doctrine')->getRepository('AppBundle:User')->findOneById(1258);\n\n $session = $this->client->getContainer()->get('session');\n\n $firewall = 'secured_area';\n $attributes = [];\n\n $token = new SamlSpToken(array('ROLE_USER'),$firewall, $attributes, $this->user);\n\n\n $session->set('_security_'.$firewall, serialize($token));\n $this->client->getContainer()->get('security.token_storage')->setToken($token);\n $session->save();\n\n $cookie = new Cookie($session->getName(), $session->getId());\n $this->client->getCookieJar()->set($cookie);\n }", "public function action_login_as()\n {\n if (!$this->loginUserObj || !$this->loginUserObj->isRoleAdmin())\n {\n $this->request->redirect('/');\n }\n $user_id = sanitizeValue($this->request->param('route'));\n $userObj = Model_User::getUserObjById($user_id);\n $user = $this->auth->force_login($userObj->getEmail());\n if ($user) {\n $session = Session::instance();\n $session->set('login_as.id', $this->loginUserObj->getId());\n $session->set('login_as.name', $this->loginUserObj->getName());\n Model_Audit::log($this->loginUserObj->getId(), Model_Audit::TYPE_LOGIN_AS, $user_id);\n $this->request->redirect('/dashboard');\n } else {\n $this->request->redirect('/');\n }\n }", "protected function login()\n {\n $this->send(Response::nick($this->config['nick']));\n $this->send(Response::user(\n $this->config['nick'],\n $this->config['hostname'],\n $this->config['servername'],\n $this->config['realname']\n ));\n }", "public function actionLogin() {\n\t\tif (Yii::app()->user->isGuest) {\n\t\t\t$userLogin = new UserLogin;\n\t\t\t$this->performAjaxValidation($userLogin, 'login-user-form');\n\t\t\t// collect user input data\n\t\t\tif (isset($_POST['UserLogin'])) {\n\t\t\t\t$userLogin->attributes = $_POST['UserLogin'];\n\t\t\t\t// validate that the username and password are valid\n\t\t\t\tif ($userLogin->login()) {\n\t\t\t\t\t$this->redirect(Yii::app()->user->returnUrl);\n\t\t\t\t}else{\n\t\t\t\t\t// check domain\n\t\t\t\t\tif($userLogin->isValidButWrongDomain()){\n\t\t\t\t\t\t$this->transferToDomain($userLogin->getUserIdentity());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// display the login form\n\t\t\t$this->render('login', array('model' => $userLogin));\n\t\t} else {\n\t\t\t$this->redirect(Yii::app()->user->returnUrl);\n\t\t}\n\t}", "private function attemptLogin($user){\n\n }", "private function logInSimpleUser()\n {\n $this->user= self::$kernel->getContainer()->get('doctrine')->getRepository('AppBundle:User')->findOneById(41);\n\n $session = $this->client->getContainer()->get('session');\n\n $firewall = 'secured_area';\n $attributes = [];\n\n $token = new SamlSpToken(array('ROLE_USER'),$firewall, $attributes, $this->user);\n\n\n $session->set('_security_'.$firewall, serialize($token));\n $this->client->getContainer()->get('security.token_storage')->setToken($token);\n $session->save();\n\n $cookie = new Cookie($session->getName(), $session->getId());\n $this->client->getCookieJar()->set($cookie);\n }", "public static function loginImpl($user)\n {\n tools::destroySession();\n //Get new Session\n session_start();\n\n //Set loggedUser\n $_SESSION['loggedUser'] = serialize($user);\n $_SESSION[\"logged\"] = true;\n }", "public function login(){\n \t\t//TODO redirect if user already logged in\n \t\t//TODO Seut up a form\n \t\t//TODO Try to log in\n \t\t//TODO Redirect\n \t\t//TODO Error message\n \t\t//TODO Set subview and load layout\n\n \t}", "public function loginUser()\n {\n $validate = $this->loginValidator->validate();\n $user = $this->userRepository->getUserWithEmail($validate[\"email\"]);\n\n if ($this->userCorrect($validate, $user)) {\n $user['api_token'] = $this->getToken();\n $user->save();\n\n return $this->successResponse('user', $user, 200)\n ->header('Token', $user['api_token']);\n }\n }", "public static function LoggedIn() {\n\t\tif (empty($_SESSION['current_user'])) {\n\t\t\tnotfound();\n\t\t}\n\t}", "public function loginUserAction() {\n\t\n\t\t\t$request = $this->getRequest();\n\t\t\t\n\t\t\t\n\t\t\tif ($request->isPost()) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// get the json raw data\n\t\t\t\t$handle = fopen(\"php://input\", \"rb\");\n\t\t\t\t$http_raw_post_data = '';\n\t\t\t\t\n\t\t\t\twhile (!feof($handle)) {\n\t\t\t\t $http_raw_post_data .= fread($handle, 8192);\n\t\t\t\t}\n\t\t\t\tfclose($handle); \n\t\t\t\t\n\t\t\t\t// convert it to a php array\n\t\t\t\t$json_data = json_decode($http_raw_post_data, true);\n\t\t\t\t\n\t\t\t\t//echo json_encode($json_data);\n\t\t\t\t\n\t\t\t\tif (is_array($json_data)) {\n\t\t\t\t\t// convert it back to json\n\t\t\t\t\t\n\t\t\t\t\t// write the user back to database\n\t\t\t\t\t$login = Application_Model_User::loginUser($json_data);\n\t\t\t\t\t\n\t\t\t\t\tif($login) {\n\t\t\t\t\t\techo json_encode($login);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\techo 0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\t \n\t\t\t}\n\t\t\t\n\t}", "private function logInSUUser()\n {\n $this->user= self::$kernel->getContainer()->get('doctrine')->getRepository('AppBundle:User')->findOneById(1646);\n\n $session = $this->client->getContainer()->get('session');\n\n $firewall = 'secured_area';\n $attributes = [];\n\n $this->user->setOpRoles('cclavoisier01.in2p3.fr');\n\n $token = new SamlSpToken(array('ROLE_USER'),$firewall, $attributes, $this->user);\n\n\n $session->set('_security_'.$firewall, serialize($token));\n $this->client->getContainer()->get('security.token_storage')->setToken($token);\n $session->save();\n\n $cookie = new Cookie($session->getName(), $session->getId());\n $this->client->getCookieJar()->set($cookie);\n }", "public function login() {\n\t\tif(!empty(Session::get('http_response'))) {\n\t\t\thttp_response_code(Session::get('http_response'));\n\t\t\tSession::delete('http_response');\n\t\t}\n\t\tif($_POST && isset($_POST['login']) && isset($_POST['password'])) {\n\t\t\t$user = $this->_model->getLogin(strtolower($_POST['login']));\n\t\t\tif($user && $user->enabled) {\n\t\t\t\tif(hash_equals($user->password,crypt($_POST['password'],$user->password))) {\n\t\t\t\t\tif($user->blocked) {\n\t\t\t\t\t\thttp_response_code(403);\n\t\t\t\t\t\tSession::setMessage(array('alert'=>'warning','icon'=>'exclamation','text'=>\"User is blocked\"));\n\t\t\t\t\t} elseif($user->verified) {\n\t\t\t\t\t\tSession::set('user',$user);\n\t\t\t\t\t\tSession::setMessage(array('alert'=>'success','icon'=>'check','text'=>\"User has logged in successfully\"));\n\t\t\t\t\t\t$redirect = Session::get('login_redirect');\n\t\t\t\t\t\tRouter::redirect(Session::get('login_redirect'));\n\t\t\t\t\t} else {\n\t\t\t\t\t\thttp_response_code(401);\n\t\t\t\t\t\tSession::setMessage(array('alert'=>'warning','icon'=>'exclamation','text'=>\"User is not yet confirmed\"));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\thttp_response_code(401);\n\t\t\t\t\tSession::setMessage(array('alert'=>'danger','icon'=>'ban','text'=>\"Invalid login name or password\"));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thttp_response_code(401);\n\t\t\t\tSession::setMessage(array('alert'=>'danger','icon'=>'ban','text'=>\"Invalid login name or password\"));\n\t\t\t}\t\n\t\t}\n\t}", "public function login() {\n $userName = Request::post('user_name');\n $userPassword = Request::post('user_password');\n if (isset($userName) && isset($userPassword)) {\n // perform the login method, put result (true or false) into $login_successful\n $login_successful = LoginModel::login($userName, $userPassword);\n\n // check login status: if true, then redirect user login/showProfile, if false, then to login form again\n if ($login_successful) {\n //if the user successfully logs in, reset the count\n $userID = Session::get('user_id');\n LoginModel::validLogin($userID);\n Redirect::to('login/loginHome');\n } else {\n Redirect::to('login/index');\n }\n }\n }", "function login() {\n\t\t//$salt = Configure::read('Security.salt');\n\t\t//echo md5('password'.$salt);\n\n\t\t// redirect user if already logged in\n\t\tif( $this->Session->check('User') ) {\n\t\t\t$this->redirect(array('controller'=>'dashboard','action'=>'index','admin'=>true));\n\t\t}\n\n\t\tif(!empty($this->data)) {\n\t\t\t// set the form data to enable validation\n\t\t\t$this->User->set( $this->data );\n\t\t\t// see if the data validates\n\t\t\tif($this->User->validates()) {\n\t\t\t\t// check user is valid\n\t\t\t\t$result = $this->User->check_user_data($this->data);\n\n\t\t\t\tif( $result !== FALSE ) {\n\t\t\t\t\t// update login time\n\t\t\t\t\t$this->User->id = $result['User']['id'];\n\t\t\t\t\t$this->User->saveField('last_login',date(\"Y-m-d H:i:s\"));\n\t\t\t\t\t// save to session\n\t\t\t\t\t$this->Session->write('User',$result);\n\t\t\t\t\t//$this->Session->setFlash('You have successfully logged in');\n\t\t\t\t\t$this->redirect(array('controller'=>'dashboard','action'=>'index','admin'=>true));\n\t\t\t\t} else {\n\t\t\t\t\t$this->Session->setFlash('Either your Username of Password is incorrect');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function login(UserModel $user)\n {\n //we store the object inside property $user of this class, we want to do this so that we can store the user\n //in session\n $this->user = $user;\n //we get the primaryKey from userModel which basically returns column 'id'\n $primaryKey = $user->primaryKey();\n //we get the userType from userModel which basically returns column 'userType'\n $userType = $user->userType();\n //we get the primaryValue of user.. i.e id of user by calling $user->id and store it to primaryValue\n $primaryValue = $user->{$primaryKey};\n //we get the userTypeValue of user.. i.e user_type of user by calling $user->user_type and store it to userTypeValue\n $userTypeValue = $user->{$userType};\n\n //we then set session for user\n\n $this->session->set('user', [$primaryKey => $primaryValue, $userType => $userTypeValue]);\n\n /*\n * NB: This will be only set when user is logged in, if another request is made,\n * The user will not be set and we need to read the session, get primary value, select the\n * user and specify. This will be implemented in constructor\n */\n\n /*\n * Log user activity i.e. logged in user\n */\n DbModel::logUserActivity('logged into the system');\n\n }", "public function doLogin()\r\n {\r\n $input = Request::all();\r\n \r\n if (Auth::attempt(['username' => $input['email'], 'password' => $input['password'], 'deleted_at' => null, 'user_type' => 1]))\r\n {\r\n \r\n $user = Auth::user();\r\n Session::set('current_user_id',$user->id);\r\n return Redirect::intended('/dashboard');\r\n }\r\n else { \r\n Session::flash(\r\n 'systemMessages', ['error' => Lang::get('pages.login.errors.wrong_credentials')]\r\n );\r\n return Redirect::action('UserController@login')\r\n ->withInput(Request::except('password'));\r\n }\r\n }", "public function login()\n {\n //$this->username = $username; // we are gonnna use the above property: $username here\n //$this->password = $password;\n // we want to call authuser from within login so\n $this->auth_user(); // we don't need to pass any arguments here because we know the class properties above this line\n\n }", "public function log_in() {\n\n // Check if the user exists on the database\n if (!$this->does_exist('username')) {\n return \"Username does not exist\";\n }\n\n $user = User::find($this->username, 'username');\n\n // If password matches\n if ($user->password !== $this->password) {\n return \"Sorry, password does not match\";\n }\n\n return true;\n }", "public function login() {\n $this->db->sql = 'SELECT * FROM '.$this->db->dbTbl['users'].' WHERE username = :username LIMIT 1';\n\n $user = $this->db->fetch(array(\n ':username' => $this->getData('un')\n ));\n\n if($user['hash'] === $this->hashPw($user['salt'], $this->getData('pw'))) {\n $this->sessionId = md5($user['id']);\n $_SESSION['user'] = $user['username'];\n $_SESSION['valid'] = true;\n $this->output = array(\n 'success' => true,\n 'sKey' => $this->sessionId\n );\n } else {\n $this->logout();\n $this->output = array(\n 'success' => false,\n 'key' => 'WfzBq'\n );\n }\n\n $this->renderOutput();\n }", "public function loginUser()\r\n {\r\n $req = $this->login->authenticate($this->user);\r\n $req_result = get_object_vars($req);\r\n print(json_encode($req_result));\r\n }", "public function Login()\n\t{\n\t\t$this->user->email = $_POST['email'];\n\t\t$this->user->password = $_POST['password'];\n // Here we verify the nonce, so that only users can try to log in\n\t\t// to whom we've actually shown a login page. The first parameter\n\t\t// of Nonce::Verify needs to correspond to the parameter that we\n\t\t// used to create the nonce, but otherwise it can be anything\n\t\t// as long as they match.\n\t\tif (isset($_POST['nonce']) && ulNonce::Verify('login', $_POST['nonce'])){\n\t\t\t// We store it in the session if the user wants to be remembered. This is because\n\t\t\t// some auth backends redirect the user and we will need it after the user\n\t\t\t// arrives back.\n\t\t\t//echo \"login successful\";\n\t\t\t\n\t\t\t///echo $this->input->post('email');\n\n\t\t\tif (isset($_POST['autologin']))\n\t\t\t\t$_SESSION['appRememberMeRequested'] = true;\n\t\t\telse\n\t\t\t\tunset($_SESSION['appRememberMeRequested']);\n \n\t\t\t// This is the line where we actually try to authenticate against some kind\n\t\t\t// of user database. Note that depending on the auth backend, this function might\n\t\t\t// redirect the user to a different page, in which case it does not return.\n\t\t\t$this->ulogin->Authenticate($_POST['email'], $_POST['password']);\n\t\t\tif ($this->ulogin->IsAuthSuccess()){\n\t\t\t\t$_SESSION[\"loggedIn\"] = true;\n\t\t\t\techo \"success\";\n\t\t\t}else echo \"failed\";\n\t\t}else echo 'refresh';\n\t\t//$this->load->view('layout/home.php');\n\t}", "public function loginUser($userId) {\n\t\tif ($this->isAdmin()) {\n\t\t\t$this->loginAdmin($userId);\n\t\t} else {\n\t\t\t$this->loginCustomer($userId);\n\t\t}\n\t}", "public function login($userName, $password);", "private function loginUser($user) {\n $this->Session->write('Auth.User.Id', $user['id']);\n $this->Session->write('Auth.User.Email', $user['email']);\n $this->Session->write('Auth.User.Password', $user['password']);\n\n if($user['first_login'] == 1){\n $this->redirect(['controller' => 'users', 'action' => 'activeAccount']);\n }\n\n try {\n $this->User->save(['id'=> $user['id'], 'last_login' => date('Y-m-d H:i:s', time())]);\n $this->redirect(\n [\n 'controller' => 'home',\n 'action' => 'index'\n ]\n );\n } catch (Exception $e) {\n $this->Session->delete('Auth');\n throw $e;\n }\n }", "public function login()\n\t{\n\t\tif($this->_identity===null)\n\t\t{\n\t\t\t$this->_identity=new UserIdentity($this->UserName,$this->passWd);\n\t\t\t$this->_identity->authenticate();\n\t\t}\n\t\tif($this->_identity->errorCode===UserIdentity::ERROR_NONE)\n\t\t{\n\t\t\t$duration=$this->rememberMe ? 3600*24*30 : 0; // 30 days\n\t\t\tuser()->login($this->_identity,$duration);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "function signInAsUser($args, &$request) {\n\t\t$this->addCheck(new HandlerValidatorJournal($this));\n\t\t// only managers and admins have permission\n\t\t$this->addCheck(new HandlerValidatorRoles($this, true, null, null, array(ROLE_ID_SITE_ADMIN, ROLE_ID_JOURNAL_MANAGER)));\n\t\t$this->validate();\n\n\t\tif (isset($args[0]) && !empty($args[0])) {\n\t\t\t$userId = (int)$args[0];\n\t\t\t$journal =& $request->getJournal();\n\n\t\t\tif (!Validation::canAdminister($journal->getId(), $userId)) {\n\t\t\t\t$this->setupTemplate($request);\n\t\t\t\t// We don't have administrative rights\n\t\t\t\t// over this user. Display an error.\n\t\t\t\t$templateMgr =& TemplateManager::getManager();\n\t\t\t\t$templateMgr->assign('pageTitle', 'manager.people');\n\t\t\t\t$templateMgr->assign('errorMsg', 'manager.people.noAdministrativeRights');\n\t\t\t\t$templateMgr->assign('backLink', $request->url(null, 'manager', 'people', 'all'));\n\t\t\t\t$templateMgr->assign('backLinkLabel', 'manager.people.allUsers');\n\t\t\t\treturn $templateMgr->display('common/error.tpl');\n\t\t\t}\n\n\t\t\t$userDao =& DAORegistry::getDAO('UserDAO');\n\t\t\t$newUser =& $userDao->getUser($userId);\n\t\t\t$session =& $request->getSession();\n\n\t\t\t// FIXME Support \"stack\" of signed-in-as user IDs?\n\t\t\tif (isset($newUser) && $session->getUserId() != $newUser->getId()) {\n\t\t\t\t$session->setSessionVar('signedInAs', $session->getUserId());\n\t\t\t\t$session->setSessionVar('userId', $userId);\n\t\t\t\t$session->setUserId($userId);\n\t\t\t\t$session->setSessionVar('username', $newUser->getUsername());\n\t\t\t\t$request->redirect(null, 'user');\n\t\t\t}\n\t\t}\n\t\t$request->redirect(null, $request->getRequestedPage());\n\t}", "public function signIn($user)\n {\n $this->setAuthenticated(true);\n\n $this->setAttribute('loggedin', true, 'user');\n $this->setAttribute('remoteaddress', $_SERVER['REMOTE_ADDR'], 'user');\n $this->setAttribute('useragent', $_SERVER['HTTP_USER_AGENT'], 'user');\n\n $this->initializeUser($user);\n }", "public function login(){\n\t\t$this->user = $this->user->checkCredentials();\n\t\t$this->user = array_pop($this->user);\n\t\tif($this->user) {\n\t\t\t$_SESSION['id'] = $this->user['id'];\n\t\t\t$_SESSION['name'] = $this->user['name'];\n\t\t\t$_SESSION['admin'] = $this->user['admin'];\n\t\t\t$this->isAdmin();\n\t \t\theader('location: ../view/home.php');\n\t \t\texit;\n\t \t}\n\t\t$dados = array('msg' => 'Usuário ou senha incorreto!', 'type' => parent::$error);\n\t\t$_SESSION['data'] = $dados;\n\t\theader('location: ../view/login.php');\n \t\texit;\n\t}", "public function loginUser()\n {\n\n $user = factory(User::class)->create();\n\n return Auth::login($user, true);\n\n\n }", "public function login(){\n echo $this->name . ' logged in';\n }", "public function login() {\n\t\treturn $this->login_as( call_user_func( Browser::$user_resolver ) );\n\t}", "public function doLogin()\n {\n\n //check if all the fields were filled\n if (!Request::checkVars(Request::postData(), array('username', 'password'))) {\n echo json_encode(array(\"swal\" => array(\"title\" => \"Oops!\", \"text\" => \"Complete all the fields!\", \"type\" => \"error\")));\n exit;\n }\n\n //create the user entity with the spcific login data\n $userEntity = new User(array('username' => Request::post('username'), 'password' => Request::post('password'), 'email' => null, 'name' => null));\n\n //check if the user exists and get it as entity if exists\n if (!$userEntity = $this->repository->findUser($userEntity)) {\n echo json_encode(array(\"swal\" => array(\"title\" => \"Oops!\", \"text\" => \"The username does not exist!\", \"type\" => \"error\")));\n exit;\n }\n\n //get the user ID from database\n $userEntity->setAttr('access', $this->repository->getAccessByUsername(Request::post('username')));\n\n //check if the login credentials are correct for login\n if (!$this->repository->checkLogin($userEntity, Request::post('password'))) {\n echo json_encode(array(\"swal\" => array(\"title\" => \"Oops!\", \"text\" => \"The user/email is incorrect!\", \"type\" => \"error\")));\n exit;\n }\n\n $userEntity->setAttr('access', $this->repository->getAccessByUsername(Request::post('username')));\n\n //set the session using the user data\n $this->session->setSession($userEntity);\n\n echo json_encode(\n array(\n \"swal\" => array(\"title\" => \"Success!\", \"text\" => \"You successfully logged in!\", \"type\" => \"success\", \"hideConfirmButton\" => true),\n \"redirect\" => array(\"url\" => BASE_URL . '/index.php?page=home', 'time' => 1)\n )\n );\n }", "public function login_as()\n {\n // Perform lookup of user\n /** @var \\Nails\\Auth\\Model\\User $oUserModel */\n $oUserModel = Factory::model('User', Constants::MODULE_SLUG);\n /** @var \\Nails\\Common\\Service\\Uri $oUri */\n $oUri = Factory::service('Uri');\n /** @var \\Nails\\Common\\Service\\Input $oInput */\n $oInput = Factory::service('Input');\n\n $sHashId = (string) $oUri->segment(4);\n $sHashPw = (string) $oUri->segment(5);\n $oUser = $oUserModel->getByHashes($sHashId, $sHashPw);\n\n if (!$oUser) {\n show404();\n }\n\n // --------------------------------------------------------------------------\n\n /**\n * Check sign-in permissions; ignore if recovering.\n * Users cannot:\n * - Sign in as themselves\n * - Sign in as superusers (unless they are a superuser)\n */\n\n if (!wasAdmin()) {\n\n $bHasPermission = userHasPermission(\\Nails\\Auth\\Admin\\Permission\\Users\\LoginAs::class);\n $bIsCloning = activeUser('id') == $oUser->id;\n $bIsSuperuser = !isSuperUser() && isSuperUser($oUser);\n\n if (!$bHasPermission || $bIsCloning || $bIsSuperuser) {\n if (!$bHasPermission) {\n $this->oUserFeedback->error(lang('auth_override_fail_nopermission'));\n redirect(\\Nails\\Admin\\Admin\\Controller\\Dashboard::url());\n\n } elseif ($bIsCloning) {\n show404();\n\n } elseif ($bIsSuperuser) {\n show404();\n }\n }\n }\n\n // --------------------------------------------------------------------------\n\n if (!$oInput->get('returningAdmin') && isAdmin()) {\n\n /**\n * The current user is an admin, we should set our Admin Recovery Data so\n * that they can come back.\n */\n\n $oUserModel->setAdminRecoveryData($oUser->id, $oInput->get('return_to'));\n $sRedirectUrl = $oInput->get('forward_to') ?: $oUser->group_homepage;\n\n $this->oUserFeedback->success(lang('auth_override_ok', $oUser->first_name . ' ' . $oUser->last_name));\n\n } elseif (wasAdmin()) {\n\n /**\n * This user is a recovering admin. Work out where we're sending\n * them back to then remove the adminRecovery data.\n */\n\n $oRecoveryData = getAdminRecoveryData();\n $sRedirectUrl = !empty($oRecoveryData->returnTo) ? $oRecoveryData->returnTo : $oUser->group_homepage;\n\n unsetAdminRecoveryData();\n\n $this->oUserFeedback->success(lang('auth_override_return', $oUser->first_name . ' ' . $oUser->last_name));\n\n } else {\n\n /**\n * This user is simply logging in as someone else and has passed the hash\n * verification.\n */\n\n $sRedirectUrl = $oInput->get('forward_to') ?: $oUser->group_homepage;\n\n $this->oUserFeedback->success(lang('auth_override_ok', $oUser->first_name . ' ' . $oUser->last_name));\n }\n\n // --------------------------------------------------------------------------\n\n // Record the event\n createUserEvent(\n 'did_log_in_as',\n [\n 'id' => $oUser->id,\n 'first_name' => $oUser->first_name,\n 'last_name' => $oUser->last_name,\n 'email' => $oUser->email,\n ]\n );\n\n // --------------------------------------------------------------------------\n\n // Replace current user's session data\n $oUserModel->setLoginData($oUser->id, true, true);\n\n // --------------------------------------------------------------------------\n\n redirect($sRedirectUrl);\n }", "public function signinAction()\n {\n // check request method\n if (Router::getMethod() == 'POST') {\n $username = Router::getParam('username');\n $password = Router::getParam('password');\n $remember = Router::getParam('remember') ? 1 : 0;\n\n $user = new User();\n // auth user with request params\n if (!$user->auth($username, $password)) {\n // add errors to display\n $this->setMessage($user->getErrors(), 'error');\n $this->setVars(array(\n 'username' => $username,\n 'remember' => $remember\n ));\n } else {\n // change session expire time\n $now = time();\n $expire = $remember ? ($now + 60 * 60 * 24 * 30 * 12) : ($now + 60 * 60 * 24); // 1 year : 1 day\n $params = session_get_cookie_params();\n setcookie(session_name(), $_COOKIE[session_name()], $expire, $params['path'], $params['domain'], $params['secure'], $params['httponly']);\n\n // remember user id to session\n $_SESSION['userId'] = $user->getUserId();\n\n Router::redirect('index', 'index');\n }\n } elseif (isset($_SESSION['userId'])) {\n Router::redirect('index', 'index');\n }\n $this->setVar('title', 'Sign in page');\n $this->render('signin');\n }", "public function login()\n {\n if (isset($_POST['signIn'])) {\n $userExist = $this->checkIfUserExist($_POST['login']);\n var_dump($userExist);\n \n if ($userExist === false) {\n header('Location: auth&alert=NotUser');\n exit();\n } else {\n $authUser = $this->usersManager->getAuthUser($_POST['login']);\n if (password_verify($_POST['password'], $authUser[0]->userPassword())) {\n $this->usersManager->setLastConnexionUser($authUser[0]->userId());\n $this->openSession($authUser[0]);\n } else {\n header('Location: auth&alert=Login');\n exit();\n }\n }\n } else {\n throw new Exception($this->datasError);\n }\n }", "public function login_user() {\n\n // Grab the username and password from the form POST\n $username = $this->input->post('username');\n $pass = $this->input->post('password');\n\n //Ensure values exist for username and pass, and validate the user's credentials\n if( $username && $pass && $this->validate_user($username,$pass)) {\n // If the user is valid, redirect to the main view\n redirect(base_url());\n } else {\n // Otherwise show the login screen with an error message.\n $this->show_login(true);\n }\n }", "function login() {\n\n $this->visitPath('/user/login');\n\n $loginForm = $this->getSession()->getPage()->findById('user-login-form');\n if (is_null($loginForm)) {\n throw new ExpectationException('Cannot find the login form.', $this->getSession()->getDriver());\n }\n\n $usernameField = $loginForm->findById('edit-name');\n $passwdField = $loginForm->findById('edit-pass');\n\n if (is_null($usernameField) or is_null($passwdField)) {\n throw new ExpectationException('Cannot find the authentication fields.', $this->getSession()->getDriver());\n }\n\n $usernameField->setValue($this->admin_username);\n $passwdField->setValue($this->admin_passwd);\n $loginForm->submit();\n\n $this->assertSession()->elementNotExists('css', '.messages--error');\n }", "public function login();", "public function login();", "public function login()\n\t{\n\t\tif($this->_identity===null)\n\t\t{\n\t\t\t$this->_identity=new UserIdentity($this->username,$this->password);\n\t\t\t$this->_identity->authenticate();\n\t\t}\n\t\tif($this->_identity->errorCode===UserIdentity::ERROR_NONE)\n\t\t{\n\t\t\t$duration=$this->rememberMe ? 3600*24*30 : 0; // 30 days\n\t\t\tYii::app()->user->login($this->_identity,$duration);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "public function login()\n {\n\t\t$login = Input::get('login');\n\t\t$password = Input::get('password');\n\t\ttry{\n\t\t\n\t\t\t$user = Auth::authenticate([\n\t\t\t\t'login' => $login,\n\t\t\t\t'password' => $password\n\t\t\t]);\n\t\t\t$this->setToken($user);\n\t\t\treturn $this->sendResponse('You are now logged in');\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\treturn $this->sendResponse($e->getMessage());\n\t\t}\n }", "function login()\n{\n\t$username = $this->Session->read('user');\n\tif ($username){\n\t$this->redirect('/inhabitants/');}\n\t\n\t$this->pageTitle = 'Login';\n\t\n\t$this->set('error', false);\n\t// jika form yg disubmit tidak kosong\n\tif ($this->data)\n\t{\n\t// jika username dan password cocok\n\t$results = $this->User->findByUsername($this->data['User']['username']);\n\t\tif ($results && $results['User']['password'] ==\n\t\tmd5($this->data['User']['password']))\n\t\t{\n\t\t\t$this->Session->write('user', $this->data['User']['username']);\n\t\t\t$this->Session->write('last_login', $results['User']['last_login']);\n\t\t\t$results['User']['last_login'] = date(\"Y-m-d H:i:s\");\n\t\t\t$this->User->save($results);\n\t\t\t// redirect\n\t\t\t$this->redirect('/users/');\n\t\t} else {\n\t\t\t$this->set('error', true);\n\t\t}\n\t}\n}", "public function ual_activity_login() {\n\n\t\t// Prevent user ID returning as 0.\n\t\t$user_reset = apply_filters( 'determine_current_user', false );\n\n\t\twp_set_current_user( $user_reset );\n\n\t\t// Store user id.\n\t\t$user_id = get_current_user_id();\n\n\t\t// If we have the user id, continue.\n\t\tif ( ! empty( $user_id ) ) {\n\t\t\t// Get user data with id.\n\t\t\t$user = get_userdata( $user_id );\n\n\t\t\t// Store a user name.\n\t\t\t$user_name = $user->display_name ? $user->display_name : $user->user_nicename;\n\n\t\t\t// Log this activity.\n\t\t\tdo_action( 'ual_log_action', $user->ID, $user_name . ' logged In', 'logged-in' );\n\t\t}\n\t}", "public function login()\n\t{\n\t\tif($this->_identity===null)\n\t\t{\n\t\t\t$this->_identity=new UserIdentity($this->username,$this->password);\n\t\t\t$this->_identity->authenticate();\n\t\t}\n\t\tif($this->_identity->errorCode===UserIdentity::ERROR_NONE)\n\t\t{\n $duration=$this->rememberMe ? 3600*24*30 : 0; // 30 days\n\n\t\t\tYii::app()->user->login($this->_identity,$duration);\n\n $lastLogin = date(\"Y-m-d H:i:s\");\n\n if(Yii::app()->user->tableName === 'tbl_user'){\n $sql = \"UPDATE tbl_user_dynamic SET ulast_login = :lastLogin WHERE user_id = :userid\";\n }\n if(Yii::app()->user->tableName === 'tbl_personnel'){\n $sql = \"UPDATE tbl_user_dynamic SET plast_login = :lastLogin WHERE user_id = :userid\";\n }\n if(Yii::app()->user->tableName === 'tbl_reader'){\n $sql = \"UPDATE tbl_user_dynamic SET rlast_login = :lastLogin WHERE user_id = :userid\";\n }\n $command = Yii::app()->db->createCommand($sql);\n $command->bindValue(\":userid\", $this->_identity->id, PDO::PARAM_STR);\n $command->bindValue(\":lastLogin\", $lastLogin, PDO::PARAM_STR);\n $command->execute();\n Tank::wipeStats();\n Yii::app()->user->setState('todayHasRecord',User::todayHasRecord());\n return true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "public static function login()\n {\n (new Authenticator(request()))->login();\n }", "private static function login() {\n if ( !self::validatePost() ) {\n return;\n }\n $_POST['email'] = strtolower($_POST['email']);\n \n $password = Helper::hash($_POST['password'].$_POST['email']);\n \n $result = Database::getUser($_POST['email'],$password);\n \n if ( $result === false || !is_array($result) ) {\n self::setError('Unbekannter Benutzername oder Passwort!<br>');\n return;\n }\n \n if ( count($result) != 1 ) {\n self::setError('Unbekannter Benutzername oder Passwort!<br>');\n return;\n }\n \n $_SESSION['user']['id'] = $result[0]['id'];\n $_SESSION['user']['email'] = $result[0]['email'];\n $_SESSION['user']['nickname'] = $result[0]['nickname'];\n $_SESSION['user']['verified'] = $result[0]['verified'];\n $_SESSION['user']['moderator'] = $result[0]['moderator'];\n $_SESSION['user']['supermoderator'] = $result[0]['supermoderator'];\n $_SESSION['loggedin'] = true;\n self::$loggedin = true;\n }", "public function logInUserChangesToLoggedInStatus() {\n\t\t$user = new Tx_Oelib_Model_FrontEndUser();\n\t\t$this->subject->logInUser($user);\n\n\t\t$this->assertTrue(\n\t\t\t$this->subject->isLoggedIn()\n\t\t);\n\t}", "public function login($user, $pass, $persistent);", "public function login() {\n\n $user_login = trim(in('id'));\n $user_pass = in('password');\n $remember_me = 1;\n\n $credits = array(\n 'user_login' => $user_login,\n 'user_password' => $user_pass,\n 'rememberme' => $remember_me\n );\n\n $re = wp_signon( $credits, false );\n\n if ( is_wp_error($re) ) {\n $user = user( $user_login );\n if ( $user->exists() ) ferror( -40132, \"Wrong password\" );\n else ferror( -40131, \"Wrong username\" );\n }\n else if ( in('response') == 'ajax' ) {\n // $this->response( user($user_login)->session() ); // 여기서 부터..\n }\n else {\n $this->response( ['data' => $this->get_button_user( $user_login ) ] );\n }\n\n }", "public function signin()\n\t{\n $user = new User();\n\n // If user can succesfully signin then signin\n if ($user->signin(Database::connection(), $_POST['username'], $_POST['password']))\n {\n $_SESSION['id'] = $user->id;\n return True;\n }\n\n return False;\n\t}", "public function actionLogin()\n {\n $this->layout = '/login';\n $manager = new Manager(['userId' => UsniAdaptor::app()->user->getId()]);\n $userFormDTO = new UserFormDTO();\n $model = new LoginForm();\n $postData = UsniAdaptor::app()->request->post();\n $userFormDTO->setPostData($postData);\n $userFormDTO->setModel($model);\n if (UsniAdaptor::app()->user->isGuest)\n {\n $manager->processLogin($userFormDTO);\n if($userFormDTO->getIsTransactionSuccess())\n {\n return $this->goBack();\n }\n }\n else\n {\n return $this->redirect($this->resolveDefaultAfterLoginUrl());\n }\n return $this->render($this->loginView,['userFormDTO' => $userFormDTO]);\n }", "public function login(&$objUser)\n\t\t{\n\t\t\tsession_regenerate_id(true);\n\t\t\t$_SESSION['id_admin'] = $objUser->id_usuario;\n\t\t\t$_SESSION['email_admin'] = $objUser->email;\n\t\t\t$_SESSION['user_lastactive_admin'] = time();\n\t\t\t$_SESSION['err'] = \"\";\n\t\t\t\n\t\t\t$this->data[\"logged\"] = true;\n\t\t\t\n\t\t\t//header(\"Location: \"._MSFW_PATH_);\n\t\t\t//exit();\n\t\t}", "function login()\r\n {\r\n if ($this->data)\r\n {\r\n // Use the AuthComponent's login action\r\n if ($this->Auth->login($this->data))\r\n {\r\n // Retrieve user data\r\n $results = $this->User->find(array('User.username' => $this->data['User']['username']), array('User.active'), null, false);\r\n // Check to see if the User's account isn't active\r\n\r\n if ($results['User']['active'] == 0)\r\n {\r\n // account has not been activated\r\n $this->Auth->logout();\r\n $this->flashNotice('Hello ' . $this->Session->read('Auth.User.username') . '. Your account has not been activated yet! Please check your mail and activate your account.', 'login');\r\n }\r\n // user is active, redirect post login\r\n else\r\n {\r\n $this->User->id = $this->Auth->user('id');\r\n $this->flashSuccess('Hello ' . $this->Session->read('Auth.User.username') . '. You have successfully logged in. Please choose your destination on the left menu.');\r\n $this->User->saveField('last_login', date('Y-m-d H:i:s') );\r\n $this->redirect(array('controller' => 'users', 'action' => 'login'));\r\n }\r\n }\r\n $this->flashWarning('You could not be logged in. Maybe wrong username or password?');\r\n }\r\n }", "public function dologinpage()\n\t\t{\n\t\t\t$userdata = array(\n\t\t\t\t'email' => Input::get('email'),\n\t\t\t\t'password' => Input::get('password')\n\t\t\t);\n\n\t\t\tif(Auth::attempt($userdata)) {\n\t\t\t\tSession::flash('successMessage', \"Welcome back, \" . Auth::user()->username . \"!\");\n\t\t\t\tSession::put('loggedinuser', Auth::user()->username);\n\t\t\t\treturn Redirect::intended('/posts');\n\t\t\t\t// $userid = DB::table('users')->where('username', Session::get('loggedinuser'))->pluck('id');\n\t\t\t\t// Session::put('loggedinid', $userid);\n\t\t\t\t\n\t\t\t\t// return Redirect::action('PostsController@index');\n\t\t\t} else {\n\t\t\t\tSession::flash('errorMessage', 'Your username or password is incorrect');\n\t\t\t\treturn Redirect::to('login');\n\t\t\t}\n\t\t}", "public function login() {\n\t\t/* if($this->Session->check('Auth.User')){\n\t\t\t$this->redirect(array('action' => 'home'));\t\n\t\t\t\t\t\n\t\t} */\n\t\t\n\t\t// if we get the post information, try to authenticate\n\t\tif ($this->request->is('post')) {\n\t\t\tif ($this->Auth->login()) {\n\t\t\t\t$this->Session->setFlash(__('Welcome, '. $this->Auth->user('username')));\n\t\t\t\t//$this->redirect($this->Auth->redirectUrl());\n\t\t\t\t$this->User->id = $this->Auth->user('id'); // target correct record\n\t\t\t\t$this->User->saveField('last_login_time', date(DATE_ATOM)); // save login time\n\t\t\t\t\n\t\t\t\t$this->redirect(array('action' => 'home'));\t\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash('Invalid username or password');\n\t\t\t}\n\t\t}\n\n\t}", "private function login(){\n \n }", "public function p_login() {\n\n\t\t# Sanitize the user entered data to prevent any funny-business (re: SQL Injection Attacks)\n\t\t$_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n\t\t# Hash submitted password so we can compare it against one in the db\n\t\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n\t\t# Search the db for this email and password\n\t\t# Retrieve the token if it's available\n\t\t$q = \"SELECT token \n\t\t\tFROM users \n\t\t\tWHERE email = '\".$_POST['email'].\"' \n\t\t\tAND password = '\".$_POST['password'].\"'\";\n\n\t\t$token = DB::instance(DB_NAME)->select_field($q);\n\n\t\t# If we didn't find a matching token in the database, it means login failed\n\t\tif(!$token) {\n\n\t\t\t# Send them back to the login page\n\t\t\tRouter::redirect(\"/users/login/error\");\n\n\t\t# But if we did, login succeeded! \n\t\t} else {\n\t\t\tsetcookie(\"token\", $token, strtotime('+1 year'), '/');\n\t\t\t# Send them to the main page - or whever you want them to go\n\t\t\tRouter::redirect(\"/\");\n\t\t}\n\t}", "function loggedin() {\n $this->checkAccess('user',false,false);\n\n $template = new Template;\n $user = new User($this->db);\n\n //get user details\n $user->getByEmail($this->f3->get('SESSION.email'));\n $this->f3->set('user', $user);\n\n //get user followers\n $this->f3->set('followers', $user->getUserFollowers($this->f3->get('SESSION.cid'))[0]);\n\n //get user waiting position\n $this->f3->set('waitrank', $user->getUserWaitPosition($this->f3->get('SESSION.cid'))[0]);\n\n echo $template->render('header.html');\n echo $template->render('user/user.html');\n echo $template->render('footer.html');\n }", "public function loginUser($params) {\n return $this->run('loginUser', array($params));\n }", "public function usersLogin() {\n // login uses its own handle\n $httpLogin = $this->_prepareLoginRequest();\n $url = $this->_appendApiKey($this->uriBase . '/users/login.json');\n $data = array('login' => $this->username, 'password' => $this->password);\n return $this->_processRequest($httpLogin, $url, 'post', $data);\n }", "public function loginAction()\n {\n $data = $this->getRequestData();\n if ($this->getDeviceSession(false)) {\n $this->setErrorResponse('Your device is already running a session. Please logout first.');\n }\n $session = Workapp_Session::login($data['username'], $data['password']);\n if (!$session) {\n $this->setErrorResponse('No user with such username and password');\n }\n $session->registerAction($_SERVER['REMOTE_ADDR']);\n $this->_helper->json(array('session_uid' => $session->getSessionUid()));\n }", "private function logIn(User $user): void\n {\n $session = self::$container->get('session');\n\n $firewallName = 'main';\n $firewallContext = 'main';\n\n $token = new UsernamePasswordToken($user, null, $firewallName, $user->getRoles());\n $session->set('_security_'.$firewallContext, serialize($token));\n $session->save();\n\n $cookie = new Cookie($session->getName(), $session->getId());\n $this->httpClient->getCookieJar()->set($cookie);\n }", "private function logIn()\n {\n $element = new Submit('login');\n $element->setAttribute('class', 'btn btn-info btn-lg btn-block text-uppercase waves-effect waves-light');\n $element->setUserOption('mainClass', 'form-group text-center m-t-20');\n $this->add($element);\n }", "function userLogin()\n\t{\n\t\t$userName = $_POST['userName'];\n\t\t$password = $_POST['userPassword'];\n\t\t$rememberData = $_POST['rememberData'];\n\n\t\t# Verify if the user currently exists in the Database\n\t\t$result = validateUserCredentials($userName);\n\n\t\tif ($result['status'] == 'COMPLETE')\n\t\t{\n\t\t\t$decryptedPassword = decryptPassword($result['password']);\n\n\t\t\t# Compare the decrypted password with the one provided by the user\n\t\t \tif ($decryptedPassword === $password)\n\t\t \t{\n\t\t \t$response = array(\"status\" => \"COMPLETE\");\n\n\t\t\t # Starting the sesion\n\t\t \tstartSession($result['fName'], $result['lName'], $userName);\n\n\t\t\t # Setting the cookies\n\t\t\t if ($rememberData)\n\t\t\t\t{\n\t\t\t\t\tsetcookie(\"cookieUserName\", $userName);\n\t\t\t \t}\n\t\t\t echo json_encode($response);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdie(json_encode(errors(306)));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdie(json_encode($result));\n\t\t}\n\t}", "public function userLogin($userModel) {\n // Validating the input on back-end\n $validateUsername = $this->validate->validateInput($userModel->getUsername(), \"/^[a-zA-Z0-9_.-]*$/\", 1, 25);\n $validatePassword = $this->validate->validateInput($userModel->getPassword(), \"/^[a-zA-Z0-9@+_.!?|]*$/\", 8, 20);\n\n // Checking if they all return true\n if ($validateUsername && $validatePassword) {\n // Sending the data to the datalayer login function\n $userID = $this->userDB->userLogin($userModel);\n $userModel->setID($userID);\n\n if ($userModel->getID() != null) {\n // Starting the session\n session_start();\n $_SESSION['userID'] = $userModel->getID();\n\n // Sending the user to the home page\n header(\"Location: index\");\n } else {\n // Reloading the page with an error\n header(\"Location: login?error=2\");\n }\n } else {\n // Reloading the page with an error\n header(\"Location: login?error=1\");\n }\n }", "public static function loginBySession()\n\t{\n\t\tif (Sessions::get('loggedIn')) :\n\t\t\tAuth::redirectUser(Sessions::get('user/type'));\n\t\tendif;\n\t}", "public function login() {\n\t\tif ($this->_identity === null) {\n\t\t\t$this->_identity = new UserIdentity($this->username, $this->password, $this->loginType);\n\t\t\t$this->_identity->authenticate();\n\t\t}\n\t\tif ($this->_identity->errorCode === UserIdentity::ERROR_NONE) {\n\t\t\t$duration = $this->rememberMe ? 3600 * 24 * 30 : 0; // 30 days or the default session timeout value\n\t\t\tYii::app()->user->login($this->_identity, $duration);\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "function login() \n\t{\n // Specify the navigation column's path so we can include it based\n // on the action being rendered\n \n \n // check for cookies and if set validate and redirect to corresponding page\n\t\t$this->viewData['navigationPath'] = $this->getNavigationPath('users');\n\t\t$this->renderWithTemplate('users/login', 'MemberPageBaseTemplate');\n\t\t\n }" ]
[ "0.75781506", "0.7324238", "0.72898465", "0.72539926", "0.72523606", "0.72420436", "0.713991", "0.7139465", "0.7107931", "0.70777375", "0.70596415", "0.70445204", "0.70346266", "0.7022269", "0.70035136", "0.70011777", "0.6968064", "0.6928372", "0.6900205", "0.6899876", "0.6887071", "0.68723", "0.68633187", "0.685603", "0.6846873", "0.68360496", "0.6810325", "0.6787381", "0.67840165", "0.67233044", "0.6722759", "0.6718321", "0.6713368", "0.67071134", "0.670072", "0.67001885", "0.66995454", "0.6699313", "0.6688967", "0.66845864", "0.6683832", "0.6682704", "0.6679801", "0.6676831", "0.6665164", "0.6662451", "0.6661516", "0.6655907", "0.6644986", "0.6643509", "0.6634542", "0.6630335", "0.66301703", "0.6620859", "0.6614835", "0.6600058", "0.6598739", "0.6598558", "0.6593877", "0.65871376", "0.6576471", "0.6568354", "0.6553601", "0.654114", "0.653743", "0.6536513", "0.65239173", "0.6520399", "0.651435", "0.6504229", "0.6501245", "0.6501245", "0.6500638", "0.64776975", "0.6476794", "0.6474322", "0.6465209", "0.64602053", "0.6457517", "0.6455975", "0.6448773", "0.6448453", "0.644606", "0.64438236", "0.6441814", "0.6441245", "0.64380556", "0.6431951", "0.64312476", "0.6430498", "0.64244634", "0.64190346", "0.64138585", "0.6405615", "0.64052033", "0.6402157", "0.64008826", "0.6397794", "0.63950866", "0.6394811", "0.63899684" ]
0.0
-1
Logs out the current user.
public function actionLogout() { Yii::$app->user->logout(); return $this->goLogin(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function logOut()\n {\n $auth = new AuthenticationService();\n\n if ($auth->hasIdentity()) {\n Session::getDefaultManager()->forgetMe();\n $auth->clearIdentity();\n }\n }", "public function LogOut() {\n\t\t$this->session->UnsetAuthenticatedUser();\n\t\t$this->session->AddMessage('success', \"You have been successfully logged out.\");\n\t}", "public function logOutUser() {\r\n\t\tif (isset($_SESSION)) {\r\n\t\t\tunset($_SESSION);\r\n\t\t\tsession_unset();\r\n\t\t\tsession_destroy();\r\n\t\t}\r\n\t\theader('Location: /');\r\n\t}", "public static function logOut()\r\n {\r\n (new Session())->remove(static::$userIdField);\r\n }", "public function logoutUser() {\r\n\t\t$this->coreAuthenticationFactory->logoutUser ();\r\n\t}", "public function logout(){\n $this->_user->logout();\n }", "function logout()\n {\n $user = $this->getAuthenticatedUser();\n if (!$user) return;\n\n unset($_SESSION['MFW_authenticated_user']);\n }", "public function Logout() {\n\n $cookie = json_decode(\\FluitoPHP\\Request\\Request::GetInstance()->\n Cookie($this->\n config['id']), true);\n\n if (isset($cookie['salt_id'])) {\n\n $this->\n database->\n Conn($this->\n GetConn())->\n Helper()->\n Delete($this->\n GetPrefix() . 'usersalt', array(\n array(\n 'column' => 'salt_id',\n 'operator' => '=',\n 'rightvalue' => $cookie['salt_id']\n )\n ))->\n Query();\n\n \\FluitoPHP\\Response\\Response::GetInstance()->\n SetCookie($this->\n config['id'], '', 0, '', '', false, true);\n }\n\n $this->\n currentUser = null;\n }", "public function logout()\n {\n $this->session->remove('user');\n }", "function LogOut() {\n\t\tunset($user);\n\t\t$loggedIn=false;\n\t}", "public function logout() {\n\t\t# Generate and save a new token for next login\n\t\t$new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string() );\n\n\t\t# Create the data array we'll use with the update method\n\t\t# In this case, we're only updating one field, so our array only has one entry\n\t\t$data = Array(\"token\" => $new_token);\n\n\t\t# Do the update\n\t\tDB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\n\t\t# Delete their token cookie by setting it to a date in the past - effectively logging them out\n\t\tsetcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\n\t\t# Send them back to the main index.\n\t\tRouter::redirect(\"/\");\n\t}", "public function logOut(){\r\n\t\t// Starting sessions\r\n\t\tsession_start();\r\n\t\t\r\n\t\t// Emptying sessions\r\n\t\t$_SESSION['userID'] = '';\r\n\t\t$_SESSION['logged_in'] = false;\r\n\t\t\r\n\t\t// Destroying sessions\r\n\t\tsession_destroy();\r\n\t\theader(\"Location: ?controller=home\");\r\n\t\texit();\r\n\t}", "public function logOut () : void {\n $this->destroySession();\n }", "public function logout(): void\n\t{\n\t\t/** @var \\App\\Models\\User $user */\n\t\t$user = Auth::user();\n\t\tLog::channel('login')->info(__METHOD__ . ':' . __LINE__ . ' -- User (' . $user->username . ') has logged out.');\n\t\tAuth::logout();\n\t\tSession::flush();\n\t}", "public function logout()\n {\n if ( !$this->isAuthenticated() )\n {\n return;\n }\n\n $event = new OW_Event(OW_EventManager::ON_USER_LOGOUT, array('userId' => $this->getUserId()));\n OW::getEventManager()->trigger($event);\n\n $this->authenticator->logout();\n }", "public function logout() {\n\t\tAuth::clear('userLogin');\n\t\t$this->redirect(array('action'=>'login'));\n\t}", "public function logout(){\n\t\t$new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string());\n\t\t\n\t\t# Create the data array we'll use with the update method\n\t\t$data = Array(\"token\" => $new_token);\n\n\t\t# Do the update\n\t\tDB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\t\t\n\t\t# Delete their token cookie by setting it to a date in the past - effectively logging them out\n\t\tsetcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\n\t\t#send back to main index\n\t\tRouter::redirect(\"/\");\n\t}", "public function Logout() {\n $this->session->UnsetAuthenticatedUser();\n $this->profile = array();\n $this->AddMessage('success', \"You have logged out.\");\n }", "public function logout()\n {\n $this->Auth->logout();\n $this->login();\n }", "public function logout() {\n\t$new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string());\n\t\n\t# Create the data array we'll use with the update method\n\t# In this case, we're only updating one field, so our array only has one entry\n\t$data = Array(\"token\" => $new_token);\n\t\n\t# Do the update\n\tDB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\t\n\t# Delete their token cookie - effectively logging them out\n\tsetcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\t\n\tRouter::redirect(\"/users/login\");\n }", "public static function logout() {\n\t\tif (self::logged_in()) {\n\t\t\tSession::delete('user');\n\t\t\tsetcookie(\"remember\", null, -1);\n\t\t\tSession::setFlash(\"alert-success\", \"Logged out successfully.\");\n\t\t\theader(\"Location: index.php\");\n\t\t} else {\n\t\t\tSession::setFlash(\"alert-danger\", \"Already logged out.\");\n\t\t\theader(\"Location: index.php\");\n\t\t}\n\t}", "public function logout()\n {\n $this->Session->delete('User');\n\n $this->redirect($this->Auth->logout());\n }", "public function logout() {\n $db = Db::getInstance();\n $user = new User($db);\n $user->logout();\n }", "public function Logout()\n\t{\n\t\t$this->user->Logout();\n\t\t$this->RedirectToController();\n\t}", "public function logout(){\n $new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string());\n\n # Create the data array we'll use with the update method\n # In this case, we're only updating one field, so our array only has one entry\n $data = Array(\"token\" => $new_token);\n\n # Do the update\n DB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\n # Delete their token cookie by setting it to a date in the past - effectively logging them out\n setcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\n # Send them back to the main index.\n Router::redirect(\"/\");\n }", "public function logoutUser() {\n $this->debugPrint(\"Logging out user...\");\n\n if ($this->auth_http_method == 'DIGEST')\n $data = $this->parseDigest($_SERVER['PHP_AUTH_DIGEST']);\n\n if ($this->session_check_method == 'BOTH' || $this->session_check_method == 'NONCE' && !empty($data))\n $this->{$this->nonce_expire_function}($data['nonce']);\n if ($this->session_check_method == 'BOTH' || $this->session_check_method == 'COOKIE') {\n session_start();\n $_SESSION['lastseen'] = time() - ($this->cookie_expire + 3600 );\n }\n if ($this->redirect_on_logout) {\n echo <<<EOF\n <html>\n <meta http-equiv=\"refresh\" content=\"0; url={$this->redirect_on_logout_url}?error=2\" />\n <body><h2>{$this->logout_text}</h2></body>\n </html>\nEOF;\n } else {\n echo \"<html><body><h2>{$this->logout_text}</h2></body></html>\";\n }\n exit();\n }", "public function logout() {\n $new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string());\n\n # Create the data array we'll use with the update method\n # In this case, we're only updating one field, so our array only has one entry\n $data = Array(\"token\" => $new_token);\n\n # Do the update\n DB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\n # Delete their token cookie by setting it to a date in the past - effectively logging them out\n setcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\n # Send them back to the main index.\n Router::redirect(\"/\");\n\n }", "public function logUserOut()\n\t{\n\t\t# destroy the session\n\t\tSession::flush();\n\n\t\t# generate a new session ID\n\t\tSession::regenerate();\n\n\t\t# ... and show the homepage\n\t\treturn Redirect::home();\n\t}", "public function logout() {\n # Generate and save a new token for next login\n $new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string());\n\n # Create the data array we'll use with the update method\n # In this case, we're only updating one field, so our array only has one entry\n $data = Array(\"token\" => $new_token);\n\n # Do the update\n DB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\n # Delete their token cookie by setting it to a date in the past, logging them out\n setcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\n # Send them back to the main index.\n Router::redirect(\"/\");\n }", "public function logout() {\n\t\t//Log this connection into the users_activity table\n\t\t\\DB::table('users_activity')->insert(array(\n\t\t\t'user_id'=>$this->user->attributes[\"id\"],\n\t\t\t'type_id'=>15,\n\t\t\t'data'=>'Log out',\n\t\t\t'created_at'=>date(\"Y-m-d H:i:s\")\n\t\t));\n\t\t$this->user = null;\n\t\t$this->cookie($this->recaller(), null, -2000);\n\t\tSession::forget($this->token());\n\t\t$this->token = null;\n\t}", "public function logout() {\n\t\t$user = $this->Auth->user();\n\t\t$this->Session->destroy();\n\t\t$this->Cookie->destroy();\n\t\t$this->Session->setFlash(sprintf(__('%s you have successfully logged out'), $user[$this->{$this->modelClass}->displayField]));\n\t\t$this->redirect($this->Auth->logout());\n\t}", "public function logoutUser() {\n $this->session->unsetSession(self::$storedUserId);\n $this->session->setFlashMessage(2);\n self::$isLoggedIn = false;\n }", "public function logout()\n {\n $this->user_provider->destroyAuthIdentifierSession();\n\n \\session()->flush();\n \n $this->user = null;\n\n $this->loggedOut = true;\n }", "function logout() {\r\n $this->auth->logout();\r\n }", "Public Function Logout()\n\t{\n\t\tunset($_SESSION['User']);\n\t}", "static function logout() {\n self::forget(self::currentUser());\n unset($_SESSION['userId']);\n session_destroy();\n }", "public function log_out() {\n $this->store_token(null);\n }", "public function logOut(){\n $this->authToken=\"\";\n $this->loggedUser=\"\";\n $this->clearAuthCookie();\n }", "public static function logout() {\n Session::forget('user');\n redirect('/login');\n }", "public function logout()\n {\n $this->removeRememberMeCookie();\n }", "public static function logoutUser( ) {\r\n self::$database->update(\"UPDATE users set sid=? where sid=?\", \r\n \"\", session_id());\r\n session_destroy();\r\n }", "public function userLogout() {\n // Starting a session to unset and destroy it\n session_start();\n session_unset();\n session_destroy();\n\n // Sending the user back to the login page\n header(\"Location: login\");\n }", "public function logoutUser()\n\t{\n\t\t\\JFactory::getApplication()->logout();\n\t}", "public function logout()\n\t{\n\t\t$this->session->unset_userdata(array(\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_LOGGED_IN',\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_ID',\n\t\t\t\t\t\t\t\t\t\t\t'VB_FULL_NAME',\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_EMAIL',\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_MOBILE',\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_CURRENT_PATH',\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_LAST_LOGIN'));\n\t\t\t\t\t\t\n\t\tredirect(base_url());\n\t}", "public static function logOut()\n {\n self::startSession();\n session_destroy();\n }", "public function logout()\n {\n $user = $this->user();\n\n // If we have an event dispatcher instance, we can fire off the logout event\n // so any further processing can be done. This allows the developer to be\n // listening for anytime a user signs out of this application manually.\n $this->clearUserDataFromStorage();\n\n if (isset($this->events)) {\n $this->events->dispatch(new LogoutEvent($this->name, $user));\n }\n\n // Once we have fired the logout event we will clear the users out of memory\n // so they are no longer available as the user is no longer considered as\n // being signed into this application and should not be available here.\n $this->user = null;\n\n $this->loggedOut = true;\n }", "public function logout() {\n $this->run('logout', array());\n }", "public function logout()\n {\n DbModel::logUserActivity('logged out of the system');\n\n //set property $user of this class to null\n $this->user = null;\n\n //we call a method remove inside session that unsets the user key inside $_SESSION\n $this->session->remove('user');\n\n //we then redirect the user back to home page using the redirect method inside Response class\n $this->response->redirect('/');\n\n\n }", "public function logOut() {\n\t$this->isauthenticated = false;\n\tunset($_SESSION['clpauthid'], $_SESSION['clpareaname'], $_SESSION['clpauthcontainer']);\n\tsession_regenerate_id();\n}", "public function logout(){\n unset($_SESSION['user_id']);\n \n session_destroy();\n redirect('users/login');\n }", "public function logout()\n {\n if (isset($_SESSION['user_id']))\n {\n unset($_SESSION['user_id']);\n }\n redirect('', 'location');\n }", "public function logout ()\n {\n User::logout(\"home\");\n }", "public function logout() {\n\t\t$this->setLoginStatus(0);\n\t}", "public function logout() {\n unset($_SESSION['user_id']);\n unset($_SESSION['user_email']);\n unset($_SESSION['user_name']);\n session_destroy();\n redirect('');\n }", "public function Logout() {\n\n\t\t$this->CI->session->unset_userdata(array('username', 'password'));\n\n\t}", "public function logoutUser()\n {\n // Unset session-key user\n $this->di->get(\"session\")->delete(\"my_user_id\");\n $this->di->get(\"session\")->delete(\"my_user_name\");\n //$this->di->get(\"session\")->delete(\"my_user_password\");\n $this->di->get(\"session\")->delete(\"my_user_email\");\n //$this->di->get(\"session\")->delete(\"my_user_created\");\n //$this->di->get(\"session\")->delete(\"my_user_updated\");\n //$this->di->get(\"session\")->delete(\"my_user_deleted\");\n //$this->di->get(\"session\")->delete(\"my_user_active\");\n $this->di->get(\"session\")->delete(\"my_user_admin\");\n }", "public function userLogout() {\n session_destroy();\n header('Location: index.php');\n }", "public function logout() {\n\t\tSentry::logout();\n\t\tredirect(website_url('auth'));\n\t}", "public function logOut() {\r\n //Logs when a user exit\r\n $ctrLog = new ControllerLog();\r\n $ctrLog->logOff();\r\n\r\n header('location:../index');\r\n session_destroy();\r\n }", "public function logout() {\n\t\t\tunset( $_SESSION['user_id'] );\n\t\t\tunset( $this->user_id );\n\t\t\t$this->logged_in = false;\n\t\t}", "function logout()\n\t{\n\n\t\t// log the user out\n\t\t$this->session->sess_destroy();\n\n\t\t// redirect them to the login page\n\t\tredirect('auth', 'refresh');\n\t}", "public function logoff()\n\t{\n\t\t$this->session->sess_destroy();\n\t\tredirect(base_url());\n\t}", "public static function user_logout()\n {\n // Check if the cookie is set\n if( is_array($_COOKIE) )\n {\n foreach($_COOKIE as $key => $blah)\n {\n setcookie( $key, false, $_SERVER['REQUEST_TIME'] - 3600, '/', \n (isset($_ENV['SERVER_PROTOCOL']) && (strpos($_ENV['SERVER_PROTOCOL'],'https') \n || strpos($_ENV['SERVER_PROTOCOL'],'HTTPS'))) );\n unset($_COOKIE[$key]);\n }\n }\n AuthUser::logout();\n // Delete the session cookie as well\n if( ini_get(\"session.use_cookies\") )\n {\n $params = session_get_cookie_params();\n setcookie( session_name(), '', time() - 3600,\n $params['path'], $params['domain'], \n $params['secure'], $params['httponly'] );\n }\n // Destroy the session\n session_destroy();\n \n redirect(URL_PUBLIC);\n }", "public function Logout()\n\t{\n // autologin for the same user. For demonstration purposes,\n // we don't do that here so that the autologin function remains\n // easy to test.\n //$ulogin->SetAutologin($_SESSION['username'], false);\n\t\tunset($_SESSION['uid']);\n\t\tunset($_SESSION['username']);\n\t\tunset($_SESSION['loggedIn']);\n\t\t$this->load->view('layout/login.php');\n\t}", "public function logout() {\n\t\t$this->session->unset_userdata('uid');\n\t\tredirect('/', 'refresh');\n\t}", "public function logOut()\n {\n $this->getElement('Toolbar')->logOut();\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\t\tif($this->session->userdata(\"username\"))\n\t\t\t$this->session->unset_userdata('username');\n\t\tredirect('user/login', 'refresh');\n\t}", "public function logout()\n {\n $this->userId = 0;\n $this->createSession();\n $this->logger->loginOutEntry(2);\n }", "function logout()\n\t\t{\n\t\t\t// log the user out\n\t\t\t$logout = $this->ion_auth->logout();\n\t\t\tredirect('login');\n\t\t}", "public function logout(){\n session_unset($_SESSION[\"user\"]);\n }", "public function logOut()\n {\n $this->_db->delete('sessions', array('user_id', '=', $this->id));\n Cookie::delete($this->_cookie);\n Session::delete($this->_session);\n Redirect::to('index.php');\n return true;\n }", "public function logout() {\n\t\t$this->clearCookies();\n\t}", "public function logout(){\r\n unset($_SESSION['user_id']);\r\n unset($this->user_id);\r\n $this->signed_in = false;\r\n }", "public function logout() {\n $this->_disconnect_user();\n redirect(base_admin_url('identification'), 'refresh');\n }", "public static function logout(){\n \n //Tornando se sessão User nulla\n $_SESSION[User::SESSION] = null;\n \n }", "public function logout() \n {\n UserModel::logout();\n\n // redirect the user back home\n Redirect::to('home');\n }", "public function logout()\n {\n $this->webUser = false;\n $this->refresh();\n \\Bdr\\Vendor\\Database::logout();\n }", "public function logout() {\n\n /**\n * Delete cookies - the time must be in the past,\n * so just negate what you added when creating the\n * cookie.\n */\n if (isset($_COOKIE['cookname']) && isset($_COOKIE['cookid'])) {\n setcookie(\"cookname\", \"\", time() - COOKIE_EXPIRE, COOKIE_PATH);\n setcookie(\"cookid\", \"\", time() - COOKIE_EXPIRE, COOKIE_PATH);\n }\n\n /* Unset PHP session variables */\n unset($_SESSION['username']);\n unset($_SESSION['user_id']);\n\n /* Reflect fact that user has logged out */\n $this->logged_in = false;\n\n /**\n * Remove from active users table and add to\n * active guests tables.\n */\n $this->connection->removeActiveUser($this->username);\n $this->connection->addActiveGuest($_SERVER['REMOTE_ADDR'], $this->time);\n\n /* Set user level to guest */\n $this->username = GUEST_NAME;\n $this->userlevel = GUEST_LEVEL;\n }", "public function logout()\n {\n // Logging\n // user_log($this->Session['username'], 'Heeft zich uitgelogd.');\n\n $this->DBsession->deleteSession($this->Session['id']);\n $this->user->setOffline();\n\n $this->session->unset_userdata('logged_in');\n $this->session->unset_userdata('Permissions');\n $this->session->sess_destroy();\n redirect('Admin', 'refresh');\n }", "public function logout() {\n $auth_cookie = Cookie::get(\"auth_cookie\");\n if ($auth_cookie != '') {\n $this->deleteCookie($auth_cookie);\n }\n }", "public function logout()\r\n\t{\r\n\t\tif(!$this->loggedIn()) return;\r\n\t\t$query = 'UPDATE users SET fingerprint=NULL WHERE id=' . $this->user->id . ' LIMIT 1';\r\n\t\tmysql_query($query);\r\n\t\tsetcookie('qw_login', '', time()-60*60*24, '/');\r\n\t\tsetcookie('tree_grid_cookie', '', time()-60*60*24, '/');\r\n\t\t$this->user = false;\r\n\t}", "public static function logout(): void\n {\n // Remove from the session (user object)\n unset($_SESSION['user']);\n }", "public function logout() {\n $logout = $this->ion_auth->logout();\n\n // redirect them back to the login page\n redirect('login');\n }", "public static function actionLogout() {\n unset($_SESSION['user']);\n header(\"Location: /\");\n }", "public function LogOut()\n {\n session_destroy();\n }", "public function logout() {\n\t\t\t// Unset the user ID from the cookie.\n\t\t\tunset($this->uid);\n\t\t\t\n\t\t\t// Set all cookies to expire immediately.\n\t setcookie('PHPSESSID', 0);\n\t\t\tsetcookie('fauth', 0);\n\t\t\t\n\t\t\t// Log the Session object out.\n\t\t\t$this->logged_in = false;\n\t\t\t\n\t\t\t// Unset all session variables.\n\t\t\t$_SESSION['uid'] = 0;\n\t\t\t$_SESSION['username'] = \"\";\n\t\t\t\n\t\t\t// Destroy the session.\n\t\t\tsession_destroy();\n\t\t}", "public function logoff(){\n\t ServiceSession::destroy();\n\t Redirect::to(\"/login\")->do();\n\t }", "public function logoutUser() {\n $this->session->unset_userdata('username');\n $this->session->unset_userdata('userId');\n $this->session->unset_userdata('logged_in');\n $this->session->sess_destroy();\n redirect('/UserController/login');\n }", "private function logout() {\n }", "public function actionLogout() {\n Yii::app()->user->logout(false);\n Yii::app()->user->setFlash('info', 'You are no longer logged in!');\n $this->redirect(Yii::app()->homeUrl);\n }", "public function user_logout()\n {\n $this->session->sess_destroy();\n redirect('userController/login_view', 'refresh');\n }", "public function logout() {\t\n\t\t$this->Session->destroy();\n\t\t$this->delete_cookie('KEYADMUSER');\n\t\t$this->disable_cache();\t\t\n\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>You have successfully signed off', 'default', array('class' => 'alert alert-success'));\n\t\t$this->redirect('/admin/login/');\n\n\t}", "public function logout()\n {\n $this->user = null;\n $this->synchronize();\n unset($_SESSION);\n }", "public function logoff(){\n\t\tsession_destroy();\n\t\theader('location: ../view/login.php');\n\t\texit;\n\t}", "final public function logout(): void\n {\n $this->logoutImpl();\n if (isset($this->session->authData['username'])) {\n $this->context->getLogger()->logSys(\n get_class($this) . '::' . __FUNCTION__,\n 'User \"' . $this->session->authData['username'] . '\" has logged out',\n \\Ptf\\Util\\Logger::INFO\n );\n }\n $this->session->authData = [];\n }", "public function logout()\r\n {\r\n unset($_SESSION['logged_user']);\r\n session_destroy();\r\n directTo(transRootConfig('app_config', 'app_login_index'));\r\n }", "public function logout()\n {\n $this->deleteSession();\n }", "public function logout()\n {\n $this->getAuth()->clearIdentity();\n }", "public function logout()\n\t{\n\t\t$this->user = null;\n\n\t\t$this->session->forget(static::$key);\n\t}", "public function logout(){\n session_destroy();\n $arr = array(\n 'sessionID' => ''\n );\n dibi::query('UPDATE `user` SET ', $arr, \n 'WHERE `email`=%s', $email);\n parent::redirection(\"index.php\");\n }" ]
[ "0.8112607", "0.8039954", "0.79536504", "0.794088", "0.7931162", "0.7927228", "0.7886047", "0.7871737", "0.7854892", "0.7783059", "0.77484393", "0.7744306", "0.77314657", "0.77302647", "0.77201074", "0.7706881", "0.76974803", "0.7685858", "0.7677316", "0.76711166", "0.76537395", "0.7650804", "0.7649912", "0.7643162", "0.76377213", "0.76341015", "0.76307225", "0.76275903", "0.76251537", "0.76206374", "0.7601324", "0.7582987", "0.7561306", "0.75586617", "0.7556745", "0.7547582", "0.7544566", "0.7539049", "0.7533373", "0.7527994", "0.75248283", "0.75226927", "0.7505519", "0.74923205", "0.7490774", "0.7469337", "0.7462369", "0.7449379", "0.7428595", "0.7422396", "0.7418417", "0.741741", "0.7410298", "0.74101436", "0.74039924", "0.7403745", "0.7392325", "0.7390951", "0.738762", "0.73843724", "0.7380801", "0.73740536", "0.7373943", "0.73738194", "0.7373222", "0.7369694", "0.7366816", "0.73637396", "0.735894", "0.73574394", "0.73516387", "0.73461795", "0.7340872", "0.7335322", "0.73340076", "0.7333987", "0.73230094", "0.7306368", "0.7304445", "0.7300601", "0.7292319", "0.72875667", "0.7283873", "0.72704315", "0.7262326", "0.72575", "0.72516394", "0.7247292", "0.7239871", "0.7237572", "0.7233325", "0.72329473", "0.7228727", "0.72270274", "0.7226349", "0.7222785", "0.72213423", "0.7219468", "0.7214693", "0.7213362", "0.72126126" ]
0.0
-1
/ Excluir o cashback e a variacao
public function deletePromocao($promocao) { CB07CASHBACK::deleteAll(['CB07_VARIACAO_ID' => $promocao]); CB06VARIACAO::deleteAll(['CB06_ID' => $promocao]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function desreservarStock(){\n $registrosReservas = ProductosTransacciones::obtenerTransacciones('pedido_id',$this->id_pedido);\n\n //Tengo que crear movimientos por reserva segun el stock disponible y prioridad de las bodegas\n foreach ($registrosReservas as $transaccion) {\n\n //Revierto transaccion\n $transaccion->revertir();\n\n }\n }", "private function sellTrasactionAddsMoney(){\n\n }", "function removeRegistro($id) {\n GLOBAL $con;\n\n //busca info\n $querybusca = \"select * from kardexs where id='\" . $id . \"'\";\n $qry = mysql_query($querybusca);\n $linha = mysql_fetch_assoc($qry);\n\n //Apagua\n $query = \"delete from kardexs where id='\" . $id . \"'\";\n mysql_query($query, $con) or die(mysql_error());\n\n if (saldoExiste($linha['produto_id'], $linha['estoque_id'])) {\n //atualiza retirando saldo\n $saldoAtual = saldoByEstoque($linha['produto_id'], $linha['estoque_id']);\n if ($linha['sinal'] == '+') {\n $saldoAtual_acerto = $saldoAtual - $linha['qtd'];\n } else {\n $saldoAtual_acerto = $saldoAtual + $linha['qtd'];\n }\n\n\n saldo_atualiza($linha['produto_id'], $linha['estoque_id'], $saldoAtual_acerto);\n }\n}", "function borrar_prov_serv_cost($idproveedor,$idservicio){\n\t\t$sql=\"\n\t\tDELETE FROM catalogo_proveedor_servicio_costo_negociado WHERE IDPROVEEDOR='$idproveedor' AND IDSERVICIO='$idservicio'\n\t\t\";\n\t\t$this->query($sql);\n\t\treturn;\n\t}", "function suppProduit($id_produit) // example ref 30\n{\n //on transmet à la foncton predefini araay_search l'id_produit du produit en rupture de stock\n // array_search() retourne l'indice du tableau ARRAY auquel se trouve l'id_produit à supprimer\n\n //recupere l'indice du tableau afin de pouvoir supprime tt les lignes du tableau panier\n $positionProduit = array_search($id_produit, $_SESSION['panier']['id_produit']); //[1] example car produit rupture de stock\n\n\n //si la valeur de $positionProduit est different de FALSE, cela veut dire que l'id produit a supprimer a bien été trouvé\n //dans le panier de la session\n if ($positionProduit !== false) {\n\n\n //array_splice() permet de supprimer des elements d'un tableay ARRAY\n //on supprime chaque ligne dans les tableaux ARRAY du produit en rupture de stock\n //array_splice() re organise les tableaux ARRAY, c'est à dire que tout les elements aux indices inférieur\n //remontent aux indices superieur, le produit stocké à l'indice 3 du teableau ARRAY remonte à l'indice 2 du tableau ARRAY\n\n\n // supprimer dans tab photo ==> indice $positionproduit et 1 correspond à 1 element\n array_splice($_SESSION['panier']['id_produit'], $positionProduit, 1);\n array_splice($_SESSION['panier']['photo'], $positionProduit, 1);\n array_splice($_SESSION['panier']['reference'], $positionProduit, 1);\n array_splice($_SESSION['panier']['titre'], $positionProduit, 1);\n array_splice($_SESSION['panier']['quantite'], $positionProduit, 1);\n array_splice($_SESSION['panier']['prix'], $positionProduit, 1);\n }\n}", "public function appr_paid($paid_id) {\n\n\t\t$sql = $this->query(\"SELECT * FROM `app_order` WHERE `id` = '$paid_id'\");\n\n\twhile($fetch = mysql_fetch_array($sql)) {\n\n\n\t\t\t\t$pro_id \t\t\t= $fetch['pro_id'];\n\t\t\t \t$pro_count \t\t\t= $fetch['count'];\n\t\t\t\t$pro_name \t\t\t= $fetch['name'];\n\t\t\t\t$pro_email \t\t\t= $fetch['email'];\n\t\t\t\t$pro_address \t\t= $fetch['address'];\n\t\t\t\t$pro_mobile \t\t= $fetch['mobile'];\n\t\t\t\t$pro_total \t\t\t= $fetch['total'];\n}\n\t\t\t$transfer_data_part_2_array = array($pro_id,$pro_count,$pro_name,$pro_email,$pro_address,$pro_mobile,$pro_total);\n\t\t\t\n\t\t\t\n\t\t\t$this->transfer_data_part_2($transfer_data_part_2_array);\n\n\t\t\t//After Sending them in a function via array........... The next programme delete the Item by using `id`\n\n\t\t\t$this->query(\"DELETE FROM `my_cart`.`app_order` WHERE `app_order`.`id` = '$paid_id'\");\n\n// Add into Main Balance............STARTS\n\t\t\t$balance_sql = $this->query(\"SELECT `total` FROM `balance`\");\n\t\t\t\n\t\t\t$balance_sql_fetch = mysql_fetch_array($balance_sql);\n\t\t\t$main_balance = $balance_sql_fetch['total'];\n\t\t\t$add_total = $main_balance + (int)$pro_total;\n\n\t\t\t$this->query(\"UPDATE `my_cart`.`balance` SET `total` = '$add_total' WHERE `id` = '1'\");\n\n// Add into Main Balance............ENDS\n\n//Add into sub balance (This balance is for Search term (it'll help Admin to Find out the Sold Date...)) ............. STARTS\n\n\n\n//Add into sub balance (This balance is for Search term (it'll help Admin to Find out the Sold Date...)) ............. ENDS\n\t}", "function removeAval($codUsr,$cod,$tipo){\r\n\t\t$fAval = new fachada_avaliacao();\r\n\t\t$fAval->removeAval($codUsr,$cod,$tipo);\r\n\t}", "public function excluir(){\r\n return (new Database('cartao'))->delete('id = '.$this->id);\r\n }", "function excluir(){\n session_start();\n $conexao = AbreBancoJP();\n\n //$sql = \"UPDATE produto set status = 0 where idProduto = $_POST[id_produto] and idOrganizacao=\". $_SESSION['idOrganizacao'] .\" and status=1\";\n\n $sql = \"\n call USP_MANTER_PRODUTOS(\n NULL, \n $_SESSION[idOrganizacao], \n NULL,\n NULL,\n $_POST[id_produto],\n NULL,\n NULL,\n NULL,\n 2,\n $_SESSION[codUsuario]\n );\";\n $sql=mysql_query($sql,$conexao);\n mysql_close($conexao);\n}", "private function sellTrasactionPendingAddsMoney(){\n\n }", "public static function deletaProdutoCarrinho(){\n $conn = \\App\\lib\\Database\\Conexao::connect();\n $expPro = explode(';',self::$carrinho->produto_id);\n $expQuant = explode(';',self::$carrinho->quantidade);\n unset($expPro[self::$posicao]);\n unset($expQuant[self::$posicao]);\n\n //VERIFICA SE TEM PRODUTOS NO CARRINHO\n if($expPro and $expQuant !== ''){\n $impPro = implode(';',$expPro);\n $impQuant = implode(';',$expQuant);\n $query = 'UPDATE carrinhos SET produto_id=:pro, quantidade=:qnt, idCliente=:idC WHERE id=:id';\n $stmt = $conn->prepare($query);\n $stmt->bindValue(1,$impPro);\n $stmt->bindValue(2,$impQuant);\n $stmt->bindValue(3,self::$carrinho->idCliente);\n $stmt->bindValue(4,self::$carrinho->id);\n $stmt->execute();\n if($stmt->rowcount()){\n return true;\n }throw new \\Exception(\"Erro ao Deletar Produto\");\n\n //SE O CARRINHO ESTIVER VAZIO SERA DELETADO\n }else{\n $query = 'DELETE FROM carrinhos WHERE carrinhos.id LIKE :id';\n $stmt = $conn->prepare($query);\n $stmt->bindValue(1,self::$carrinho->id);\n $stmt->execute();\n if($stmt->rowcount()){\n $_SESSION['user']['carrinhoId'] = NULL;\n\n return true;\n }throw new \\Exception(\"Erro ao Deletar Carrinho\");\n }\n }", "protected function updateCash()\n\t{\n\t\tforeach($this->amount as $line => $amount)\n\t\t{\n\t\t\tif(isset($this->maxFare[$line]) && $this->maxFare[$line])\n\t\t\t{\n\t\t\t\t$mcoCash = new Application_Model_DbTable_McoCash();\n\t\t\t\t$mcoCashNew = $mcoCash->createRow();\n\t\t\t\t$mcoCashNew->mco_id = $this->mcoId;\n\t\t\t\t$mcoCashNew->line = $line;\n\t\t\t\t$mcoCashNew->type = 'DNH';\n\t\t\t\t$mcoCashNew->amount = ($amount - $this->amountCash[$line]);\n\t\t\t\t$mcoCashNew->value = $this->maxFare[$line];\n\t\t\t\t$mcoCashNew->diff = 0;\n\t\t\t\t$mcoCashNew->save();\n\t\t\t}\n\t\t}\t\n\t}", "function remove_cart_item($keyId) { \n //print_r($keyId); die;\n if(isset($keyId) && !empty($keyId)) { //\n $cart = $_SESSION['cart'];\n $rem_qty = $cart['item'][$keyId]['qty'];\n foreach($cart['item'] as $key => $val) { \n if ($key== $keyId) {\n if($cart['item'][$key]['qty'] > 1) {\n $cart['total'] = $cart['total'] - ($cart['item'][$key]['qty'] * $val['price']);\n $cart['itotal'] = $cart['itotal'] - ($cart['item'][$key]['qty'] * $val['price']);\n } else {\n $cart['total'] = $cart['total'] - $val['price'];\n $cart['itotal'] = $cart['itotal'] - $val['price'];\n }\n \n $cart['item'][$key]['qty'] = 0;\n //print_r($cart['itotal']); die;\n \n //$this->apply_coupon($cart['itotal']);\n \n $cart['tcount'] = $cart['tcount'] - 1;\n $cart['item'][$key]['price'] = 0;\n \n }\n\n } \n $this->session->set('cart', $cart);\n //echo \"<pre>\"; print_r($_SESSION['cart']); \"</pre>\"; die;\n for($i =1; $i<=$rem_qty; $i++ ) {\n $rem_val = array_pop($_SESSION['cart']['seats_selected']);\n \n }\n if(!empty($_SESSION['ccode'])) {\n $this->remove_coupon();\n }\n \n if($_SESSION['cart']['tcount'] <= 0) {\n $_SESSION['cart']['total'] = 0;\n $_SESSION['cart']['salestax'] = 0;\n $_SESSION['cart']['processingfees'] = 0;\n }\n return redirect()->to('/cart');\n } else {\n echo \"Item Not Removed\";\n }\n }", "public function removeCoupon()\n {\n $this->coupon = null;\n foreach ($this->order_configurations as $config) {\n $config->calculateFinalPrice();\n }\n $this->save();\n }", "public function ExcluirContaCorrente($fin_conta_corrente_chave){\n\t\treturn self::_Call('ExcluirContaCorrente',Array(\n\t\t\t$fin_conta_corrente_chave\n\t\t));\n\t}", "function borrar(){\n\t\t\n\t\t$this->mysqli = conectarBD();\n\t\t\n\t\t$sql = \"UPDATE Linea_Factura SET Borrado='1' WHERE Id_Linea_Factura='\".$this->linea.\"';\";\n\t\t$this->mysqli->query($sql);\n\t\t$sql = \"SELECT Importe FROM Linea_Factura WHERE Id_Linea_Factura='\".$this->linea.\"';\";\n\t\t$resultado = $this->mysqli->query($sql);\n\t\t$row = $resultado->fetch_array();\n\t\t$sql = \"UPDATE Factura SET Total=Total-(\".$row['Importe'].\") WHERE Id_Factura='\".$this->factura.\"';\";\n\t\t$this->mysqli->query($sql);\n\t\t\n\t\treturn \"borrado exito\";\n\t}", "public function incluir(CreditoFuturoVO $CreditoFuturoVo) {\r\n\t\t\r\n\t\t\t\r\n\t\t/*\r\n\t\t * Valida as informações obrigatorios por motivo de credito\r\n\t\t */\r\n\t\t$CreditoFuturoVo->saldo = 'NULL';\r\n\t\tif ($CreditoFuturoVo->MotivoCredito->tipo == $this->MOTIVO_CREDITO_CONTESTACAO) {\r\n\t\t\t\r\n\t\t\tif (empty($CreditoFuturoVo->protocolo)) {\r\n\t\t\t\tthrow new Exception('Necessário número do protocolo da contestação.');\r\n\t\t\t}\r\n\r\n\t\t\t$CreditoFuturoVo->tipoDesconto = $this->DESCONTO_VALOR;\r\n\t\t}\r\n\t\t\r\n\t\tif ($CreditoFuturoVo->MotivoCredito->tipo == $this->MOTIVO_CREDITO_INDICACAO_AMIGO) {\r\n\t\t\t\r\n\t\t\tif (empty($CreditoFuturoVo->contratoIndicado)) {\r\n\t\t\t\tthrow new Exception('Necessário número do contrato indicado pelo cliente.');\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif ($CreditoFuturoVo->MotivoCredito->tipo == $this->MOTIVO_CREDITO_ISENCAO_MONITORAMENTO) {\r\n\r\n $CreditoFuturoVo->formaAplicacao = $this->APLICACAO_PARCELADO;\r\n\t\t\t$CreditoFuturoVo->tipoDesconto = $this->DESCONTO_PERCENTUAL;\r\n $CreditoFuturoVo->aplicarDescontoSobre = $this->APLICADO_SOBRE_MONITORAMENTO;\r\n\t\t\t$CreditoFuturoVo->valor = 100;\r\n\t\t}\r\n\t\t\t\r\n\t\t/*\r\n\t\t * Aplicacao de forma INTEGRAL -> a quantidade de parcelas é igual a 1\r\n\t\t * Aplicacao em PARCELAS -> a quantidade deverá ser a informada no campo Qtd. Parcelas\r\n\t\t */\r\n\t\tif ($CreditoFuturoVo->formaAplicacao == $this->APLICACAO_INTEGRAL) {\r\n\t\t\t$CreditoFuturoVo->qtdParcelas = 1;\r\n\t\t} \r\n\t\t\r\n\t\tif ($CreditoFuturoVo->formaAplicacao == $this->APLICACAO_PARCELADO) {\r\n\t\t\t\r\n\t\t\tif ((int) $CreditoFuturoVo->qtdParcelas == 0) {\r\n\t\t\t\tthrow new Exception ('Necessário informar o número de parcelas para aplicação Parcelado.');\r\n\t\t\t}\r\n\t\t}\r\n \r\n \r\n //verificação com a parametrização de credito futuro\r\n \r\n /*\r\n\t\t * Busca os valores parametrizados para o credito futuro\r\n\t\t */\r\n\t\t$parametrosCreditoFuturo = $this->dao->obterParametrosCreditoFuturo();\r\n \r\n\t\tif (!$parametrosCreditoFuturo) {\r\n\t\t\tthrow new Exception('Parametros do crédito futuro não encontrados.');\r\n\t\t}\r\n\t\t\r\n\r\n\t\t/*\r\n * Verifica se os valores informados sao maiores que a cota configurada\r\n */\r\n $CreditoFuturoVo->status = $this->STATUS_APROVADO;\r\n\r\n //se tipo desconto for porcentagem\r\n if ($CreditoFuturoVo->tipoDesconto == '1') {\r\n \r\n if (floatval($CreditoFuturoVo->valor) > floatval($parametrosCreditoFuturo->porcentagem) ||\r\n $CreditoFuturoVo->qtdParcelas > $parametrosCreditoFuturo->numeroparcelas) {\r\n\r\n $CreditoFuturoVo->status = $this->STATUS_PENDENTE;\r\n }\r\n } else {\r\n //se tipo desconto for valor\r\n\r\n $CreditoFuturoVo->saldo = ($CreditoFuturoVo->qtdParcelas * $CreditoFuturoVo->valor);\r\n\r\n if (floatval($CreditoFuturoVo->saldo) > floatval($parametrosCreditoFuturo->valorcredito) ||\r\n $CreditoFuturoVo->qtdParcelas > $parametrosCreditoFuturo->numeroparcelas) {\r\n\r\n $CreditoFuturoVo->status = $this->STATUS_PENDENTE;\r\n }\r\n }\r\n\t\t\r\n \t/*\r\n\t\t\t * Apenas se for contestação calcula o saldo\r\n\t\t\t */\r\n\t\t\t\r\n\r\n\r\n\t\t/*\r\n\t\t * Validações dos campos obrigatórios da tabela\r\n\t\t */\r\n\t\tif (empty($CreditoFuturoVo->cliente)) {\r\n\t\t\tthrow new Exception('Necessário informar o cliente.');\r\n\t\t}\r\n\t\t\r\n\t\tif (empty($CreditoFuturoVo->usuarioInclusao)) {\r\n\t\t\tthrow new Exception('Usuário de inclusão não informado.');\r\n\t\t}\r\n\t\t\r\n\t\tif (empty($CreditoFuturoVo->MotivoCredito->id)) {\r\n\t\t\tthrow new Exception('Necessário informar o motivo do crédito.');\r\n\t\t}\r\n\t\t\r\n\t\tif (empty($CreditoFuturoVo->status)) {\r\n\t\t\tthrow new Exception('Status não informado.');\r\n\t\t}\r\n \r\n\t\tif (empty($CreditoFuturoVo->tipoDesconto)) {\r\n\t\t\tthrow new Exception('Necessário informar tipo de desconto.');\r\n\t\t}\r\n\t\t\r\n\t\tif (empty($CreditoFuturoVo->formaAplicacao)) {\r\n\t\t\tthrow new Exception('Necessário informar forma de aplicação.');\r\n\t\t}\r\n\t\t\r\n\t\tif (empty($CreditoFuturoVo->aplicarDescontoSobre)) {\r\n\t\t\tthrow new Exception('Necessário informar tipo de desconto sobre.');\r\n\t\t}\r\n\r\n\r\n\r\n\t\t\r\n\t\t/*\r\n\t\t * Salva o credito fututo (persistencia)\r\n\t\t */\r\n\t\t$creditoFuturoId = $this->dao->salvar($CreditoFuturoVo);\r\n\t\t\r\n\t\t/*\r\n\t\t * Insere as parcelas\r\n\t\t * Mesmo que a forma de aplicação seja INTEGRAL haverá pelo menos uma parcela\r\n\t\t */\r\n\t\tfor ($i = 1; $i <= $CreditoFuturoVo->qtdParcelas; $i++) {\r\n\t\t\t\t\r\n\t\t\t$this->dao->adicionarParcela($creditoFuturoId, $i , $CreditoFuturoVo->valor);\r\n\t\t}\r\n\t\t\r\n //se o status for pendente quer dizer que o valores informados são maiores que os parametrizados na configuração de\r\n //credito futuro.\r\n\t\tif ($CreditoFuturoVo->status == $this->STATUS_PENDENTE) {\t\t\t\r\n //chamar método notificar Aprovador\r\n $this->notificarAprovador($CreditoFuturoVo, $parametrosCreditoFuturo); \r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Historico do credito futuro\r\n\t\t */\r\n \r\n $CreditoFuturoVo->id = $creditoFuturoId;\r\n\r\n $saldoParcelas = $this->dao->buscarParcelasCreditoFuturo($creditoFuturoId, $CreditoFuturoVo->formaAplicacao, $CreditoFuturoVo->tipoDesconto);\r\n \r\n $parametros = array (\r\n 'usuarioInclusao' => $CreditoFuturoVo->usuarioInclusao,\r\n 'operacao' => $this->OPERACAO_INCLUSAO_CREDITO,\r\n 'origem' => $CreditoFuturoVo->origem,\r\n 'creditoFuturoId' => $CreditoFuturoVo->id,\r\n 'status' => $CreditoFuturoVo->status,\r\n 'tipoDesconto' => $CreditoFuturoVo->tipoDesconto,\r\n 'formaAplicacao' => $CreditoFuturoVo->formaAplicacao,\r\n 'aplicarDescontoSobre' => $CreditoFuturoVo->aplicarDescontoSobre,\r\n 'qtdParcelas' => $CreditoFuturoVo->qtdParcelas,\r\n 'valor' => $CreditoFuturoVo->valor,\r\n 'saldo' => $CreditoFuturoVo->saldo,\r\n 'cfhsaldo_parcelas' => $saldoParcelas,\r\n 'observacao' => $CreditoFuturoVo->observacao,\r\n 'justificativa' => NULL,\r\n 'obrigacaoFinanceiraDesconto' => $CreditoFuturoVo->obrigacaoFinanceiraDesconto,\r\n \r\n 'nf_numero' => 'NULL',\r\n 'nf_serie' => NULL,\r\n 'dt_emissao_nf' => 'NULL',\r\n 'valor_total_nf' => 'NULL',\r\n 'vl_total_itens_nf' => 'NULL',\r\n 'valor_aplicado_desconto' => 'NULL',\r\n 'num_parcela_aplicada' => 'NULL',\r\n );\r\n \r\n\t\t$CreditoFuturoHistoricoVo = $this->prepararHistoricoVo($parametros);\r\n \r\n\t\t$this->dao->incluirHistoricoCreditoFuturo($CreditoFuturoHistoricoVo);\r\n\t\t\r\n\t\t/*\r\n\t\t * Historico no cliente\r\n\t\t * Prepara o texto da observacao\r\n\t\t */\r\n\t\t$textoHistoticoCliente = $this->prepararTextoHistoricoCliente($CreditoFuturoVo, $this->OPERACAO_INCLUSAO_CREDITO, $creditoFuturoId, array());\r\n\t\t$this->dao->incluirHistoricoCliente($CreditoFuturoVo, $textoHistoticoCliente);\r\n\t\t\r\n\t\t/*\r\n\t\t * Historico da contestacao\r\n\t\t*/\r\n\t\tif ($CreditoFuturoVo->MotivoCredito->tipo == $this->MOTIVO_CREDITO_CONTESTACAO) {\r\n\t\t\t\r\n\t\t\t$protocoloStatus = $this->dao->buscarStatusAnaliseContas($CreditoFuturoVo->protocolo);\r\n\t\t\r\n\t\t\t$this->dao->incluirHistoricoContestacao($textoHistoticoCliente, $CreditoFuturoVo->protocolo, $protocoloStatus, $CreditoFuturoVo->usuarioInclusao);\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\t * Historico no contrato indicador\r\n\t\t */\r\n\t\tif ($CreditoFuturoVo->MotivoCredito->tipo == $this->MOTIVO_CREDITO_INDICACAO_AMIGO) {\r\n\t\t\t\t\r\n\t\t\t$cliente = $this->dao->obterDadosClientePorId($CreditoFuturoVo->cliente);\r\n\t\t\t\r\n \r\n\t\t\tif (count($cliente) > 0) {\r\n\t\t\t\t$numeroDocumento = $cliente['numerodocumento'];\r\n\t\t\t\t$nome \t\t\t = $cliente['nome'];\r\n\t\t\t\t$textoHistoticoCliente .= \"<br/>Cliente Indicador: $numeroDocumento $nome\";\r\n\t\t\t}\r\n\t\t\t\r\n \r\n\t\t\t$this->dao->incluirHistoricoContratoIndicador($CreditoFuturoVo->contratoIndicado, $CreditoFuturoVo->usuarioInclusao, $textoHistoticoCliente);\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t\t\r\n\t}", "function destroy()\n\t{\n\t\tunset($this->_tour_voucher_contents);\n\n\t\t$this->_tour_voucher_contents['totals'] = array();\n\t\t$this->_tour_voucher_contents['total_itineraries'] = 0;\n\t\t$this->_tour_voucher_contents['trip_id'] = gINVALID;\n\n\t\t$this->CI->session->unset_userdata('tour_voucher_contents');\n\t}", "function cancelCheque($connection,$ref_no){\r\n // $sql = \"SELECT check_ref,debit,accno from _transactionshistory WHERE check_ref= :check_ref AND cancelled_cheque=0\";\r\n // $statement = $connection->prepare($sql);\r\n // $statement->execute(array(':check_ref' => $ref_no));\r\n // $row = $statement->fetchall();\r\n // if(sizeof($row)<1){\r\n // return false;\r\n // }\r\n // $debit;\r\n // $accno;\r\n // foreach ($row as $key => $value) {\r\n // $debit = $value['debit'];\r\n // $accno =$value['accno'];\r\n // }\r\n\r\n // $initial = $debit;\r\n //update balances and mark check as cancelled\r\n //$accno = $_SESSION['accno'];\r\n //$update_sql = \"UPDATE _accounts SET balance = :balance WHERE accno = :account\";\r\n //$update_statement = $connection->prepare($update_sql);\r\n\r\n //balance as of now\r\n // $debit = $debit + Services::getServiceBal($connection)-Services::charges($initial);\r\n\r\n //execute UPDATE\r\n //$update_statement->execute(array(':balance' => $debit,':account'=>$accno));\r\n\r\n //update cheque as cancelled;\r\n $cancel_update = \"UPDATE _transactionshistory SET cancelled_cheque=1 WHERE check_ref= :check_ref AND cancelled_cheque=0 \";\r\n $cancel_stmt = $connection->prepare($cancel_update);\r\n $cancel_stmt->execute(array(':check_ref' => $ref_no));\r\n\r\n if($cancel_stmt->rowCount()){\r\n return true;\r\n }\r\n\r\n //record the transaction history\r\n // $history_sql = \"INSERT INTO _transactionshistory (accno,date,debit,credit,check_ref,cancelled_cheque,balance) VALUES(:accno,:date,:debit,:credit,:check_ref,:cancelled,:balance)\";\r\n // $history_stmt = $connection->prepare($history_sql);\r\n // $history_stmt->execute(array(':accno'=>$accno,':date'=>date(\"Y/m/d\"),':debit'=>0,':credit'=>$initial,\r\n // ':check_ref'=>$ref_no,':cancelled'=>1,':balance'=>$debit));//-Services::charges($initial)\r\n\r\n return false;\r\n\r\n }", "public function cortesia()\n {\n $this->costo = 0;\n }", "public function addCredits($observer)\n{ \n\n$creditmemo = $observer->getCreditmemo();\n//Mage::log($creditmemo);\n//Mage::log($creditmemo->getBaseGrandTotal());\n $order = $creditmemo->getOrder();\n//Mage::log($order);\n$store_id = $order->getStoreId();\n$website_id = Mage::getModel('core/store')->load($store_id)->getWebsiteId();\n$website = Mage::app()->getWebsite($website_id); \n//Mage::log( $website->getName());\n$sName = Mage::app()->getStore($store_id)->getName();\n//Mage::log( $sid);\n//Mage::log(Mage::getSingleton('adminhtml/session')->getTotal()['status']);\n\n\nif (Mage::helper('kartparadigm_storecredit')->getRefundDeductConfig())\n{\n // Deduct the credits which are gained at the time of invoice\n\n $credits = array(); \n $currentTimestamp = Mage::getModel('core/date')->timestamp(time()); \n $nowdate = date('Y-m-d H:m:s', $currentTimestamp);\n $credits['c_id'] = $order->getCustomerId();\n $credits['order_id'] = $order->getIncrementId();\n $credits['website1'] = 'Main Website';\n $credits['store_view'] = $sName;\n $credits['action_date'] = $nowdate;\n $credits['action'] = \"Deducted\";\n $credits['customer_notification_status'] = 'Notified';\n $credits['state'] = 1; \n //$credits['custom_msg'] = 'By admin : Deducted the Credits of the Order ' . $credits['order_id'] ;\n\n foreach ($creditmemo->getAllItems() as $item) {\n $orderItem = Mage::getResourceModel('sales/order_item_collection'); \n $orderItem->addIdFilter($item->getOrderItemId()); \n $data = $orderItem->getData();\n\n //Mage::log($data);\n $credits['action_credits'] = - ($data[0]['credits'] * $item->getQty());\n\n $collection = Mage::getModel('kartparadigm_storecredit/creditinfo')->getCollection()->addFieldToFilter('c_id',$order->getCustomerId())->addFieldToFilter('website1','Main Website')->getLastItem();\n\n $totalcredits = $collection->getTotalCredits();\n $credits['total_credits'] = $totalcredits + $credits['action_credits'] ;\n $credits['custom_msg'] = \"By User:For Return The Product \" .$item->getName().\" For Quantity \" . round($item->getQty()) ; //Custom Message\n $credits['item_id'] = $item->getOrderItemId();\n $table1 = Mage::getModel('kartparadigm_storecredit/creditinfo');\n $table1->setData($credits);\n try{\n if($credits['action_credits'] != 0)\n $table1->save();\n }catch(Exception $e){\n Mage::log($e);\n }\n }\n\n// End Deduct the credits which are gained at the time of invoice\n\n}\n//end\n$status = array();\n$status = Mage::getSingleton('adminhtml/session')->getTotal(); \nif($status['status'] == 1)\n { \n\n $val = array(); \n \n \n $val['c_id'] = $order->getCustomerId();\n \n $val['order_id'] = $order->getIncrementId();\n \n $val['website1'] = $website->getName();\n \n $val['store_view'] = $sName;\n \n\n$collection = Mage::getModel('kartparadigm_storecredit/creditinfo')->getCollection()->addFieldToFilter('c_id',$val['c_id'])->addFieldToFilter('website1',$val['website1'])->getLastItem();\n $currentCurrencyRefund1 = array();\n $currentCurrencyRefund1 = Mage::getSingleton('adminhtml/session')->getTotal();\n $currentCurrencyRefund = $currentCurrencyRefund1['credits'];\n/*------------------------Convert Current currency(refunded amount is current currency) to credit points-------------- */\n$baseCurrencyCode = Mage::app()->getStore()->getBaseCurrencyCode();\n $currentCurrencyCode = Mage::app()->getStore()->getCurrentCurrencyCode();\n$baseCurrency;\nif ($baseCurrencyCode != $currentCurrencyCode) {\n \n$allowedCurrencies = Mage::getModel('directory/currency')->getConfigAllowCurrencies();\n$rates = Mage::getModel('directory/currency')->getCurrencyRates($baseCurrencyCode, array_values($allowedCurrencies));\n\n$baseCurrency = $currentCurrencyRefund/$rates[$currentCurrencyCode];\n\n }\nelse{\n $baseCurrency = $currentCurrencyRefund;\n }\n$array2 = Mage::helper('kartparadigm_storecredit')->getCreditRates();\n//$amt1 = ($array2['basevalue'] * $amt) / $array2['credits'];\nif(isset($array2)){\n$refundCredits = round(($array2['credits'] * $baseCurrency) / $array2['basevalue']); \n}\nelse{\n$refundCredits = round($baseCurrency);\n}\n/*---------------------end------------------ */\n $val['action_credits'] = $refundCredits;\n $val['total_credits'] = $collection->getTotalCredits() + $refundCredits;\n $val['action_date'] = $nowdate; \n $val['action'] = \"Refunded\";\n $val['custom_msg'] = 'By admin : return product by customer to the order ' . $val['order_id'] ;\n $val['customer_notification_status'] = 'Notified'; \n $val['state'] = 0;\n//Mage::getSingleton('adminhtml/session')->unsTotal();\n$model = Mage::getSingleton('kartparadigm_storecredit/creditinfo');\n//Mage::log($creditmemo->getDiscountAmount());\n//Mage::log($creditmemo->getDiscountDescription());\n//checking \nif($creditmemo->getDiscountDescription() == \"Store Credits\"){\n$total = $creditmemo->getGrandTotal() - ($creditmemo->getDiscountAmount());\n}\nelse{\n$total = $creditmemo->getGrandTotal();\n}\n$model->setData($val);\ntry{\nif($total >= $currentCurrencyRefund){\nif( $currentCurrencyRefund > 0)\n{\n\n$model->save();\n\n}\n}\nelse{\n\nMage::getSingleton('adminhtml/session')->setErr('true');\n\n}\n\n} catch(Mage_Core_Exception $e){\n//Mage::log($e);\n}\n\n}\n}", "public function cashierDeleteOTClearence($bill_id , $booking_id , $invoice , $year_invoice , $daily_invoice, $cashbook_id)\n {\n // amount distribution of this ot by manager\n $count_amount_distribution = DB::table('tbl_ot_distribution_amount')->where('branch_id',$this->branch_id)->where('ot_booked_id',$booking_id)->count();\n if($count_amount_distribution > 0){\n Session::put('failed','Sorry ! Already Amount Distribuition Into OT Surgeon And Staffs Of This OT. You Can Not Delete This OT Clearence Bill. Contact With Manager To Delete OT Amount Distribuition Amount Then Delete This OT Cleearence Bill');\n return Redirect::to('cashierOTClearanceBillReport');\n exit(); \n }\n\n $count_amount_distribution = DB::table('tbl_ot_clear_bill')->where('branch_id',$this->branch_id)->where('id',$bill_id)->where('ot_booking_id',$booking_id)->where('cashbook_id',$cashbook_id)->where('ot_amount_distribution','1')->count();\n if($count_amount_distribution > 0){\n Session::put('failed','Sorry ! Already Amount Distribuition Into OT Surgeon And Staffs Of This OT. You Can Not Delete This OT Clearence Bill. Contact With Manager To Delete OT Amount Distribuition Amount Then Delete This OT Cleearence Bill');\n return Redirect::to('cashierOTClearanceBillReport');\n exit(); \n }\n $ot_ledger_info = DB::table('tbl_ot_ledger')->where('branch_id',$this->branch_id)->where('ot_booking_id',$booking_id)->whereNotIn('service_type',[4])->get();\n $total_payable_without_clear = 0 ;\n $total_discount_without_clear = 0 ;\n $total_rebate_without_clear = 0 ;\n $total_payment_without_clear = 0 ;\n\n foreach ($ot_ledger_info as $ledger_value) {\n $total_payable_without_clear = $total_payable_without_clear + $ledger_value->payable_amount ;\n $total_discount_without_clear = $total_discount_without_clear + $ledger_value->discount ;\n $total_rebate_without_clear = $total_rebate_without_clear + $ledger_value->rebate ;\n $total_payment_without_clear = $total_payment_without_clear + $ledger_value->payment_amount ;\n\n }\n $previus_discountAnd_rebate = $total_discount_without_clear + $total_rebate_without_clear ;\n $total_payment_with_discount = $total_payment_without_clear + $previus_discountAnd_rebate ;\n $total_payable = $total_payable_without_clear - $total_payment_with_discount ;\n // service type 4 info\n $ot_clear_ledger_info = DB::table('tbl_ot_ledger')->where('branch_id',$this->branch_id)->where('ot_booking_id',$booking_id)->where('service_type',4)->first();\n\n $total_discount = $ot_clear_ledger_info->discount ;\n $total_rebate = $ot_clear_ledger_info->rebate ;\n $total_payment = $ot_clear_ledger_info->payment_amount ;\n\n $check_pettycash_amount = DB::table('pettycash')->where('branch_id',$this->branch_id)->where('type',3)->limit(1)->first();\n // petty cash check\n $check_current_pettycash_amt = $check_pettycash_amount->pettycash_amount ;\n if($check_current_pettycash_amt < $total_payment){\n Session::put('failed','Sorry ! Pettycash Amount Small Than OT Clear Bill Payment Amount. Please Delete This OT Clearence Bill After Available Pettycash');\n return Redirect::to('cashierOTClearanceBillReport');\n exit();\n }\n // ot clearence bill info\n $ot_clear_bill_info = DB::table('tbl_ot_clear_bill')->where('branch_id',$this->branch_id)->where('id',$bill_id)->where('ot_booking_id',$booking_id)->where('cashbook_id',$cashbook_id)->first();\n\n $bill_added_id = $ot_clear_bill_info->added_id ;\n $bill_tr_date = $ot_clear_bill_info->bill_date ;\n $bill_created_time = $ot_clear_bill_info->bill_time ;\n $bill_created_at = $ot_clear_bill_info->created_at ;\n $patient_id = $ot_clear_bill_info->patient_id ;\n $pc_id = $ot_clear_bill_info->pc_id ;\n // delete cashbook id\n DB::table('cashbook')->where('id',$cashbook_id)->delete();\n $pettycash_amount = DB::table('pettycash')->where('branch_id',$this->branch_id)->where('type',3)->limit(1)->first();\n // petty cash update\n $current_pettycash_amt = $pettycash_amount->pettycash_amount ;\n $now_pettycash_amt = $current_pettycash_amt - $total_payment ;\n // update pettycash amount\n $data_update_pettycash = array();\n $data_update_pettycash['pettycash_amount'] = $now_pettycash_amt; \n DB::table('pettycash')->where('branch_id',$this->branch_id)->where('type',3)->update($data_update_pettycash);\n // pc info\n if($pc_id != '0'){\n // get pc amount of this invoice\n $pc_amt_query = DB::table('pc_ledger')->where('branch_id',$this->branch_id)->where('cashbook_id',$cashbook_id)->where('invoice',$invoice)->where('year_invoice',$year_invoice)->where('daily_invoice_number',$daily_invoice)->where('invoice_type',3)->where('pc_id',$pc_id)->where('status',3)->first();\n // reduce pc amount\n // update pc due\n $pc_amount = $pc_amt_query->payable_amount ;\n $pc_due_query = DB::table('pc_due')->where('pc_id',$pc_id)->limit(1)->first();\n $pc_due_amount = $pc_due_query->total_due_amount ;\n $now_pc_due_amount = $pc_due_amount - $pc_amount ;\n // updte pc due amount\n $data_pc_due_update = array();\n $data_pc_due_update['total_due_amount'] = $now_pc_due_amount; \n DB::table('pc_due')->where('pc_id',$pc_id)->update($data_pc_due_update);\n // pc ledger delete\n DB::table('pc_ledger')->where('branch_id',$this->branch_id)->where('cashbook_id',$cashbook_id)->where('invoice',$invoice)->where('year_invoice',$year_invoice)->where('daily_invoice_number',$daily_invoice)->where('invoice_type',3)->where('pc_id',$pc_id)->where('status',3)->delete(); \n }// pc ledger ended\n if($pc_id == '0'){\n $bill_pc_amount = 0 ;\n }else{\n $bill_pc_amount = $pc_amount ;\n }\n // update tbl ot bookin\n #--------------------------- UPDAT OT BOOKING STATUS----------------------------#\n $data_ot_booking_update = array();\n $data_ot_booking_update['status'] = 0 ;\n $data_ot_booking_update['end_date'] = '' ;\n DB::table('tbl_ot_booking')->where('branch_id',$this->branch_id)->where('id',$booking_id)->where('patient_id',$patient_id)->where('status',1)->update($data_ot_booking_update );\n #--------------------------- END UPDATE OT BOOKING STATUS------------------------#\n #----------------------------------- insert date into delete history---------------------------#\n $data_delete_history = array();\n $data_delete_history['admin_type'] = 3 ;\n $data_delete_history['branch_id'] = $this->branch_id ;\n $data_delete_history['status'] = 14 ;\n $data_delete_history['tr_status'] = 1 ;\n $data_delete_history['before_pettycash_amt'] = $current_pettycash_amt ;\n $data_delete_history['after_pettycash_amt'] = $now_pettycash_amt ;\n $data_delete_history['bill_added_id'] = $bill_added_id ;\n $data_delete_history['bill_remove_id'] = $this->loged_id ;\n $data_delete_history['bill_tr_date'] = $bill_tr_date ;\n $data_delete_history['bill_remove_date'] = $this->rcdate ;\n $data_delete_history['bill_created_date'] = $bill_created_at ;\n $data_delete_history['bill_created_time'] = $bill_created_time ;\n $data_delete_history['bill_remove_time'] = $this->current_time ; \n DB::table('delete_history')->insert($data_delete_history);\n #----------------------------------- end insert data into delete history -----------------------#\n // get last delete history\n $last_delete_history_query = DB::table('delete_history')->orderBy('id','desc')->limit(1)->first();\n $last_delete_history_id = $last_delete_history_query->id ; \n $delete_ot_bill = array();\n $delete_ot_bill['ot_booking_id'] = $booking_id; \n $delete_ot_bill['delete_history_id'] = $last_delete_history_id ; \n $delete_ot_bill['branch_id'] = $this->branch_id ; \n $delete_ot_bill['cashbook_id'] = $cashbook_id; \n $delete_ot_bill['invoice_number'] = $invoice ; \n $delete_ot_bill['year_invoice_number'] = $year_invoice ; \n $delete_ot_bill['daily_invoice_number'] = $daily_invoice ; \n $delete_ot_bill['doctor_id'] = ''; \n $delete_ot_bill['patient_id'] = $patient_id; \n $delete_ot_bill['pc_id'] = $pc_id; \n $delete_ot_bill['ot_type_id'] = ''; \n $delete_ot_bill['total_payable'] = $total_payable; \n $delete_ot_bill['total_payment'] = $total_payment ; \n $delete_ot_bill['total_discount'] = $total_discount ; \n $delete_ot_bill['total_rebate'] = $total_rebate; \n $delete_ot_bill['pc_amount'] = $bill_pc_amount; \n $delete_ot_bill['service_id'] = '' ;\n $delete_ot_bill['status'] = 4 ; \n $delete_ot_bill['booking_date'] = ''; \n $delete_ot_bill['end_date'] = '' ; \n $delete_ot_bill['booking_status'] = '' ; \n $delete_ot_bill['bill_added_id'] = $bill_added_id;\n $delete_ot_bill['bill_remove_id'] = $this->loged_id ; \n $delete_ot_bill['bill_tr_date'] = $bill_tr_date ;\n $delete_ot_bill['bill_remove_date'] = $this->rcdate ;\n $delete_ot_bill['bill_created_date'] = $bill_created_at;\n $delete_ot_bill['bill_created_time'] = $bill_created_time ;\n $delete_ot_bill['bill_remove_time'] = $this->current_time;\n DB::table('delete_ot_bill')->insert($delete_ot_bill);\n #----------------------------- delete opd ledger ---------------------------#\n DB::table('tbl_ot_ledger')->where('branch_id',$this->branch_id)->where('ot_booking_id',$booking_id)->where('service_type',4)->delete();\n #--------------------------- end delete opd ledger ------------------------#\n DB::table('tbl_ot_clear_bill')->where('branch_id',$this->branch_id)->where('id',$bill_id)->where('ot_booking_id',$booking_id)->where('cashbook_id',$cashbook_id)->delete();\n Session::put('succes','Thanks , OT Clearence Bill Deleted Successfully');\n return Redirect::to('cashierOTClearanceBillReport');\n\n }", "public function eliminarVentas($id_unico){\n //echo($id_unico);\n date_default_timezone_set('America/La_Paz');\n $fecha_actual = date(\"y-m-d H:i:s\");\n $datos['vent_prof_cab_usr_baja'] = $_SESSION['login'];\n $datos['vent_prof_cab_fech_hr_baja'] = $fecha_actual;\n $condicion = \"vent_prof_cab_cod_unico='\".$id_unico.\"'\";\n return $this->mysql->update('vent_prof_cab', $datos, $condicion);\n //$this->mysql->update('vent_prof_cab',$datos,'vent_prof_cab_cod_unico='.$id_unico.'');\n }", "function delete_one_stock($bdd)\n{\n 'UPDATE `articles` \n SET `stock`=(`stock`-1) \n WHERE articles.id=3';\n}", "public function quitarplus($cantidad);", "function atcf_theme_variable_pricing() {\n\tremove_action( 'edd_purchase_link_top', 'edd_purchase_variable_pricing' );\n\tadd_action( 'edd_purchase_link_top', 'atcf_purchase_variable_pricing' );\n}", "public function transient_clear_hooks(){\n\t\t\n\t\tadd_action( 'woocommerce_payment_complete', function( $order_id ){ \n\n\t\t\t$order = wc_get_order( $order_id );\t\t\t\n\t\t\t$this->clear_transient('liod_purchased_products' ,$order->user_id);\n\t\t\t$this->clear_transient('liod_purchased_events' ,$order->user_id);\n\t\t\t\n\t\t}, 1, 1 );\n\t\t\n\t}", "public function eliminarItemsVentas($id_unico){\n //echo($id_unico.\"---\");\n \n date_default_timezone_set('America/La_Paz');\n $fecha_actual = date(\"y-m-d H:i:s\");\n $datos['vent_prof_det_usr_baja'] = $_SESSION['login'];\n $datos['vent_prof_det_fech_hr_baja'] = $fecha_actual;\n $condicion = \"vent_prof_det_cod_unico='\".$id_unico.\"'\";\n return $this->mysql->update('vent_prof_det', $datos, $condicion);\n //$this->mysql->update('vent_prof_cab',$datos,'vent_prof_cab_cod_unico='.$id_unico.'');\n }", "function setDelete(){\n\t\t$msg\t= \"===========\\tELIMINADO LA CUENTA \" . $this->mNumeroCuenta . \"\\r\\n\";\n\t\t$cuenta\t= $this->mNumeroCuenta;\n\t\t$socio\t= $this->mSocioTitular;\n\t\t$xQL\t= new MQL();\n\t\t\t//Cuenta\n\t\t\t$SQLDCuenta \t= \"DELETE FROM captacion_cuentas WHERE numero_cuenta = $cuenta AND numero_socio = $socio \";\n\t\t\t$x = $xQL->setRawQuery($SQLDCuenta);\n\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\t Eliminando la Cuenta (\" . $x[\"info\"] . \")\\r\\n\";\n\t\t\t}\n\t\t\t//Firma\n\t\t\t/*$SQLDFirma \t= \"DELETE FROM socios_firmas WHERE numero_de_cuenta = $cuenta \";\n\t\t\t$x = my_query($SQLDFirma);\n\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\tEliminando las Firmas (\" . $x[\"info\"] . \")\\r\\n\";\n\t\t\t}*/\n\t\t\t//sdpm\n\t\t\t$SQLD_SDPM \t= \"DELETE FROM captacion_sdpm_historico WHERE cuenta = $cuenta \";\n\t\t\t$x = $xQL->setRawQuery($SQLD_SDPM);\n\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\t\" . $x[\"info\"] . \"\\r\\n\";\n\t\t\t}\n\n\t\t\t//Movimientos\n\t\t\t$SQLDOpes\t= \"DELETE FROM operaciones_mvtos WHERE docto_afectado = $cuenta AND socio_afectado = $socio \";\n\t\t\t$x = $xQL->setRawQuery($SQLDOpes);\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\t\" . $x[\"info\"] . \"\\r\\n\";\n\t\t\t}\n\n\t\t\t$SQLDRecs\t= \"DELETE FROM operaciones_recibos WHERE docto_afectado = $cuenta AND numero_socio = $socio \";\n\t\t\t$x = $xQL->setRawQuery($SQLDRecs);\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\t\" . $x[\"info\"] . \"\\r\\n\";\n\t\t\t}\n\n\t\t\t//Actualizar el Credito Relacionado\n\t\t\t$SQLDCC\t= \"UPDATE creditos_solicitud\n\t\t\t\t\t\tSET contrato_corriente_relacionado = \" . CTA_GLOBAL_CORRIENTE . \"\n\t\t\t\t\t\tWHERE contrato_corriente_relacionado = $cuenta \";\n\t\t\t$x = $xQL->setRawQuery($SQLDCC);\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\tActualizando Creditos Relacionados (\" . $x[\"info\"] . \") \\r\\n\";\n\t\t\t}\n\t\treturn $msg;\n\t}", "function eliminaStock($codigo)\r\n{\r\n $link=conectar();\r\n $sql=\"DELETE FROM producto_ubicacion WHERE pu_id ='$codigo'\";\r\n $res=mysql_query($sql,$link) or die(\"Error en: $sql: \" . mysql_error());\r\n if(mysql_affected_rows()>0)\r\n {\r\n return '1';\r\n }\r\n mysql_close($link);\r\n}", "function fp_remove_fee_from_cart()\r\n {\r\n if(isset($_POST['fp_remove_points'])) {\r\n remove_action( 'woocommerce_cart_calculate_fees', array( $this , 'fp_woo_add_cart_fee' ),10,1);\r\n $_SESSION['fp_action']=\"remove\";\r\n }\r\n }", "public function removePurchaseDetail() { \n\n $result = 0;\n $purchaseDelIds = !empty($_GET['purchaseDelIds']) ? $_GET['purchaseDelIds'] : '';\n $totalss = !empty($_GET['totalss']) ? $_GET['totalss'] : '';\n $totalr = !empty($_GET['totalr']) ? $_GET['totalr'] : '';\n $otherChargess = !empty($_GET['otherChargess']) ? $_GET['otherChargess'] : '';\n $purchaseIds = !empty($_GET['purchaseIds']) ? $_GET['purchaseIds'] : '';\n $grandTotals = !empty($_GET['grandTotals']) ? $_GET['grandTotals'] : '';\n \n \n //if (!empty($purchaseDelIds)) {\n $purhaseModel = new PurhaseModel();\n $result = $purhaseModel->deletePurhaseDetails($purchaseDelIds,$purchaseIds,$totalss,$totalr,$otherChargess,$grandTotals);\n //}\n echo $result;\n\n \n }", "public function excluir(){\n\t\tglobal $tabela_links;\n\t\t$consulta = new conexao();\n\t\t$endereco = $consulta->sanitizaString($this->end_link);\n\t\t$funcionalidade_tipo = (int) $this->funcionalidade_tipo;\n\t\t$funcionalidade_id = (int) $this->funcionalidade_id;\n\t\t//echo(\"$endereco\t $funcionalidade_tipo\t$funcionalidade_id\");\n\t\t$consulta->connect();\n\t\t$consulta->solicitar(\"DELETE FROM $tabela_links \n\t\t\t\t\t\t\t\tWHERE endereco = '$endereco'\n\t\t\t\t\t\t\t\tAND funcionalidade_tipo\t= '$funcionalidade_tipo'\n\t\t\t\t\t\t\t\tAND funcionalidade_id\t= '$funcionalidade_id'\");\n\t\t\n\t\n\t}", "public function deleteOperation(){\n if($this->type == \"IN\"){\n $this->inventory->setQuantity($this->inventory->getQuantity() - $this->getQuantity());\n }else{\n $this->inventory->setQuantity($this->inventory->getQuantity() + $this->getQuantity());\n }\n }", "public function cashierDeleteOPDDoctorDiscount ($id , $invoice , $year_invoice , $daily_invoice , $cashbook_id , $invoice_tr_id , $status)\n {\n $collection_info = DB::table('opd_bill_transaction')->where('branch_id',$this->branch_id)->where('id',$id)->where('invoice_number',$invoice)->where('year_invoice_number',$year_invoice)->where('daily_invoice_number',$daily_invoice)->where('status',$status)->where('cashbook_id',$cashbook_id)->where('invoice_tr_id',$invoice_tr_id)->first();\n $total_payable = $collection_info->total_payable ;\n $total_discount = $collection_info->total_discount ;\n $total_rebate = $collection_info->total_rebate ;\n $total_payment = $collection_info->total_payment ;\n $bill_added_id = $collection_info->added_id ;\n $bill_tr_date = $collection_info->tr_date ;\n $bill_created_time = $collection_info->created_time ;\n $bill_created_at = $collection_info->created_at ;\n // get opd bill info\n $opd_bill_info_query = DB::table('opd_bill')->where('branch_id',$this->branch_id)->where('invoice',$invoice)->where('year_invoice',$year_invoice)->where('daily_invoice',$daily_invoice)->limit(1)->first();\n $opd_status = $opd_bill_info_query->opd_status ;\n if($opd_status == '2'){\n // delete cashbook id\n DB::table('cashbook')->where('id',$cashbook_id)->delete();\n \n // incress pettycash amount\n $pettycash_amount = DB::table('pettycash')->where('branch_id',$this->branch_id)->where('type',3)->limit(1)->first();\n $current_pettycash_amt = $pettycash_amount->pettycash_amount ;\n $now_pettycash_amt = $current_pettycash_amt + $total_discount ;\n // update pettycash amount\n $data_update_pettycash = array();\n $data_update_pettycash['pettycash_amount'] = $now_pettycash_amt; \n DB::table('pettycash')->where('branch_id',$this->branch_id)->where('type',3)->update($data_update_pettycash);\n }else{\n $pettycash_amount = DB::table('pettycash')->where('branch_id',$this->branch_id)->where('type',3)->limit(1)->first();\n $current_pettycash_amt = $pettycash_amount->pettycash_amount ;\n $now_pettycash_amt = $pettycash_amount->pettycash_amount ;\n }\n // insert data into\n $data_delete_history = array();\n $data_delete_history['admin_type'] = 3 ;\n $data_delete_history['branch_id'] = $this->branch_id ;\n $data_delete_history['status'] = 4 ;\n $data_delete_history['tr_status'] = 1 ;\n $data_delete_history['before_pettycash_amt'] = $current_pettycash_amt ;\n $data_delete_history['after_pettycash_amt'] = $now_pettycash_amt ;\n $data_delete_history['bill_added_id'] = $bill_added_id ;\n $data_delete_history['bill_remove_id'] = $this->loged_id ;\n $data_delete_history['bill_tr_date'] = $bill_tr_date ;\n $data_delete_history['bill_remove_date'] = $this->rcdate ;\n $data_delete_history['bill_created_date'] = $bill_created_at ;\n $data_delete_history['bill_created_time'] = $bill_created_time ;\n $data_delete_history['bill_remove_time'] = $this->current_time ; \n DB::table('delete_history')->insert($data_delete_history);\n // get last delete history\n $last_delete_history_query = DB::table('delete_history')->orderBy('id','desc')->limit(1)->first();\n $last_delete_history_id = $last_delete_history_query->id ; \n // insert into delete pathlogy bill\n $data_delete_pathology_bill = array();\n $data_delete_pathology_bill['delete_history_id'] = $last_delete_history_id ;\n $data_delete_pathology_bill['branch_id'] = $this->branch_id ;\n $data_delete_pathology_bill['cashbook_id'] = $cashbook_id ;\n $data_delete_pathology_bill['invoice_number'] = $invoice;\n $data_delete_pathology_bill['year_invoice_number'] = $year_invoice ;\n $data_delete_pathology_bill['daily_invoice_number'] = $daily_invoice;\n $data_delete_pathology_bill['invoice_tr_id'] = $invoice_tr_id ;\n $data_delete_pathology_bill['total_payable'] = $total_payable;\n $data_delete_pathology_bill['total_payment'] = $total_payment;\n $data_delete_pathology_bill['total_discount'] = $total_discount;\n $data_delete_pathology_bill['total_rebate'] = $total_rebate;\n $data_delete_pathology_bill['opd_status'] = $opd_status;\n $data_delete_pathology_bill['status'] = $status ;\n $data_delete_pathology_bill['bill_added_id'] = $bill_added_id;\n $data_delete_pathology_bill['bill_remove_id'] = $this->loged_id ; \n $data_delete_pathology_bill['bill_tr_date'] = $bill_tr_date ;\n $data_delete_pathology_bill['bill_remove_date'] = $this->rcdate ;\n $data_delete_pathology_bill['bill_created_date'] = $bill_created_at;\n $data_delete_pathology_bill['bill_created_time'] = $bill_created_time ;\n $data_delete_pathology_bill['bill_remove_time'] = $this->current_time;\n DB::table('delete_opd_bill')->insert($data_delete_pathology_bill);\n // now delete patylogy bill transaction\n DB::table('opd_bill_transaction')->where('branch_id',$this->branch_id)->where('id',$id)->where('invoice_number',$invoice)->where('year_invoice_number',$year_invoice)->where('daily_invoice_number',$daily_invoice)->where('status',$status)->where('cashbook_id',$cashbook_id)->where('invoice_tr_id',$invoice_tr_id)->delete();\n Session::put('succes','Thanks , OPD Doctor Discount Deleted Successfully');\n return Redirect::to('cashierOPDDoctorDiscountReport');\n }", "function Recalcular_Monto_Compra($idcompra){\n//echo \"idcompra=\".$idcompra;\n\t$datoscompra\t\t=\tregistro( runsql(\"select fecha from compras where id_compra='$idcompra'\") );\n\t$datoscompradet\t\t=\trunsql(\"select total,moneda from compras_det where id_compra='$idcompra';\");\n\t$tcUSD\t=\tTipoCambio('USD',$datoscompra[fecha]);\n\t$tcEUR\t=\tTipoCambio('EUR',$datoscompra[fecha]);\n\t$tcQUE\t=\t1;\n\t$Monto_Compra=0;$SubMonto=0;\n\twhile($i=registro($datoscompradet)){\n\t\tswitch($i[moneda]){\n\t\t\tcase \"USD\":\n\t\t\t\t$SubMonto\t=\t$i[total]*$tcUSD;\n\t\t\tbreak;\n\t\t\tcase \"EUR\":\n\t\t\t\t$SubMonto\t=\t$i[total]*$tcEUR;\n\t\t\tbreak;\t\n\t\t\tcase \"QUE\":\n\t\t\t\t$SubMonto\t=\t$i[total]*$tcQUE;\n\t\t\tbreak;\t\t\t\t\t\n\t\t}\n\t\t$Monto_Compra\t=\t$Monto_Compra + $SubMonto;\n\t\t$SubMonto\t\t=\t0;\n\t}\n\t$campos3=Array();\n $campos3[monto]\t=\t$Monto_Compra;\n\t$ins=actualizar(\"compras\",$campos3,\"id_compra = '$idcompra'\");\n}", "public function excluir(){\r\n\t\t$instancia = ServicoDAO::getInstancia();\r\n\t\t// executando o metodo //\r\n\t\t$servico = $instancia->excluir($this->getId());\r\n\t\t// retornando o resultado //\r\n\t\treturn $servico;\r\n\t}", "public function managerPurchaseDelete($invoice , $cashbook_id)\n {\n // get purchas information\n $purchase_info_query = DB::table('purchase')->where('cashbook_id',$cashbook_id)->where('invoice',$invoice)->first();\n\n $bill_added_id = $purchase_info_query->added_id ;\n $bill_tr_date = $purchase_info_query->purchase_date ;\n $bill_created_at = $purchase_info_query->created_at ;\n $total_price = $purchase_info_query->total_price;\n $total_payment = $purchase_info_query->total_payment ;\n $total_qty = $purchase_info_query->total_quantity ;\n $memo = $purchase_info_query->memo_no ;\n $supplier_id = $purchase_info_query->supplier_id ;\n\n $was_supplier_due = $total_price - $total_payment ;\n\n // purchase product item\n $product_item = DB::table('purchase_product')->where('branch_id',$this->branch_id)->where('cashbook_id',$cashbook_id)->where('invoice_number',$invoice)->get();\n $itam = array();\n $qty = array();\n $price= array();\n foreach ($product_item as $value_iteam) {\n $itam[] = $value_iteam->product_id ;\n $qty[] = $value_iteam->total_quantity ;\n $price[] = $value_iteam->purchase_price ;\n }\n $item_implode = implode(',', $itam);\n $qty_implode = implode(',', $qty);\n $price_implode = implode(',', $price);\n #----------------------------- pettycash amount ----------------------------------#\n #----------------------------------- update pettycash ------------------------------------#\n $pettycash_amount = DB::table('pettycash')->where('branch_id',$this->branch_id)->where('type',2)->limit(1)->first();\n // petty cash update\n $current_pettycash_amt = $pettycash_amount->pettycash_amount ;\n $now_pettycash_amt = $current_pettycash_amt + $total_payment ;\n // update pettycash amount\n $data_update_pettycash = array();\n $data_update_pettycash['pettycash_amount'] = $now_pettycash_amt; \n DB::table('pettycash')->where('branch_id',$this->branch_id)->where('type',2)->update($data_update_pettycash);\n #----------------------------------- end update pettycash ------------------------------------ #\n #----------------------------------- insert date into delete history---------------------------#\n $data_delete_history = array();\n $data_delete_history['admin_type'] = 2 ;\n $data_delete_history['branch_id'] = $this->branch_id ;\n $data_delete_history['status'] = 16 ;\n $data_delete_history['tr_status'] = 1 ;\n $data_delete_history['before_pettycash_amt'] = $current_pettycash_amt ;\n $data_delete_history['after_pettycash_amt'] = $now_pettycash_amt ;\n $data_delete_history['bill_added_id'] = $bill_added_id ;\n $data_delete_history['bill_remove_id'] = $this->loged_id ;\n $data_delete_history['bill_tr_date'] = $bill_tr_date ;\n $data_delete_history['bill_remove_date'] = $this->rcdate ;\n $data_delete_history['bill_created_date'] = $bill_created_at ;\n $data_delete_history['bill_remove_time'] = $this->current_time ; \n DB::table('delete_history')->insert($data_delete_history);\n #----------------------------------- end insert data into delete history -----------------------#\n // get last delete history\n $last_delete_history_query = DB::table('delete_history')->orderBy('id','desc')->limit(1)->first();\n $last_delete_history_id = $last_delete_history_query->id ; \n #----------------------------- end pettycash amount -------------------------------#\n #----------------------------- insert delete purcahse ------------------------------#\n $delete_purchase = array();\n $delete_purchase['cashbook_id'] = $cashbook_id ;\n $delete_purchase['invoice'] = $invoice ;\n $delete_purchase['memo_no'] = $memo ;\n $delete_purchase['supplier_id'] = $supplier_id ;\n $delete_purchase['branch_id'] = $this->branch_id ;\n $delete_purchase['total_quantity'] = $total_qty ;\n $delete_purchase['total_price'] = $total_price ;\n $delete_purchase['total_payment'] = $total_payment ;\n $delete_purchase['product_id'] = $item_implode ;\n $delete_purchase['product_qty'] = $qty_implode ;\n $delete_purchase['product_price'] = $price_implode ;\n $delete_purchase['bill_added_id'] = $bill_added_id;\n $delete_purchase['bill_remove_id'] = $this->loged_id ; \n $delete_purchase['bill_tr_date'] = $bill_tr_date ;\n $delete_purchase['bill_remove_date'] = $this->rcdate ;\n $delete_purchase['bill_created_date'] = $bill_created_at;\n $delete_purchase['bill_remove_time'] = $this->current_time;\n DB::table('delete_purchase')->insert($delete_purchase);\n #----------------------------- end insert delete purchase ---------------------------#\n #----------------------------- update supplier due-----------------------------------#\n $supplier_due_query = DB::table('supplier_due')->where('supplier_id',$supplier_id)->first();\n $database_supplier_due = $supplier_due_query->total_due_amount ;\n $now_supplier_due = $database_supplier_due - $was_supplier_due ;\n $data3 = array();\n $data3['total_due_amount'] = $now_supplier_due ;\n $update_supplier_due = DB::table('supplier_due')->where('supplier_id',$supplier_id)->update($data3);\n\n #----------------------------- end update supplier due -------------------------------#\n #----------------------------- delete cash book --------------------------------------# \n DB::table('cashbook')->where('id',$cashbook_id)->delete();\n\n #----------------------------- end delete cash book ----------------------------------#\n #----------------------------- delete payment ledger --------------------------------#\n DB::table('payment_ledger')->where('branch_id',$this->branch_id)->where('cashbook_id',$cashbook_id)->where('invoice',$invoice)->where('status',1)->where('supplier_id',$supplier_id)->delete();\n #---------------------------- end delete payment ledger -----------------------------#\n #---------------------------- delete purchase product -------------------------------#\n DB::table('purchase_product')->where('branch_id',$this->branch_id)->where('cashbook_id',$cashbook_id)->where('invoice_number',$invoice)->delete();\n #---------------------------- end delete purchas product-----------------------------#\n #---------------------------- delete purchase ---------------------------------------#\n DB::table('purchase')->where('cashbook_id',$cashbook_id)->where('invoice',$invoice)->delete();\n #---------------------------- end delete purchase -----------------------------------#\n Session::put('succes','Thanks , Purchase Deleted Successfully');\n return Redirect::to('managerPurchaseReport');\n\n }", "function eliminarFactura(){\r\n\t\t$this->procedimiento='tesor.f_factura_ime';\r\n\t\t$this->transaccion='TSR_FAC_ELI';\r\n\t\t$this->tipo_procedimiento='IME';\r\n\t\t\t\t\r\n\t\t//Define los parametros para la funcion\r\n\t\t$this->setParametro('id_factura','id_factura','int4');\r\n\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "public static function removeProduitPanier() {\n if (!isset($_GET['id'])) {\n self::error();\n } else {\n $idProduit = $_GET['id'];\n\n $_SESSION[\"panier\"][\"produit\" . $idProduit][\"stock\"] --;\n $var = $_SESSION[\"panier\"][\"produit\" . $idProduit][\"stock\"];\n if ($var <= 0) {\n unset($_SESSION[\"panier\"][\"produit\" . $idProduit]);\n }\n if (count($_SESSION[\"panier\"]) == 0) {\n unset($_SESSION[\"panier\"]);\n }\n }\n self::readPanier();\n }", "public function undo_deposit( $result, $order_id ) { \n $order = new WC_Order( $order_id );\n\n update_post_meta($order->id, '_order_total', get_post_meta( $order->id, 'order_total', true ) );\n update_post_meta($order->id, '_cart_discount', 0 );\n update_post_meta($order->id, '_order_discount', 0 );\n \n $order->order_total = get_post_meta( $order->id, 'order_total', true );\n $order->cart_discount = 0;\n $order->order_discount = 0; \n \n return $result;\n }", "public function cashierDeleteOPDDueCollection($id , $invoice , $year_invoice , $daily_invoice , $cashbook_id , $invoice_tr_id , $status)\n {\n // due collection info\n $collection_info = DB::table('opd_bill_transaction')->where('branch_id',$this->branch_id)->where('id',$id)->where('invoice_number',$invoice)->where('year_invoice_number',$year_invoice)->where('daily_invoice_number',$daily_invoice)->where('status',$status)->where('cashbook_id',$cashbook_id)->where('invoice_tr_id',$invoice_tr_id)->first();\n $total_payable = $collection_info->total_payable ;\n $total_discount = $collection_info->total_discount ;\n $total_rebate = $collection_info->total_rebate ;\n $total_payment = $collection_info->total_payment ;\n $bill_added_id = $collection_info->added_id ;\n $bill_tr_date = $collection_info->tr_date ;\n $bill_created_time = $collection_info->created_time ;\n $bill_created_at = $collection_info->created_at ;\n\n // get opd bill info\n $opd_bill_info_query = DB::table('opd_bill')->where('branch_id',$this->branch_id)->where('invoice',$invoice)->where('year_invoice',$year_invoice)->where('daily_invoice',$daily_invoice)->limit(1)->first();\n $opd_status = $opd_bill_info_query->opd_status ;\n\n if($opd_status == '2'){\n $check_pettycash_amount = DB::table('pettycash')->where('branch_id',$this->branch_id)->where('type',3)->limit(1)->first();\n // petty cash check\n $check_current_pettycash_amt = $check_pettycash_amount->pettycash_amount ;\n if($check_current_pettycash_amt < $total_payment){\n Session::put('failed','Sorry ! Pettycash Amount Small Than Delete Collection Amount. Please Delete This Collection After Available Pettycash');\n return Redirect::to('cashierOPDDueCollectionReport');\n exit();\n }\n }\n // check doctor discount\n $count_doctor_discount = DB::table('opd_bill_transaction')->where('branch_id',$this->branch_id)->where('invoice_number',$invoice)->where('year_invoice_number',$year_invoice)->where('daily_invoice_number',$daily_invoice)->where('status',2)->count();\n if($count_doctor_discount > 0){\n Session::put('failed','Sorry ! Given Doctor Discount Of This OPD Bill. First Delete Doctor Discount Of This Bill Then Try To Delete OPD Due Collection');\n return Redirect::to('cashierOPDDoctorDiscountReport');\n exit();\n \n }\n\n if($opd_status == '2'){\n // delete cashbook id\n DB::table('cashbook')->where('id',$cashbook_id)->delete();\n // reduce pettycash amount\n $pettycash_amount = DB::table('pettycash')->where('branch_id',$this->branch_id)->where('type',3)->limit(1)->first();\n $current_pettycash_amt = $pettycash_amount->pettycash_amount ;\n $now_pettycash_amt = $current_pettycash_amt - $total_payment ;\n // update pettycash amount\n $data_update_pettycash = array();\n $data_update_pettycash['pettycash_amount'] = $now_pettycash_amt; \n DB::table('pettycash')->where('branch_id',$this->branch_id)->where('type',3)->update($data_update_pettycash);\n }else{\n $pettycash_amount = DB::table('pettycash')->where('branch_id',$this->branch_id)->where('type',3)->limit(1)->first();\n $current_pettycash_amt = $pettycash_amount->pettycash_amount ;\n $now_pettycash_amt = $pettycash_amount->pettycash_amount ;\n }\n\n $due_status = 2 ;\n // change opd bill status\n $data_pathlogy_due_status = array() ;\n $data_pathlogy_due_status['due_status'] = $due_status ;\n DB::table('opd_bill')->where('branch_id',$this->branch_id)->where('invoice',$invoice)->where('year_invoice',$year_invoice)->where('daily_invoice',$daily_invoice)->update($data_pathlogy_due_status);\n \n // insert data into\n $data_delete_history = array();\n $data_delete_history['admin_type'] = 3 ;\n $data_delete_history['branch_id'] = $this->branch_id ;\n $data_delete_history['status'] = 5 ;\n $data_delete_history['tr_status'] = 1 ;\n $data_delete_history['before_pettycash_amt'] = $current_pettycash_amt ;\n $data_delete_history['after_pettycash_amt'] = $now_pettycash_amt ;\n $data_delete_history['bill_added_id'] = $bill_added_id ;\n $data_delete_history['bill_remove_id'] = $this->loged_id ;\n $data_delete_history['bill_tr_date'] = $bill_tr_date ;\n $data_delete_history['bill_remove_date'] = $this->rcdate ;\n $data_delete_history['bill_created_date'] = $bill_created_at ;\n $data_delete_history['bill_created_time'] = $bill_created_time ;\n $data_delete_history['bill_remove_time'] = $this->current_time ; \n DB::table('delete_history')->insert($data_delete_history);\n // get last delete history\n $last_delete_history_query = DB::table('delete_history')->orderBy('id','desc')->limit(1)->first();\n $last_delete_history_id = $last_delete_history_query->id ; \n // insert into delete pathlogy bill\n $data_delete_pathology_bill = array();\n $data_delete_pathology_bill['delete_history_id'] = $last_delete_history_id ;\n $data_delete_pathology_bill['branch_id'] = $this->branch_id ;\n $data_delete_pathology_bill['cashbook_id'] = $cashbook_id ;\n $data_delete_pathology_bill['invoice_number'] = $invoice;\n $data_delete_pathology_bill['year_invoice_number'] = $year_invoice ;\n $data_delete_pathology_bill['daily_invoice_number'] = $daily_invoice;\n $data_delete_pathology_bill['invoice_tr_id'] = $invoice_tr_id ;\n $data_delete_pathology_bill['total_payable'] = $total_payable;\n $data_delete_pathology_bill['total_payment'] = $total_payment;\n $data_delete_pathology_bill['total_discount'] = $total_discount;\n $data_delete_pathology_bill['total_rebate'] = $total_rebate;\n $data_delete_pathology_bill['status'] = $status ;\n $data_delete_pathology_bill['opd_status'] = $opd_status ;\n $data_delete_pathology_bill['bill_added_id'] = $bill_added_id;\n $data_delete_pathology_bill['bill_remove_id'] = $this->loged_id ; \n $data_delete_pathology_bill['bill_tr_date'] = $bill_tr_date ;\n $data_delete_pathology_bill['bill_remove_date'] = $this->rcdate ;\n $data_delete_pathology_bill['bill_created_date'] = $bill_created_at;\n $data_delete_pathology_bill['bill_created_time'] = $bill_created_time ;\n $data_delete_pathology_bill['bill_remove_time'] = $this->current_time;\n DB::table('delete_opd_bill')->insert($data_delete_pathology_bill);\n // now delete patylogy bill transaction\n DB::table('opd_bill_transaction')->where('branch_id',$this->branch_id)->where('id',$id)->where('invoice_number',$invoice)->where('year_invoice_number',$year_invoice)->where('daily_invoice_number',$daily_invoice)->where('status',$status)->where('cashbook_id',$cashbook_id)->where('invoice_tr_id',$invoice_tr_id)->delete();\n Session::put('succes','Thanks , OPD Due Collection Deleted Successfully');\n return Redirect::to('cashierOPDDueCollectionReport');\n }", "static public function ctrEliminarVenta(){\n\n\t\tif(isset($_GET[\"idVenta\"])){\n\n\t\t\t$tabla = \"ventas\";\n\n\t\t\t$item = \"id\";\n\t\t\t$valor = $_GET[\"idVenta\"];\n\n\t\t\t$traerVenta = ModeloVentas::mdlMostrarVentas($tabla, $item, $valor);\n\n\t\t\t/*=============================================\n\t\t\tACTUALIZAR FECHA ÚLTIMA COMPRA\n\t\t\t=============================================*/\n\n\t\t\t$tablaClientes = \"clientes\";\n\n\t\t\t$itemVentas = null;\n\t\t\t$valorVentas = null;\n\n\t\t\t$traerVentas = ModeloVentas::mdlMostrarVentas($tabla, $itemVentas, $valorVentas);\n\n\t\t\t$guardarFechas = array();\n\n\t\t\tforeach ($traerVentas as $key => $value) {\n\t\t\t\t\n\t\t\t\tif($value[\"id_cliente\"] == $traerVenta[\"id_cliente\"]){\n\n\t\t\t\t\tarray_push($guardarFechas, $value[\"fecha\"]);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif(count($guardarFechas) > 1){\n\n\t\t\t\tif($traerVenta[\"fecha\"] > $guardarFechas[count($guardarFechas)-2]){\n\n\t\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t\t$valor = $guardarFechas[count($guardarFechas)-2];\n\t\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t\t}else{\n\n\t\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t\t$valor = $guardarFechas[count($guardarFechas)-1];\n\t\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t\t}\n\n\n\t\t\t}else{\n\n\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t$valor = \"0000-00-00 00:00:00\";\n\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t}\n\n\t\t\t/*=============================================\n\t\t\tFORMATEAR TABLA DE PRODUCTOS Y LA DE CLIENTES\n\t\t\t=============================================*/\n\n\t\t\t$productos = json_decode($traerVenta[\"productos\"], true);\n\n\t\t\t$totalProductosComprados = array();\n\n\t\t\tforeach ($productos as $key => $value) {\n\n\t\t\t\tarray_push($totalProductosComprados, $value[\"cantidad\"]);\n\t\t\t\t\n\t\t\t\t$tablaProductos = \"productos\";\n\n\t\t\t\t$item = \"id\";\n\t\t\t\t$valor = $value[\"id\"];\n\t\t\t\t$orden = \"id\";\n\n\t\t\t\t$traerProducto = ModeloProductos::mdlMostrarProductos($tablaProductos, $item, $valor, $orden);\n\n\t\t\t\t$item1a = \"ventas\";\n\t\t\t\t$valor1a = $traerProducto[\"ventas\"] - $value[\"cantidad\"];\n\n\t\t\t\t$nuevasVentas = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1a, $valor1a, $valor);\n\n\t\t\t\t$item1b = \"stock\";\n\t\t\t\t$valor1b = $value[\"cantidad\"] + $traerProducto[\"stock\"];\n\n\t\t\t\t$nuevoStock = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1b, $valor1b, $valor);\n\n\t\t\t}\n\n\t\t\t$tablaClientes = \"clientes\";\n\n\t\t\t$itemCliente = \"id\";\n\t\t\t$valorCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t$traerCliente = ModeloClientes::mdlMostrarClientes($tablaClientes, $itemCliente, $valorCliente);\n\n\t\t\t$item1a = \"compras\";\n\t\t\t$valor1a = $traerCliente[\"compras\"] - array_sum($totalProductosComprados);\n\n\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item1a, $valor1a, $valorCliente);\n\n\t\t\t/*=============================================\n\t\t\tELIMINAR VENTA\n\t\t\t=============================================*/\n\n\t\t\t$respuesta = ModeloVentas::mdlEliminarVenta($tabla, $_GET[\"idVenta\"]);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"La venta ha sido borrada correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"ventas\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\t\t\n\t\t}\n\n\t}", "private function eliminarCita(){\n $query = \"UPDATE \" . $this->table . \" SET estado = 'Inactivo' WHERE CitaId = '\" . $this->idcita . \"'\";\n $resp = parent::nonQuery($query);\n if($resp >= 1 ){\n return $resp;\n }else{\n return 0;\n }\n }", "private function updateCommesse()\n {\n //Rielabora\n $preventivatore = $this->getPreventivatore();\n $result = $preventivatore->elabora();\n $imponibile = $result['prezzo_cliente_senza_iva'];\n $iva = $result['prezzo_cliente_con_iva'] - $result['prezzo_cliente_senza_iva'];\n $importo_trasportatore = $result['costo_trazione'];\n $importo_depositario = $result['deposito'];\n $importo_traslocatore_partenza = $result['costo_servizio_smontaggio_imballo_carico'] + $result['costo_servizio_imballo_carico'];\n $importo_traslocatore_destinazione = $result['costo_servizio_scarico'] + $result['costo_servizio_salita'] + $result['costo_servizio_montaggio'];\n\n $totali = array();\n $totali[$this->id_trasportatore] = 0;\n $totali[$this->id_depositario] = 0;\n $totali[$this->id_traslocatore_destinazione] = 0;\n $totali[$this->id_traslocatore_partenza] = 0;\n\n $totaliMC = array();\n $totaliMC[$this->id_trasportatore] = 0;\n $totaliMC[$this->id_depositario] = 0;\n $totaliMC[$this->id_traslocatore_destinazione] = 0;\n $totaliMC[$this->id_traslocatore_partenza] = 0;\n\n\n $totali[$this->id_trasportatore] = $totali[$this->id_trasportatore] + $importo_trasportatore;\n $totali[$this->id_depositario] = $totali[$this->id_depositario] + $importo_depositario;\n $totali[$this->id_traslocatore_partenza] = $totali[$this->id_traslocatore_partenza] + $importo_traslocatore_partenza;\n $totali[$this->id_traslocatore_destinazione] = $totali[$this->id_traslocatore_destinazione] + $importo_traslocatore_destinazione;\n\n\n $mc = $preventivatore->getMC();\n\n $totaliMC[$this->id_trasportatore] = $totaliMC[$this->id_trasportatore] + $mc['mc_da_trasportare'];\n $totaliMC[$this->id_depositario] = $totaliMC[$this->id_depositario] + $mc['mc_da_trasportare'];\n $totaliMC[$this->id_traslocatore_destinazione] = $totaliMC[$this->id_traslocatore_destinazione] + $mc['mc_smontaggio'] + $mc['mc_no_smontaggio'];\n $totaliMC[$this->id_traslocatore_partenza] = $totaliMC[$this->id_traslocatore_partenza] + $mc['mc_da_rimontare'] + $mc['mc_scarico_salita_piano'];\n\n\n $imponibile = round($totali[$this->id_trasportatore]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_trasportatore] - $imponibile,2);\n\n $ordine_trasportatore = new OrdineFornitore($this->id_preventivo, $this->id_trasportatore, $totali[$this->id_trasportatore], $imponibile, $iva, $totaliMC[$this->id_trasportatore], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_TRASPORTO);\n $ordine_trasportatore->save();\n\n $imponibile = round($totali[$this->id_traslocatore_partenza]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_traslocatore_partenza] - $imponibile,2);\n $ordine_traslocatore_partenza = new OrdineFornitore($this->id_preventivo, $this->id_traslocatore_partenza, $totali[$this->id_traslocatore_partenza], $imponibile, $iva, $totaliMC[$this->id_traslocatore_destinazione], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_TRASLOCO_PARTENZA);\n $ordine_traslocatore_partenza->save();\n\n $imponibile = round($totali[$this->id_traslocatore_destinazione]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_traslocatore_destinazione] - $imponibile,2);\n $ordine_traslocatore_destinazione = new OrdineFornitore($this->id_preventivo, $this->id_traslocatore_destinazione, $totali[$this->id_traslocatore_destinazione], $imponibile, $iva, $totaliMC[$this->id_traslocatore_partenza], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_TRASLOCO_DESTINAZIONE);\n $ordine_traslocatore_destinazione->save();\n\n if ($this->giorni_deposito> 10)\n {\n $imponibile = round($totali[$this->id_depositario]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_depositario] - $imponibile,2);\n\n $ordine_depositario = new OrdineFornitore($this->id_preventivo, $this->id_depositario, $totali[$this->id_depositario], $imponibile, $iva, $totaliMC[$this->id_depositario], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_DEPOSITO);\n $ordine_depositario->save();\n\n }\n\n $con = DBUtils::getConnection();\n $sql =\"UPDATE preventivi SET\n importo_commessa_trasportatore ='\".$totali[$this->id_trasportatore].\"',\n importo_commessa_traslocatore_partenza ='\".$totali[$this->id_traslocatore_partenza].\"',\n importo_commessa_traslocatore_destinazione ='\".$totali[$this->id_traslocatore_destinazione].\"',\n importo_commessa_depositario ='\".$totali[$this->id_depositario].\"',\n imponibile ='\".$imponibile.\"',\n iva ='\".$iva.\"'\n WHERE id_preventivo=\".$this->id_preventivo;\n\n $res = mysql_query($sql);\n\n\n DBUtils::closeConnection($con);\n\n }", "static public function ctrEliminarVenta(){\n\n\t\tif(isset($_GET[\"idVenta\"])){\n\n\t\t\t$tabla = \"ventas\";\n\n\t\t\t$item = \"id\";\n\t\t\t$valor = $_GET[\"idVenta\"];\n\n\t\t\t$traerVenta = ModeloVentas::mdlMostrarVentas($tabla, $item, $valor);\n\n\t\t\t/*=============================================\n\t\t\tACTUALIZAR FECHA ÚLTIMA COMPRA\n\t\t\t=============================================*/\n\n\t\t\t$tablaClientes = \"clientes\";\n\n\t\t\t$itemVentas = null;\n\t\t\t$valorVentas = null;\n\n\t\t\t$traerVentas = ModeloVentas::mdlEliminarVenta($tabla, $itemVentas, $valorVentas);\n\n\t\t\t$guardarFechas = array();\n\n\t\t\tforeach ($traerVentas as $key => $value) {\n\t\t\t\t\n\t\t\t\tif($value[\"id_cliente\"] == $traerVenta[\"id_cliente\"]){\n\n\t\t\t\t\tarray_push($guardarFechas, $value[\"fecha\"]);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif(count($guardarFechas) > 1){\n\n\t\t\t\tif($traerVenta[\"fecha\"] > $guardarFechas[count($guardarFechas)-2]){\n\n\t\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t\t$valor = $guardarFechas[count($guardarFechas)-2];\n\t\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t\t}else{\n\n\t\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t\t$valor = $guardarFechas[count($guardarFechas)-1];\n\t\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t\t}\n\n\n\t\t\t}else{\n\n\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t$valor = \"0000-00-00 00:00:00\";\n\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t}\n\n\t\t\t/*=============================================\n\t\t\tFORMATEAR TABLA DE PRODUCTOS Y LA DE CLIENTES\n\t\t\t=============================================*/\n\n\t\t\t$productos = json_decode($traerVenta[\"productos\"], true);\n\n\t\t\t$totalProductosComprados = array();\n\n\t\t\tforeach ($productos as $key => $value) {\n\n\t\t\t\tarray_push($totalProductosComprados, $value[\"cantidad\"]);\n\t\t\t\t\n\t\t\t\t$tablaProductos = \"productos\";\n\n\t\t\t\t$item = \"id\";\n\t\t\t\t$valor = $value[\"id\"];\n\t\t\t\t$orden = \"id\";\n\n\t\t\t\t$traerProducto = ModeloProductos::mdlMostrarProductos($tablaProductos, $item, $valor, $orden);\n\n\t\t\t\t$item1a = \"ventas\";\n\t\t\t\t$valor1a = $traerProducto[\"ventas\"] - $value[\"cantidad\"];\n\n\t\t\t\t$nuevasVentas = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1a, $valor1a, $valor);\n\n\t\t\t\t$item1b = \"stock\";\n\t\t\t\t$valor1b = $value[\"cantidad\"] + $traerProducto[\"stock\"];\n\n\t\t\t\t$nuevoStock = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1b, $valor1b, $valor);\n\n\t\t\t}\n\n\t\t\t$tablaClientes = \"clientes\";\n\n\t\t\t$itemCliente = \"id\";\n\t\t\t$valorCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t$traerCliente = ModeloClientes::mdlMostrarClientes($tablaClientes, $itemCliente, $valorCliente);\n\n\t\t\t$item1a = \"compras\";\n\t\t\t$valor1a = $traerCliente[\"compras\"] - array_sum($totalProductosComprados);\n\n\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item1a, $valor1a, $valorCliente);\n\n\t\t\t/*=============================================\n\t\t\tELIMINAR VENTA\n\t\t\t=============================================*/\n\n\t\t\t$respuesta = ModeloVentas::mdlEliminarVenta($tabla, $_GET[\"idVenta\"]);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"La venta ha sido borrada correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"ventas\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\t\t\n\t\t}\n\n\t}", "function pnh_superscheme_give_cash_back()\r\n\t{\r\n\t\t$user=$this->auth(FINANCE_ROLE);\r\n\t\t$super_scheme_logid=$this->input->post('super_scheme_logid');\r\n\t\t$logids=explode(',', $super_scheme_logid);\r\n\r\n\t\tforeach($logids as $logid)\r\n\t\t{\r\n\t\t\t$super_scheme_processed=0;\r\n\t\t\t$super_scheme_sales=$this->db->query(\"SELECT f.pnh_franchise_id,f.franchise_id,f.franchise_name, f.city, inv.invoice_no, o.transid, d.menuid, m.name AS menuname, DATE(FROM_UNIXTIME(o.time)) AS order_date, DATE(FROM_UNIXTIME(inv.createdon)) AS invoice_date,\r\n\t\t\t\t\tb.name AS brand, i.name AS deal, inv.mrp, inv.discount, (inv.mrp - inv.discount) AS landing_cost, o.quantity AS deal_qty, (inv.mrp-inv.discount)*o.quantity AS sub_total,IFNULL(SUM(o.i_orgprice-(o.i_coup_discount+o.i_discount))*o.quantity,0) AS total_sales,\r\n\t\t\t\t\to.super_scheme_processed,o.super_scheme_cashback,o.super_scheme_logid,o.id\r\n\t\t\t\t\tFROM king_orders o\r\n\t\t\t\t\tJOIN king_invoice inv ON inv.order_id = o.id\r\n\t\t\t\t\tJOIN king_dealitems i ON i.id = o.itemid\r\n\t\t\t\t\tJOIN king_brands b ON b.id = o.brandid\r\n\t\t\t\t\tJOIN king_deals d ON d.dealid = i.dealid\r\n\t\t\t\t\tJOIN pnh_menu m ON m.id = d.menuid\r\n\t\t\t\t\tJOIN king_transactions t ON t.transid = o.transid\r\n\t\t\t\t\tJOIN pnh_m_franchise_info f ON f.franchise_id = t.franchise_id\r\n\t\t\t\t\tWHERE invoice_status = 1 AND t.is_pnh = 1 AND\r\n\t\t\t\t\to.super_scheme_logid=? and o.has_super_scheme=1 and o.super_scheme_processed=0\r\n\t\t\t\t\tORDER BY f.franchise_name, b.name, i.name\",$logid);\r\n\t\t\tif($super_scheme_sales->num_rows())\r\n\t\t\t{\r\n\r\n\t\t\t\tforeach($super_scheme_sales->result_array() as $s)\r\n\t\t\t\t{\r\n\r\n\t\t\t\t\t$this->db->query(\"update king_orders o join king_transactions t on t.transid=o.transid set o.super_scheme_processed=1 where o.super_scheme_logid=? and o.id=? \",array($logid,$s['id']));\r\n\t\t\t\t\t$super_scheme_processed=1;\r\n\t\t\t\t\tif($this->db->affected_rows()>0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$type=0;\r\n\t\t\t\t\t\t$amount=$s['total_sales']*$s['super_scheme_cashback']/100;\r\n\t\t\t\t\t\t$desc='super scheme';\r\n\t\t\t\t\t\t$acc_correc_id=$s['super_scheme_logid'];\r\n\r\n\t\t\t\t\t\t//if target value is acheived insert into pnh_fran_account_stat table & pnh_franchise_account_summary table\r\n\t\t\t\t\t\tif($s['total_sales']>=$s['super_scheme_target'] && $s['super_scheme_processed']=1)\r\n\t\t\t\t\t\t\t$acc_stat_id = $this->erpm->pnh_fran_account_stat($s['franchise_id'],$type,$amount,$desc,\"correction\",$s['franchise_id']);\r\n\t\t\t\t\t\tif($this->db->affected_rows()>0)\r\n\t\t\t\t\t\t\t$remarks=\"super scheme cash back\";\r\n\t\t\t\t\t\t$this->db->query(\"insert into pnh_franchise_account_summary(franchise_id,action_type,acc_correc_id,credit_amt,status,created_on,remarks)values(?,6,?,?,1,now(),?)\",array($s['franchise_id'],$acc_correc_id,$amount,$remarks));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->erpm->flash_msg(\"Super scheme Processed\");\r\n\t\tredirect($_SERVER['HTTP_REFERER']);\r\n\t}", "function updateBudgetAsRemove($clin_number)\n{\n\tglobal $mysqli;\n\t$update_data = \"update usaid_requisition_clin_budget set status = 'Remove' where budget_number='\".$clin_number.\"'\";\n\t$result_data = $mysqli->query($update_data);\n}", "function Recalcular_Saldo_Venta_AddCobro($idventa){\n\t$datosventa\t\t=\tregistro( runsql(\"select fecha, monto,saldo from ventas where id_venta='$idventa'\") ); \n\t$datoscobros\t=\trunsql(\"select id_cobro,fecha,monto,saldo,moneda from cobros where id_venta='$idventa' order by id_cobro desc LIMIT 1 OFFSET 0 ;\"); // AGARRA EL ULTIMO\n\t$tcUSD\t=\tTipoCambio('USD',$datosventa[fecha]);\n\t$tcEUR\t=\tTipoCambio('EUR',$datosventa[fecha]);\n\t$tcQUE\t=\t1;\n\t$Monto_Pagado\t=\t0;\n\t$SubMonto\t\t=\t0;\n\t$Saldo_Anterior\t=\t$datosventa[saldo];\n\twhile($i=registro($datoscobros)){\n\t\tswitch($i[moneda]){\n\t\t\tcase \"USD\":\n\t\t\t\t$Monto_Pagado\t=\t$i[monto]*$tcUSD;\n\t\t\t\techo $Monto_Pagado;\n\t\t\tbreak;\n\t\t\tcase \"EUR\":\n\t\t\t\t$Monto_Pagado\t=\t$i[monto]*$tcEUR;\n\t\t\t\techo $Monto_Pagado;\t\t\t\t\n\t\t\tbreak;\t\n\t\t\tcase \"QUE\":\n\t\t\t\t$Monto_Pagado\t=\t$i[monto]*$tcQUE;\n\t\t\t\techo $Monto_Pagado;\t\t\t\t\n\t\t\tbreak;\t\t\t\t\t\n\t\t}\n\t}\n\t$Saldo_Actual\t=\t$Saldo_Anterior\t - $Monto_Pagado;\n//\techo \"<br>**************\". $Saldo_Actual\t.\"=\".\t$Saldo_Anterior\t .\"-\". $Monto_Pagado.\" ****<br>\";exit();\n\t$campos=Array();\n $campos[saldo]\t=\t$Saldo_Actual;\n\t$ins=actualizar(\"ventas\",$campos,\"id_venta = '$idventa'\");\n\t//recalcular_saldo_venta($idventa);\n\t//echo \"<br>actualizar(ventas,\".$Saldo_Actual.\",id_venta = $idventa\"; \texit();\n\treturn $Saldo_Actual;\n}", "function export_cp_remove_items($invoice_number, $script_nos) {\n\n if ( ! $script_nos) return;\n\n global $mssql;\n $mssql = $mssql ?: new Mssql_Cp();\n\n $order_id = $invoice_number - 2; //TODO SUPER HACKY\n $script_nos = \"('\".implode(\"', '\", $script_nos).\"')\";\n\n //$sql = \"SirumWeb_RemoveScriptNosFromOrder '$invoice_number', '$script_nos'\";\n\n $sql1 = \"\n DELETE csomline\n FROM csomline\n JOIN cprx ON cprx.rx_id = csomline.rx_id\n WHERE csomline.order_id = '$order_id'\n AND script_no IN $script_nos\n AND rxdisp_id = 0 -- if the rxdisp_id is set on the line, you have to call CpOmVoidDispense first.\n \";\n\n $sql2 = \"\n UPDATE csom\n SET csom.liCount = (SELECT COUNT(*) FROM csomline WHERE order_id = '$order_id')\n WHERE order_id = '$order_id'\n \";\n\n $res = $mssql->run($sql1);\n $res = $mssql->run($sql2);\n}", "public function ActualizarCantidadCajaTmp(){\n\t\tif(isset($_POST['ActualizarCantidadCajaTmp'])):\n\t\t\t$IdCajaTmp\t\t\t\t\t= filter_var($_POST['IdCajaTmp'], FILTER_VALIDATE_INT);\n\t\t\t$IdProducto\t\t\t\t\t= filter_var($_POST['IdProducto'], FILTER_VALIDATE_INT);\n\t\t\t$Cantidad\t\t\t\t\t= filter_var($_POST['Cantidad'], FILTER_VALIDATE_INT);\n\t\t\t$Precio\t\t\t\t\t\t= filter_var($_POST['Precio'], FILTER_SANITIZE_STRING);\n\t\t\t$AntiguaCantidad\t\t\t= filter_var($_POST['CantidadAnterior'], FILTER_VALIDATE_INT);\n\t\t\t\n\t\t\t$PrecioTotal\t\t\t\t= $Precio*$Cantidad;\n\t\t\t\n\t\t\t$ActualizarProductoQuery\t= $this->Conectar()->query(\"UPDATE `producto` SET `stock` = `stock`+{$AntiguaCantidad} WHERE `id`='{$IdProducto}'\");\n\t\t\t$ActulizarStockSql\t\t\t= $this->Conectar()->query(\"UPDATE `producto` SET `stock` = `stock`-{$Cantidad} WHERE `id`='{$IdProducto}'\");\n\t\t\t\n\t\t\t$StockProductoSql\t\t\t= $this->Conectar()->query(\"SELECT stock FROM `producto` WHERE id='{$IdProducto}'\");\n\t\t\t$StockProducto\t\t\t\t= $StockProductoSql->fetch_array();\n\t\t\t\n\t\t\t$StockTmp\t\t\t\t\t= $StockProducto['stock'];\n\t\t\t$ActualizarProductoTmpQuery\t= $this->Conectar()->query(\"UPDATE `cajatmp` SET `cantidad` = '{$Cantidad}' , `totalprecio` = '{$PrecioTotal}' , `stockTmp` = '{$StockTmp}', `stock` = '{$StockTmp}' WHERE `id` = '{$IdCajaTmp}'\");\n\n\t\t\tif($ActualizarProductoQuery && $ActulizarStockSql && $ActualizarProductoTmpQuery == true):\n\t\t\t\techo'\n\t\t\t\t<div class=\"alert alert-dismissible alert-success\">\n\t\t\t\t\t<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>\n\t\t\t\t\t<strong>&iexcl;Bien hecho!</strong> Se ha eliminado la venta actual con exito.\n\t\t\t\t</div>\n\t\t\t\t<meta http-equiv=\"refresh\" content=\"0;url='.URLBASE.'\"/>';\n\t\t\telse:\n\t\t\t\techo'\n\t\t\t\t<div class=\"alert alert-dismissible alert-danger\">\n\t\t\t\t\t<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>\n\t\t\t\t\t<strong>&iexcl;Lo Sentimos!</strong> A ocurrido un error al eliminar la venta actual, intentalo de nuevo.\n\t\t\t\t</div>\n\t\t\t\t<meta http-equiv=\"refresh\" content=\"0;url='.URLBASE.'\"/>';\n\t\t\tendif;\n\t\tendif;\n\t}", "function tache_barre_avancement_charge($tache_tmp, $element=\"tache\")\r\n{\r\n\t//Init\r\n\tglobal $trad;\r\n\t$lib_avancement\t\t\t= ($element==\"dossier\") ? $trad[\"TACHE_avancement_moyen\"] : $trad[\"TACHE_avancement\"];\r\n\t$lib_charge_jour_homme\t= ($element==\"dossier\") ? $trad[\"TACHE_charge_jour_homme_total\"] : $trad[\"TACHE_charge_jour_homme\"];\r\n\t// Barre de statut de l'avancement (+ de la charge?)\r\n \tif($tache_tmp[\"avancement\"]>0)\r\n \t{\r\n\t\t// Init\r\n\t\t$tache_retardee = tache_retardee($tache_tmp);\r\n \t\t$couleur_pourcent = ($tache_retardee==true) ? \"rouge\" : \"jaune\";\r\n \t\t// Infos principales\r\n \t\t$txt_barre = \"<img src=\\\"\".PATH_TPL.\"module_tache/avancement.png\\\" /> \".$tache_tmp[\"avancement\"].\"% &nbsp;\";\r\n\t\tif(@$tache_tmp[\"avancement_moyen_pondere\"]>0)\t$txt_barre .= \"<img src=\\\"\".PATH_TPL.\"module_tache/avancement_moyen_pondere.png\\\" /> \".$tache_tmp[\"avancement_moyen_pondere\"].\"% &nbsp;\";\r\n\t\tif($tache_tmp[\"charge_jour_homme\"]>0)\t\t\t$txt_barre .= \"<img src=\\\"\".PATH_TPL.\"module_tache/charge_jour_homme.png\\\" /> \".$tache_tmp[\"charge_jour_homme\"];\r\n\t\t// Pécision dans l'infobulle\r\n\t\t$txt_infobulle = \"<img src=\\\"\".PATH_TPL.\"module_tache/avancement.png\\\" /> &nbsp; \".$lib_avancement.\" : \".$tache_tmp[\"avancement\"].\" %\";\r\n \t\tif(@$tache_tmp[\"avancement_moyen_pondere\"]>0)\t$txt_infobulle .= \"<br /><img src=\\\"\".PATH_TPL.\"module_tache/avancement_moyen_pondere.png\\\" /> &nbsp; \".$trad[\"TACHE_avancement_moyen_pondere\"].\" : \".$tache_tmp[\"avancement_moyen_pondere\"].\" %\";\r\n\t\tif($tache_tmp[\"charge_jour_homme\"]>0)\t\t\t$txt_infobulle .= \"<br /><img src=\\\"\".PATH_TPL.\"module_tache/charge_jour_homme.png\\\" /> &nbsp; \".$lib_charge_jour_homme.\" : \".$tache_tmp[\"charge_jour_homme\"];\r\n\t\tif($tache_retardee==true)\t\t\t\t\t\t$txt_infobulle .= \"<br /><br /><img src=\\\"\".PATH_TPL.\"divers/important.png\\\" /> &nbsp; \".$trad[\"TACHE_avancement_retard\"];\r\n\t\t// Affichage\r\n\t\treturn status_bar($tache_tmp[\"avancement\"], $txt_barre, $txt_infobulle, $couleur_pourcent).\" &nbsp; &nbsp;\";\r\n\t}\r\n\t// Affichage de la charge\r\n\telseif($tache_tmp[\"charge_jour_homme\"]>0) {\r\n\t\treturn \"<img src=\\\"\".PATH_TPL.\"module_tache/charge_jour_homme.png\\\" /> \".$lib_charge_jour_homme.\" : \".$tache_tmp[\"charge_jour_homme\"].\"<img src=\\\"\".PATH_TPL.\"divers/separateur.gif\\\" />\";\r\n\t}\r\n}", "function update_money($account,$total_money,$input_money){\n\t\t$total_money -= $input_money;\n\t\tglobal $connection;\n\t\t$query_mn = mysqli_query($connection,\"UPDATE khachhang SET `money`=$total_money WHERE account='$account'\" );\n\t\treturn $total_money;\n\t}", "public function cashierDeletePathologyDoctorDiscount($invoice , $year_invoice , $daily_invoice , $cashbook_id , $invoice_tr_id , $status)\n {\n $collection_info = DB::table('pathology_bill_transaction')->where('branch_id',$this->branch_id)->where('invoice_number',$invoice)->where('year_invoice_number',$year_invoice)->where('daily_invoice_number',$daily_invoice)->where('status',$status)->where('cashbook_id',$cashbook_id)->where('invoice_tr_id',$invoice_tr_id)->first();\n \t$total_payable = $collection_info->total_payable ;\n \t$total_discount = $collection_info->total_discount ;\n \t$total_rebate = $collection_info->total_rebate ;\n \t$total_payment = $collection_info->total_payment ;\n \t$bill_added_id = $collection_info->added_id ;\n \t$bill_tr_date = $collection_info->tr_date ;\n \t$bill_created_time = $collection_info->created_time ;\n \t$bill_created_at = $collection_info->created_at ;\n\n \t// $due_status = 2 ;\n \t// delete cashbook id\n \tDB::table('cashbook')->where('id',$cashbook_id)->delete();\n \t// // change pathology bill status\n \t// $data_pathlogy_due_status = array() ;\n \t// $data_pathlogy_due_status['due_status'] = $due_status ;\n \t// DB::table('pathology_bill')->where('branch_id',$this->branch_id)->where('invoice',$invoice)->where('year_invoice',$year_invoice)->where('daily_invoice',$daily_invoice)->where('cashbook_id',$cashbook_id)->update($data_pathlogy_due_status);\n \t// reduce pettycash amount\n $pettycash_amount = DB::table('pettycash')->where('branch_id',$this->branch_id)->where('type',3)->limit(1)->first();\n $current_pettycash_amt = $pettycash_amount->pettycash_amount ;\n $now_pettycash_amt = $current_pettycash_amt + $total_discount ;\n // update pettycash amount\n $data_update_pettycash = array();\n $data_update_pettycash['pettycash_amount'] = $now_pettycash_amt; \n DB::table('pettycash')->where('branch_id',$this->branch_id)->where('type',3)->update($data_update_pettycash);\n // insert data into\n $data_delete_history \t\t\t\t= array();\n $data_delete_history['admin_type'] \t= 3 ;\n $data_delete_history['branch_id'] \t= $this->branch_id ;\n $data_delete_history['status'] \t\t= 2 ;\n $data_delete_history['tr_status'] \t= 1 ;\n $data_delete_history['before_pettycash_amt'] = $current_pettycash_amt ;\n $data_delete_history['after_pettycash_amt'] = $now_pettycash_amt ;\n $data_delete_history['bill_added_id'] \t\t= $bill_added_id ;\n $data_delete_history['bill_remove_id'] \t\t= $this->loged_id ;\n $data_delete_history['bill_tr_date'] \t\t\t= $bill_tr_date ;\n $data_delete_history['bill_remove_date'] \t\t= $this->rcdate ;\n $data_delete_history['bill_created_date'] \t= $bill_created_at ;\n $data_delete_history['bill_created_time'] \t= $bill_created_time ;\n $data_delete_history['bill_remove_time'] \t\t= $this->current_time ;\t\n DB::table('delete_history')->insert($data_delete_history);\n // get last delete history\n $last_delete_history_query = DB::table('delete_history')->orderBy('id','desc')->limit(1)->first();\n $last_delete_history_id = $last_delete_history_query->id ; \n // insert into delete pathlogy bill\n $data_delete_pathology_bill = array();\n $data_delete_pathology_bill['delete_history_id'] = $last_delete_history_id ;\n $data_delete_pathology_bill['branch_id'] = $this->branch_id ;\n $data_delete_pathology_bill['cashbook_id'] = $cashbook_id ;\n $data_delete_pathology_bill['invoice_number'] = $invoice;\n $data_delete_pathology_bill['year_invoice_number'] = $year_invoice ;\n $data_delete_pathology_bill['daily_invoice_number'] = $daily_invoice;\n $data_delete_pathology_bill['invoice_tr_id'] = $invoice_tr_id ;\n $data_delete_pathology_bill['total_payable'] = $total_payable;\n $data_delete_pathology_bill['total_payment'] = $total_payment;\n $data_delete_pathology_bill['total_discount'] = $total_discount;\n $data_delete_pathology_bill['total_rebate'] = $total_rebate;\n $data_delete_pathology_bill['status'] = $status ;\n $data_delete_pathology_bill['bill_added_id'] = $bill_added_id;\n $data_delete_pathology_bill['bill_remove_id'] = $this->loged_id ; \n $data_delete_pathology_bill['bill_tr_date'] = $bill_tr_date ;\n $data_delete_pathology_bill['bill_remove_date'] = $this->rcdate ;\n $data_delete_pathology_bill['bill_created_date'] = $bill_created_at;\n $data_delete_pathology_bill['bill_created_time'] = $bill_created_time ;\n $data_delete_pathology_bill['bill_remove_time'] = $this->current_time;\n DB::table('delete_pathology_bill')->insert($data_delete_pathology_bill);\n // now delete patylogy bill transaction\n DB::table('pathology_bill_transaction')->where('branch_id',$this->branch_id)->where('invoice_number',$invoice)->where('year_invoice_number',$year_invoice)->where('daily_invoice_number',$daily_invoice)->where('status',$status)->where('cashbook_id',$cashbook_id)->where('invoice_tr_id',$invoice_tr_id)->delete();\n Session::put('succes','Thanks , Pathology Doctor Discount Deleted Successfully');\n return Redirect::to('cashierPathologyDoctorDiscountReport');\n }", "function suppr_tache($id_tache)\r\n{\r\n\tglobal $objet;\r\n\tif(droit_acces($objet[\"tache\"],$id_tache)>=2){\r\n\t\tsuppr_objet($objet[\"tache\"],$id_tache);\r\n\t\tdb_query(\"DELETE FROM gt_tache_responsable WHERE id_tache=\".db_format($id_tache));\r\n\t}\r\n}", "function borrarInscrito() {\n //Creamos la evaluacion\n leerClase('Evaluacion');\n leerClase('Estudiante');\n leerClase('Proyecto_dicta');\n $estudiante = new Estudiante($this->estudiante_id);\n $evaluacion = new Evaluacion($this->evaluacion_id);\n $protecto=$estudiante->getProyecto();\n $sql = \"select p.id as id from \" . $this->getTableName('Proyecto_dicta') . \" as p where p.proyecto_id = '$protecto->id' and p.dicta_id = '$this->dicta_id' \";\n $resultado = mysql_query($sql);\n\n $proyecto_array = mysql_fetch_array($resultado);\n $proyecto_dicta = new Proyecto_dicta($proyecto_array);\n $proyecto_dicta->delete();\n $evaluacion->delete();\n $this->delete();\n }", "function eliminarCotizacion(){\n\t\t$this->procedimiento='adq.f_cotizacion_ime';\n\t\t$this->transaccion='ADQ_COT_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cotizacion','id_cotizacion','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function excluir(){\n\t\n\t\t$idcomentario = $this->uri->segment(3);\n\t\tif ($idcomentario != NULL):\n\t\t\t$query = $this->Comentarios->get_byid($idcomentario);\n\t\t\tif ($query->num_rows()==1):\n\t\t\t\t$query = $query->row();\n\t\t\t\t$this->Comentarios->do_delete(array('id_comentario'=>$query->id_comentario), FALSE);\n\t\t\tendif;\n\t\telse:\n\t\t\tset_msg('msgerro', 'Escolha um comentario para excluir', 'erro');\n\t\tendif;\n\t\t\tredirect('comentarios/gerenciar');\n\t}", "public function darCostos(){\n\t\t/*variables: int $valor, float $costo*/\n\t\t$valor = parent::darCostos();\n\t\t$costo = $valor + ($valor * $this->getPorcentajeIncremento()); //45% incremento \n\t\treturn $costo;\n\t}", "function debit($total, $creditCard)\n {\n }", "function trasnsaccionRegistraAhogado($kant){\n /*\n * Guardo Registro \n */\n $cant = intval($kant);\n $registro = array(\n 'cantidad'=>$cant,\n 'usuario' =>$_SESSION['name']\n );\n $this->db->insert('pollo_ahogado',$registro);\n /*\n * Obtengo Stock VIVO\n */\n $this->db->select('cantidad');\n $stock = $this->db->get('stock_vivo')->row();\n print_r($stock);\n if($stock){\n $stockActual = intval($stock->cantidad) - intval($cant);\n $data = array(\n 'id' => 1,\n 'cantidad' =>$stockActual\n );\n $this->db->replace('stock_vivo', $data);\n }\n\n }", "function deleteAbandonedCart(){\n\t$kemarin = date('Y-m-d', mktime(0,0,0, date('m'), date('d') - 1, date('Y')));\n\tmysql_query(\"DELETE FROM orders_temp \n\t WHERE tgl_order_temp < '$kemarin'\");\n}", "public function delete_data_to_tombstone(){\n }", "function removeProcessoPronto(){\n\tunset($_SESSION['fila'][0]);\n\n\t/*REORGANIZA O ARRAY DE PROCESSOS PRONTOS*/\n\t$_SESSION['fila'] = array_values($_SESSION['fila']);\n}", "public function action_removetest()\n\t{\n\t\ttry{\n\t\t\t$array_accounts = include($_SERVER['DOCUMENT_ROOT'].'/ayushman/application/config/accounts.php');\n\t\t\t$orderno=$_GET['orderno'];\n\t\t\t$objUser = Auth::instance()->get_user();\n\t\t\t$userid = $objUser->id;\n\t\t\tif($orderno != \"\")\n\t\t\t{\n\t\t\t\t$objtest = ORM::factory('diagnosticlabsorder')->where('id','=',$orderno)->find();\n\t\t\t\tif($objtest->id != \"\")\n\t\t\t\t{\t\n\t\t\t\t\t$from_account \t= ORM::factory('billingaccount')->where('refaccountuserid_c','=',$array_accounts['provisionaccountuserid'])->find()->accountcode_c;\n\t\t\t\t\t$to_account \t= ORM::factory('billingaccount')->where('refaccountuserid_c','=',$userid)->find()->accountcode_c;\n\t\t\t\t\t\n\t\t\t\t\t// If online transaction then reverted back\n\t\t\t\t\tif($objtest->cashpaymentflag_c == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif($objtest->paid_c)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$amount = $objtest->rate_c;\n\t\t\t\t\t\t\t$result = transaction::transfer($from_account,$to_account,1,$objtest->rate_c,8);\n\t\t\t\t\t\t\t$objtest->status_c= 'Cancelled';\n\t\t\t\t\t\t\t$objtest->save();\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\tdie();\n\t\t} \n\t\tcatch (Exception $e) {\n\t\tthrow new Exception($e);\n\t\t}\n\t}", "public function cash($id) {\n// $cash = array_shift($cash);\n $this->checked = 0;\n $this->dispatchBrowserEvent('cash-detail', $id);\n }", "public function carrinho(){\n\n $total = 0;\n $totalProdutos = 0;\n\n\n\n require_once ('cms/models/produto_class.php');\n\n $produtoClass = new produtoClass;\n // VERIFICAR SE EXISTE UMA SESSION\n\n if ($_SESSION) {\n\n if (isset($_SESSION['idUsuario'])) {\n $totalDados = count($_SESSION);\n @$dadosTotais = $totalDados - 2;\n\n // echo $dadosTotais;\n }else {\n $totalDados = count($_SESSION);\n @$dadosTotais = $totalDados - 2;\n\n // echo $dadosTotais;\n }\n\n\n\n //echo $dadosTotais;\n // SEPARA NOME DE QUANTIDADE OU VALORES\n\n echo \"<form class='' action='router.php?controller=produtos&modo=finalizarCompra' method='post'>\";\n foreach ($_SESSION as $nome => $quantidade) {\n\n if ($quantidade > 0) {\n\n if (substr($nome,0,9) == 'produtos_') {\n\n // echo (\"essas e a quantidade \".$quantidade.\"</br>\");\n // PEGA id DA SESSION\n $id = substr($nome,9,(strlen($nome) -9));\n\n\n\n //echo $id.\"</br>\";\n\n\n // MONTA O CARRINHO\n $produtoClass->idProduto = substr($nome,9,(strlen($nome) -9));\n $produtoClass->quantidade = $quantidade;\n $retorno = $produtoClass::selecionarPorId($produtoClass);\n // var_dump($retorno);\n\n $count=0;\n\n // $conta = 100;\n while ($count < count($retorno)) {\n\n //$conta = $conta - 1;\n\n //echo $conta;\n\n // echo \"</br> STRING </br>\";\n $subtotal =$retorno[$count]->quantidade * $retorno[$count]->preco;\n // echo ('nome: '.$retorno[$count]->nome. ' '.$retorno[$count]->quantidade.' x R$ '.number_format($retorno[$count]->preco ,2 ) .' = R$'. number_format($subtotal,2).'</br>');\n //var_dump($retorno);\n\n\n // validacao para Nao adicionar produtos zerados\n if ($retorno[$count]->quantidade <= 1) {\n $class='cursor';\n }else {\n $class='Novocursor';\n }\n\n // validacao de quantidade no estoque\n //echo $retorno[$count]->quantidadeProduto ;\n if ($retorno[$count]->quantidadeProduto <= $retorno[$count]->quantidade) {\n $class2='cursor';\n }else {\n $class2='Novocursor';\n }\n //\n // $counta=1;\n // while ($counta < $totalDados) {\n //\n // echo $counta;\n //\n // $counta+=1;\n // }\n\n\n echo (\n \"\n\n <div class='produtoItemDescricao'>\n <div class='descricaoProdutoPedido'>\n <div class='produtoDetalhes'>\n <div class='imgProdutodetalhe'>\n <img src=cms/\". $retorno[$count]->imagem .\" alt='produto'>\n </div>\n\n <div class='descricaoProdutoItem'>\n <div class='textoDescricaoProduto'>\n <p>\".$retorno[$count]->descricao.\"</p>\n </div>\n\n <div class='textoDescricaoDestribuidor'>\n <p>Produzido e entregue por: <span class='abrirModal'>Auto center</span> </p>\n </div>\n </div>\n\n\n\n\n </div>\n </div>\n\n <div class='descricaoProdutoPedidoPreco'>\n <div class='textoDescricaoPreco'>\n\n <p>R$ <span class='preco'>\".number_format($retorno[$count]->preco ,2 ).\"</span> </p>\n </div>\n </div>\n\n <div class='descricaoProdutoPedidoQuantidade'>\n <div class='textoDescricaoQuantidade'>\n\n <div class='QuantidadeProdutos'>\n <div class='del'>\n\n <a class='\".$class.\"' href='router.php?controller=produtos&modo=addCarrinho&menos=\".$id.\"'>-</a>\n\n </div>\n\n <div class='quantidadeTotal'>\n\n <p>\".$retorno[$count]->quantidade.\"</p>\n\n </div>\n\n <div class='add'>\n <a class='\".$class2.\"' href='router.php?controller=produtos&modo=addCarrinho&idProduto=\".$id.\"'>+</a>\n </div>\n </div>\n\n <a href='router.php?controller=produtos&modo=addCarrinho&del=\".$id.\"'>Remover</a>\n\n\n </div>\n </div>\n\n <div class='descricaoProdutoPedidoSubTotal'>\n <div class='textoDescricaoPreco'>\n <p>R$ <span class='preco'>\".number_format($subtotal,2).\"</span> </p>\n </div>\n </div>\n </div>\n\n <!-- passando dados para cadastrar no banco -->\n\n <input class='esconder' type='text' name='txtIdProduto\".(@$counta = $counta -1 ).\"' value='\".$id.\"'>\n <input class='esconder' type='text' name='txtQuantidade\".(@$counta2 = $counta2 -1 ).\"' value='\".$retorno[$count]->quantidade.\"'>\n\n\n\n \");\n\n //echo $count;\n\n $count+=1;\n\n $total +=$subtotal;\n\n $totalProdutos+=$quantidade;\n }\n\n\n }\n\n\n }\n\n // $count=0;\n // while ($count < count($retorno)) {\n // echo \"</br> STRING </br>\";\n // var_dump($retorno);\n // return $retorno;\n // $count+=1;\n // }\n\n\n // $quantidadeProdutos = count($_SESSION);\n //\n // $produtosQuantidade = $quantidadeProdutos-1;\n //\n // $cont = 0;\n // while ($produtosQuantidade > $cont) {\n // echo (\"produtos \".$cont);\n // $cont+=1;\n // }\n\n\n\n }\n } // aqui fecha o foreach\n\n\n\n\n if ($total == 0) {\n echo \"nao ha produtos\";\n }else{\n echo (\" <div class='TotalProdutos'>\n <div class='espaco'>\n <input class='esconder' type='text' name='txtDados' value='\".$dadosTotais.\"'>\n </div>\n\n <div class='espaco'>\n <div class='Totalgeral'>\n <div class='detalhesValores'>\n <p>Subtotal (\".$totalProdutos.\" itens):</p>\n </div>\n\n <div class='detalhesValores'>\n <p class='precoTotal'>R$ <span class='preco'>\".$total.\"</span> </p>\n </div>\n\n\n </div>\n\n <div class='Totalgeral'>\n <div class='detalhesValores'>\n <p>Frete:</p>\n </div>\n\n <div class='detalhesValores'>\n <div class='calculofrete'>\n <form class='' action='index.html' method='post'>\n <input class='txttCep' type='text' name='' value=''>\n </form>\n </div>\n </div>\n\n </div>\n\n\n <div class='Totalgeral'>\n <div class='detalhesValores'>\n <p>Total a pagar:</p>\n </div>\n\n <div class='detalhesValores'>\n <p class='precoTotal'>R$ <span class='preco'>\".$total.\"</span> </p>\n </div>\n\n\n </div>\n\n <div class='botaoEnviar'>\n <input class='botaoEnviar' type='submit' name='btnSalvarCarrinho' value='Finalizar Compra'>\n </div>\n\n\n\n </div>\n </div>\n\n </form>\");\n }\n\n $_SESSION['totalProdutos'] = $totalProdutos;\n\n\n //echo $_SESSION[$totalProdutos];\n\n }", "public function set_credits_discountamount($observer)\n {\n$array2 = Mage::helper('kartparadigm_storecredit')->getCreditRates();\n//Mage::log(Mage::helper('kartparadigm_storecredit')->getRefundDeductConfig() . \" configuration settings \");\n//Mage::log($array2);\n $session = Mage::getSingleton('checkout/session');\n if(Mage::helper('customer')->isLoggedIn()) {\n $customer = Mage::getSingleton('customer/session')->getCustomer();\n $customer_group=Mage::getModel('customer/group')->load(Mage::getSingleton('customer/session')->getCustomerGroupId())->getCustomerGroupCode();\n}\n \n$val1 = Mage::getSingleton('adminhtml/session')->getValue();\nif(isset($val1))\n{\n$amt1 = array();\n$amt1 = Mage::getSingleton('checkout/session')->getCredits();\n$amt = $amt1['totalCredits'];\n$quote = Mage::getSingleton('adminhtml/session_quote')->getQuote();\n}\nelse{\n$amt1 = array();\n $quote = Mage::getModel('checkout/cart')->getQuote();\n$amt1 = Mage::getSingleton('checkout/session')->getCredits();\n$amt = $amt1['discountCredits'];\n}\n $isvirtual=0;\n foreach($quote->getAllItems() as $item){\n if($item->getIsVirtual()==1) {\n $isvirtual=1;\n }\n if(Mage::getModel('catalog/product')->load($item->getProductId())->getTypeId()=='customproduct'){\n $isvirtual=1;\n }\n }\n$total=$quote->getGrandTotal(); \n\n$subTotal = $quote->getSubtotal();\n//Mage::log($quote->getGrandTotal().\"this is grand total store credit\");\n//Mage::log($quote->getSubtotal().\"this is sub total\");\n\n if (!Mage::helper('kartparadigm_storecredit')->getTaxEnabled()){\n$tax = $quote->getShippingAddress()->getData('tax_amount');\n}\n if(!Mage::helper('kartparadigm_storecredit')->getIsShippingEnabled()){\n$shippingPrice = $quote->getShippingAddress()->getShippingAmount();\n}\n$totalCredits1 = array();\n$totalCredits1 = Mage::getSingleton('checkout/session')->getCredits();\n$totalCredits = $totalCredits1['totalCredits'];\n\n$currentTimestamp = Mage::getModel('core/date')->timestamp(time()); \n$nowdate = date('Y-m-d H:m:s', $currentTimestamp); \n//echo $expirydate;\n//echo $nowdate;\n$balance;\n//echo $amt;\n$amt2;\n $amt1;\n \n\nif(isset($amt)){\n/*---------------------Calculating Default Currency Value----------------------- */\n$amt1 = ($array2['basevalue'] * $amt) / $array2['credits'];\n $baseCurrencyCode = Mage::app()->getStore()->getBaseCurrencyCode();\n $currentCurrencyCode = Mage::app()->getStore()->getCurrentCurrencyCode();\n if ($baseCurrencyCode != $currentCurrencyCode) {\n $amt2 = Mage::helper('directory')->currencyConvert($amt1, $baseCurrencyCode, $currentCurrencyCode);\n }\n else{\n $amt2 = $amt1; \n }\n // $amt2 = Mage::helper('core')->currency($amt1, true, false);\n//Mage::log($amt1.\" = amount = \".$amt2 );\n//----------------------------------------------------------------\nif($total > $amt2) {\nif(($total - $tax - $shippingPrice) > $amt2){\n$discountAmount = $amt2;\n$balance = $totalCredits - $amt;\n}else{\n $discountAmount = $subTotal;\n$points = round(($discountAmount * $amt)/$amt2);\n//Mage::log($points.\"Conver Points\");\n$balance = $totalCredits - $points;\n}\n}\nelse {\n$discountAmount = $total - $tax - $shippingPrice;\n$points = round(($discountAmount * $amt)/$amt2);\n//Mage::log($points.\"Conver Points\");\n$balance = $totalCredits - $points;\n}\nMage::getSingleton('core/session')->setBalance($balance);\n\nMage::getSingleton('checkout/session')->setDiscount($totalCredits - $balance);\n$msg = \"Current Credits In Your Account : \" . $balance;\nMage::getSingleton('core/session')->setCredits($msg);\n if ($discountAmount > 0) {\n\n\nif ($baseCurrencyCode != $currentCurrencyCode) {\n \n$allowedCurrencies = Mage::getModel('directory/currency')->getConfigAllowCurrencies();\n$rates = Mage::getModel('directory/currency')->getCurrencyRates($baseCurrencyCode, array_values($allowedCurrencies));\n\n$baseDiscount = $discountAmount/$rates[$currentCurrencyCode];\n\n }\nelse{\n $baseDiscount = $discountAmount;\n } \n $total = $quote->getBaseSubtotal();\n $data1 = $quote->getData();\n // Mage::log($data1['entity_id'].\"quote id\");\n $quote->setSubtotal(0);\n $quote->setBaseSubtotal(0);\n $quote->setSubtotalWithDiscount(0);\n $quote->setBaseSubtotalWithDiscount(0);\n $quote->setGrandTotal(0);\n $quote->setBaseGrandTotal(0);\n $canAddItems = $quote->isVirtual() ? ('billing') : ('shipping');\n foreach($quote->getAllAddresses() as $address) {\n $data = $address->getData();\n $address->setSubtotal(0);\n $address->setBaseSubtotal(0);\n $address->setGrandTotal(0);\n $address->setBaseGrandTotal(0);\n $address->collectTotals();\n $quote->setSubtotal((float)$quote->getSubtotal() + $address->getSubtotal());\n $quote->setBaseSubtotal((float)$quote->getBaseSubtotal() + $address->getBaseSubtotal());\n $quote->setSubtotalWithDiscount((float)$quote->getSubtotalWithDiscount() + $address->getSubtotalWithDiscount());\n $quote->setBaseSubtotalWithDiscount((float)$quote->getBaseSubtotalWithDiscount() + $address->getBaseSubtotalWithDiscount());\n $quote->setGrandTotal((float)$quote->getGrandTotal() + $address->getGrandTotal());\n $quote->setBaseGrandTotal((float)$quote->getBaseGrandTotal() + $address->getBaseGrandTotal());\n $quote->setEntityId($data1['entity_id'])->save();\n $quote->setSubtotalWithDiscount($quote->getSubtotal() - $discountAmount)->setBaseSubtotalWithDiscount($quote->getBaseSubtotal() - $baseDiscount)->setEntityId($data1['entity_id'])->save();\n if ($address->getAddressType() == $canAddItems) {\n $address->setSubtotalWithDiscount((float)$data['subtotal_with_discount'] - $discountAmount);\n $address->setGrandTotal((float)$data['grand_total'] - $discountAmount);\n $address->setBaseSubtotalWithDiscount((float)$data['base_subtotal_with_discount'] - $baseDiscount);\n $address->setBaseGrandTotal((float)$data['base_grand_total'] - $baseDiscount);\n if ($data['discount_description']) {\n $address->setDiscountAmount(($data['discount_amount'] - $discountAmount));\n $address->setDiscountDescription($data['discount_description'] . ', Store Credits');\n $address->setBaseDiscountAmount(($data['base_discount_amount'] - $baseDiscount));\n }\n else {\n $address->setDiscountAmount(-($discountAmount));\n $address->setDiscountDescription('Store Credits');\n $address->setBaseDiscountAmount(-($baseDiscount));\n }\n $address->setAddressId($data['address_id'])->save();\n }\n }\n foreach($quote->getAllItems() as $item) {\n\n // We apply discount amount based on the ratio between the GrandTotal and the RowTotal\n $rat = $item->getPriceInclTax() / $quote->getSubtotal();\n $rat1 = $item->getBasePriceInclTax() / $quote->getBaseSubtotal();\n $ratdisc = $discountAmount * $rat;\n $ratdisc1 = $baseDiscount * $rat1;\n//Mage::log($item->getDiscountAmount().\"include tax\".$item->getBaseDiscountAmount());\n // Mage::log($item->getDiscountAmount().\"discount storecredit\");\n$idata = $item->getData();\n Mage::log($item->getDiscountAmount().\"discount amount credit\");\n $item->setDiscountAmount(($item->getDiscountAmount() + $ratdisc) * $item->getQty());\n $item->setBaseDiscountAmount(($item->getBaseDiscountAmount() + $ratdisc1) * $item->getQty())->save();\n }\n }else if($totalCredits == 0){\n\n$msg = \"Sorry You Have No Credits In Your Account\";\nMage::getSingleton('core/session')->setCredits($msg);\n}\n \n \n } \n }", "function descontar_reservados_mov($id_mov,$id_dep,$anular=0)\r\n{\r\nglobal $db,$_ses_user,$titulo_pagina;\r\n\r\n $db->StartTrans();\r\n //por cada producto seleccionado desde el proveedor de tipo stock\r\n //ingresamos la cantidad dada, en la parte de reservados de ese\r\n //producto, en ese stock, bajo ese deposito (todo esto contenido)\r\n //en diferentes variables\r\n $items_stock=get_items_mov($id_mov);\r\n\r\n for($i=0;$i<$items_stock['cantidad'];$i++)\r\n {\r\n $id_prod_esp=$items_stock[$i][\"id_prod_esp\"];\r\n $cantidad=$items_stock[$i][\"cantidad\"];\r\n $id_detalle_movimiento=$items_stock[$i][\"id_detalle_movimiento\"];\r\n if($anular){\r\n $comentario_stock=\"Cancelacion de reserva de productos por anulación del $titulo_pagina Nº $id_mov\";\r\n $id_tipo_movimiento=9;\r\n }\r\n else {\r\n $comentario_stock=\"Utilización de los productos reservados por el $titulo_pagina Nº $id_mov\";\r\n $id_tipo_movimiento=7;\r\n }\r\n\r\n cancelar_reserva($id_prod_esp,$cantidad,$id_dep,$comentario_stock,$id_tipo_movimiento,\"\",$id_detalle_movimiento);\r\n\r\n }//de for($i=0;$i<$items_rma['cantidad'];$i++)\r\n\r\n $db->CompleteTrans();\r\n}", "public function excluir(){\r\n return (new Database('atividades'))->delete('id = '.$this->id);\r\n }", "function eliminar($bd);", "public function execute() {\n\t\n\t\techo \"Quantidade de feitiços removidos do \".$this->campo.\" : \".$this->getPetSpells();\n\t}", "function removePacote($campos){\n\t\t\t$listDel = $campos['InputDelPacote'];\t\t\t\n\t\t\t\t\n\t\t\t\tif(!empty($listDel)){\n\t\t\t\t\n\t\t\t\tfor($i=0;$i<sizeof($listDel);$i++){\n\t\t\t\t\t\tif($listDel[$i] != 0){\n\t\t\t\t\t\t\t\t$sql = \" DELETE FROM vekttor_venda_pacote WHERE pacotes_id = '$listDel[$i]' AND vekttor_venda_id = '$campos[venda_id]'\";\n\t\t\t\t\t\t\t\t//echo $sql;\n\t\t\t\t\t\t\t\tmysql_query($sql);\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t/*Seleciona os pacote para trazer os modulos */\n\t\t\t\t\t$sqlPacote = mysql_query($tn=\" SELECT * FROM pacote_item WHERE pacote_id = '$listDel[$i]' \");\n\t\t\t\t\t\twhile($pct=mysql_fetch_object($sqlPacote)){\n\t\t\t\t\t\t\t\t$modulos[] = $pct->sis_modulo_id;\n\t\t\t\t\t\t}\n\t\t\t\t} /*Fim de For*/\n\t\t\t\t\n\t\t\t\t\tfor($j=0;$j<sizeof($modulos);$j++){\n\t\t\t\t\t\t\t$sqlModulos = \" DELETE FROM usuario_tipo_modulo WHERE modulo_id = '$modulos[$j]' AND usuario_tipo_id = '$campos[id_usuario_tipo]'\";\n\t\t\t\t\t\t\tmysql_query($sqlModulos);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n}", "function removeCredit($credit, $id) { // promo-product.php, single-product.php\r\n\r\n\tglobal $mysqli,$db_table_prefix; \r\n\r\n\t\t$stmt = $mysqli->prepare(\"UPDATE \".$db_table_prefix.\"user_credits\r\n\r\n\t\t\tSET\r\n\r\n\t\t\tcredits = credits - ?\r\n\r\n\t\t\tWHERE\r\n\r\n\t\t\tuser_id = ?\r\n\t\t\t\r\n\t\t\tAND credits > 0\");\r\n\r\n\t$stmt->bind_param(\"ii\", $credit, $id);\r\n\r\n\t$result = $stmt->execute();\r\n\r\n\t$stmt->close();\t\r\n\r\n\treturn $result;\r\n\r\n}", "public function decrementar_stockx1($cod, $sede, $cantidad)\n\t\t{ \t\n\t\t$stockprevio = $this->obtener_stock($cod, $sede);\n\t\t$nuevo_stock = $stockprevio - $cantidad;\n\t\t$this->actualiza_stock($cod, $sede, $nuevo_stock);\n\t\t\t\n\t\t}", "public function decreaseAmount(): void;", "public function refund();", "function delete() {\n\t\t$sql = \"DELETE FROM cost_detail\n\t\t\t\tWHERE cd_fr_id=?, cd_seq=?\";\n\t\t$this->ffm->query($sql, array($this->cd_fr_id, $this->cd_seq));\n\t}", "function eliminarConceptoCta(){\n\t\t$this->procedimiento='pre.f_concepto_cta_ime';\n\t\t$this->transaccion='PRE_CCTA_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_concepto_cta','id_concepto_cta','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function baja(){\n global $baseDatos;\n $id_c = $this->getIdC();\n $sql = \"DELETE FROM `conductores` WHERE `conductores`.`id_c` = '$id_c'\";\n $res = $baseDatos->query($sql);\n return $res;\n }", "public function salvarDepreciacao() {\n\n $oDaoBensDepreciacao = new cl_bensdepreciacao();\n $oDaoBensDepreciacao->t44_benstipoaquisicao = $this->getTipoAquisicao()->getCodigo();\n $oDaoBensDepreciacao->t44_benstipodepreciacao = $this->getTipoDepreciacao()->getCodigo();\n $oDaoBensDepreciacao->t44_valoratual = \"{$this->getValorDepreciavel()}\";\n $oDaoBensDepreciacao->t44_valorresidual = \"{$this->getValorResidual()}\";\n $oDaoBensDepreciacao->t44_vidautil = \"{$this->getVidaUtil()}\";\n\n if (!empty($this->iCodigoBemDepreciacao)) {\n\n $oDaoBensDepreciacao->t44_sequencial = $this->iCodigoBemDepreciacao;\n $oDaoBensDepreciacao->alterar($this->iCodigoBemDepreciacao);\n\n } else {\n\n $oDaoBensDepreciacao->t44_ultimaavaliacao = date(\"Y-m-d\", db_getsession(\"DB_datausu\"));\n $oDaoBensDepreciacao->t44_bens = $this->iCodigoBem;\n $oDaoBensDepreciacao->incluir(null);\n $this->iCodigoBemDepreciacao = $oDaoBensDepreciacao->t44_sequencial;\n }\n\n if ($oDaoBensDepreciacao->erro_status == \"0\") {\n $sMsg = _M('patrimonial.patrimonio.Bem.erro_salvar_calculo', (object)array(\"erro_msg\" => $oDaoBensDepreciacao->erro_msg));\n throw new Exception($sMsg);\n }\n return true;\n }", "function incluirApostila($apostila,$qtd)\n{\n\t$consulta = 'SELECT * FROM apostilas';\n\t$visualiza = mysql_query($consulta) or die(mysql_error());\n\t\n\twhile ($coluna = mysql_fetch_assoc($visualiza))\n\t{\n\t$moduloApostila = $coluna[$apostila];\n\techo 'moduloApostila '.$moduloApostila.'<br/>';\n\t$adicionar = $moduloApostila + $qtd;\n\techo 'adicionar '.$adicionar.'<br/>';\n\t\n\t$altera = 'UPDATE apostilas SET '.$apostila.'='.$adicionar.' WHERE id=1';\n\t$alterar = mysql_query($altera) or die(mysql_error());\n\t\n\techo('<meta http-equiv=\"refresh\" content=\"0.5;home.php?url=apostilas\"/>');\n\t}\n}", "function affichePays(){\n global $pays; // permet d'aler chercher la variable pays à l'extérier de la fonction pour pouvoir l'exploiter à l'intérieur.\n echo $pays; // affiche france\n }", "function eralha_crowdfunding_account(){\n\t\t\t\n\t\t}", "private function setDepositFromData()\n {\n if ($this->dataHasDeposit()) {\n $this->collection->items[$this->cart_hash]->deposit = $this->data['deposit'];\n $this->collection->deposit += $this->data['deposit'];\n }\n }", "function commandes_trig_bank_reglement_en_echec($flux){\r\n\t// Si on est dans le bon cas d'un paiement de commande et qu'il y a un id_commande et que la commande existe toujours\r\n\tif ($id_transaction = $flux['args']['id_transaction']\r\n\t AND $transaction = sql_fetsel(\"*\",\"spip_transactions\",\"id_transaction=\".intval($id_transaction))\r\n\t\tAND $id_commande = $transaction['id_commande']\r\n\t\tAND $commande = sql_fetsel('id_commande, statut, id_auteur', 'spip_commandes', 'id_commande='.intval($id_commande))){\r\n\r\n\t\t$statut_commande = $commande['statut'];\r\n\t\t$transaction_mode = $transaction['mode'];\r\n\t\t$statut_nouveau = $statut_commande;\r\n\r\n\t\t// on ne passe la commande en erreur que si le reglement a effectivement echoue,\r\n\t\t// pas si c'est une simple annulation (retour en arriere depuis la page de paiement bancaire)\r\n\t\tif (strncmp($transaction['statut'],\"echec\",5)==0){\r\n\t\t\t$statut_nouveau = 'erreur';\r\n\t\t}\r\n\t\tif ($statut_nouveau !== $statut_commande){\r\n\t\t\tspip_log(\"commandes_trig_bank_reglement_en_attente marquer la commande #$id_commande statut=$statut_nouveau\",'commandes');\r\n\t\t\t//on met a jour la commande\r\n\t\t\tinclude_spip(\"action/editer_commande\");\r\n\t\t\tcommande_modifier($id_commande,array('statut'=>$statut_nouveau,'mode'=>$transaction_mode));\r\n\t\t}\r\n\t}\r\n\r\n\treturn $flux;\r\n}", "function eliminarCuentaBancaria(){\n\t\t$this->procedimiento='sigep.ft_cuenta_bancaria_ime';\n\t\t$this->transaccion='SIGEP_CUEN_BAN_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cuenta_bancaria_boa','id_cuenta_bancaria_boa','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function debitOrder(Varien_Event_Observer $observer)\n{ \n\n try {\n $arr = array(); \n$id = Mage::getModel(\"sales/order\")->getCollection()->getLastItem()->getIncrementId();\n\n$order = Mage::getModel('sales/order')->loadByIncrementId($id);\n$_grand = $order->getGrandTotal();\n$custname = $order->getCustomerName();\n//echo \"<br> cumstomer id :\".$order->getCustomerId();\n$currentTimestamp = Mage::getModel('core/date')->timestamp(time()); \n$nowdate = date('Y-m-d H:m:s', $currentTimestamp); \n$amt =Mage::getSingleton('checkout/session')->getDiscount();\n$totalCredits1 = array();\n$totalCredits1 = Mage::getSingleton('checkout/session')->getCredits();\n$totalCredits = $totalCredits1['totalCredits'];\n$balance = Mage::getSingleton('core/session')->getBalance();\n$arr['c_id'] = $order->getCustomerId();\n$arr['action_credits'] = - $amt;\n$arr['total_credits'] = $balance;\n$arr['store_view'] = Mage::app()->getStore()->getName();\n$arr['state'] = 1;\n$arr['order_id'] = $id;\n$arr['action'] = \"Used\";\n$arr['custom_msg'] = \"By User:Using For Order \" . $arr['order_id'];\n$arr['customer_notification_status'] = 'Notified';\n$arr['action_date'] = $nowdate;\n$arr['website1'] = \"Main Website\";\n \n if($amt > 0) {\n $credits = Mage::getModel('kartparadigm_storecredit/creditinfo');\n\n $model = Mage::getModel('kartparadigm_storecredit/creditinfo')->setData($arr);\n\ntry{\n\n $model->save();\n}\ncatch(Exception $e)\n {\n\n echo $e->getMessage();\n }\n\n $successMessage = Mage::helper('kartparadigm_storecredit')->__('Credits Inserted Successfully');\n Mage::getSingleton('core/session')->addSuccess($successMessage);\n\n \n \n }else{\n //throw new Exception(\"Insufficient Data provided\");\n }\n\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('core/session')->addError($e->getMessage());\n $this->_redirectUrl($this->_getRefererUrl());\n } \n\nMage::getSingleton('checkout/session')->unsCredits();\n Mage::getSingleton('core/session')->unsBalance();\n Mage::getSingleton('core/session')->unsCredits();\nMage::getSingleton('adminhtml/session')->unsValue();\nMage::getSingleton('checkout/session')->unsDiscount();\n \n}", "function eliminarCuentaBancaria(){\n\t\t$this->procedimiento='tes.f_cuenta_bancaria_ime';\n\t\t$this->transaccion='TES_CTABAN_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cuenta_bancaria','id_cuenta_bancaria','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function eliminarReenvioFactura(){\n\t\t$this->procedimiento='vef.ft_reenvio_factura_ime';\n\t\t$this->transaccion='VF_REFACOR_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_reenvio_factura','id_reenvio_factura','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function destroy()\n\t{\n\t\tunset($this->_tour_cart_contents);\n\n\t\t$this->_tour_cart_contents['tour_cart_total'] = 0;\n\t\t$this->_tour_cart_contents['total_itineraries'] = 0;\n\t\t$this->_tour_cart_contents['delete_itineraries'] = array();\n\t\t$this->_tour_cart_contents['estimate'] = array();\n\t\t$this->CI->session->unset_userdata('tour_cart_contents');\n\t}", "public function eliminarNRC()\r\n {\r\n $nrc = $this->input->post('nrc');\r\n\r\n if ($nrc)\r\n {\r\n $bloques = $this->Nrc_model->get($nrc);\r\n $horario = $this->session->horario;\r\n $materias = $this->Materias_model->get();\r\n\r\n foreach ($materias as $materia)\r\n {\r\n foreach ($materia['secciones'] as $seccion)\r\n {\r\n if ($seccion['nrc'] == $nrc)\r\n {\r\n $creditos = $materia['creditos'];\r\n $id = $materia['id'];\r\n break 2;\r\n }\r\n }\r\n }\r\n\r\n foreach ($bloques as $bloque)\r\n {\r\n $horario[$bloque[0]][$bloque[1]] = null;\r\n }\r\n\r\n $this->toggle_enabled($id);\r\n $this->session->set_userdata('horario', $horario);\r\n $this->session->set_userdata('creditos', $this->session->creditos - $creditos);\r\n }\r\n }", "function remove_all_discounts()\n\t\t{\n\t\t\t// The 'unset_discount()' function can accept an array of either discount ids or codes to delete more than one discount at a time.\n\t\t\t// Alternatively, if no data is submitted, the function will delete all discounts that are applied to the cart.\n\t\t\t// This example removes all discount data.\n\t\t\t// $this->flexi_cart->unset_userdata_discount(); // Can't remeber why this 'stock code' didn't work - said 'undefined method' or something\t\t\n\t\t\t$this->flexi_cart->unset_discount();\n\t\t\t\n\t\t\t// Set a message to the CI flashdata so that it is available after the page redirect.\n\t\t\t$this->session->set_flashdata('message', $this->flexi_cart->get_messages());\n\n\t\t\tredirect('cart');\n\t\t}", "public function cancel_local_activation($sum,$symbol,$id_trader,$login)\n\t{\n $this->db->trans_start();\n\t $this->db->query(\"UPDATE investroom_personal_accounts SET $symbol = $symbol+$sum WHERE id=$id_trader\");\n $this->db->trans_complete();\n\t $data['active'] = '0';\n\t return $this->db->where('login',$login)\n\t ->update('pamm_accounts', $data);\n\t}", "public function purchase_return_unsaved_delete()\n {\n $purchase_return_no = $this->input->post(\"purchase_return_no\");\n /** Remove auto created purchase journal */\n $journal = $this->MAc_journal_master->get_by_doc('Purchase Return', $purchase_return_no);\n if (count($journal) > 0)\n {\n $this->MAc_journal_details->delete_by_journal_no($journal['journal_no']);\n $this->MAc_journal_master->delete_by_journal_no($journal['journal_no']);\n }\n /** Remove auto created payment receipt for partial or full cash purchase */\n $payment = $this->MAc_payment_receipts->get_by_doc('Purchase', $purchase_return_no);\n if (count($payment) > 0)\n {\n $this->MAc_payment_receipts->delete($payment['id']);\n }\n /** Remove purchase */\n $this->MPurchase_return_details->delete_by_purchase_return_no($purchase_return_no);\n $this->MPurchase_return_master->delete_by_purchase_return_no($purchase_return_no);\n }", "public function excluirPortfolio($obj){ \r\n \r\n $sql = 'DELETE FROM tb_portfolio WHERE port_id = :id';\r\n $stmt = BD::conn()->prepare($sql);\r\n $stmt->bindValue(':id', $obj->getIdPort(), PDO::PARAM_INT);\r\n $stmt->execute();\r\n \r\n return ($stmt->execute()) ? TRUE : FALSE;\r\n }", "function eliminarVacacion(){\n\t\t$this->procedimiento='asis.ft_vacacion_ime';\n\t\t$this->transaccion='ASIS_VAC_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_vacacion','id_vacacion','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function delete() {\n\t$stmt = $this->_database->prepare('DELETE FROM planetterrains WHERE refid = ?');\n\t$stmt->bind_param('i', $this->refid);\n\t$stmt->execute();\n\tif (\\is_array($this->deposit) && \\count($this->deposit) > 0) {\n\t $this->deposit[$this->refid]->delete();\n\t}\n }", "function cash_bank_vali()\n{\n$this->layout='blank';\n$s_role_id=$this->Session->read('role_id');\n$s_society_id = (int)$this->Session->read('society_id');\n$s_user_id=$this->Session->read('user_id');\t\n\n$cc = (int)$this->request->query('ss');\n$this->set('cc',$cc);\n}", "public function getSubtotalInvoiced();", "public function deleteDiscount();" ]
[ "0.578221", "0.5552638", "0.55135065", "0.55015993", "0.54113245", "0.5390799", "0.5388894", "0.53554195", "0.53416437", "0.5314374", "0.5308717", "0.52817506", "0.52706516", "0.52593285", "0.5217622", "0.5201188", "0.5194405", "0.5190084", "0.5178804", "0.5157779", "0.51560855", "0.5151926", "0.5141357", "0.51341623", "0.5128761", "0.5128508", "0.51180905", "0.51083964", "0.51062113", "0.50866306", "0.506542", "0.50632215", "0.50625145", "0.5059051", "0.5058214", "0.50493413", "0.5044026", "0.50354177", "0.5030802", "0.50288135", "0.50222015", "0.501629", "0.5014942", "0.50081295", "0.5004267", "0.50039756", "0.49968266", "0.49934345", "0.4991428", "0.4989968", "0.49887258", "0.49875847", "0.4986062", "0.4976837", "0.49757937", "0.4973655", "0.4966862", "0.49666488", "0.49662164", "0.49656108", "0.4962596", "0.49591285", "0.49565196", "0.49563295", "0.49548304", "0.49502936", "0.49468407", "0.49467465", "0.494554", "0.4944743", "0.49371228", "0.49356467", "0.4930856", "0.49305525", "0.49281344", "0.49265447", "0.49197808", "0.49188316", "0.49187452", "0.49178982", "0.49178207", "0.49172953", "0.49156165", "0.49028113", "0.49012637", "0.4895978", "0.48956123", "0.489502", "0.48903045", "0.4887668", "0.48867252", "0.48859707", "0.48858652", "0.48809516", "0.48808777", "0.48765317", "0.48668566", "0.4861964", "0.48613805", "0.4856316", "0.4848283" ]
0.0
-1
altera status da entrega
public function setStatusDelivery($param) { $CB16PEDIDO = CB16PEDIDO::find()->where("CB16_ID = ".$param['pedido']." and CB16_STATUS >= 30")->all()[0]; if ($CB16PEDIDO) { $CB16PEDIDO->setAttribute('CB16_STATUS_DELIVERY', $param['new_status']); $CB16PEDIDO->save(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update_status();", "function setStatus($new_status)\n {\n $this->status = $new_status;\n }", "public function change_status(){\n $data = array(\n 'status' => $this->input->post('status') ,\n 'status_changer' => $this->data[\"user_id\"] ,\n );\n $task_id = $this->input->post('task_id') ;\n \n $this->m_task->save($data , $task_id);\n }", "public function mudarStatus(){\n //CO_STATUS = 5 se refere ao caso clinico Disponivel na base publica\n\n //busca e atualiza todos os casos clinicos que tenham CO_STATUS = 4 para o CO_STATUS = 5\n CasoClinico::where('CO_STATUS', '=', 4)->update(['CO_STATUS' => '5']);\n }", "public function status()\t{\n\t\t\t$this->veiculo->update($this->input->post('id'), array('veiculo_status' => $this->input->post('status')));\n\t\t}", "public function changeStatus()\n {\n }", "function updatestatus() {\n global $_lib;\n\n $dataH = array();\n $dataH['ID'] = $this->transaction->ID;\n $dataH['RemittanceSequence'] = $this->transaction->RemittanceSequence;\n $dataH['RemittanceDaySequence'] = $this->transaction->RemittanceDaySequence;\n $dataH['RemittanceSendtDateTime'] = $_lib['sess']->get_session('Datetime');\n $dataH['RemittanceSendtPersonID'] = $_lib['sess']->get_person('PersonID');\n $dataH['RemittanceStatus'] = 'sent';\n \n #Disse mŒ fjernes nŒr vi har en godkjenningsprosess\n $dataH['RemittanceApprovedDateTime'] = $_lib['sess']->get_session('Datetime');\n $dataH['RemittanceApprovedPersonID'] = $_lib['sess']->get_person('PersonID');\n\n $_lib['storage']->store_record(array('data' => $dataH, 'table' => 'invoicein', 'debug' => false));\n }", "public function activar()\n {\n $this->estatus = 1;\n $this->save();\n }", "protected static function set_status()\n {\n }", "public function setStatus($status);", "public function setStatus($status);", "function setStatus($statusid, $status) {\n\tglobal $gStatusTable;\n\n\t$cmd = \"UPDATE $gStatusTable SET status = $status, timeOfLastChange = \" . time() . \" WHERE statusid = $statusid;\";\n\tdoSimpleCommand($cmd);\n}", "function ctools_export_set_status($table, $name, $new_status = TRUE) {\r\n $schema = ctools_export_get_schema($table);\r\n $status = variable_get($schema['export']['status'], array());\r\n\r\n $status[$name] = $new_status;\r\n variable_set($schema['export']['status'], $status);\r\n}", "function changeStatus($estatus,$id) \n {\n $sql=\"update Usuarios set estatus='\".$estatus.\"' where id=\".$id; \n $response = mysqli_query($this->_connDb, $sql); \n return $response;\n }", "public function setStatus(Status $status);", "public function changeStatus(int $id);", "abstract public function setStatus($status);", "public function changestatus()\r {\r $query=\"update `\".$this->tablename.\"` set `status`='\".$this->status.\"' where `id`='\".$this->id.\"' \";\r $result=mysqli_query($this->conn,$query);\r return $result;\r }", "public function actualizaEstado(){\n $this->estado = 'Completo';\n // $this->cotiza = $this->generarCustomID();\n $this->save();\n }", "function setStatus($cod_status){\n\n\t\t$this->status = $cod_status;\n\t\n\t}", "public function refreshTaskStatus(){\n\n $webCronResult = $this->webCronResults()->orderBy('code', 'desc')->first();\n\n if ($webCronResult) {\n\n if ($webCronResult->code >= 300) {\n // bad status\n $this->status = 0 ;\n }else{\n // good status\n $this->status = 2 ;\n };\n\n $this->save();\n\n };\n\n }", "function alterarStatus() {\n\n\t\t$codigoParaAlterar = $_GET['codigo'];\n\t\t$statusAutal = $_GET['status'];\n\n\t\tif (true){\n\n\t\t\techo '<div class=\"alert alert-success\"><strong> Status do codigo \"'.$codigoParaAlterar.'\" alterado com sucesso!</strong> </div>';\n\n\t\t}else{\n\n\t\t\techo \"<div class='alert alert-danger espacoForm'><strong>Edição não realizada!</strong> Ocorreu um erro.</div>\";\n\n\t\t}\n\n\n\t}", "public function setStatus($status)\r\n {\r\n $this->status = $status;\r\n }", "function setStatus( $status )\n {\n if ( $status instanceof eZOrderStatus )\n $this->StatusID = $status->attribute( 'id' );\n else\n $this->StatusID = $status;\n $this->setStatusModified( time() );\n }", "public function setStatus($status)\n {\n \n $this->status = $status;\n }", "public function setStatus(string $status): void;", "public function estatus( Request $request ){\n \n $error = null;\n DB::beginTransaction();\n try {\n $response = $this->_tabla_model::where(['id' => $request->id])->update(['id_estatus' => $request->id_estatus]);\n DB::commit();\n $success = true;\n } catch (\\Exception $e) {\n $success = false;\n $error = $e->getMessage().\" \".$e->getLine().\" \".$e->getFile();\n DB::rollback();\n }\n\n if ($success) {\n return $this->_message_success( 201, $response , self::$message_success );\n }\n return $this->show_error(6, $error, self::$message_error );\n \n }", "private function manageStatus()\n {\n $this->updateStatus();\n $this->checkStatus();\n }", "public function status($id, $status, $sistema)\n {\n //\n if(!(Gate::denies('read_equipamento'))){\n\n $equipamento = Equipamento::find($id); \n \n //LOG ----------------------------------------------------------------------------------------\n $this->log(\"equipamento.index.status=\".$status);\n //--------------------------------------------------------------------------------------------\n\n $equipamento->status = $status; \n\n //LOG ----------------------------------------------------------------------------------------\n $this->log(\"ticket.update.id=\".$id);\n //--------------------------------------------------------------------------------------------\n\n if($equipamento->save()){\n return redirect('equipamentos/dashboard/'.$sistema)->with('success', 'Status atualizado com sucesso!');\n }else{\n return redirect('equipamentos/dashboard/'.$sistema)->with('danger', 'Houve um problema, tente novamente.');\n }\n }\n\n\n else{\n return redirect('erro')->with('permission_error', '403');\n }\n }", "private function setStatus($status)\n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "public function updateStatus()\n {\n $this->status = Cart::CART_STATUS_ORDERED;\n $this->save();\n }", "public function setStatus($status)\n {\n $this->_status = $status;\n }", "public function setStatus($status)\n\t{\n\t\t$this->status = $status;\n\t}", "public function setStatus( $status ) {\n\t\t$this->status = $status;\n\t}", "public function changeStatus($id, $status){ \n $this->upd(\"orders\", array(\"status\" => $status), array(\"order_id\" => $id));\n }", "public function _setStatus($status) {\n\t\t$this->_status = $status;\n\t}", "function change_relais($id_domain,$status){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->query(\"UPDATE `relais_mail` SET `status_relais` = '$status' WHERE `id_relais` = '$id_domain'\");\n\t\t\n\t\t$req->closeCursor();\n\t}", "public function setSuccess()\n {\n $this->attributes['status'] = 2;\n self::save();\n }", "public function change_status() {\n\n $id = $this->input->post('id');\n $status = $this->input->post('status');\n\n $data['is_active'] = $status;\n\n $this->db->where('id', $id);\n $this->db->update('template_pola', $data);\n }", "function updateReservationStatus($codigo_reserva) {\r\n\r\n global $connect;\r\n\r\n $sql_update_query = \"UPDATE reserva SET estado=1 WHERE (codigo_reserva = '$codigo_reserva');\";\r\n\r\n // Realizamos la consulta a la tabla \r\n $updated = $connect->executeIDU($sql_update_query);\r\n\r\n if (!$updated) { \r\n echo \"no se pudo acceder a la base\";\r\n return false;\r\n }\r\n\r\n }", "public function respon(){\n //update 'status'\n }", "function upStatusIncidencia($idIncidencia, $status) {\r\n $nuevoStatus['iStatus'] = $status;\r\n $this->db->where('idIncidencia', $idIncidencia);\r\n $query = $this->db->update('incidencias_t', $nuevoStatus);\r\n return $query;\r\n }", "function change_status_to() {\n $stat_param = array(\n 'status' => $this->uri->segment(3)\n );\n $id = $this->uri->segment(4);\n $updt_status = $this->guest_post_model->change_status_to('newsletter', $stat_param, $id);\n if ($updt_status) {\n $this->session->set_userdata('success_msg', 'Status Updated susseccfully.');\n } else {\n $this->session->set_userdata('error_msg', 'Cannot update status.');\n }\n redirect('news_letter_cont');\n }", "public function setStatus(string $status) : void;", "function changeStatus($table, $status, $id)\n {\n $data = array('is_active' => $status);\n $where = $table . \"_id = '$id'\";\n $builder = $this->db->table($table);\n $builder->where($where);\n $builder->set($data);\n $builder->update();\n }", "function setStatus($status) {\n\t\treturn $this->setData('status', $status);\n\t}", "public function postUpdateStatus(){\n\t\t$expense_id = Input::get('expense_id');\n\t\t$status = Input::get('status');\n\t\t$expense = Expense::find($expense_id);\n\t\t$expense->status = $status;\n\t\t$expense->save();\n\t}", "public function setActive()\n {\n $this->update(['status' => static::STATUS_ACTIVE]);\n }", "public function setStatus(int $status)\n {\n $this->status = $status;\n }", "public function changeStatus($status)\n {\n $changestatus = User::findOrFail($status);\n \n if (isset($changestatus) && !empty($changestatus)) {\n if ($changestatus->active == 1) {\n $changestatus->update(['active' => 0]);\n return redirect()->back()->withFlashSuccess('Successfully Deactive User');\n }else{\n $changestatus->update(['active' => 1]); \n return redirect()->back()->withFlashSuccess('Successfully Activeted User');\n }\n }\n }", "public function setStatus($status)\n {\n $this['status'] = $status;\n }", "function change_status_to() {\n $stat_param = array(\n 'status' => $this->uri->segment(3)\n );\n $id = $this->uri->segment(4);\n $updt_status = $this->news_letter_model->change_status_to('newsletter', $stat_param, $id);\n if ($updt_status) {\n $this->session->set_userdata('success_msg', 'Status Updated susseccfully.');\n } else {\n $this->session->set_userdata('error_msg', 'Cannot update status.');\n }\n redirect('news_letter_cont');\n }", "function setstatus($pr_id, $cloud_status) {\n\t\tswitch ($cloud_status) {\n\t\t\tcase 'new':\n\t\t\t\t$cr_status=1;\n\t\t\t\tbreak;\n\t\t\tcase 'approve':\n\t\t\t\t$cr_status=2;\n\t\t\t\tbreak;\n\t\t\tcase 'active':\n\t\t\t\t$cr_status=3;\n\t\t\t\tbreak;\n\t\t\tcase 'deny':\n\t\t\t\t$cr_status=4;\n\t\t\t\tbreak;\n\t\t\tcase 'deprovision':\n\t\t\t\t$cr_status=5;\n\t\t\t\tbreak;\n\t\t\tcase 'done':\n\t\t\t\t$cr_status=6;\n\t\t\t\tbreak;\n\t\t\tcase 'no-res':\n\t\t\t\t$cr_status=7;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\texit(1);\n\t\t\t\tbreak;\n\t\t}\n\t\t$db=htvcenter_get_db_connection();\n\t\t$rs = $db->Execute(\"update \".$this->_db_table.\" set pr_status=$cr_status where pr_id=$pr_id\");\n\n\t}", "final public function setStatus(Int $status)\n\t{\n\t\t$this->_status = $status;\n\t}", "public function setStatus($value)\n {\n $this->setItemValue('status', ['id' => (int)$value]);\n }", "public function desactivar()\n {\n $this->estatus = 0;\n $this->save();\n }", "function setStatus($bstatus = 'f')\n {\n $this->bstatus = $bstatus;\n }", "function setStatus($bstatus = 'f')\n {\n $this->bstatus = $bstatus;\n }", "function update_record_status($id, $status, $table, $key) {\n\t$sql = \"UPDATE \".TB_PREF.$table.\" SET inactive = \"\n\t\t. ((int)$status).\" WHERE $key=\".db_escape($id);\n\t\t\n \tdb_query($sql, \"Can't update record status\");\n}", "public function status_change_action(){\n\t $table = $this->input->post('table');\n\t $state = $this->input->post('state');\n\t $primary_field = $this->input->post('primary_field');\n\t $primary_key = $this->input->post('primary_key');\n\t if($state=='true'){\n\t $status = \"Y\";\n\t $status_text = \"Approved\";\n\t }else{\n\t $status = \"N\";\n\t $status_text = \"Rejected\";\n\t }\n\t $statusReturn = $this->common_model->update_row(array('fr_status'=>$status), array($primary_field=>$primary_key), $table);\n\t if($statusReturn){\n\t echo \"1\";\n\t }else{\n\t echo \"0\";\n\t }\n\t}", "function changeStatusDriver($status) {\n $this->db->where('id_kendaraan', $this->input->post('merk', TRUE));\n $this->db->update('kendaraan', array('status_ken' => $status));\n }", "public function actualizar_estado() {\n }", "function setStato($status)\n {\n $this->stato = $status;\n }", "public function setStatus($status)\n {\n if (!is_null($status))\n $this->status = $status;\n }", "public function updateStatus($status, $idApuracao)\n\t{\n\t\t$sql = new Conexao;\n\n\t\t//Status\n\t\t//1 = criada esperando para continuar\n\t\t//2 = gerada ocorrencia, foi para confirmacao\n\t\t//3 = virou ocorrencia\n\t\t//4 = excluida\n\n\t\t$sql->query(\"\n\t\t\tUPDATE tb_criarapuracao \n\t\t\tSET status = :status\n\t\t\tWHERE idCriarApuracao = :idCriarApuracao\n\t\t\", [\n\t\t\t\":status\" => $status,\n\t\t\t\":idCriarApuracao\" => $idApuracao\n\t\t]);\n\t}", "public function change_status($id, $status) {\n $this -> advertisementsmodel -> change_status($id, $status);\n $this -> session -> set_userdata('success_message', \"Advertisement status updated successfully\");\n redirect('advertisements', 'refresh');\n }", "public function change_status($data)\n {\n if (empty($data['id']) || empty($data['status']))\n {\n return;\n }\n\n $this->db->where('users.id', $data['id']);\n\n if ($data['status'] == DELETED)\n {\n $this->db->delete('users');\n $this->after_delete($data['id']);\n }\n else\n {\n $this->db->update('users', array('status' => $data['status']));\n $this->after_update($data['id']);\n }\n }", "public function set_status ($status) {\n $this->status = $status;\n }", "public function setStatus( int $status ) : void\n {\n $this->status = $status;\n }", "public function alterarstatus ($dados) {\n\n $c = new CRUD();\n $fim = [];\n\n if ($_SESSION['tipo_id'] > 4) {\n\n $verifica = $c->Selecionar(\"*\", \"agendamento\", \" where status = 3 and tecnico_id = {$_SESSION['id']}\");\n\n if (count($verifica) > 0 and $dados['status'] == 3) {\n $fim['msg'] = \"Não é possível concluir essa ação. Uma solicitação encontra-se em andamento.\";\n } else {\n if ($dados['status'] == 1) {\n $data = date(\"Y-m-d H:i:s\");\n $valores = \"status = '{$dados['status']}', conclusao = '{$data}'\";\n } else {\n $data = null;\n $valores = \"status = '{$dados['status']}', conclusao = '{$data}'\";\n }\n\n $s = $c->Update(\"agendamento\", $valores, \" where id =\" . $dados['id']);\n if ($s > 0) {\n $fim['msg'] = \"Salvo.\";\n }\n }\n\n } else {\n if ($dados['status'] == 1) {\n $data = date(\"Y-m-d H:i:s\");\n $valores = \"status = '{$dados['status']}', conclusao = '{$data}'\";\n } else {\n $data = null;\n $valores = \"status = '{$dados['status']}', conclusao = '{$data}'\";\n }\n\n\n $s = $c->Update(\"agendamento\", $valores, \" where id =\" . $dados['id']);\n if ($s > 0) {\n $fim['msg'] = \"Salvo.\";\n }\n }\n\n\n return $fim;\n\n }", "function setStatus( $status )\n {\n\t if (is_int($status)) {\n\t\t \n\t\t switch ( $status ) {\n\t\t\t \n\t\t\t case RowManager_RegistrationManager::STATUS_REGISTERED:\n\t\t\t \t$this->setValueByFieldName( 'registration_status', $status );\n\t\t\t \tbreak;\t\t\t \t\n\t\t\t case RowManager_RegistrationManager::STATUS_INCOMPLETE:\n\t\t\t \t$this->setValueByFieldName( 'registration_status', $status );\n\t\t\t \tbreak;\t\t\t \t\n\t\t\t case RowManager_RegistrationManager::STATUS_CANCELLED:\n\t\t\t \t$this->setValueByFieldName( 'registration_status', $status );\n\t\t\t \tbreak;\n\t\t\t case RowManager_RegistrationManager::STATUS_UNASSIGNED:\n\t\t\t \t$this->setValueByFieldName( 'registration_status', $status );\n\t\t\t \tbreak;\n\t\t }\n\n\t\t}\n\t}", "public function change_status($vid, $status) {\n $result = db_query('UPDATE {video_files} SET status = %d WHERE vid = %d ', $status, $vid);\n }", "public function ModificarEstado()\n\t{\n\t\t$query=\"UPDATE estado SET idpais=$this->id_pais, estado='$this->estado' , descripcion='$this->descripcion' WHERE idestado=$this->id_estado\";\n\t\t$resp=$this->db->consulta($query);\n\t}", "public function updateStatus($id){\n\n $task = Task::find($id);\n $task->status = ! $task->status;\n $task->save();\n\n return redirect()->back();\n\n }", "public function changeUserStatusAction()\n {\n $id = $this->_getParam('id');\n $guid = $this->_getParam('guid');\n $usersNs = new Zend_Session_Namespace(\"members\");\n if($usersNs->userId==$id)\n {\n $this->_flashMessenger->addMessage(array('error'=>'You cannot change your status!' ));\n $this->_helper->_redirector->gotoUrl($this->view->seoUrl('/security/user')); \n exit;\n } \n $this->view->user_id = $id;\n $model1 = new Security_Model_User();\n $model = $model1->fetchRow(\"id='{$id}' and row_guid='{$guid}'\");\n if(false===$model )\n {\n $this->_flashMessenger->addMessage(array('error'=>'Invalid request! Please try again.'));\n $this->_helper->_redirector->gotoUrl($this->view->seoUrl('/security/user')); \n }\n \n \n if($model->getStatus()==1)\n $model->setStatus (0);\n else\n $model->setStatus (1);\n \n if($model->save())\n {\n $this->_flashMessenger->addMessage(array('success'=>'Status changed for '.$model->getFirstName().' '.$model->getLastName().' [ ID : '.$model->getId().', Status : '.$model->getStatus().']'));\n $this->_helper->_redirector->gotoUrl($this->view->seoUrl('/security/user/index')); \n }\n else\n {\n $this->_flashMessenger->addMessage(array('error'=>'Failed to change the status for '.$model->getFirstName().' '.$model->getLastName().' [ ID : '.$model->getId().', Status : '.$model->getStatus().']'));\n $this->_helper->_redirector->gotoUrl($this->view->seoUrl('/security/user/index')); \n }\n \n }", "public function UserListChangeStatus(): void{\n \n if(!ArtworkVerifier::setStatusList($_POST) || !Session::isLogin()){\n exit;\n }\n \n if(isset(UserList::where('user_list.user_id', Session::getUser()['id'])->where('user_list.artwork_id', $_POST['artwork_id'])->getOne()->id)){\n UserList::values([ 'user_list.status' => $_POST['status'] ])\n ->where('user_id' ,Session::getUser()['id'])\n ->where('artwork_id', $_POST['artwork_id'])\n ->update();\n exit;\n }\n }", "public function setPending()\n {\n $this->attributes['status'] = 'pending';\n self::save();\n }", "function ctools_export_crud_set_status($table, $object, $status) {\r\n $schema = ctools_export_get_schema($table);\r\n $export = $schema['export'];\r\n\r\n if (!empty($export['status callback']) && function_exists($export['status callback'])) {\r\n $export['status callback']($object, $status);\r\n }\r\n else {\r\n if (is_object($object)) {\r\n ctools_export_set_object_status($object, $status);\r\n }\r\n else {\r\n ctools_export_set_status($table, $object, $status);\r\n }\r\n }\r\n\r\n}", "private function setLock($status) {\n $this->status->is_locked = $status;\n $this->status->save();\n }", "public function updateStatus()\n {\n $this->Invoice->updateInvoiceStatus($this->input->post('id'));\n }", "public function up_status_siswa($id_pengguna){\n $this->db->where(\"id\",$id_pengguna);\n $this->db->set(\"status\",0);\n $this->db->update(\"tb_pengguna\");\n }", "function setStatus($status) \n {\n return $this->instance->setStatus($status);\n }", "function altera_status($id=\"\", $status=\"\")\n {\n //var_dump($id);\n //var_dump($status);\n\n //$id = $this->uri->segment(4);\n //$status = $this->uri->segment(5);\n\n //var_dump($this->uri);\n\n\t\tif($id==\"\" || $status==\"\"){\n\t\t\techo \"error\";\n\t\t}\n\t\telse{\n $retorno = $this->audiencia->altera_status($id, $status);\n echo $retorno;\n\t\t}\n }", "public function setFailed()\n {\n $this->attributes['status'] = 4;\n self::save();\n }", "public function addStatus($status);", "function actualizar_status_comprobante($id, $status) {\n $sql = \"UPDATE prosic_comprobante set status_comprobante='\" . $status . \"' where id_comprobante = \" . $id;\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "public function changeOrderStatus(){\r\n $cookies = new CookieModel();\r\n $cookie_id = $cookies -> read();\r\n $Form = M('userinfo');\r\n $condition_in['stuid'] = $cookie_id;\r\n $data = $Form->where($condition_in)->find();\r\n if (! $data['manager']) $this->redirect('/');\r\n \t$key = $_REQUEST['id'];\r\n \t//$key = 2;\r\n \t$condition['id'] = $key;\r\n \t$form = M(\"orderinfo\");\r\n \t$data = $form->where($condition)->find();\r\n \t//echo $data;\r\n \tif ($data['status'] == \"下单成功\") $data['status'] = \"烹饪中\";\r\n \telse if ($data['status'] == \"烹饪中\") $data['status'] = \"送餐途中\"; \r\n \telse if ($data['status'] == \"送餐途中\") $data['status'] = \"餐已收到\";\r\n \t$form->save($data);\r\n \t//$this->display();\r\n }", "public function actionUpdateIsActive()\n {\n $ids = Yii::app()->request->getPost('ids');\n $status = (int)Yii::app()->request->getPost('status');\n $models = StoreMarket::model()->findAllByPk($ids);\n foreach($models as $market)\n {\n if(in_array($status, array(0,1)))\n {\n $market->is_active=$status;\n $market->save();\n }\n }\n echo Yii::t('StoreModule.admin', 'Изменения успешно сохранены.');\n }", "public function changeStatus(): void\n {\n if ('online' === $this->online_status) {\n if ($this->reference_id > 0) {\n $query = 'UPDATE '. rex::getTablePrefix() .'d2u_references_references '\n .\"SET online_status = 'offline' \"\n .'WHERE reference_id = '. $this->reference_id;\n $result = rex_sql::factory();\n $result->setQuery($query);\n }\n $this->online_status = 'offline';\n } else {\n if ($this->reference_id > 0) {\n $query = 'UPDATE '. rex::getTablePrefix() .'d2u_references_references '\n .\"SET online_status = 'online' \"\n .'WHERE reference_id = '. $this->reference_id;\n $result = rex_sql::factory();\n $result->setQuery($query);\n }\n $this->online_status = 'online';\n }\n\n // Don't forget to regenerate URL cache to make online machine available\n if (rex_addon::get('url')->isAvailable()) {\n d2u_addon_backend_helper::generateUrlCache('reference_id');\n d2u_addon_backend_helper::generateUrlCache('tag_id');\n }\n }", "function changeStatus() {\n\n $newStatus = $_GET['newstatus'];\n\n foreach ($_POST['status'] as $key => $val) {\n \n DB::update(CFG::$tblPrefix . \"ticket\", array(\"status\" => $newStatus), \" id=%d \", $key);\n \n }\n }", "public function setNextStatus()\n {\n if (!self::checkRole($this->currentUser->role_id, $this->roles)) {\n throw new StatusException('У вас недостаточно прав');\n }\n\n if ($this->task->status_id === $this->nextStatus) {\n throw new StatusException('Статус задания уже обновлен');\n }\n\n if (!self::checkAccessStatus($this->getCurrentStatus(), $this->accessStatuses)) {\n throw new StatusException('Ошибка смены статуса');\n } else {\n $this->task->status_id = $this->nextStatus;\n }\n }", "private function setStatus($status)\n {\n $this->status = $status;\n\n $hash = spl_object_hash($this);\n $name = TaskStatus::getName($status);\n // echo \"task [$hash] -> $name\\n\"; // TODO\n }", "function changeTodoStatus() {\n\n if ( !checkAuthToken() ) return;\n $todoId = isset( $_POST['todoId'] ) ? (int)$_POST['todoId'] : \"\"; \n $newStatus = isset( $_POST['newStatus'] ) ? $_POST['newStatus'] : \"\"; \n\n if ( !$todoId || !$newStatus ) {\n echo \"error\";\n return;\n }\n\n if ( $todo = Todo::getById( (int)$_POST['todoId'] ) ) {\n if ( $todo->userId == User::getLoggedInUser()->id ) {\n $todo->completed = ( $newStatus == \"true\" ) ? 1 : 0;\n $todo->update();\n echo \"success\";\n } else {\n echo \"error\";\n }\n \n } else {\n echo \"error\";\n }\n}", "function changeStatus($status)\n\t{\n\t\t$where = array('uid' => session_get('uid'));\n\t\t$this->DB->database_update('users', array('online' => $status), $where);\n\t}", "public function setExpired()\n {\n $this->attributes['status'] = 'expired';\n self::save();\n }", "public function setExpired()\n {\n $this->attributes['status'] = 'expired';\n self::save();\n }" ]
[ "0.73309135", "0.72572637", "0.7174051", "0.7148859", "0.70969886", "0.7033785", "0.7027022", "0.70061916", "0.6916643", "0.6906857", "0.6906857", "0.6801535", "0.6780195", "0.676849", "0.6758553", "0.6747038", "0.6740935", "0.6681312", "0.6670862", "0.6665013", "0.66554385", "0.6650693", "0.6624873", "0.65828526", "0.65660936", "0.6560733", "0.6560451", "0.6556239", "0.65552384", "0.65531707", "0.6548023", "0.6548023", "0.6548023", "0.6548023", "0.6547518", "0.6522944", "0.65229374", "0.65229344", "0.6520063", "0.65068626", "0.6506635", "0.64966077", "0.64936686", "0.6489867", "0.6489199", "0.6468404", "0.6468369", "0.6466987", "0.64599705", "0.64583045", "0.6442952", "0.64416975", "0.6431857", "0.6422584", "0.64131945", "0.6407693", "0.64057124", "0.6376028", "0.63679874", "0.63667643", "0.63651943", "0.63651943", "0.63635415", "0.6355211", "0.63493884", "0.633951", "0.632385", "0.6319206", "0.6318731", "0.63136446", "0.63136333", "0.6310985", "0.630815", "0.63020915", "0.63018566", "0.629731", "0.6283686", "0.62833697", "0.62801427", "0.6278092", "0.6269445", "0.6264231", "0.6263737", "0.626069", "0.6250755", "0.6248795", "0.62455493", "0.62451595", "0.6242822", "0.6236023", "0.62354684", "0.62325084", "0.62270373", "0.6226978", "0.622412", "0.6223973", "0.62165546", "0.62046266", "0.61994845", "0.61994845" ]
0.6475865
45
permite baixar apenas os pedidos pagos
public function saveBaixaCompra($param) { $CB16PEDIDO = CB16PEDIDO::find()->where("CB16_ID = ".$param['pedido']." and CB16_STATUS >= 30")->all()[0]; if ($CB16PEDIDO) { $CB16PEDIDO->setAttribute('CB16_STATUS', 20); $CB16PEDIDO->save(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function corrigirPlanosPagto()\n\t{\n\t\t$this->dbcrosier->trans_start();\n\n\t\t$query = $this->dbcrosier->query(\"SELECT * FROM ekt_venda WHERE cond_pag = '0.99'\") or $this->exit_db_error();\n\t\t$result = $query->result_array();\n\n\t\t// Pega todos os produtos da ekt_produto para o $mesano\n\t\t$i = 0;\n\t\tforeach ($result as $r) {\n\t\t\ttry {\n\t\t\t\t$query = $this->dbcrosier->query('SELECT * FROM ven_venda WHERE pv = ? AND json_data.\"$->>mesano\" = ?', array(\n\t\t\t\t\t$r['NUMERO'],\n\t\t\t\t\t$r['mesano']\n\t\t\t\t)) or $this->exit_db_error();\n\t\t\t\t$naVenVenda = $query->result_array();\n\t\t\t\tif (count($naVenVenda) == 0) {\n\t\t\t\t\t$this->logger->info(\"Não encontrado para pv = '\" . $r['NUMERO'] . \"' e mesano = '\" . $r['mesano'] . \"'\");\n\t\t\t\t} else if (count($naVenVenda) == 1) {\n\t\t\t\t\tif ($naVenVenda[0]['plano_pagto_id'] == 2) {\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t$this->logger->info(\"Atualizando o pv = '\" . $r['NUMERO'] . \"' e mesano = '\" . $r['mesano'] . \"'\");\n\t\t\t\t\t\t$this->dbcrosier->query(\"UPDATE ven_venda SET plano_pagto_id = 158 WHERE id = ?\", $naVenVenda[0]['id']) or $this->exit_db_error();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->logger->info(\"Mais de um encontrado para pv = '\" . $r['NUMERO'] . \"' e mesano = '\" . $r['mesano'] . \"'\");\n\t\t\t\t\texit();\n\t\t\t\t}\n\t\t\t} catch (Exception $e) {\n\t\t\t\tprint_r($e->getMessage());\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\n\t\t$this->logger->info(PHP_EOL . PHP_EOL . \"TOTAL ATUALIZADO: \" . $i);\n\n\t\t$this->dbcrosier->trans_complete();\n\t}", "function getPagosanteriores() {\n $where = \" WHERE 1\";\n $array = \"\";\n\n $columns = \"`Clave_catalogo`, `Nombre`, `Email`, `Cantidad`, `Fecha_pagada`, `Id_pago` \";\n $response = $this->db->select3($columns, 'catalogo_pagos', $where, $array);\n return $response;\n }", "function getPagos($id_afiliado){\n\t\t$sql = \n\t\t\"SELECT\n\t\t\t$this->_tablename.agencia,\n\t\t\t$this->_tablename.terminal,\n\t\t\t$this->_tablename.nro_transaccion,\n\t\t\t$this->_tablename.fecha_pago,\n\t\t\t$this->_tablename.importe\n\t\tFROM\n\t\t\t$this->_tablename\n\t\tINNER JOIN \n\t\t\ttarjetas ON($this->_tablename.id_tarjeta = tarjetas.id_tarjeta)\n\t\tWHERE \n\t\t\ttarjetas.id_afiliado = '$id_afiliado'\";\n\t\t\n\t\treturn $this->getQuery($sql);\t\n\t}", "public function pagos($pagos = null)\r\n\t{\r\n\t\t/*if (isset($this->relations)) {\r\n\t\t\t$relationTypes = key($this->relations);\r\n\t\t\tif (in_array('manyToMany', $relationTypes)) {\r\n\t\t\t\t$relation = $this->relations['manyToMany'];\r\n\t\t\t\tif (is_a($pagos, 'Usuario')) {\r\n\t\t\t\t} elseif (is_array($pagos)) {\r\n\t\t\t\t\t\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t}*/\r\n\r\n\t\tif ($pagos) {\r\n\t\t\tif (is_a($pagos, 'Pago')) {\r\n\t\t\t\t$this->savePagoUsuario($pagos);\r\n\t\t\t} elseif (is_array($pagos)) {\r\n\t\t\t\tforeach ($pagos as $pago) {\r\n\t\t\t\t\t$this->savePagoUsuario($pago);\r\n\t\t\t\t}\r\n\t\t\t} \t\t\t\r\n\t\t\treturn 1;\r\n\t\t} \r\n\r\n\t\t$pagoUsuario = new PagoUsuario;\r\n\t\t$pagosUsuario = $pagoUsuario->findBy('codigo_usuario', $this->codigoUsuario);\r\n\r\n\t\t$pagos = [];\r\n\t\tforeach ($pagosUsuario as $pagoUsuario) {\r\n\t\t\t$pago = $pagoUsuario->pago();\r\n\t\t\t$pagos[] = $pago;\r\n\t\t}\r\n\t\treturn $pagos;\r\n\t}", "public function RelatorioContasPagarPorFornecedor($where,$codigo){\n\t\t\t\t\n\t\t$dba = $this->dba;\n\n\t\t$vet = array();\n\n\n\t\t$sql =\"SELECT \n\t\t\t\td.emissao,\n\t\t\t\td.vencimento,\n\t\t\t\td.numero,\n\t\t\t\tsum(d.valordoc) as valordoc,\n\t\t\t\td.numero_nota,\n\t\t\t\tf.codigo,\n\t\t\t\tf.nome,\n\t\t\t\td.parcial1,\n\t\t\t\td.parcial2,\n\t\t\t\td.parcial3,\n\t\t\t\td.parcial4,\n\t\t\t\td.parcial5,\n\t\t\t\td.data_parcial1,\n\t\t\t\td.data_parcial2,\n\t\t\t\td.data_parcial3,\n\t\t\t\td.data_parcial4,\n\t\t\t\td.data_parcial5\n\t\t\tFROM\n\t\t\t\tduplic d\n\t\t\t\t\tinner join\n\t\t\t\tfornecedores f ON (f.codigo = d.cedente)\n\t\t\t\t\".$where.\"\n\t\t\t\t\tand f.codigo = \".$codigo.\"\n\t\t\tgroup by d.numero , d.numero_nota , d.emissao , f.codigo , f.nome , d.tipo , d.vencimento , d.parcial1 , d.parcial2 , d.parcial3 , d.parcial4 , d.parcial5 , d.data_parcial1 , d.data_parcial2 , d.data_parcial3 , d.data_parcial4 , d.data_parcial5\";\n\t\t\n\t\t$res = $dba->query($sql);\n\n\t\t$num = $dba->rows($res); \n\n\t\t$i = 0;\n\t\t\t\n\t\twhile($dup = ibase_fetch_object($res)){\t\t\n\t\t\t\n\t\t\t$numero = $dup->NUMERO;\n\t\t\t$valordoc = $dup->VALORDOC;\n\t\t\t$numnota = $dup->NUMERO_NOTA;\n\t\t\t$emissao\t = $dup->EMISSAO;\n\t\t\t$codfor = $dup->CODIGO;\n\t\t\t$nomfor = $dup->NOME;\t\t\t\t\t\n\t\t\t$vencimento = $dup->VENCIMENTO;\n\t\t\t$parcial1 = $dup->PARCIAL1;\n\t\t\t$parcial2 = $dup->PARCIAL2;\n\t\t\t$parcial3 = $dup->PARCIAL3;\n\t\t\t$parcial4 = $dup->PARCIAL4;\n\t\t\t$parcial5 = $dup->PARCIAL5;\n\t\t\t$data_parcial1 = $dup->DATA_PARCIAL1;\n\t\t\t$data_parcial2 = $dup->DATA_PARCIAL2;\n\t\t\t$data_parcial3 = $dup->DATA_PARCIAL3;\n\t\t\t$data_parcial4 = $dup->DATA_PARCIAL4;\n\t\t\t$data_parcial5 = $dup->DATA_PARCIAL5;\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$duplic = new Duplic();\t\t\t\n\n\t\t\t$duplic->setNumero($numero);\n\t\t\t$duplic->setValorDoc($valordoc);\n\t\t\t$duplic->setNumeroNota($numnota);\n\t\t\t$duplic->setCodFornecedor($codfor);\n\t\t\t$duplic->setNomeFornevedor($nomfor);\n\t\t\t$duplic->setEmissao($emissao);\n\t\t\t$duplic->setVencimento($vencimento);\n\t\t\t$duplic->setParcial1($parcial1);\n\t\t\t$duplic->setParcial2($parcial2);\n\t\t\t$duplic->setParcial3($parcial3);\n\t\t\t$duplic->setParcial4($parcial4);\n\t\t\t$duplic->setParcial5($parcial5);\n\t\t\t$duplic->setDataParcial1($data_parcial1);\n\t\t\t$duplic->setDataParcial2($data_parcial2);\n\t\t\t$duplic->setDataParcial3($data_parcial3);\n\t\t\t$duplic->setDataParcial4($data_parcial4);\n\t\t\t$duplic->setDataParcial5($data_parcial5);\t\n\t\t\t\n\t\t\t$vet[$i++] = $duplic;\n\n\t\t}\n\n\t\treturn $vet;\n\n\t}", "abstract public function preparePagination();", "public function generar_link_pago()\n {\n\n $items = array();\n $ids = '';\n if (Input::get('id'))\n {\n $pago = Pago::find(Input::get('id'));\n $item = array(\n \"title\" => $pago->nombre,\n \"description\" => $pago->descripcion,\n \"quantity\" => 1,\n \"currency_id\" => \"MEX\",\n \"unit_price\" => doubleval($pago->monto)\n );\n $ids = $pago->id;\n array_push($items, $item);\n }\n else\n {\n $pagos = Auth::user()->userable->pagos->filter(function($pago) {\n return $pago->pagado == false;\n });\n\n foreach ($pagos as $pago) {\n\n $item = array(\n \"title\" => $pago->nombre,\n \"description\" => $pago->descripcion,\n \"quantity\" => 1,\n \"currency_id\" => \"MEX\",\n \"unit_price\" => doubleval($pago->monto)\n );\n $ids = $ids . $pago->id . \"-\";\n array_push($items, $item);\n }\n }\n\n if (Config::get('params.prueba_pago'))\n {\n $referer = Url::route('obtener_pago_prueba');\n }\n else\n {\n $referer = Request::header('referer');\n }\n\n $preference_data = array(\n \"items\" => $items,\n \"payer\" => array(\n \"name\" => Auth::user()->userable->nombre,\n \"email\" => Auth::user()->email,\n ),\n \"back_urls\" => array(\n \"success\" => $referer,\n \"failure\" => $referer,\n \"pending\" => $referer,\n ),\n \"external_reference\" => $ids,\n );\n\n $preference = $this->checkout->generar_preferencia($preference_data);\n if (isset($preference))\n {\n $link = $preference['response'][Config::get('payment.init_point')];\n return Redirect::away($link);\n }\n else\n {\n Session::flash('error', 'Ocurrio un error al tratar de generar el pago.');\n return Redirect::back();\n }\n }", "public function ListarProductosParaPromocion($start, $limit, $sSearch, $iSortCol_0, $sSortDir_0, $categoria_id, $marca_id, $productos_id)\n {\n $arreglo_resultado = array();\n $cont = 0;\n\n $lista = $this->getDoctrine()->getRepository('IcanBundle:Producto')\n ->ListarProductosParaPromocion($start, $limit, $sSearch, $iSortCol_0, $sSortDir_0, $categoria_id, $marca_id, $productos_id);\n\n foreach ($lista as $value) {\n $producto_id = $value->getProductoId();\n\n $nombre = $value->getNombre();\n $categoria = ($value->getCategoria() != null) ? $value->getCategoria()->getNombre() : \"\";\n $marca = ($value->getMarca() != null) ? $value->getMarca()->getNombre() : \"\";\n $estado = ($value->getEstado()) ? 1 : 0;\n $precio = $value->getPrecio();\n $fecha = $value->getFechapublicacion() != \"\" ? $value->getFechapublicacion()->format(\"d/m/Y H:i\") : \"\";\n $views = $value->getViews();\n\n $ruta = $this->ObtenerURL();\n $dir = 'uploads/productos/';\n $imagen = $ruta . $dir . $value->getImagen();\n\n\n $acciones = '<a href=\"javascript:;\" class=\"add importar-producto m-portlet__nav-link btn m-btn m-btn--hover-success m-btn--icon m-btn--icon-only m-btn--pill\" title=\"Agregar producto relacionado\"\n data-id=\"' . $producto_id . '\" data-nombre=\"' . $nombre . '\" data-categoria=\"' . $categoria . '\"\n data-marca=\"' . $marca . '\" data-estado=\"' . $estado . '\" data-imagen=\"' . $imagen . '\"\n data-precio=\"' . $precio . '\" data-fecha=\"' . $fecha . '\" data-views=\"' . $views . '\"> <i class=\"la la-plus\"></i> </a> ';\n\n $arreglo_resultado[$cont] = array(\n \"id\" => $producto_id,\n \"nombre\" => $nombre,\n \"categoria\" => $categoria,\n \"marca\" => $marca,\n \"estado\" => $estado,\n \"imagen\" => $imagen,\n \"precio\" => number_format($precio, 0, ',', '.'),\n \"fechapublicacion\" => $fecha,\n \"views\" => $views,\n \"acciones\" => $acciones\n );\n\n $cont++;\n }\n\n return $arreglo_resultado;\n }", "public function primerPagoStripe($metodo)\n {\n $cliente=Customer::create([\n 'payment_method' => $metodo,\n ]);\n // aqui lo guarlo en mi DB\n $c=new Cliente();\n $c->token=$cliente->id;\n $c->save();\n // se realiza el pago en formato entero .. ej. 20$ son 2000 , los ultimos 2 ceros son los decimales\n // 512$ son 51200\n $this->pagoStripe($cliente->id,$metodo, 1100);\n \n }", "function pagocobrobancossaldos($periodo,$ejer,$moneda,$cuenta,$opc){\n\t\tswitch($opc){\n\t\t\tcase 1://cargo\n\t\t\t\t$mov=\"Cargo M.E.\";\n\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$mov=\"Abono M.E\";\n\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$mov=\"Abono\";\n\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t$mov=\"Cargo\";\n\t\t\tbreak;\n\t\t}\n\t\t\t$sql=$this->query(\"select m.IdPoliza,m.Cuenta,sum(m.Importe) importe,m.TipoMovto,c.description,p.relacionExt,p.concepto,p.idperiodo,c.manual_code\n\t\t\tfrom cont_movimientos m,cont_polizas p,cont_accounts c,cont_config conf\n\t\t\twhere m.cuenta=c.account_id and c.currency_id=\".$moneda.\" and c.`main_father`=conf.CuentaBancos and m.TipoMovto='\".$mov.\"'\n\t\t\tand m.IdPoliza=p.id and p.activo=1 and m.Activo=1 and p.idperiodo<=\".$periodo.\" and m.Cuenta=\".$cuenta.\"\n\t\t\tand p.id not in(select id from cont_polizas where concepto='POLIZA DE AJUSTE POR DIFERENCIA CAMBIARIA' and idperiodo=\".$periodo.\")\n\t\t\tgroup by m.Cuenta,p.idperiodo,m.TipoMovto\");\n\t\t\treturn $sql;\n\t\t}", "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}", "function epagoped($mysqli,$fecha,$ref,$monto,$iva,$total,$saldoi,$factu,$mpago,$sfactu,$cte,$saldof,$arch=NULL){\n\t//define los montos de pago\n $pagoiva = defiva($monto,$saldoi,$monto);\n //definicion del status de pago\n if($monto<$saldoi){$status = 35;}else{$status = 40;};\n\t\t\ttry{\n\t\t\t\t$mysqli->autocommit(false);\n\t\t\t//la referencia es pedido\n\t\t\t\t$tipoper=1;\n\t\t\t//movimientos de diario\n\t\t\t\t//cargo en entrada de efectivo segun metodo de pago\n\t\t\t\t\t$cuenta1=metpago($mpago);\n\t\t\t\t\t$tipom1=0;\n\t\t\t\t\toperdiario($mysqli, $cuenta1, $tipoper, $tipom1, $ref, $monto, $fecha,$sfactu);\n\t\t\t//abono a clientes\n\t\t\t\t\t$cuenta4=\"105.01\";\n\t\t\t\t\t$tipom4=1;\n\t\t\t\t\toperdiario($mysqli,$cuenta4,$tipoper,$tipom4,$ref,$monto,$fecha,$sfactu,$cte);\n\t\t\t\t//cargo a iva trasladado no cobrado\n\t\t\t\t\t$cuenta2=\"209.01\";\n\t\t\t\t\t$tipom2=0;\n\t\t\t\t\toperdiario($mysqli,$cuenta2,$tipoper,$tipom2,$ref,$iva,$fecha,$sfactu);\n\t\t\t\t//abono a iva trasladado\n\t\t\t\t\t$cuenta3=\"208.01\";\n\t\t\t\t\t$tipom3=1;\n\t\t\t\t\toperdiario($mysqli,$cuenta3,$tipoper,$tipom3,$ref,$iva,$fecha,$sfactu);\n\t\t\t//actualizacion en pedidos\n\t\t\t\t\tif($arch!=NULL){\n\t\t\t\t\t $mysqli->query(\"UPDATE pedidos SET status=$status,fechapago='$fecha',\n factura='$factu',saldo=$saldof,arch='$arch' WHERE idpedidos='$ref'\");}else {\n $mysqli->query(\"UPDATE pedidos SET status=$status,fechapago='$fecha',\n factura='$factu',saldo=$saldof WHERE idpedidos='$ref'\");\n\t\t\t\t\t }\n\t\t\t//efectuar la operacion\n\t\t\t\t$mysqli->commit();\n\t\t\t\t$resul=0;\n\t\t\t}catch (Exception $e) {\n\t\t\t\t\t//error en las operaciones de bd\n\t\t\t\t $mysqli->rollback();\n\t\t\t\t \t$resul=-2;\n\t\t\t\t}\n\treturn $resul;\n}", "public function verPagosUsuario($id){\n $local = Local_User::findorfail($id);\n\n //Validación Encargado, Premium, Bloqueado\n $locales = Local_User::where('user_id', Auth::user()->id)\n ->where('estado', '!=', 'Desvinculado')\n ->where('local_id', $local->local_id)\n ->where('rol', 'Encargado')\n ->first();\n\n if (empty($locales)) {\n session()->flash('danger', 'Usted no tiene privilegios suficientes.');\n return redirect()->action('HomeController@index');\n }elseif($locales->Local->cuenta != 'Premium'){\n session()->flash('danger', 'Opción sólo para locales premium.');\n return redirect()->action('UsuarioController@empaques', ['id' => $local->local_id]);\n }elseif($locales->Local->estado == 'Bloqueado'){\n session()->flash('danger', 'El local se encuentra temporalmente bloqueado.');\n return redirect()->action('UsuarioController@misLocales');\n }\n //fin validación\n\n\n\n $pagos = Pago::where('local_user_id', $id)->orderBy('pagoHasta', 'desc')->paginate(10);\n\n\n if($pagos->count() == 0) {\n session()->flash('danger', 'Aún no se registran pagos');\n return redirect()->route('usuario.local.empaques', ['id' => $local->local_id]);\n //return redirect()->action('UsuarioController@misLocales');\n }else{\n //Query para obtener la última fecha pagada\n $lastPagoHasta = Pago::select('pagoHasta')->where('local_user_id', $id)->orderBy('pagoHasta', 'desc')->take(1)->get();\n\n //editamos la fecha\n $lastPagoHasta = $lastPagoHasta[0]['pagoHasta'] . ' 00:00:00';\n\n //verificamos si la persona tomó un turno después de la última fecha pagada\n $deuda=Planilla_Turno_User::where('local_user_id', $id)->where('created_at', '>', $lastPagoHasta)->count();\n\n //si count es arriba de 0 es porque tomó un turno y aún no paga\n if($deuda > 0 && $local->Local->cuenta == 'Premium'){\n $deuda = \"Si\";\n }else{\n $deuda = \"No\";\n }\n\n $meses = array('Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic');\n $months = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');\n\n foreach ($pagos as $pago){\n $pago->fechaPago= date('d-m-Y', strtotime($pago->fechaPago));\n $pago->pagoDesde= str_replace($months, $meses, date('d-M-Y', strtotime($pago->pagoDesde)));\n $pago->pagoHasta= str_replace($months, $meses, date('d-M-Y', strtotime($pago->pagoHasta)));\n }\n return view ('usuario.ver-pagos')\n ->with('pagos', $pagos)\n ->with('local', $local)\n ->with('deuda', $deuda);\n }\n }", "public function permisos($pagina = false) {\n $this->_acl->acceso('gestionar_permisos');\n\n if (!$this->filtrarInt($pagina)) {\n $pagina = false;\n } else {\n $pagina = (int) $pagina;\n }\n\n $this->getLibrary('paginador');\n $paginador = new Paginador();\n\n $this->_view->assign('permisos', $paginador->paginar($this->_aclm->getPermisos(), $pagina, 10));\n $this->_view->assign('titulo', 'MigraGest');\n $this->_view->renderizar('permisos', 'acl');\n }", "private function verificarPago($usuarioId, $mentoriaId)\n {\n $pagado = false;\n \n\t\t$em = $this->getDoctrine()->getManager();\n $pagoCompleto = $this->get('pagos')->verificarPagoProducto($this->get('pagos')->getProductoId('programa_orientacion'), $usuarioId);\n \n if($pagoCompleto)\n {\n\t\t\t// Verificar tipo de mentor para verificar pago\n $dql = \"SELECT r.id rolId, u.id mentorId FROM vocationetBundle:Mentorias m\n JOIN vocationetBundle:Usuarios u WITH m.usuarioMentor = u.id\n JOIN vocationetBundle:Roles r WITH u.rol = r.id\n WHERE m.id = :mentoriaId\"; \n $query = $em->createQuery($dql);\n $query->setParameter('mentoriaId', $mentoriaId);\n $query->setMaxResults(1);\n $mentorRol = $query->getResult();\n if($mentorRol)\n {\n $mentorRol = $mentorRol[0]['rolId'];\n\n if($mentorRol == 2)\n {\n\t\t\t\t\t// Validar pago de producto individual\n\t\t\t\t\t$productoId = $this->get('pagos')->getProductoId('mentoria_profesional'); // Producto: Mentoría con experto en orientación vocacional\n\t\t\t\t\t$pagado = $this->get('pagos')->verificarPagoProducto($productoId, $usuarioId);\n\t\t\t\t}\n\t\t\t\telseif($mentorRol == 3) // Mentor de orientacion vocacional\n\t\t\t\t{\n\t\t\t\t\t$pagado = true;\n\t\t\t\t}\n }\n }\n else\n {\n // Verificar tipo de mentor para verificar pago\n $dql = \"SELECT r.id rolId, u.id mentorId FROM vocationetBundle:Mentorias m\n JOIN vocationetBundle:Usuarios u WITH m.usuarioMentor = u.id\n JOIN vocationetBundle:Roles r WITH u.rol = r.id\n WHERE m.id = :mentoriaId\"; \n $query = $em->createQuery($dql);\n $query->setParameter('mentoriaId', $mentoriaId);\n $query->setMaxResults(1);\n $mentorRol = $query->getResult();\n if($mentorRol)\n {\n $mentorId = $mentorRol[0]['mentorId'];\n $mentorRol = $mentorRol[0]['rolId'];\n }\n \n if($mentorRol == 2) // Mentor experto\n {\n $productoId = $this->get('pagos')->getProductoId('mentoria_profesional'); // Producto: Mentoría con profesional\n \n // Validar pago de producto individual para el mentor seleccionado\n $pagado = $this->get('pagos')->verificarPagoProducto($productoId, $usuarioId, $mentorId);\n }\n elseif($mentorRol == 3) // Mentor de orientacion vocacional\n {\n $productoId = $this->get('pagos')->getProductoId('mentoria_ov'); // Producto: Mentoría con experto en orientación vocacional\n \n // Validar pago de producto individual\n $pagado = $this->get('pagos')->verificarPagoProducto($productoId, $usuarioId);\n }\n }\n \n return $pagado;\n }", "function paginador($pagina, $orden = NULL, $nombreOrden = NULL, $consultaGlobal = NULL, $cantidadRegistros = NULL) {\n global $configuracion;\n\n $item = '';\n $respuesta = array();\n $objeto = new FacturaVenta();\n\n $registros = $configuracion['GENERAL']['registrosPorPagina'];\n\n if (!empty($cantidadRegistros)) {\n $registros = (int) $cantidadRegistros;\n }\n\n if (isset($pagina)) {\n $pagina = $pagina;\n } else {\n $pagina = 1;\n }\n\n if (isset($consultaGlobal) && $consultaGlobal != '') {\n\n $data = explode('[', $consultaGlobal);\n $datos = $data[0];\n $palabras = explode(' ', $datos);\n\n if ($data[1] != '') {\n $condicionales = explode('|', $data[1]);\n\n $condicion = '(';\n $tam = sizeof($condicionales) - 1;\n for ($i = 0; $i < $tam; $i++) {\n $condicion .= $condicionales[$i] . ' REGEXP \"(' . implode('|', $palabras) . ')\" ';\n if ($i != $tam - 1) {\n $condicion .= ' OR ';\n }\n }\n $condicion .= ')';\n\n $consultaGlobal = $condicion;\n } else {\n $consultaGlobal = '(p.nombre REGEXP \"(' . implode('|', $palabras) . ')\")';\n }\n } else {\n $consultaGlobal = '';\n }\n\n if (!isset($nombreOrden)) {\n $nombreOrden = $objeto->ordenInicial;\n }\n\n\n if (isset($orden) && $orden == 'ascendente') {//ordenamiento\n $objeto->listaAscendente = true;\n } else {\n $objeto->listaAscendente = false;\n }\n\n if (isset($nombreOrden) && $nombreOrden == 'estado') {//ordenamiento\n $nombreOrden = 'activo';\n }\n\n $registroInicial = ($pagina - 1) * $registros;\n\n\n $arregloItems = $objeto->listar($registroInicial, $registros, array('0'), $consultaGlobal, $nombreOrden);\n\n if ($objeto->registrosConsulta) {//si la consulta trajo registros\n $datosPaginacion = array($objeto->registrosConsulta, $registroInicial, $registros, $pagina);\n $item .= $objeto->generarTabla($arregloItems, $datosPaginacion);\n }\n\n $respuesta['error'] = false;\n $respuesta['accion'] = 'insertar';\n $respuesta['contenido'] = $item;\n $respuesta['idContenedor'] = '#tablaRegistros';\n $respuesta['idDestino'] = '#contenedorTablaRegistros';\n $respuesta['paginarTabla'] = true;\n\n Servidor::enviarJSON($respuesta);\n}", "public function AnularOrdenDePago(OrdenDePago $op)\n {\n \t$detalleDePago\t=\t$op->GetDetalleDePago();\n \t\n \tforeach ($detalleDePago as $d)\n \t{\n \t\t$PagoTipoId\t=\t$d->PagoTipoId;\n \t\t\n \t\t// si es un tipo de pago: Cheque propio (id = 1)\n \t\tif($PagoTipoId == 1)\n \t\t{\n \t\t\t$Cheque\t\t= Doctrine::getTable('Cheque')->FindOneById($d->ChequeId);\n \t\t\tif(!is_object($Cheque))\n \t\t\t\tthrow new Exception('No existe el cheque para anular');\n \t\t\t \n \t\t\t$Cheque->Estado\t=\t'Anulado';\n \t\t\t$Cheque->FechaAnulacion\t=\tdate('Y-m-d');\n \t\t\t$Cheque->save();\n \t\t}\n \t\t// si pago con cheque tercero en cartera, cambiar estado\n \t\tif($PagoTipoId == 4)\n \t\t{\n \t\t\t$Cheque\t\t= Doctrine::getTable('Cheque')->FindOneById($d->ChequeId);\n \t\t\tif(!is_object($Cheque))\n \t\t\t\tthrow new Exception('No existe el cheque para anular');\n \t\t\t \n \t\t\t$Cheque->Estado\t=\t'En cartera';\n \t\t\t$Cheque->save();\n \t\t}\n \t\t\n \t\t// si pague con retencion, la creo nuevamente al anular\n \t\tif(($PagoTipoId == 6)||($PagoTipoId ==7)||($PagoTipoId == 8)\n \t\t\t\t||($PagoTipoId == 9)||($PagoTipoId == 10)||($PagoTipoId == 11))\n \t\t{\n \t\t\t\n \t\t\t$detalle\t\t= Doctrine::getTable('CobranzaDetalle')->FindOneById($d->RetencionUtilizadaId);\n \t\t\tif(!is_object($detalle))\n \t\t\t\tthrow new Exception('No existe la retencion');\n \t\t\t// se marca la retencion utilizada\n \t\t\t$detalle->RetencionUtilizada\t=\t'NO';\n \t\t\t$detalle->save();\n \t\t}\n \t\t\n \t\t// si es efectivo, incrementar saldo en efectivo\n \t\tif($PagoTipoId == 2)\n \t\t{\n \t\t\t$Configuracion = Doctrine::GetTable ( 'Configuracion' )->FindOneByNombre('SaldoEfectivo');\n \t\t\t$Configuracion->Valor +=\t$d->Importe;\n \t\t\t$Configuracion->save();\n \t\t\t\n \t\t\t$data['Detalle'] = 'OP #' . $op->Id . ' anulada';\n \t\t\t$data['Importe']\t=\t$d->Importe;\n \t\t\t$data['Saldo']\t=\t$Configuracion->Valor;\n \t\t\t$data['Debe']\t=\t$data['Importe'];\n \t\t\t\n \t\t\t$g = new Classes_GestionEconomicaManager();\n \t\t\t$g->AddHistorialEfectivo($data);\n \t\t}\n \t\t\n \t\t// si es un tipo de pago: transferencia (id = 13),\n \t\t// - actualizar saldo de la cuenta de banco asociada\n \t\tif($PagoTipoId == 13)\n \t\t{\n \t\t\tlist($banco, $cuenta)\t=\texplode('-', $d->Detalle);\n \t\t\t\n \t\t\tif(isset($cuenta) && is_numeric($cuenta))\n \t\t\t{\n \t\t\n \t\t\t\t$banco\t\t= Doctrine::getTable('Banco')->FindOneByNumeroDeCuenta($cuenta);\n \t\t\t\tif(!is_object($banco))\n \t\t\t\t\tthrow new Exception('El banco ingresado no existe');\n \t\t\n \t\t\t\t$ctacte\t\t=\tnew Classes_CuentaCorrienteManager();\n \t\t\t\t$data['Debe']\t=\t$d->Importe;\n \t\t\t\t$data['Saldo']\t=\t$banco->SaldoCuenta;\n \t\t\t\t$data['BancoId']\t=\t$banco->Id;\n \t\t\t\t$data['Detalle']\t=\t'Tranferencia bancaria de OP '.$op->Numero. ' anulada';\n \t\t\t\t$ctacte->AddConceptoBancoCuentaCorriente($data);\n \t\t\t}\n \t\t}\n \t\t\n \t}\n }", "public function pagos(Request $request){\n /* Creating a query to the database, but not executing it. */\n $pagos = PensionFondoPago::where('fondo_id','=',$this->id);\n if($request->fechaIni != '')\n /* Adding a filter to the query. */\n $pagos = $pagos->whereBetween('fecha_movimiento', [$request->fechaIni, $request->fechaFin]);\n /* Adding a filter to the query, and then executing it. */\n $pagos = $pagos->orderBy('fecha_movimiento','desc')->paginate(10);\n return $pagos;\n }", "public function MediosPagosPorId()\n{\n\tself::SetNames();\n\t$sql = \" select * from mediospagos where codmediopago = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codmediopago\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "function ModificarPaginas($pags){\n\t\t$this->ConectarBD();\n\t\t$sql=\"DELETE FROM EMPLEADOS_PAGINA WHERE EMP_USER='\".$this->EMP_USER.\"'\";\n\t\t$this->mysqli->query($sql);\n\t\tfor ($i=0;$i<count($pags);$i++){\n\t\t\t$sql=\"INSERT INTO EMPLEADOS_PAGINA(EMP_USER,PAGINA_ID) VALUES ('\".$this->EMP_USER.\"', \".ConsultarIDPagina($pags[$i]).\")\";\n\n\t\t\t$this->mysqli->query($sql);\n\t\t}\n\t}", "public function pagar()\n\t{\n\t\tif ( ! $this->Auth->user() )\n\t\t{\n\t\t\t$this->Session->write('Flujo.loginPending', array('controller' => 'reservas', 'action' => 'add'));\n\t\t\t$this->redirect(array('controller' => 'usuarios', 'action' => 'login'));\n\t\t}\n\n\t\t/**\n\t\t * Comprueba que existan productos en el carro\n\t\t */\n\t\t$productos\t\t\t= $this->Carro->productos('reserva');\n\t\tif ( empty($productos['reserva']) )\n\t\t{\n\t\t\t$this->redirect(array('action' => 'add'));\n\t\t}\n\n\t\t/**\n\t\t * Comprueba si existe una compra en proceso\n\t\t */\n\t\tif ( ( $id = $this->Session->read('Flujo.Reserva.compra_id') ) && $this->Reserva->DetalleCompra->Compra->pendiente($id) )\n\t\t{\n\t\t\t$this->Reserva->DetalleCompra->Compra->id\t\t\t= $id;\n\t\t}\n\n\t\t/**\n\t\t * Guarda la compra en estado pendiente\n\t\t */\n\t\t$compra\t\t\t\t= $this->Reserva->DetalleCompra->Compra->registrarCarro($productos, null, 0, true);\n\t\t$this->Session->write('Flujo.Reserva.compra_id', $compra['Compra']['id']);\n\n\t\t/**\n\t\t * Si existe error al guardar la compra, devuelve al usuario a la pagina de resumen\n\t\t * para reintentar la operacion\n\t\t */\n\t\tif ( ! $compra )\n\t\t{\n\t\t\t$this->redirect(array('action' => 'resumen'));\n\t\t}\n\n\t\t/**\n\t\t * Verifica si es necesario pasar por webpay\n\t\t */\n\t\tif ( $compra['Compra']['total'] )\n\t\t{\n\t\t\t/**\n\t\t\t * Datos necesarios para comenzar el flujo con webpay\n\t\t\t */\n\t\t\t$webpay\t\t\t= array(\n\t\t\t\t'gateway'\t\t\t=> Router::url($this->Transbank->cgiPath['pago'], true),\n\t\t\t\t'oc'\t\t\t\t=> $compra['Compra']['id'],\n\t\t\t\t'monto'\t\t\t\t=> sprintf('%d00', $compra['Compra']['total']),\n\t\t\t\t'exito'\t\t\t\t=> Router::url(array('controller' => 'reservas', 'action' => 'exito'), true),\n\t\t\t\t'fracaso'\t\t\t=> Router::url(array('controller' => 'reservas', 'action' => 'fracaso'), true)\n\t\t\t);\n\n\t\t\t$this->layout\t\t= 'ajax';\n\t\t\t$this->set(compact('webpay'));\n\t\t}\n\n\t\t/**\n\t\t * Si la reserva no tiene seleccion de productos, pasa al detalle de reserva\n\t\t */\n\t\telse\n\t\t{\n\t\t\t$this->Reserva->DetalleCompra->Compra->cambiarEstado($compra['Compra']['id'], 'PAGADO', null, true, false);\n\t\t\t$this->redirect(array('action' => 'exito', $compra['Compra']['id']));\n\t\t}\n\t}", "public function ListarProductosParaCotizacion($start, $limit, $sSearch, $iSortCol_0, $sSortDir_0, $categoria_id, $marca_id, $productos_id)\n {\n $arreglo_resultado = array();\n $cont = 0;\n\n $lista = $this->getDoctrine()->getRepository('IcanBundle:Producto')\n ->ListarProductosParaCotizacion($start, $limit, $sSearch, $iSortCol_0, $sSortDir_0, $categoria_id, $marca_id, $productos_id);\n\n foreach ($lista as $value) {\n $producto_id = $value->getProductoId();\n\n $nombre = $value->getNombre();\n $categoria = ($value->getCategoria() != null) ? $value->getCategoria()->getNombre() : \"\";\n $marca = ($value->getMarca() != null) ? $value->getMarca()->getNombre() : \"\";\n $estado = ($value->getEstado()) ? 1 : 0;\n $precio = $value->getPrecio();\n $fecha = $value->getFechapublicacion() != \"\" ? $value->getFechapublicacion()->format(\"d/m/Y H:i\") : \"\";\n $views = $value->getViews();\n\n $ruta = $this->ObtenerURL();\n $dir = 'uploads/productos/';\n $imagen = $ruta . $dir . $value->getImagen();\n\n\n $acciones = '<a href=\"javascript:;\" class=\"add importar-producto m-portlet__nav-link btn m-btn m-btn--hover-success m-btn--icon m-btn--icon-only m-btn--pill\" title=\"Agregar producto relacionado\"\n data-id=\"' . $producto_id . '\" data-nombre=\"' . $nombre . '\" data-categoria=\"' . $categoria . '\"\n data-marca=\"' . $marca . '\" data-estado=\"' . $estado . '\" data-imagen=\"' . $imagen . '\"\n data-precio=\"' . $precio . '\" data-fecha=\"' . $fecha . '\" data-views=\"' . $views . '\"> <i class=\"la la-plus\"></i> </a> ';\n\n $arreglo_resultado[$cont] = array(\n \"id\" => $producto_id,\n \"nombre\" => $nombre,\n \"categoria\" => $categoria,\n \"marca\" => $marca,\n \"estado\" => $estado,\n \"imagen\" => $imagen,\n \"precio\" => number_format($precio, 0, ',', '.'),\n \"fechapublicacion\" => $fecha,\n \"views\" => $views,\n \"acciones\" => $acciones\n );\n\n $cont++;\n }\n\n return $arreglo_resultado;\n }", "abstract public function getPaginate($premiereEntree, $messageTotal, $where);", "function listarSolicitudObligacionPago()\r\n {\r\n $this->procedimiento = 'tes.ft_solicitud_obligacion_pago_sel';\r\n $this->transaccion = 'TES_SOOBPG_SEL';\r\n $this->tipo_procedimiento = 'SEL';//tipo de transaccion\r\n\r\n\r\n $this->setParametro('id_funcionario_usu', 'id_funcionario_usu', 'int4');\r\n $this->setParametro('tipo_interfaz', 'tipo_interfaz', 'varchar');\r\n $this->setParametro('historico', 'historico', 'varchar');\r\n\r\n //Definicion de la lista del resultado del query\r\n $this->captura('id_obligacion_pago', 'int4');\r\n $this->captura('id_proveedor', 'int4');\r\n $this->captura('desc_proveedor', 'varchar');\r\n $this->captura('estado', 'varchar');\r\n $this->captura('tipo_obligacion', 'varchar');\r\n $this->captura('id_moneda', 'int4');\r\n $this->captura('moneda', 'varchar');\r\n $this->captura('obs', 'varchar');\r\n $this->captura('porc_retgar', 'numeric');\r\n $this->captura('id_subsistema', 'int4');\r\n $this->captura('nombre_subsistema', 'varchar');\r\n $this->captura('id_funcionario', 'int4');\r\n $this->captura('desc_funcionario1', 'text');\r\n $this->captura('estado_reg', 'varchar');\r\n $this->captura('porc_anticipo', 'numeric');\r\n $this->captura('id_estado_wf', 'int4');\r\n $this->captura('id_depto', 'int4');\r\n $this->captura('nombre_depto', 'varchar');\r\n $this->captura('num_tramite', 'varchar');\r\n $this->captura('id_proceso_wf', 'int4');\r\n $this->captura('fecha_reg', 'timestamp');\r\n $this->captura('id_usuario_reg', 'int4');\r\n $this->captura('fecha_mod', 'timestamp');\r\n $this->captura('id_usuario_mod', 'int4');\r\n $this->captura('usr_reg', 'varchar');\r\n $this->captura('usr_mod', 'varchar');\r\n $this->captura('fecha', 'date');\r\n $this->captura('numero', 'varchar');\r\n $this->captura('tipo_cambio_conv', 'numeric');\r\n $this->captura('id_gestion', 'integer');\r\n $this->captura('comprometido', 'varchar');\r\n $this->captura('nro_cuota_vigente', 'numeric');\r\n $this->captura('tipo_moneda', 'varchar');\r\n $this->captura('total_pago', 'numeric');\r\n $this->captura('pago_variable', 'varchar');\r\n $this->captura('id_depto_conta', 'integer');\r\n $this->captura('total_nro_cuota', 'integer');\r\n $this->captura('fecha_pp_ini', 'date');\r\n $this->captura('rotacion', 'integer');\r\n $this->captura('id_plantilla', 'integer');\r\n $this->captura('desc_plantilla', 'varchar');\r\n $this->captura('ultima_cuota_pp', 'numeric');\r\n $this->captura('ultimo_estado_pp', 'varchar');\r\n $this->captura('tipo_anticipo', 'varchar');\r\n $this->captura('ajuste_anticipo', 'numeric');\r\n $this->captura('ajuste_aplicado', 'numeric');\r\n $this->captura('monto_estimado_sg', 'numeric');\r\n $this->captura('id_obligacion_pago_extendida', 'integer');\r\n $this->captura('desc_contrato', 'text');\r\n $this->captura('id_contrato', 'integer');\r\n $this->captura('obs_presupuestos', 'varchar');\r\n $this->captura('codigo_poa', 'varchar');\r\n $this->captura('obs_poa', 'varchar');\r\n $this->captura('uo_ex', 'varchar');\r\n //Funcionario responsable de el plan de pagos\r\n $this->captura('id_funcionario_responsable', 'integer');\r\n $this->captura('desc_fun_responsable', 'text');\r\n\r\n $this->captura('id_conformidad', 'int4');\r\n $this->captura('conformidad_final', 'text');\r\n $this->captura('fecha_conformidad_final', 'date');\r\n $this->captura('fecha_inicio', 'date');\r\n $this->captura('fecha_fin', 'date');\r\n $this->captura('observaciones', 'varchar');\r\n $this->captura('fecha_certificacion_pres', 'date');\r\n\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "public function paginate($orderBy = 'nome', $perPage = 10);", "function listarObligacionPagoSol()\n {\n $this->objParam->defecto('ordenacion', 'id_obligacion_pago');\n $this->objParam->defecto('dir_ordenacion', 'asc');\n\n $this->objParam->addParametro('id_funcionario_usu', $_SESSION[\"ss_id_funcionario\"]);\n\n\n if ($this->objParam->getParametro('tipo_interfaz') == 'obligacionPagoUnico') {\n $this->objParam->addFiltro(\"obpg.tipo_obligacion = ''pago_unico''\");\n }\n\n if ($this->objParam->getParametro('tipo_interfaz') == 'obligacionPagoSol') {\n $this->objParam->addFiltro(\"obpg.tipo_obligacion in (''pago_directo'',''rrhh'')\");\n }\n\n if ($this->objParam->getParametro('tipo_interfaz') == 'obligacionPagoAdq') {\n $this->objParam->addFiltro(\"obpg.tipo_obligacion = ''adquisiciones''\");\n }\n\n if ($this->objParam->getParametro('id_obligacion_pago') != '') {\n $this->objParam->addFiltro(\"obpg.id_obligacion_pago = \" . $this->objParam->getParametro('id_obligacion_pago'));\n }\n\n if ($this->objParam->getParametro('filtro_campo') != '') {\n $this->objParam->addFiltro($this->objParam->getParametro('filtro_campo') . \" = \" . $this->objParam->getParametro('filtro_valor'));\n }\n if ($this->objParam->getParametro('id_gestion') != '') {\n $this->objParam->addFiltro(\"obpg.id_gestion = \" . $this->objParam->getParametro('id_gestion') . \" \");\n\n }\n\n //(may)para internacionales SP, SPD, SPI\n if ($this->objParam->getParametro('tipo_interfaz') == 'obligacionPagoS') {\n $this->objParam->addFiltro(\"obpg.tipo_obligacion in (''sp'')\");\n }\n if ($this->objParam->getParametro('tipo_interfaz') == 'solicitudObligacionPagoUnico') {\n $this->objParam->addFiltro(\"obpg.tipo_obligacion in (''spd'')\");\n }\n\n if ($this->objParam->getParametro('tipo_interfaz') == 'obligacionPagoInterS') {\n $this->objParam->addFiltro(\"obpg.tipo_obligacion in (''spi'')\");\n }\n\n //03/12/2020 (may) para pagos POC\n if ($this->objParam->getParametro('tipo_interfaz') == 'obligacionPagoPOC') {\n $this->objParam->addFiltro(\"obpg.tipo_obligacion in (''pago_poc'')\");\n }\n\n //filtro breydi.vasquez 07/01/2020 \n $this->objParam->getParametro('tramite_sin_presupuesto_centro_c') != '' && $this->objParam->addFiltro(\"obpg.presupuesto_aprobado = ''sin_presupuesto_cc'' \");\n //\n \n if($this->objParam->getParametro('tipoReporte')=='excel_grid' || $this->objParam->getParametro('tipoReporte')=='pdf_grid'){\n $this->objReporte = new Reporte($this->objParam,$this);\n $this->res = $this->objReporte->generarReporteListado('MODObligacionPago','listarObligacionPagoSol');\n } else{\n $this->objFunc=$this->create('MODObligacionPago');\n \n $this->res=$this->objFunc->listarObligacionPagoSol($this->objParam);\n }\n $this->res->imprimirRespuesta($this->res->generarJson());\n }", "public function Carregar_Pagina() : void\n {\n $view = $this->Retornar_Pagina();\n \n $view->set_peca_id($this->obj_contato_anunciante->get_obj_peca()->get_id());\n \n $view->Executar();\n }", "public function pedidos($id, $page)\n {\n \n //\n if(!(Gate::denies('read_franqueado'))){\n\n //Selecionar franquia com segurança\n $franquia = Auth::user()\n ->franquia()\n ->where('franquias.id', $id)\n ->first(); \n\n //Verifica se tem permissão na franquia-----------------------------\n if($franquia){\n\n /* ----------------- Inicia Conexão WC ----------------------- */\n $consumer_secret = $this->decrypt($franquia->consumer_secret); \n\n $woocommerce = new Client(\n $franquia->store_url, \n $franquia->consumer_key, \n $consumer_secret,\n [\n 'wp_api' => true,\n 'version' => 'wc/v3',\n ]\n );\n\n /* ----------------- FIM Inicia Conexão WC ----------------------- */\n\n if(!isset($page)){\n $page = 1;\n } \n\n //$pedidos = $woocommerce->get('products'); \n $pedidos = $woocommerce->get('orders', array('per_page'=>50, 'page'=>$page)); \n\n $woocommerceHeaders = $woocommerce->http->getResponse()->getHeaders();\n\n $totalPages = $woocommerceHeaders['X-WP-TotalPages']; \n\n\n //LOG ------------------------------------------------------\n $this->log(\"franqueado.pedidosFranqueado=\".$franquia);\n //----------------------------------------------------------\n\n return view('franqueado.pedido', \n array(\n 'franquia' => $franquia, \n 'pedidos' => $pedidos,\n 'page' => $page,\n 'totalPages' => $totalPages,\n 'linkPaginate' => 'franqueados/'.$franquia->id.'/pedidos/',\n ));\n\n }else{\n return view('errors.403');\n }\n //---------------------------------------------------------------------------------------------------\n \n }\n else{\n return view('errors.403');\n }\n }", "public function traerModulos()\n {\n $modeloPermisos = new \\App\\Models\\ModeloPermisos();\n $permisos = $modeloPermisos->traerDePerfil($_SESSION[\"id_perfil\"], $_SESSION[\"id_cliente\"]);\n\n // Modulos a lo que tiene acceso el usuario\n $modeloModulos = new \\App\\Models\\ModeloModulos();\n $i = 0;\n $modulos = []; // Modulos en general al que tiene acceso\n $hijos = []; // SubModulos de '$modulos' al que tiene acceso\n foreach ($permisos as $permiso)\n {\n // Obtenemos un modulo padre\n $modulosHijos = $modeloModulos->traerHijos($permiso[\"id_modulo\"], $permiso[\"id_cliente\"]);\n $j = 0;\n // Obtenemos los hijos del modulo padre\n foreach ($modulosHijos as $nhijos)\n {\n // Guardamos hijos\n $hijos[$j++] = [\"modulo\" => $nhijos[\"modulo\"], \"url\" => $nhijos[\"url\"]];\n }\n // Guardamos padres\n $modulos[$i++] = [\"modulo\" => $permiso[\"modulo\"], \"hijos\" => $hijos];\n $j = 0;\n $hijos = [];\n }\n // Limpiar aquellos modulos sin hijos\n $nmodulos = []; // Datos para el menu\n $i = 0;\n foreach ($modulos as $modulo)\n {\n if (empty($modulo[\"hijos\"]))\n continue;\n $nmodulos[$i++] = [\"modulo\" => $modulo[\"modulo\"], \"hijos\" => $modulo[\"hijos\"]];\n }\n\n return $nmodulos;\n }", "public function paginar_get(){\n\n $this->load->helper('paginacion');\n\n $pagina = $cliente_id = $this->uri->segment(3); // parametro #3\n $por_pagina = $cliente_id = $this->uri->segment(4); // parametro #4\n\n $campos = array('id','nombre','telefono1'); // campos de la tabla\n\n $respuesta = paginar_todo( 'clientes', $pagina, $por_pagina, $campos ); // helper\n $this->response( $respuesta ); // imprime el resultado de lo que se obtuvo\n }", "public function actionListado(){\n $model = new Cuenta();\n if(Yii::$app->request->post('consulta')!=NULL){ \n $this->layout = 'printlayout';\n $pdf = new mPDF('utf-8','A4-L',0,'',10,10,10,10);\n $movimientos = $model->getListado(Yii::$app->request->post('consulta'));\n $movPerPage=25;\n $misMovimientos = array_chunk($movimientos,$movPerPage,true);\n $numPages = count($misMovimientos);\n $anyoActual = Cuenta::getDb()->createCommand( 'SELECT contActual()' )->queryScalar();\n foreach($misMovimientos as $key=>$valor){\n $ultimo=false;\n if(($key+1)==$numPages){\n $ultimo=true;\n }\n \n $content = $this->render('imprimir', [\n 'model' => $model,'movimientos'=>$valor,'mpdf'=>$pdf,'ultimo'=>$ultimo,'anyoactual'=>$anyoActual,\n ]);\n //$pdf->SetHeader('Movimientos del año 2015');\n $pdf->SetHTMLHeader($this::$CABECERA,'',true);\n $pdf->SetFooter('Página '.($key+1).' de '.$numPages.'->'.'{PAGENO}');\n $pdf->WriteHTML($content);\n \n if(!$ultimo){\n $pdf->AddPage();\n }\n }\n \n $pdf->Output();\n exit;\n \n \n \n /****************************************************************************************/\n \n }\n /**Pagina de filtrado************************/\n return $this->render('listado', [\n 'model' => $model, 'tipos'=>$model->getTipos(),\n ]);\n }", "public function do_paging()\n {\n }", "function asignar_pago_adelantado($acceso,$id_contrato){\n\t$cable=conexion();\n\t$acceso1=conexion();\n\t$cable->objeto->ejecutarSql(\"select id_pago,costo_cobro,id_cont_serv from vista_pago_ser where id_contrato='$id_contrato' and id_serv='ZZZ00001'\");\n\twhile($row=row($cable)){\n\t\n\t\t$id_pago=trim($row['id_pago']);\n\t\t$id_cont_serv_deuda=trim($row['id_cont_serv']);\n\t\t$monto_pago=trim($row['costo_cobro'])+0;\n\t\t\n\t\t//echo \"<br>:$id_pago:$monto_pago:$id_cont_serv_deuda\";\n\t\t//echo \"<br>:select tipo_costo,id_cont_serv,(((cant_serv * costo_cobro)-descu) - pagado ) as costo from vista_contratodeu where id_contrato='$id_contrato' and status_con_ser='DEUDA' and costo_cobro>0 order by tipo_serv ,fecha_inst:<br>\";\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t$acceso1->objeto->ejecutarSql(\"select tipo_costo,id_cont_serv,(((cant_serv * costo_cobro)-descu) - pagado ) as costo from vista_contratodeu where id_contrato='$id_contrato' and status_con_ser='DEUDA' and (((cant_serv * costo_cobro)-descu) - pagado )>0 order by tipo_serv ,fecha_inst\");\n\t\twhile($row=row($acceso1)){\n\t\t\t$id_cont_serv=trim($row['id_cont_serv']);\n\t\t\t$tipo_costo=trim($row['tipo_costo']);\n\t\t\t$costo=trim($row['costo'])+0;\n\t\t\t//echo \"<br>id_cont_serv:$id_cont_serv:costo:$costo<br>\";\n\t\t\tif($monto_pago>=$costo){\n\t\t\t\t$id_select=$id_select.\"=@$id_cont_serv\";\n\t\t\t\t$acceso->objeto->ejecutarSql(\"Update contrato_servicio_deuda Set apagar=0, pagado=pagado+'$costo' where id_cont_serv='$id_cont_serv'\");\n\t\t\t\t$acceso->objeto->ejecutarSql(\"insert into pago_factura(id_pago,id_cont_serv,costo_cobro_serv) values ('$id_pago','$id_cont_serv','$costo')\");\n\t\t\t\t$acceso->objeto->ejecutarSql(\"update contrato_servicio_deuda set status_con_ser='PAGADO' where id_cont_serv='$id_cont_serv' and ((cant_serv * costo_cobro)-descu)=pagado\");\n\t\t\t\t$monto_pago=$monto_pago-$costo;\n\t\t\t}\n\t\t\telse if($monto_pago>0){\n\t\t\t\t$id_select=$id_select.\"=@$id_cont_serv\";\n\t\t\t\t$acceso->objeto->ejecutarSql(\"Update contrato_servicio_deuda Set apagar=0, pagado=pagado+'$monto_pago' where id_cont_serv='$id_cont_serv'\");\n\t\t\t\t\n\t\t\t\t$cable->objeto->ejecutarSql(\"select costo_cobro_serv from pago_factura where id_pago='$id_pago' and id_cont_serv='$id_cont_serv'\");\n\t\t\t\tif($row=row($cable)){\n\t\t\t\t\t$costo_cobro_serv1=trim($row['costo_cobro_serv'])+0;\n\t\t\t\t\t//echo \"<BR>ENTRO ACT<BR>update pago_factura set costo_cobro_serv=costo_cobro_serv+$costo_cobro_serv1 where id_pago='$id_pago' and id_cont_serv='$id_cont_serv';\";\n\t\t\t\t\t$acceso->objeto->ejecutarSql(\"update pago_factura set costo_cobro_serv=costo_cobro_serv+$costo_cobro_serv1 where id_pago='$id_pago' and id_cont_serv='$id_cont_serv'\");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$acceso->objeto->ejecutarSql(\"insert into pago_factura(id_pago,id_cont_serv,costo_cobro_serv) values ('$id_pago','$id_cont_serv','$monto_pago')\");\n\t\t\t\t}\n\t\t\t\t$acceso->objeto->ejecutarSql(\"update contrato_servicio_deuda set status_con_ser='PAGADO' where id_cont_serv='$id_cont_serv' and ((cant_serv * costo_cobro)-descu)=pagado\");\n\t\t\t\t$monto_pago=0;\n\t\t\t}\n\t\t}\n\t\t$acceso->objeto->ejecutarSql(\"select id_pago from contrato_servicio_deuda where id_cont_serv='$id_cont_serv_deuda'\");\n\t\t$row=row($acceso);\n\t\t$id_pago_ade=trim($row['id_pago']);\n\t\t\t//echo \"<br>:$monto_pago:<br>\";\n\t\tif($monto_pago>0){\n\t\t\t$acceso->objeto->ejecutarSql(\"update pago_factura set costo_cobro_serv=$monto_pago where id_cont_serv='$id_cont_serv_deuda' \");\n\t\t\t$acceso->objeto->ejecutarSql(\"update contrato_servicio_deuda set costo_cobro=$monto_pago, pagado=$monto_pago where id_cont_serv='$id_cont_serv_deuda'\");\n\t\t\t\n\t\t\tactualizar_monto_pago($acceso,$id_pago_ade);\n\t\t}else{\n\t\t\t\n\t\t\t$acceso->objeto->ejecutarSql(\"delete from pago_factura where id_cont_serv='$id_cont_serv_deuda'\");\n\t\t\t$acceso->objeto->ejecutarSql(\"delete from contrato_servicio_deuda where id_cont_serv='$id_cont_serv_deuda'\");\n\t\t\t//echo \"delete from pagos where id_pago='$id_pago_ade'<br><br>\";\n\t\t\t$acceso->objeto->ejecutarSql(\"delete from pagos where id_pago='$id_pago_ade'\");\n\t\t}\n\n\t}//while inicial\n}", "public function pagamento($pagamento){\n curl_setopt($this->curl, CURLOPT_URL, $this->url.\"payments\");\n curl_setopt($this->curl, CURLOPT_POST, 1);\n curl_setopt($this->curl, CURLOPT_HTTPHEADER, array(\n \"Content-Type: application/json\",\n \"Authorization: Bearer \".$this->token,\n \"X-Api-Version: 2\",\n \"X-Resource-Token: \".$this->recipientToken,\n ));\n\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, json_encode($pagamento));\n\n $temp = curl_exec($this->curl);\n $resp = json_decode($temp);\n\n return $resp;\n }", "public function ListarProductosParaRelacionados($start, $limit, $sSearch, $iSortCol_0, $sSortDir_0, $categoria_id, $marca_id, $productos_id)\n {\n $arreglo_resultado = array();\n $cont = 0;\n\n $lista = $this->getDoctrine()->getRepository('IcanBundle:Producto')\n ->ListarProductosParaRelacionados($start, $limit, $sSearch, $iSortCol_0, $sSortDir_0, $categoria_id, $marca_id, $productos_id);\n\n foreach ($lista as $value) {\n $producto_id = $value->getProductoId();\n\n $nombre = $value->getNombre();\n $categoria = ($value->getCategoria() != null) ? $value->getCategoria()->getNombre() : \"\";\n $marca = ($value->getMarca() != null) ? $value->getMarca()->getNombre() : \"\";\n $estado = ($value->getEstado()) ? 1 : 0;\n $precio = number_format($value->getPrecio(), 0, ',', '.');\n $fecha = $value->getFechapublicacion() != \"\" ? $value->getFechapublicacion()->format(\"d/m/Y H:i\") : \"\";\n $views = $value->getViews();\n\n $ruta = $this->ObtenerURL();\n $dir = 'uploads/productos/';\n $imagen = $ruta . $dir . $value->getImagen();\n\n\n $acciones = '<a href=\"javascript:;\" class=\"add importar-producto m-portlet__nav-link btn m-btn m-btn--hover-success m-btn--icon m-btn--icon-only m-btn--pill\" title=\"Agregar producto relacionado\"\n data-id=\"' . $producto_id . '\" data-nombre=\"' . $nombre . '\" data-categoria=\"' . $categoria . '\"\n data-marca=\"' . $marca . '\" data-estado=\"' . $estado . '\" data-imagen=\"' . $imagen . '\"\n data-precio=\"' . $precio . '\" data-fecha=\"' . $fecha . '\" data-views=\"' . $views . '\"> <i class=\"la la-plus\"></i> </a> ';\n\n $arreglo_resultado[$cont] = array(\n \"id\" => $producto_id,\n \"nombre\" => $nombre,\n \"categoria\" => $categoria,\n \"marca\" => $marca,\n \"estado\" => $estado,\n \"imagen\" => $imagen,\n \"precio\" => $precio,\n \"fechapublicacion\" => $fecha,\n \"views\" => $views,\n \"acciones\" => $acciones\n );\n\n $cont++;\n }\n\n return $arreglo_resultado;\n }", "function requestAllDadosProduto($page, $itensPorPagina)\n {\n\n $conn = new db_conect();\n $query = 'SELECT \n produto.codigo AS codigo,\n produto.nome AS produto, \n produto.preco, \n qntd_disponivel,\n qntd_min_vendida,\n categoria,\n tipo_venda,\n data_producao,\n data_validade,\n cliente.cpf AS vendedor_fk, \n cliente.nome AS vendedor, \n produto.data_cadastro AS data_anuncio, \n produto.avaliacao AS avaliacao_produto, \n produto.num_vendas AS num_vendas_produto, \n produto.num_visualizacao AS visualizacoes, \n caminho_foto AS foto \n FROM produto \n INNER JOIN cliente ON cliente.CPF = produto.produtor_fk \n INNER JOIN img_produto ON img_produto.produto_fk = produto.codigo \n WHERE \n produtor_fk = \"' . base64_decode($_SESSION['log_id']) . '\" \n AND \n caminho_foto = (SELECT caminho_foto FROM img_produto WHERE produto_fk = produto.codigo LIMIT 1) \n ORDER BY data_anuncio ASC LIMIT ' . $page . ', ' . $itensPorPagina . ';';\n\n\n $result = $conn->selectCustom($query);\n return $result;\n }", "public function pagar($id)\n {\n\n $com = Comisiones::where('id','=',$id)->first();\n\n $last = Comisiones::select('recibo')->where('estatus','=',2)->orderby('recibo', 'desc')->max('recibo');\n if ($last != NULL) {\n $last1 = $last;\n //$last = array_pop($last);\n } else {\n $last1 = 0;\n }\n\n $recibo = $last1 + 1;\n\n\n $a = Atenciones::where('id','=',$com->id_atencion)->first();\n $a->pagado =2;\n $resa = $a->update();\n \n\n $p = Comisiones::find($id);\n $p->estatus =2;\n $p->recibo = $recibo;\n $p->fecha_pago = date('Y-m-d');\n $res = $p->update();\n \n return back();\n\n //\n }", "public function pedidosPorAsignar()\n {\n //pedidos no asignados (Estado 1)\n $porAsignar = \\App\\Pedido::select('id', 'estado', 'usuario_id', 'repartidor_id', 'estado_pago', 'created_at')\n ->with(['usuario' => function ($query) {\n $query->select('id', 'nombre');\n }])\n ->where('estado_pago','aprobado')\n ->where('estado',1)\n ->whereNull('repartidor_id')\n ->where(DB::raw(\"PERIOD_DIFF(DATE_FORMAT(now(), '%y%m') ,DATE_FORMAT(created_at, '%y%m'))\"), '<=', 1)\n ->orderBy('id', 'desc')\n ->take(10)\n ->get();\n\n\n return response()->json(['porAsignar'=>$porAsignar], 200);\n \n }", "function pagination(){}", "public function getPaginas($OficialiaDto, $param, $estado) {\n $inicia = false;\n $orden = \" \";\n $campos = \" a.cveAdscripcion, a.desAdscripcion, o.cveOficialia, o.desOficilia, o.cveDistrito, d.desDistrito, o.cveMunicipio, m.desMunicipio, e.cveEstado, e.desEstado \";\n $orden .= \" o inner join tbladscripciones a on a.cveAdscripcion = o.cveAdscripcion \";\n $orden .= \" left join tblmunicipios m on m.cveMunicipio = o.cveMunicipio \";\n $orden .= \" left join tbldistritos d on d.cveDistrito = o.cveDistrito \";\n $orden .= \" left join tblestados e on e.cveEstado = d.cveEstado AND e.cveEstado = m.cveMunicipio \";\n $orden .= \" where a.activo = 'S' \";\n $orden .= \" AND o.activo = 'S' \";\n if ($estado != \"\")\n $orden .= \" AND e.cveEstado = \" . $estado . \" \";\n if ($OficialiaDto->getCveMunicipio() != \"\")\n $orden .= \" AND o.cveMunicipio = \" . $OficialiaDto->getCveMunicipio() . \" \";\n if ($OficialiaDto->getCveDistrito() != \"\")\n $orden .= \" AND o.cveDistrito = \" . $OficialiaDto->getCveDistrito() . \" \";\n if ($OficialiaDto->getDesOficilia() != \"\")\n $orden .= \" AND o.desOficilia like '%\" . $OficialiaDto->getDesOficilia() . \"%' \";\n $OficialiaDao = new OficialiaDAO();\n $param[\"paginacion\"] = false;\n $oficialia = new OficialiaDTO();\n $numTot = $OficialiaDao->selectOficialia($oficialia, $orden, null, null, \" count(o.cveOficialia) as totalCount \");\n $Pages = (int) $numTot[0]['totalCount'] / $param[\"cantxPag\"];\n $restoPages = $numTot[0]['totalCount'] % $param[\"cantxPag\"];\n $totPages = $Pages + (($restoPages > 0) ? 1 : 0);\n\n $json = \"\";\n $json .= '{\"type\":\"OK\",';\n $json .= '\"totalCount\":\"' . $numTot[0]['totalCount'] . '\",';\n $json .= '\"data\":[';\n $x = 1;\n\n if ($totPages >= 1) {\n for ($index = 1; $index <= $totPages; $index++) {\n\n $json .= \"{\";\n $json .= '\"pagina\":' . json_encode(utf8_encode($index)) . \"\";\n $json .= \"}\";\n $x++;\n if ($x <= ($totPages )) {\n $json .= \",\";\n }\n }\n $json .= \"],\";\n $json .= '\"pagina\":{\"total\":\"\"},';\n $json .= '\"total\":\"' . ($index - 1) . '\"';\n $json .= \"}\";\n } else {\n $json .= \"]}\";\n }\n return $json;\n }", "public function ListarProductos($start, $limit, $sSearch, $iSortCol_0, $sSortDir_0, $categoria_id, $marca_id)\n {\n $arreglo_resultado = array();\n $cont = 0;\n\n $lista = $this->getDoctrine()->getRepository('IcanBundle:Producto')\n ->ListarProductos($start, $limit, $sSearch, $iSortCol_0, $sSortDir_0, $categoria_id, $marca_id);\n\n\n foreach ($lista as $value) {\n $producto_id = $value->getProductoId();\n\n $acciones = $this->ListarAcciones($producto_id);\n\n $ruta = $this->ObtenerURL();\n $dir = 'uploads/productos/';\n $imagen = $ruta . $dir . $value->getImagen();\n\n $acciones1 = '';\n $ficha = $value->getFicha();\n if ($ficha != \"\") {\n $acciones1 = ' <a href=\"' . $this->generateUrl('descargarFichaProducto', array('producto_id' => $producto_id)) . '\" target=\"_blank\" class=\"download m-portlet__nav-link btn m-btn m-btn--hover-accent m-btn--icon m-btn--icon-only m-btn--pill\" title=\"Descargar ficha\"><i class=\"la la-download\"></i></a>';\n }\n\n $arreglo_resultado[$cont] = array(\n \"id\" => $producto_id,\n \"nombre\" => $value->getNombre(),\n \"categoria\" => ($value->getCategoria() != null) ? $value->getCategoria()->getNombre() : \"\",\n \"marca\" => ($value->getMarca() != null) ? $value->getMarca()->getNombre() : \"\",\n \"estado\" => ($value->getEstado()) ? 1 : 0,\n \"imagen\" => $imagen,\n \"precio\" => number_format($value->getPrecio(), 0, ',', '.'),\n \"fechapublicacion\" => $value->getFechapublicacion() != \"\" ? $value->getFechapublicacion()->format(\"d/m/Y H:i\") : \"\",\n \"views\" => $value->getViews(),\n \"acciones\" => $acciones . $acciones1\n );\n\n $cont++;\n }\n\n return $arreglo_resultado;\n }", "protected function selectPagos($tabla) {\n $getproducto = $this->_db->query(\"SELECT deuda.Id_cliente as dni, nombre as nombre, apellidos as apellido, \n direccion as direccion, telefono as telefono, celular as celular, deuda.total as deuda\n FROM $tabla as pagos \n INNER JOIN venta as venta ON venta.Id_deuda = pagos.Id_deuda\n INNER JOIN productoventa as prodventa ON venta.cod_busqueda = prodventa.cod_busqueda\n INNER JOIN deuda as deuda ON deuda.Id_deuda = venta.Id_deuda\n INNER JOIN cliente as cliente ON cliente.Id_cliente = deuda.Id_cliente where pagos.estado = 0 and pagos.Fecha_Pago = CURDATE()\n GROUP BY cliente.Id_cliente\n ORDER BY deuda.Fecha_deuda\");\n $this->_db->cerrar();\n return $getproducto->fetchall();\n }", "function getPagos() {\n $where = \" WHERE 1\";\n $array = \"\";\n $columns = \"`Id_pago`, `Nombre`, `Email`, `Fecha_anterior`, `Pago`, `Proxima_fecha`, `Estatus`, `Id_cliente`\";\n $response = $this->db->select3($columns, 'pagos', $where, $array);\n return $response;\n }", "function listarRelacionProceso(){\n $this->objParam->defecto('ordenacion','id_relacion_proceso_pago');\n $this->objParam->defecto('dir_ordenacion','asc');\n\n\n if($this->objParam->getParametro('tipoReporte')=='excel_grid' || $this->objParam->getParametro('tipoReporte')=='pdf_grid'){\n $this->objReporte = new Reporte($this->objParam,$this);\n $this->res = $this->objReporte->generarReporteListado('MODObligacionPago','listarRelacionProceso');\n } else{\n $this->objFunc=$this->create('MODObligacionPago');\n\n $this->res=$this->objFunc->listarRelacionProceso($this->objParam);\n }\n $this->res->imprimirRespuesta($this->res->generarJson());\n }", "function paginateWithExtra($size = 15);", "public function PagarCompras()\n{\n\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\tself::SetNames();\n\t\t$sql = \" update compras set \"\n\t\t.\" fechavencecredito = '0000-00-00', \"\n\t\t.\" statuscompra = ? \"\n\t\t.\" where \"\n\t\t.\" codcompra = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $statuscompra);\n\t\t$stmt->bindParam(2, $codcompra);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$statuscompra = strip_tags(\"PAGADA\");\n\t\t$stmt->execute();\n\n\t\theader(\"Location: compraspendientes?mesage=1\");\n\t\texit;\n\n\t} else {\n\n\t\theader(\"Location: compraspendientes?mesage=2\");\n\t\texit;\n\t}\n\n}", "public function MediosPagosId()\n\t{\n\t\tself::SetNames();\n\t\t$sql = \" select * from mediospagos where codmediopago = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_GET[\"formapagove\"]) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\n\t\t{\n\t\t\techo \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t\t{\n\t\t\t\t\t$this->p[] = $row;\n\t\t\t\t}\n\t\t\t\treturn $this->p;\n\t\t\t\t$this->dbh=null;\n\t\t\t}\n\t\t}", "public function gera_pagamentos_renovacao()\n {\n $this->FinanceiroPagamento->geraPagamentoRenovacaoMatriculas();\n }", "public function consultaPaginas(){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT * FROM tbpaginas order by idpaginas\";\n $sql = $this->conexao->query($sql);\n $dados = array();\n\n while ($row = $sql->fetch_assoc()) {\n\n $dado = array();\n $dado['idpaginas'] = $row['idpaginas'];\n $dado['paginas'] = $row['nome_paginas'];\n $dado['url'] = $row['paginas'];\n $dados[] = $dado;\n }\n\n return $dados;\n\n }", "public function paginate()\n {\n }", "public function EliminarMediosPagos()\n\t\t{\n\n\t\t\t$sql = \" select codmediopago from ventas where codmediopago = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->execute( array(base64_decode($_GET[\"codmediopago\"])) );\n\t\t\t$num = $stmt->rowCount();\n\t\t\tif($num == 0)\n\t\t\t{\n\n\t\t\t\t$sql = \" delete from mediospagos where codmediopago = ? \";\n\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t$stmt->bindParam(1,$codmediopago);\n\t\t\t\t$codmediopago = base64_decode($_GET[\"codmediopago\"]);\n\t\t\t\t$stmt->execute();\n\n\t\t\t\theader(\"Location: mediospagos?mesage=1\");\n\t\t\t\texit;\n\n\t\t\t}else {\n\n\t\t\t\theader(\"Location: mediospagos?mesage=2\");\n\t\t\t\texit;\n\t\t\t}\n\n\t\t}", "public function index()\n {\n $user = Auth::user();\n\n if(!$user == null)\n {\n\n $id_opcion = 9010;\n $idperfil = auth()->user()->id_perfil;\n $emailclien = auth()->user()->email;\n $perfiles = Opcperfil::where('id_perfil', '=', $idperfil)\n ->where('id_opcion','=', $id_opcion)->get();\n \n $operfiles = Perfil::orderBy('id_perfil')\n ->paginate(5);\n // ->get();\n return view('perfiles.t_perfiles', compact('perfiles', 'operfiles'));\n } else {\n return Redirect::to('home'); \n }\n\n }", "public static function paginado_usuario(){\n\t\t $page = 1; //inicializamos la variable $page a 1 por default\n\t\t if(array_key_exists('pg', $_GET)){\n\t\t $page = $_GET['pg']; //si el valor pg existe en nuestra url, significa que estamos en una pagina en especifico.\n\t\t }\n\t\t //ahora que tenemos en que pagina estamos obtengamos los resultados:\n\t\t // a) el numero de registros en la tabla\n\t\t $mysqli = new mysqli(\"localhost\",\"root\",\"slam2018\",\"corgran\");\n\t\t if ($mysqli->connect_errno) {\n\t\t\t\tprintf(\"Connect failed: %s\\n\", $mysqli->connect_error);\n\t\t\t\texit();\n\t\t\t}\n\n\n\t\t $conteo_query = $mysqli->query(\"SELECT COUNT(*) as conteo FROM usuarios\");\n\t\t $conteo = \"\";\n\t\t if($conteo_query){\n\t\t \twhile($obj = $conteo_query->fetch_object()){ \n\t\t \t \t$conteo =$obj->conteo; \n\t\t \t}\n\t\t }\n\t\t $conteo_query->close(); \n\t\t unset($obj); \n \t\t\n\t\t //ahora dividimos el conteo por el numero de registros que queremos por pagina.\n\t\t $max_num_paginas = intval($conteo/10); //en esto caso 10\n\t\t\t\n\t\t // ahora obtenemos el segmento paginado que corresponde a esta pagina\n\t\t $segmento = $mysqli->query(\"SELECT * FROM usuarios LIMIT \".(($page-1)*10).\", 10 \");\n $resultado=[];\n\t\t //ya tenemos el segmento, ahora le damos output.\n\t\t if($segmento){\n\t\t\t // echo '<table>';\n\t\t\t while($obj2 = $segmento->fetch_object())\n\t\t\t {\n\t\t\t \t$obj_usu = new usuario($obj2->id_usuario,$obj2->tipo_usu,$obj2->nombre,$obj2->clave);\n $resultado[]=$obj_usu;\n\t\t\t /* echo '<tr>\n\t\t\t <td>'.$obj2->id_usuario.'</td>\n\t\t\t <td>'.$obj2->tipo_usu.'</td>\n\t\t\t <td>'.$obj2->nombre.'</td>\n\t\t\t </tr>'; \n\t\t\t */ }\n\t\t\t // echo '</table><br/><br/>';\n\t\t\t}\n\t\n\t\t //ahora viene la parte importante, que es el paginado\n\t\t //recordemos que $max_num_paginas fue previamente calculado.\n\t\t for($i=0; $i<$max_num_paginas;$i++){\n\n\t\t echo '<a href=\"index.php?pg='.($i+1).'\">'.($i+1).'</a> | ';\n\t\t \n\t\t } \n\t\t echo '<div>-------------------------- PAginacion------------------------------------------------</div>'; \n return $resultado; \n \n }", "public static function pageTbhotelCliente($inicio, $pag, $rgtro)\n {\n $str=\"\";\n $str = \"select * from \".self::$tablename;\n if (trim($inicio) <> \"\")\n {\n // ojo cambiar las xxx por campo de busqueda \n $str.= \" Where xxxxx like '%$inicio%'\";\n $str.= \"\t or xxxxx like '%$inicio%'\";\n } \n $str .= \" order by xxxxx desc limit \" . $pag . \",\" . $rgtro;\n $cnx = dbcon();\n $rr = mysqli_query($cnx, $str);\n $array1 = array();\n $cn = 0;\n while ($rx = mysqli_fetch_array($rr))\n { \n $array1[$cn] = new tbhotelClienteData();\n $array1[$cn]->cons = $cn;\n $array1[$cn]->idnitHotel = $rx['idnitHotel'];\n $array1[$cn]->nitHotel = $rx['nitHotel'];\n $array1[$cn]->idCiudad = $rx['idCiudad'];\n $array1[$cn]->nomHotel = $rx['nomHotel'];\n $array1[$cn]->dirHotel = $rx['dirHotel'];\n $array1[$cn]->telHotel1 = $rx['telHotel1'];\n $array1[$cn]->telHotel2 = $rx['telHotel2'];\n $array1[$cn]->correoHotel = $rx['correoHotel'];\n $array1[$cn]->tipoHotel = $rx['tipoHotel'];\n $array1[$cn]->Administrador = $rx['Administrador'];\n $array1[$cn]->idRedes = $rx['idRedes'];\n $array1[$cn]->aforo = $rx['aforo'];\n $array1[$cn]->tipoHabitaciones = $rx['tipoHabitaciones'];\n $array1[$cn]->status = $rx['status'];\n $cn++;\n } // fin del Ciclo\n return $array1;\n }", "public function bppersona($id_per,$nperson,$pagina=null)\n {\n $id_persona=($id_per); \n $datatram2=DB::select('SELECT distinct t.IDTRAMITE,t.COSTO_TRAM,t.TRAMOSERV,t.ENLINEA,t.Ambito,t.AMBITO_MUN_CLAVE,t.COSTO_TRAM,t.COSTO_CANTIDAD,t.Denominacion,t.PRINFIN_URL,t.PREGES_URL,t.CHAT_URL,t.PRINFIN,t.PREGES,t.CHAT,t.PRESENCIAL,t.PRINFIN_SEITS,t.TIPOTRAM,t.PREGES_SEITS\n FROM TBGEM_CITRAMITE t\n INNER JOIN TBGEM_CITRAM_PERFIL TT ON TT.IDTRAMITE = t.IDTRAMITE\n INNER JOIN TBGEM_CIPERFIL TM ON TM.ID_PERFIL = TT.ID_PERFIL\n WHERE t.BAJA = 0\n AND TM.ID_PERFIL='.$id_persona.'\n order by t.denominacion');\n\n\n\n\n // return $datatram;\n $count = sizeof($datatram2);\n $nper =($nperson);\n $tram_x_pag=9;\n $paginas =$count/9;\n $paginas=ceil($paginas);\n $id_persona=($id_per);\n $pagina=($pagina);\n $inicia=($pagina-1)*$tram_x_pag;\n\n\n $datatram=DB::select('SELECT distinct t.IDTRAMITE,t.COSTO_TRAM,t.TRAMOSERV,t.ENLINEA,t.Ambito,t.AMBITO_MUN_CLAVE,t.COSTO_TRAM,t.COSTO_CANTIDAD,t.Denominacion,t.PRINFIN_URL,t.PREGES_URL,t.CHAT_URL,t.PRINFIN,t.PREGES,t.CHAT,t.PRESENCIAL,t.PRINFIN_SEITS,t.TIPOTRAM,t.PREGES_SEITS\n FROM TBGEM_CITRAMITE t\n INNER JOIN TBGEM_CITRAM_PERFIL TT ON TT.IDTRAMITE = t.IDTRAMITE\n INNER JOIN TBGEM_CIPERFIL TM ON TM.ID_PERFIL = TT.ID_PERFIL\n WHERE t.BAJA = 0\n AND TM.ID_PERFIL='.$id_persona.'\n order by t.denominacion\n OFFSET '.$inicia.' ROWS FETCH FIRST '.$tram_x_pag.' ROW ONLY');\n\n\n \n\n return view('VistasRetys.personatarjeta')\n /*->with(['dataper'=>$datapersona])*/\n ->with(['id_persona'=>$id_persona])\n ->with(['datatram'=>$datatram])\n ->with(['count'=>$count])\n ->with(['nper'=>$nper])\n ->with(['paginas'=>$paginas])\n ->with(['pagina'=>&$pagina]);\n }", "public function ListarComprasPag()\n\t{\n\t\tself::SetNames();\t\t\n\t\t$sql = \" SELECT compras.codcompra, compras.subtotalivasic, compras.subtotalivanoc, compras.ivac, compras.totalivac, compras.descuentoc, compras.totaldescuentoc, compras.totalc, compras.statuscompra, compras.fechavencecredito, compras.fechacompra, proveedores.nomproveedor, SUM(detallecompras.cantcompra) AS articulos FROM (compras INNER JOIN proveedores ON compras.codproveedor = proveedores.codproveedor) INNER JOIN usuarios ON compras.codigo = usuarios.codigo LEFT JOIN detallecompras ON detallecompras.codcompra = compras.codcompra WHERE compras.statuscompra = 'PAGADA' GROUP BY compras.codcompra\";\n foreach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\treturn $this->p;\n\t\t$this->dbh=null;\t \n}", "function deletaPagamento($idpedido){\n //$conexao = $c->conexao();\n\n $sql = \"UPDATE tbpedido_pagamento SET status='D' WHERE idpedido ='$idpedido' \";\n\n $mensagem = \"O Pagamento do Pedido $idpedido foi deletado!\";\n $this->salvaLog($mensagem);\n\n return $this->conexao->query($sql);\n }", "public function paginateAllDeleted($postsPerPage);", "public function procesarPagos(){ \n\t\trequire_once './core/SimpleXLSX.php';\n\t\t$dato=\"\";\n\t\t$fecha=\"\";\n\t\t$reg=0;\n\t\t$act=0;\n\t\t$count1=0;\n\t\t$aporte0=new Aporte($this->adapter);\n\t\t$porCruzar= $aporte0->contarCruceAportes();\n\t\tif (isset($porCruzar) && count($porCruzar)>=1)\n {\n\t\t\t\t foreach($porCruzar as $aporte)\n\t\t\t\t {\n\t\t\t\t\t $count1 = $aporte->aporteID;\n\t\t\t\t }\n\t\t\t }\n\t\t\n\t\tif ( $xlsx = SimpleXLSX::parse( './uploads/Datos.xlsx' ) ) {\n\t\t\t \n\t foreach ( $xlsx->rows() as $r => $row ) {\n\t\t\n\t\tif ($r > 0)\n\t\t{\n\t\t\tif ($row[5]!= 'Depósito')\n\t\t\t{\n\t\t\t\t$fecha = substr($row[3], 0, 19) ;\n\t\t\t\t$fecha = str_replace(\".\",\":\",$fecha);\n\t\t\t\t$fecha = substr_replace($fecha, \" \", 10, 1);\n\t\t\t\t\t//echo $fecha.':'.$row[5].'|||'.$fecha .'<br/>';\n\t\t\t\t\t\n\t\t\t\t$aporte=new Aporte($this->adapter);\n\t\t\t\t$aporte->setTransactionID($row[4]);\n\t\t\t\t$aporte->setBank($row[14]);\n\t\t\t\t$aporte->setRegisteredDate($fecha);\n\t\t\t\t$aporte->setValue($row[6]);\n\t\t\t\t$aporte->setAccount($row[13]);\n\t\t\t\t\n\t\t\t\t$save=$aporte->updateCruce(); // Manda a actualizar la moto en el modelo\n\t\t\t\tif ($save == TRUE)\n\t\t\t\t{\n\t\t\t\t\t$act = $act+1;\n\t\t\t\t}\n\t\t\t\t$reg = $reg+1;\t\n\t\t\t\t//$dato = \"UPDATE aporte set \\\"transactionId\\\"='\".$row[4].\"', \\\"bank\\\"='\".$row[14].\"', \\\"registeredDate\\\"='\".$fecha.\"', \\\"bankValidated\\\"='true' WHERE \\\"account\\\"='\".$row[13].\"' AND \\\"value\\\"='\".$row[6].\"' AND \\\"bankValidated\\\"='false' AND \\\"callCenterValidated\\\"='false' AND \\\"transactionId\\\"= '0';\";\n\t\t\t\t//echo strval($save) . '<br/>';\n\t\t\t\ttry{\n\t\t\t\t$payment=new Payment($this->adapter);\n\t\t\t\t$payment->setTransactionID($row[4]);\n\t\t\t\t$payment->setValue($row[6]);\n\t\t\t\t$payment->setCedula($row[10]);\n\t\t\t\t$payment->setBank($row[14]);\n\t\t\t\t$payment->setAccount($row[13]);\n\t\t\t\t$payment->setRegisteredDate($fecha);\n\t\t\t\t$payment->setIsMatched('false');\n\t\t\t\t$payment->setIsActive('true');\n\t\t\t\t$save=$payment->save();\n\t\t\t\t}\n\t\t\t\tcatch (Exception $e) {\n\t\t\t\t\t//echo 'Excepción capturada: ', $e->getMessage(), \"\\n\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t}\n\t\t} else {\n\t\techo SimpleXLSX::parseError();\n\t\t}\n\t\t\t$count2=0;\n\t\t$aporte1=new Aporte($this->adapter);\n\t\t$porCruzar1= $aporte1->contarCruceAportes();\n\t\tif (isset($porCruzar1) && count($porCruzar1)>=1)\n {\n\t\t\t\t foreach($porCruzar1 as $aporte)\n\t\t\t\t {\n\t\t\t\t\t $count2 = $aporte->aporteID;\n\t\t\t\t }\n\t\t\t }\n\t\t$payment0=new Payment($this->adapter);\n\t $save=$payment0->updateMatch();\n\t\n\t\t$aporte1->phpAlert('Registros econtrados en excel: ' .$reg \n\t\t.'\\nRegistros procesados desde el excel: ' .$act\n\t\t.'\\nAportes pendientes por cruzar antes del cruce: ' .$count1\n\t\t.'\\nAportes pendientes de cruzar luego del cruce: ' .$count2\n\t\t.'\\nTOTAL CRUZADOS en esta carga: ' .($count1 - $count2),\n\t\t$this->baseUrl(\"BandejaCallcenters\", \"index\")); // Alerta y redirige\n //$this->redirect(\"BandejaBancos\", \"index\"); // COntrolador + Vista\n }", "public function listar_mis_pedidos() {\n \n try {\n $sql = \"\n select \n c.nro_documento,\n c.nombre,\n c.correo,\n c.telefono_celular,\n p.direccion_entrega,\n p.referencia_entrega,\n p.observacion,\n d.descripcion,\n c.cod_distrito,\n f.descripcion,\n p.importe_total,\n p.fecha_pedido,\n p.nro_pedido,\n p.cantidad_productos,\n p.estado,\n p.id_pedido\n from \n cliente c inner join pedido p\n on\n c.id_cliente = p.id_cliente inner join distrito d\n on\n c.cod_distrito = d.cod_distrito inner join forma_pago f\n on\n f.id_forma_pago = p.id_forma_pago\n where\n p.estado = 'PENDIENTE' and c.id_cliente = '$_SESSION[cliente_id]'; \n \";\n $sentencia = $this->dblink->prepare($sql);\n $sentencia->execute();\n $resultado = $sentencia->fetchAll(PDO::FETCH_ASSOC);\n return $resultado;\n } catch (Exception $exc) {\n throw $exc;\n }\n }", "function setComprobantePagoARegistroPago() {\n\t\tglobal $bd;\t\t\n\t\tglobal $x_correlativo_comprobante;\n\t\t$correlatico_comprobante = $x_correlativo_comprobante;\n\t\t$x_array_comprobante = $_POST['p_comprobante'];\n\t\t$id_registro_pago = $_POST['idregistro_pago'];\n\n\t\t$idtipo_comprobante_serie = $x_array_comprobante['idtipo_comprobante_serie'];\n\t\t\n\t\t$sqlrp=\"update registro_pago set idtipo_comprobante_serie=\".$idtipo_comprobante_serie.\" where idregistro_pago=\".$id_registro_pago;\n\t\t$idregistro_pago=$bd->xConsulta_NoReturn($sqlrp);\n\t}", "public function index()\n {\n /* $permisos = Permiso::where('user_id', $user->id)->orderBy('created_at', 'ASC')->paginate(10);\n return view('/permisos', compact('permisos', 'user'));\n $permiso [] = DB::table('permisos')->pluck('user_id');\n $user= User::where('id', $permiso);\n return view('dir.permisos.index', compact('user'))->with('permisos', Permiso::paginate(10));\n //return $permiso;*/\n $datas = DB::table('permisos as P')\n ->select('P.fecha_ausencia', 'P.tipo', 'P.created_at', 'P.cargo', 'P.aprobado', 'U.nombre', 'U.id','P.id as pid')\n ->where('aprobado', 0)\n ->join('users as U', 'U.id', '=', 'P.user_id')\n ->orderBy('P.created_at', 'DESC')\n ->paginate(10);\n return view('dir.permisos.index', compact('datas'));\n }", "function perfiles($acceso){\n\t$acceso->objeto->ejecutarSql(sql(\"modulo ORDER BY nombremodulo\"));\t\n\treturn seguridadPerfil($acceso);\n}", "function agenda_liste_paginer($id_agenda=0, $annee_choisie=0, $mois_choisi=0, $filtre='-1', $separateur='&nbsp;|&nbsp;', $ancre=NULL, $tri='normal') {\n\tstatic $count_page = 0;\n\n\tif ($id_agenda == 0)\n\t\treturn $count_page;\n\n\t$evenements = agenda_recenser_evenement(0);\n\t$count_evt = count($evenements);\n\n\t$pagination = NULL;\n\tif ($count_evt == 0)\n\t\treturn $pagination;\n\n\tif ($ancre)\n\t\t$pagination .= '<a class=\"ancre\" name=\"pagination_'.$ancre.'\" id=\"pagination_'.$ancre.'\"></a>';\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\t}\n\n\n\t$annee_courante = 0;\n\t$nouvelle_annee = FALSE;\n\t$count_page = 0;\n\n\tfor ($i=1;$i<=$count_evt;$i++) {\n\t\t$j = ($tri == 'inverse') ? $count_evt - $i + 1 : $i;\n\t\tif (($filtre == '-1') || \n\t\t\t(($filtre == '0') && (!$evenements[$j]['categorie'])) ||\n\t\t\t(($filtre != '-1') && ($filtre != '0') && (preg_match(\"/<$filtre>/\",$evenements[$j]['categorie']) > 0))) {\n\n\n\t\t\t$annee_redac = $evenements[$j]['saison'];\n\t\t\t$annee_evt = $evenements[$j]['annee'];\n\t\t\t$mois_evt = $evenements[$j]['mois'];\n\t\t\tif ($annee_redac != $annee_courante) {\n\t\t\t\t$nouvelle_annee = TRUE;\n\t\t\t\t$count_page += 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$nouvelle_annee = FALSE;\n\t\t\t}\n\n\t\t\tif ($nouvelle_annee) {\n\t\t\t\tif ($annee_courante != 0) {\n\t\t\t\t\t$pagination .= $separateur;\n\t\t\t\t}\n\t\t\t\tif ($annee_redac == $annee_choisie) {\n\t\t\t\t\t$pagination .= '<span class=\"on\">'.$evenements[$j]['lien_page'].'</span>';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$arg_option = NULL;\n\t\t\t\t\tif ($filtre != '-1') $arg_option = '&amp;categorie='.$filtre;\n\t\t\t\t\tif ($ancre) $arg_option .= '#pagination_'.$ancre;\n\t\t\t\t\tif (intval($debut_saison) != 1) $annee_evt = (intval($mois_evt) < intval($debut_saison)) ? strval(intval($annee_evt)-1) : $annee_evt;\n\t\t\t\t\t$pagination .= '<a class=\"ajax\" href=\"spip.php?page=agenda&amp;id_rubrique='.$contexte_aff['id_rubrique'].'&amp;annee='.$annee_evt.'&amp;mois='.$debut_saison.$arg_option.'\">'.$evenements[$j]['lien_page'].'</a>';\n\t\t\t\t}\n\t\t\t$annee_courante = $annee_redac;\n\t\t\t}\n\t\t}\n\t}\n\treturn $pagination;\n}", "public function show($id)\n {\n $mob = Mobiliarios::find($id);\n //Pagos\n $montoTotal = Pagos::where('mobiliario_id',$id)->sum('monto');\n $interTotal = Pagos::where('mobiliario_id',$id)->sum('interes');\n $moraTotal = Pagos::where('mobiliario_id',$id)->sum('mora');\n $cuotas = Pagos::where('mobiliario_id',$id)->count();\n $cuotasc = Pagos::where('mobiliario_id',$id)->where('caja_id', '>',0)->count();\n $cuotasb = Pagos::where('mobiliario_id',$id)->where('banco_id', '>',0)->count();\n $pagoss = Pagos::where('mobiliario_id',$id)->orderBy('created_at','asc')->get();\n $listac = Pagos::where('mobiliario_id',$id)->where('caja_id', '>',0)->orderBy('created_at','asc')->paginate(8);\n $listab = Pagos::where('mobiliario_id',$id)->where('banco_id', '>',0)->orderBy('created_at','asc')->paginate(8);\n $cc = Pagos::where('mobiliario_id',$id)->where('caja_id', '>',0)->sum('monto');\n $cb = Pagos::where('mobiliario_id',$id)->where('banco_id', '>',0)->sum('monto');\n $ic = Pagos::where('mobiliario_id',$id)->where('caja_id', '>',0)->sum('interes');\n $ib = Pagos::where('mobiliario_id',$id)->where('banco_id', '>',0)->sum('interes');\n $mc = Pagos::where('mobiliario_id',$id)->where('caja_id', '>',0)->sum('mora');\n $mb = Pagos::where('mobiliario_id',$id)->where('banco_id', '>',0)->sum('mora');\n //Reparaciones\n $totalreparacion = Reparaciones::where('mobiliario_id',$id)->count();\n $reparar = Reparaciones::where('mobiliario_id',$id)->orderBy('fecha_deposito','asc')->paginate(8);\n $totreparc = Reparaciones::where('mobiliario_id',$id)->where('credito',true)->count();\n $valreparc = Reparaciones::where('mobiliario_id',$id)->where('credito',true)->sum('precio');\n $totreparn = Reparaciones::where('mobiliario_id',$id)->where('credito',false)->count();\n $valreparn = Reparaciones::where('mobiliario_id',$id)->where('credito',false)->sum('precio');\n $ivatotal = Reparaciones::where('mobiliario_id',$id)->sum('iva');\n\n $totpagorep = Reparaciones::join('pagoreparaciones','reparaciones.id','=','pagoreparaciones.reparacion_id')->where('mobiliario_id', $id)->count();\n $prereptot = Reparaciones::join('pagoreparaciones','reparaciones.id','=','pagoreparaciones.reparacion_id')->where('mobiliario_id', $id)->sum('monto');\n $pagosp = Reparaciones::join('pagoreparaciones','reparaciones.id','=','pagoreparaciones.reparacion_id')->where('mobiliario_id', $id)->get();\n $totalc = $cc + $ic + $mc;\n $totalb = $cb + $ib + $mb;\n $valtotal = $valreparn + $valreparc;\n $hoy = Carbon::now();\n return view('Mobiliarios.show',\n compact(\n 'mob',\n 'montoTotal',\n 'interTotal',\n 'cuotas',\n 'moraTotal',\n 'pagoss',\n 'cuotasc',\n 'cuotasb',\n 'listac',\n 'listab',\n 'totalc',\n 'totalb',\n 'cc',\n 'cb',\n 'ic',\n 'ib',\n 'mc',\n 'mb',\n 'totalreparacion',\n 'reparar',\n 'totreparn',\n 'totreparc',\n 'valreparc',\n 'valreparn',\n 'valtotal',\n 'totpagorep',\n 'prereptot',\n 'ivatotal',\n 'pagosp',\n 'hoy'\n ));\n }", "function ListaCuentasxpagarInactivas() {\n\n\t$sql = \"SELECT a.id, a.descripcion, a.fecha, a.total, b.descripcion AS nombre_proveedor\n\t\t\tFROM cuentaxpagar a\n\t\t\tINNER JOIN proveedor b ON a.proveedor_id = b.id\n\t\t\tWHERE a.estado = 'PAGADO'\";\n\n\t$db = new conexion();\n\t$result = $db->consulta($sql);\n\t$num = $db->encontradas($result);\n\n\t$respuesta->datos = [];\n\t$respuesta->mensaje = \"\";\n\t$respuesta->codigo = \"\";\n\n\tif ($num != 0) {\n\t\tfor ($i=0; $i < $num; $i++) {\n\t\t\t$respuesta->datos[] = mysql_fetch_array($result);\n\t\t}\n\n\t\t$respuesta->mensaje = \"Ok\";\n\t\t$respuesta->codigo = 1;\n\t} else {\n\t\t$respuesta->mensaje = \"No existen registros de cuentas por pagar!\";\n\t\t$respuesta->codigo = 0;\n\t}\n\n\treturn json_encode($respuesta);\n}", "public static function obtenerPagados(){\n $criteria = new CDbCriteria;\n $criteria->condition = 'estado = '.self::ORDER_OPEN.' OR estado = '.self::ORDER_CLOSED;\n //Ademas de los pagados agrego los pendientes de pagar con transferencia\n //.' || (estado = '.self::ORDER_OPEN.' AND id_medio_pago = 3)';\n return PedidoOnline::model()->findAll($criteria);\n }", "public function pagomesalum(Request $request)\n {\n $hoy = Carbon::now();\n $today = $hoy->format('Y-m-d');\n $mesactual = $hoy->format('m');\n\n //id del alumno\n $id = $request->id_alum;\n //sacamos informacion de nivel por el costo \n $infoa = Alumnos::where('id', $id)->first();\n $nivel = Nivel::find($infoa->nivel);\n $costoN = $nivel->costo;\n $Pagoinscripcion = Pagos::where('id_usuario', $infoa->id)->where('id_nivel', $infoa->nivel)->where('tipo', 1)->first();\n $Pagocolegiatura = Pagos::where('id_usuario', $infoa->id)->where('id_nivel', $infoa->nivel)->where('tipo', 2)->orderBy('id', 'desc')->first();\n $montoInscripcion = $Pagoinscripcion->monto;\n if ($Pagocolegiatura != null) {\n $montoColegiatura = $Pagocolegiatura->monto;\n $idPagoColegiatura = $Pagocolegiatura->id;\n $idEstatusp = $Pagocolegiatura->estatus;\n $ultimoM = $Pagocolegiatura->mes;\n } else {\n $montoColegiatura = null;\n $idPagoColegiatura = null;\n $idEstatusp = null;\n $ultimoM = null;\n }\n $idPagoInscripcion = $Pagoinscripcion->id;\n $primer_pago = Carbon::createFromFormat('d/m/Y', $nivel->finicio)->format('m');\n\n $ultimo_pago = Carbon::createFromFormat('d/m/Y', $nivel->ffin)->format('m');\n\n //calculando meses de nivel\n $start = date($nivel->finicio);\n $inicio = 'd/m/Y';\n\n $end = date($nivel->ffin);\n $fin = 'd/m/Y';\n\n $finicio = Carbon::createFromFormat($inicio, $start);\n $ffin = Carbon::createFromFormat($fin, $end);\n\n $meses = $finicio->diffInMonths($ffin) + 1;\n\n $CostoC = $meses * $costoN;\n // //sacamos registro del ultimo pago\n // $info = Pagos::where('id_usuario',$id)->where('id_nivel',$nivel->id)->where('tipo',2)->orderBy('id','desc')->first();\n\n // // $info2 = Pagos::where('id_usuario',$id)->where('id_nivel',$nivel->id)->where('tipo',1)->orderBy('id','desc')->first();\n\n\n // if($info == null){\n // $numeroinf = 0;\n // }else{\n // $numeroinf = 1;\n // }\n\n // if($numeroinf != 0){\n // $mp = Carbon::parse($info->fecha_pago);\n // $mes_pago = $mp->format('m');\n // }\n\n\n //lo que el usuario teclea\n $abono = $request->pago;\n $inscripcionR = $request->debeinsc;\n // si el abono es igual ala colegiatura le pone estatus 1 si no 2\n // if($abono == $costoN){\n // $estatus = 1; \n // }else{\n // $estatus = 2;\n // }\n\n\n ///////////////////////////////////////////////////////// pago nuevo\n\n if ($inscripcionR == null) {\n } else {\n $this->inscripcionupdate($inscripcionR, $montoInscripcion, $idPagoInscripcion, $mesactual, $today, $id, $nivel->id);\n //si no se captura colegiatura\n }\n\n $this->abonoupdate($abono, $montoColegiatura, $idPagoColegiatura, $idEstatusp, $mesactual, $ultimoM, $today, $id, $nivel->id, $CostoC, $primer_pago, $ultimo_pago, $costoN);\n\n\n\n\n\n\n ///////////////////////////////////////////////////////// pago anterior\n // //pagar primer mes si solo pago inscripcion detecta si algun dato tipo colegiatura\n // if($numeroinf != 0){\n // // si cuando paga es el mismo mes\n // if($info->mes == $mesactual){\n // //y ya esta pagado crea registros de siguiente mes correspondiente\n // if($info->estatus == 1){\n // //si abonado es igual actualiza a 1\n // if(($abono)==$costoN){\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => $estatus,\n // 'monto' => $abono,\n // 'mes' => $info->mes+1,\n // 'tipo' => 2]);\n // return back();\n // }else\n // // si el abono es menor crea con estatus 2\n // if(($abono)<$costoN){\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => $estatus,\n // 'monto' => $abono,\n // 'mes' => $info->mes+1,\n // 'tipo' => 2]);\n // return back();\n // }else\n // // si abono es mayor crea a sts 1 y la diferencia crea registro del siguiente mes\n // if ($abono>$costoN) {\n\n // if(is_int($abono/$costoN) == true){\n // $mesesApagar = $abono/$costoN;\n // $meses_corridos = $info->mes + 1;\n // for ($i=0; $i < $mesesApagar ; $i++) { \n // $aux = 0;\n\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $meses_corridos + $i,\n // 'tipo' => 2]);\n // $aux++;\n // }\n // }else{\n\n // $mesesApagarC= explode(\".\", $abono/$costoN);\n // $numeroMeses = $mesesApagarC[0]+1;\n\n // for ($i=0; $i < $numeroMeses; $i++) { \n // if($i == ($numeroMeses-1)){\n // $residuo = $abono%$costoN;\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 2,\n // 'monto' => $residuo,\n // 'mes' => $info->mes+$numeroMeses,\n // 'tipo' => 2]);\n // }else{\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $info->mes+$i+1,\n // 'tipo' => 2]); \n // }\n // }\n // }\n // }\n // return back();\n // }// si no esta pagado hace condiciones\n // else{ \n // ////////////////////////////////////////////// \n // //si el monto que tenia mas el abonado es igual actualiza a 1\n // if(($abono+$info->monto)==$costoN){\n\n // $pagoupdate = array_merge($request->all(),array(\n // 'fecha_pago' => $today,\n // 'estatus'=>1,\n // 'monto' => ($abono+$info->monto)));\n\n // $pag = Pagos::find($info->id);\n // $pag->update($pagoupdate);\n // return back();\n // }else\n // // si el monto que tenia mas el abonado es menor actualiza monto\n // if(($abono+$info->monto)<$costoN){\n // $pagoupdate = array_merge($request->all(),array(\n // 'fecha_pago' => $today,\n // 'monto' => ($abono+$info->monto)));\n\n // $pag = Pagos::find($info->id);\n // $pag->update($pagoupdate);\n // return back();\n // }else\n // // si el monto que tenia mas el abonado es mayor actualiza a 1 y la diferencia crea registro del siguiente mes\n // if (($abono+$info->monto)>$costoN) {\n // $pagoupdate = array_merge($request->all(),array(\n // 'fecha_pago' => $today,\n // 'estatus'=>1,\n // 'monto' => $costoN));\n // $pag = Pagos::find($info->id);\n // $pag->update($pagoupdate);\n\n // $faltante = $costoN - $info->monto;\n // $abonado2 = $abono - $faltante;\n // if(is_int($abonado2/$costoN) == true){\n // $mesesApagar = $abonado2/$costoN;\n // $meses_corridos = $info->mes + 1;\n // for ($i=0; $i < $mesesApagar ; $i++) { \n // $aux = 0;\n\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $meses_corridos + $i,\n // 'tipo' => 2]);\n // $aux++;\n // }\n // }else{\n\n // $mesesApagarC= explode(\".\", $abonado2/$costoN);\n // $numeroMeses = $mesesApagarC[0]+1;\n // //si abonado 2 es menor ala colegitura solo se agrega el reg del lo restante si no agrega registros de meses +\n // if($abonado2<$costoN){\n // $residuo = $abonado2%$costoN;\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 2,\n // 'monto' => $abonado2,\n // 'mes' => $info->mes+$numeroMeses,\n // 'tipo' => 2]);\n // }else{\n // for ($i=0; $i < $numeroMeses; $i++) { \n // if($i == ($numeroMeses-1)){\n // $residuo = $abonado2%$costoN;\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 2,\n // 'monto' => $residuo,\n // 'mes' => $info->mes+$numeroMeses,\n // 'tipo' => 2]);\n // }else{\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $info->mes+$i+1,\n // 'tipo' => 2]); \n // }\n // }\n // }\n\n // }\n // }\n // return back();\n // }\n // ///////////////////////////////////////\n // }// si no es del mismo mes crea la siguiente dependiente del mes\n // else{\n // if($mes_pago == $mesactual && $mes_pago != $info->mes){\n // if($info->estatus == 1){\n // //si abonado es igual actualiza a 1\n // if(($abono)==$costoN){\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => $estatus,\n // 'monto' => $abono,\n // 'mes' => $info->mes+1,\n // 'tipo' => 2]);\n // return back();\n // }else\n // // si el abono es menor crea con estatus 2\n // if(($abono)<$costoN){\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => $estatus,\n // 'monto' => $abono,\n // 'mes' => $info->mes+1,\n // 'tipo' => 2]);\n // return back();\n // }else\n // // si abono es mayor crea a sts 1 y la diferencia crea registro del siguiente mes\n // if ($abono>$costoN) {\n\n // if(is_int($abono/$costoN) == true){\n // $mesesApagar = $abono/$costoN;\n // $meses_corridos = $info->mes + 1;\n // for ($i=0; $i < $mesesApagar ; $i++) { \n // $aux = 0;\n\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $meses_corridos + $i,\n // 'tipo' => 2]);\n // $aux++;\n // }\n // }else{\n\n // $mesesApagarC= explode(\".\", $abono/$costoN);\n // $numeroMeses = $mesesApagarC[0]+1;\n\n // for ($i=0; $i < $numeroMeses; $i++) { \n // if($i == ($numeroMeses-1)){\n // $residuo = $abonado2%$costoN;\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 2,\n // 'monto' => $residuo,\n // 'mes' => $info->mes+$numeroMeses,\n // 'tipo' => 2]);\n // }else{\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $info->mes+$i+1,\n // 'tipo' => 2]); \n // }\n // }\n // }\n // }\n // return back();\n // }else{//\n // //si el monto que tenia mas el abonado es igual actualiza a 1\n // if(($abono+$info->monto)==$costoN){\n\n // $pagoupdate = array_merge($request->all(),array(\n // 'fecha_pago' => $today,\n // 'estatus'=>1,\n // 'monto' => ($abono+$info->monto)));\n\n // $pag = Pagos::find($info->id);\n // $pag->update($pagoupdate);\n // return back();\n // }else\n // // si el monto que tenia mas el abonado es menor actualiza monto\n // if(($abono+$info->monto)<$costoN){\n // $pagoupdate = array_merge($request->all(),array(\n // 'fecha_pago' => $today,\n // 'monto' => ($abono+$info->monto)));\n\n // $pag = Pagos::find($info->id);\n // $pag->update($pagoupdate);\n // return back();\n // }else\n // // si el monto que tenia mas el abonado es mayor actualiza a 1 y la diferencia crea registro del siguiente mes\n // if (($abono+$info->monto)>$costoN) {\n // $pagoupdate = array_merge($request->all(),array(\n // 'fecha_pago' => $today,\n // 'estatus'=>1,\n // 'monto' => $costoN));\n // $pag = Pagos::find($info->id);\n // $pag->update($pagoupdate);\n\n // $faltante = $costoN - $info->monto;\n // $abonado2 = $abono - $faltante;\n // if(is_int($abonado2/$costoN) == true){\n // $mesesApagar = $abonado2/$costoN;\n // $meses_corridos = $info->mes + 1;\n // for ($i=0; $i < $mesesApagar ; $i++) { \n // $aux = 0;\n\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $meses_corridos + $i,\n // 'tipo' => 2]);\n // $aux++;\n // }\n // }else{\n\n // $mesesApagarC= explode(\".\", $abonado2/$costoN);\n // $numeroMeses = $mesesApagarC[0]+1;\n // //si abonado 2 es menor ala colegitura solo se agrega el reg del lo restante si no agrega registros de meses +\n // if($abonado2<$costoN){\n // $residuo = $abonado2%$costoN;\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 2,\n // 'monto' => $abonado2,\n // 'mes' => $info->mes+$numeroMeses,\n // 'tipo' => 2]);\n // }else{\n // for ($i=0; $i < $numeroMeses; $i++) { \n // if($i == ($numeroMeses-1)){\n // $residuo = $abonado2%$costoN;\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 2,\n // 'monto' => $residuo,\n // 'mes' => $info->mes+$numeroMeses,\n // 'tipo' => 2]);\n // }else{\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $info->mes+$i+1,\n // 'tipo' => 2]); \n // }\n // }\n // }\n\n // }\n // }\n // return back(); \n // }//\n\n // }else{\n // //pago mes normal correspondiente\n // Pagos::create(\n // ['id_usuario' => $id,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => $estatus,\n // 'monto' => $abono,\n // 'mes' => $hoy->format('m'),\n // 'tipo' => 2]);\n // return back();\n // }\n // }\n // }else{\n // //si no crea registro del primer mes de colegiatura\n // //si el curso ya empezo y paga un mes despues o dependiendo guarda el mes que entra\n // if($primer_pago >= $mesactual){\n // if(($abono)==$costoN){\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => $estatus,\n // 'monto' => $abono,\n // 'mes' => $primer_pago,\n // 'tipo' => 2]);\n // return back();\n // }else\n // // si el abono es menor crea con estatus 2\n // if(($abono)<$costoN){\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => $estatus,\n // 'monto' => $abono,\n // 'mes' => $primer_pago,\n // 'tipo' => 2]);\n // return back();\n // }else\n // // si abono es mayor crea a 1 y la diferencia crea registro del siguiente mes\n // if (($abono)>$costoN) {\n\n // if(is_int($abono/$costoN) == true){\n // $mesesApagar = $abono/$costoN;\n // $meses_corridos = $info2->mes;\n // for ($i=0; $i < $mesesApagar ; $i++) { \n // $aux = 0;\n\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $meses_corridos + $i,\n // 'tipo' => 2]);\n // $aux++;\n // }\n // }else{\n\n // $mesesApagarC= explode(\".\", $abono/$costoN);\n // $numeroMeses = $mesesApagarC[0]+1;\n\n // for ($i=0; $i < $numeroMeses; $i++) { \n // if($i == ($numeroMeses-1)){\n // $residuo = $abono%$costoN;\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 2,\n // 'monto' => $residuo,\n // 'mes' => $info2->mes+($numeroMeses-1),\n // 'tipo' => 2]);\n // }else{\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $info2->mes+$i,\n // 'tipo' => 2]); \n // }\n // }\n // }\n // }\n // return back();\n\n // }else{\n // if(($abono)==$costoN){\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => $estatus,\n // 'monto' => $abono,\n // 'mes' => $mesactual,\n // 'tipo' => 2]);\n // return back();\n // }else\n // // si el abono es menor crea con estatus 2\n // if(($abono)<$costoN){\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => $estatus,\n // 'monto' => $abono,\n // 'mes' => $mesactual,\n // 'tipo' => 2]);\n // return back();\n // }else\n // // si abono es mayor crea a 1 y la diferencia crea registro del siguiente mes\n // if (($abono)>$costoN) {\n\n // if(is_int($abono/$costoN) == true){\n // $mesesApagar = $abono/$costoN;\n // $meses_corridos = $info2->mes;\n // for ($i=0; $i < $mesesApagar ; $i++) { \n // $aux = 0;\n\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $meses_corridos + $i,\n // 'tipo' => 2]);\n // $aux++;\n // }\n // }else{\n\n // $mesesApagarC= explode(\".\", $abono/$costoN);\n // $numeroMeses = $mesesApagarC[0]+1;\n\n // for ($i=0; $i < $numeroMeses; $i++) { \n // if($i == ($numeroMeses-1)){\n // $residuo = $abonado2%$costoN;\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 2,\n // 'monto' => $residuo,\n // 'mes' => $info2->mes+$numeroMeses,\n // 'tipo' => 2]);\n // }else{\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $info2->mes+$i,\n // 'tipo' => 2]); \n // }\n // }\n // }\n // }\n // return back();\n // }\n // }\n ////////////////////////////////////////////////// fin pago anterior\n }", "function epagoc($mysqli,$fecha,$ref,$monto,$iva,$total,$saldoi,$factu,$mpago,$sfactu,$prov,$folio,$montop,\n $saldof,$cta,$arch=NULL,$comi=NULL,$civa=NULL){\n\t//define los montos de pago\n\t$pagoiva = defiva($monto,$saldoi,$montop);\n\t//definicion del status de pago\n\tif($montop<$saldoi){$status = 90;}else{$status = 99;};\n\t\t\ttry{\n\t\t\t\t$mysqli->autocommit(false);\n\t\t\t//la referencia es oc\n\t\t\t\t$tipoper=0;\n\t\t\t//movimientos de diario\n\t\t\t\t//cargo en salida de efectivo de recursos segun metodo de pago\n\t\t\t\t\t$cuenta1=metpago($mpago);\n\t\t\t\t\t//tipo 0 es debe\n\t\t\t\t\t$tipom1=1;\n\t\t\t\t\toperdiario($mysqli,$cuenta1,$tipoper,$tipom1,$ref,$montop,$fecha,$sfactu,$cta);\n\t\t\t\t//abono a proveedores\n\t\t\t\t\t$cuenta2=\"201.01\";\n\t\t\t\t\t$tipom2=0;\n\t\t\t\t\toperdiario($mysqli,$cuenta2,$tipoper,$tipom2,$ref,$montop,$fecha,$sfactu,$prov);\n\t\t\t\t//abono a iva acreditable por pagar\n\t\t\t\t\t$cuenta3=\"119.01\";\n\t\t\t\t\t$tipom3=1;\n\t\t\t\t\toperdiario($mysqli,$cuenta3,$tipoper,$tipom3,$ref,$pagoiva,$fecha,$sfactu);\n\t\t\t\t//cargo a iva acreditable pagado\n\t\t\t\t\t$cuenta4=\"118.01\";\n\t\t\t\t\t$tipom4=0;\n\t\t\t\t\toperdiario($mysqli,$cuenta4,$tipoper,$tipom4,$ref,$pagoiva,$fecha,$sfactu);\n\t\t\t\t//movimientos de comisiones, si las hay, siempre se factura\n\t\t\t\t\tif($comi!=NULL){\n\t\t\t\t\t //cargo a bancos\n\t\t\t\t\t $cuentacomi=\"102.01\";\n\t\t\t\t\t $tipomc=1;\n\t\t\t\t\t $comitot = $comi+$civa;\n\t\t\t\t\t operdiario($mysqli,$cuentacomi,$tipoper,$tipomc,$ref,$comitot,$fecha,1,NULL,'comisiones banc');\n\t\t\t\t\t //abono a gastos financieros e iva pagado\n\t\t\t\t\t operdiario($mysqli,\"701.10\",$tipoper,0,$ref,$comi,$fecha,1,NULL,'comisiones banc');\n\t\t\t\t\t operdiario($mysqli,\"118.01\",$tipoper,0,$ref,$civa,$fecha,1,NULL,'comisiones banc');\t\t\t\t\t \n\t\t\t\t\t}\n\t\t\t\t//actualizacion de orden de compra\n\t\t\t\t$archm;\n\t\t\t\tif($arch!=NULL){\n\t\t\t\t\t$archm= substr($arch,11);\n\t\t\t\t}else{$archm = NULL;}\n\t\t\t\t\t$mysqli->query(\"UPDATE oc SET status=$status,fechapago='$fecha',saldo=$saldof,factura='$factu',arch='$archm',foliomov='$folio' WHERE idoc='$ref'\");\t\t\t\t\n\t\t\t//efectuar la operacion\n\t\t\t\t$mysqli->commit();\n\t\t\t\t$resul=0;\n\t\t\t}catch (Exception $e) {\n\t\t\t\t\t//error en las operaciones de bd\n\t\t\t\t $mysqli->rollback();\n\t\t\t\t \t$resul=-2;\n\t\t\t\t}\n\treturn $resul;\n}", "public function getPaginated();", "function listarObligacioPagoCombos(){\n $this->objParam->defecto('ordenacion','id_obligacion_pago');\n\n $this->objParam->defecto('dir_ordenacion','asc');\n if($this->objParam->getParametro('tipoReporte')=='excel_grid' || $this->objParam->getParametro('tipoReporte')=='pdf_grid'){\n $this->objReporte = new Reporte($this->objParam, $this);\n $this->res = $this->objReporte->generarReporteListado('MODObligacionPago','listarObligacioPagoCombos');\n } else{\n $this->objFunc=$this->create('MODObligacionPago');\n $this->res=$this->objFunc->listarObligacioPagoCombos();\n }\n\n /*if($this->objParam->getParametro('_adicionar')!=''){\n\n $respuesta = $this->res->getDatos();\n\n array_unshift ( $respuesta, array( 'id_proveedor'=>'0',\n 'rotulo_comercial'=>'Todos', 'desc_proveedor'=>'Todos'\n ));\n //\t\tvar_dump($respuesta);\n $this->res->setDatos($respuesta);\n }*/\n\n $this->res->imprimirRespuesta($this->res->generarJson());\n }", "public function militaresPorPostoGraduacaoDaOMeOMSubordAministrativamentePag($codOM, $postoGraduacao, $linha_inicial, $linhas_por_pagina, $buscaNIP, $buscaPessoa, $tipo)\n {\n $buscaNIP = Helper::formataNipsSemPontos($buscaNIP);\n $resultado = array();\n $stmt = $this->dao->militaresPorPostoGraduacaoDaOMeOMSubordAministrativamentePag($codOM, $postoGraduacao, $linha_inicial, $linhas_por_pagina, $buscaNIP, $buscaPessoa, $tipo);\n \n // var_dump($codOM, $postoGraduacao, $linha_inicial, $linhas_por_pagina, $buscaNIP, $buscaPessoa);\n $lista = array();\n while ($row = $stmt->fetch()) {\n \n $mil = new Militar($row->NRONIP);\n $mil->setNipCodficado(Helper::encrypt($row->NRONIP));\n $mil->setNomeGuerra(utf8_encode($row->NOMEGUERRA));\n $mil->setNomePessoa(utf8_encode($row->NOMPESSOA));\n // Posto/Grad\n $mil->getPatente()->setCodCorpo($row->CODCORPO);\n $mil->getPatente()->setQuadro($row->QUADRO);\n $mil->getPatente()->setCodPostoGraduacao($row->CODPOSTOGRADUACAO);\n $mil->getPatente()->setAperfeicoamento($row->APERFEICOAMENTO);\n $mil->getPatente()->setEspecialidade($row->ESPECIALIDADE);\n $mil->getPatente()->setPge($row->PGE);\n // OM\n $mil->getOm()->setCodOM($row->CODOM);\n $mil->getOm()->setNomeOM(utf8_encode($row->NOMOM));\n $mil->getOm()->setNomeAbreviado(utf8_encode($row->NOMABREVIADO));\n \n $lista[] = $mil;\n }\n \n // return $resultado;\n return $lista;\n }", "private function telaPerfilGerente()\r\n {\r\n //Carregando as lojas do banco de dados\r\n $repositorio = $this->getDoctrine()->getRepository('DCPBundle:Quebra');\r\n\r\n $sql = $repositorio->createQueryBuilder('l')\r\n ->select('l.id')\r\n ->groupby('l.id')\r\n ->getquery();\r\n\r\n $resultado = $sql->getResult();\r\n\r\n $loja = array();\r\n $contLoja = 0;\r\n foreach($resultado as $data)\r\n {\r\n if (!in_array($data, $loja))\r\n {\r\n $loja[$contLoja] = $data[\"id\"];\r\n $contLoja++;\r\n }\r\n }\r\n \r\n return $loja;\r\n }", "function identificar_pago_cli_mercantil($acceso,$id_cuba,$abrev_cuba){\n\t$acceso2=conexion();\n\t\n\t\tsession_start();\n\t\t$ini_u = $_SESSION[\"ini_u\"]; \n\t\tif($ini_u==''){\n\t\t\t$ini_u =\"AA\";\n\t\t}\n\t$acceso->objeto->ejecutarSql(\"select *from pagodeposito where (id_pd ILIKE '$ini_u%') ORDER BY id_pd desc\"); \n\t$id_pd = $ini_u.verCoo($acceso,\"id_pd\");\n\t$login = $_SESSION[\"login\"]; \n\t$fecha= date(\"Y-m-d\");\n\t$hora= date(\"H:i:s\");\n\t\n\t$palabra_clave='DEPOSITO EN EFECTIVO';\n\t$palabra_clave1='DEPO-FACIL ELECTRONICO';\n\t//ECHO \" select * from vista_tablabancos where id_cuba='$id_cuba' and descrip_tb ilike 'REC. INT. CARGO CUENTA%'\";\n\t$acceso2->objeto->ejecutarSql(\" select * from vista_tablabancos where id_cuba='$id_cuba' and (descrip_tb ilike '$palabra_clave%' or descrip_tb ilike '$palabra_clave1%' )AND (Status_tb='REGISTRADO' or status_tb='NO RELACIONADO')order by id_tb \");\n\t\twhile($row=row($acceso2)){\n\t\t\t$abrev_cuba=trim($row[\"abrev_cuba\"]);\n\t\t\t$id_tb=trim($row[\"id_tb\"]);\n\t\t\t//echo \"<br>$abrev_cuba:\";\n\t\t\t$fecha_tb=trim($row[\"fecha_tb\"]);\n\t\t\t$referencia_tb=trim($row[\"referencia_tb\"]);\n\t\t\t$monto_tb=trim($row[\"monto_tb\"]);\n\t\t\t$descrip_tb=trim($row[\"descrip_tb\"]);\n\t\t\t$valor=explode($palabra_clave,$descrip_tb);\n\t\t\t$ini=substr($referencia_tb, 0, 3);\n\t\t\t$nro_contrato='00000000000000000000000000';\n\t\t\t//echo \"<br>:$referencia_tb:\";\n\t\t\t//if($ini=='000'){\n\t\t\t\t//$nro_contrato=\t$ano=substr($referencia_tb, 3, 8);\n\t\t\t\t$nro_contrato=\t$referencia_tb;\n\t\t\t\tif(strlen($nro_contrato)!=8 && strlen($nro_contrato)!=7){\n\t\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//\techo \"<br>nro_contrato:$nro_contrato:\";\n\t\t\t//}\n\t\t\t//echo \"<br>$referencia_tb: select * from contrato where nro_contrato ilike '%$nro_contrato%' \";\n\t\t\t$acceso->objeto->ejecutarSql(\" select * from contrato where nro_contrato ilike '%$nro_contrato%' \");\n\t\t\tif($row=row($acceso)){\n\t\t\t\t$id_contrato=trim($row[\"id_contrato\"]);\n\t\t\t\t$acceso->objeto->ejecutarSql(\"insert into pagodeposito(id_pd,id_contrato,fecha_reg,hora_reg,login_reg,fecha_dep,banco,numero_ref,status_pd,tipo_dt,monto_dep,obser_p,id_tb,fecha_conf,hora_conf,login_conf) values \n\t\t\t\t('$id_pd','$id_contrato','$fecha','$hora','$login','$fecha_tb','$id_cuba','$referencia_tb','CONFIRMADO','DEPOSITO','$monto_tb','$descrip_tb','$id_tb','$fecha','$hora','$login')\");\t\n\t\t\t\t$acceso->objeto->ejecutarSql(\"update tabla_bancos set status_tb='CONCILIADO' , tipo_tb='CLIENTES' where id_tb='$id_tb'\");\t\n\t\t\t\t$id_pd=$ini_u.verCoo_inc($acceso,$id_pd);\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$acceso->objeto->ejecutarSql(\"update tabla_bancos set status_tb='NO RELACIONADO', tipo_tb='CLIENTES' where id_tb='$id_tb'\");\t\n\t\t\t}\n\t\t}\n\treturn $cad;\t\n}", "public function formaPagamento($idpedido){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT a.nome,b.* FROM tbclientes a, tbpedidos b where a.reg = b.reg and idpedido = '$idpedido' \";\n $sql = $this->conexao->query($sql);\n $row = $sql->fetch_assoc();\n $dados = array();\n\n $dado = array();\n $dado['nome'] = $row['nome'];\n $dado['idpedido'] = $row['idpedido'];\n $dado['comanda'] = $row['comanda'];\n $dado['reg'] = $row['reg'];\n $dado['status'] = $row['status'];\n $dado['valor'] = number_format($row['valor'],2, \",\", \".\");\n $dado['tipo'] = $row['tipo'];\n $dado['titulo'] = strtoupper($row['titulo']);\n $dado['comanda'] = $row['comanda'];\n $dados[] = $dado;\n\n return $dados;\n\n }", "public function ObtenerPagina($aiPaginaActual = 1, $aiItemsPorPagina = 10, $asCampoOrdenacion = \"\", $asTipoOrdenacion = \"\")\n\t{\n\t\treturn $this->_db->ProyectosArchivosObtenerPagina($this->_WherePDO, $aiPaginaActual, $aiItemsPorPagina, $asCampoOrdenacion, $asTipoOrdenacion);\n\t}", "protected function buildPagination() {}", "protected function buildPagination() {}", "public function RelatorioContasPagarEmissao($where,$dtemi){\n\t\t\t\t\n\t\t$dba = $this->dba;\n\n\t\t$vet = array();\n\n\n\t\t$sql =\"SELECT \n\t\t\t\td.emissao,\n\t\t\t\td.vencimento,\n\t\t\t\td.numero,\n\t\t\t\tsum(d.valordoc) as valordoc,\n\t\t\t\td.numero_nota,\n\t\t\t\tf.codigo,\n\t\t\t\tf.nome\n\t\t\tFROM\n\t\t\t\tduplic d\n\t\t\t\t\tinner join\n\t\t\t\tfornecedores f ON (f.codigo = d.cedente)\n\t\t\t\".$where.\" and d.emissao = '\".$dtemi.\"'\n\t\t\tgroup by d.numero , d.numero_nota , d.emissao , f.codigo , f.nome , d.tipo,d.vencimento\";\n\t\t\n\t\t$res = $dba->query($sql);\n\n\t\t$num = $dba->rows($res); \n\n\t\t$i = 0;\n\t\t\t\n\t\twhile($dup = ibase_fetch_object($res)){\t\t\n\t\t\t\n\t\t\t$numero = $dup->NUMERO;\n\t\t\t$valordoc = $dup->VALORDOC;\n\t\t\t$numnota = $dup->NUMERO_NOTA;\n\t\t\t$emissao\t = $dup->EMISSAO;\n\t\t\t$codfor = $dup->CODIGO;\n\t\t\t$nomfor = $dup->NOME;\t\t\t\t\t\n\t\t\t$vencimento = $dup->VENCIMENTO;\n\t\t\t\n\t\t\t$duplic = new Duplic();\t\t\t\n\n\t\t\t$duplic->setNumero($numero);\n\t\t\t$duplic->setValorDoc($valordoc);\n\t\t\t$duplic->setNumeroNota($numnota);\n\t\t\t$duplic->setCodFornecedor($codfor);\n\t\t\t$duplic->setNomeFornevedor($nomfor);\n\t\t\t$duplic->setEmissao($emissao);\n\t\t\t$duplic->setVencimento($vencimento);\n\t\t\t\n\t\t\t$vet[$i++] = $duplic;\n\n\t\t}\n\n\t\treturn $vet;\n\n\t}", "public function listarFormasPagamento($idpedido){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT * FROM tbpedido_pagamento c,tbformas_pagamento b where c.idpedido = '$idpedido' and c.forma = b.idforma_pagamento; \";\n $sql = $this->conexao->query($sql);\n \n $dados = array();\n\n // $troco = number_format($row['troco'],2,\",\", \".\");\n \n if (mysqli_num_rows($sql) > 0) {\n\n while ($row = $sql->fetch_assoc()){\n $valor = number_format($row['valor'], 2, \",\", \".\");\n $dado = array();\n $dado['forma'] = $row['forma'];\n $dado['forma_descricao'] = $row['forma_descricao'];\n // $dado['troco'] = $troco;\n $dado['status'] = $row['status'];\n $dado['valor'] = $valor;\n $dado['idforma'] = $row['idforma'];\n $dado['idpedido'] = $row['idpedido'];\n $dados[] = $dado;\n\n }\n\n\n }\n\n\n return $dados;\n\n }", "public function buscarPorFavoritos($pagina = 1 , $elementos_por_pagina = 5 ){\n\n $query = $this->createQueryBuilder('m')\n ->where('m.favorito = true')\n ->orderBy('m.creado' , 'DESC')\n ->addOrderBy('m.nombre' , 'ASC')\n ->getQuery();\n\n return $this->paginacion($query , $pagina , $elementos_por_pagina);\n\n }", "function findAllOrdersDescPaginated();", "public function Carregar_Pagina()\r\n {\r\n if (Controller_Header_Usuario::Verificar_Autenticacao()) {\r\n $status = Controller_Header_Usuario::Verificar_Status_Usuario();\r\n if ($status != 0) {\r\n $view = new View_Meu_Plano($status);\r\n \r\n $planos = DAO_Plano::BuscarTodos();\r\n \r\n if (!empty($planos) AND $planos != false) {\r\n $view->set_planos($planos);\r\n }\r\n \r\n $view->set_plano_id(Login_Session::get_entidade_plano());\r\n \r\n $view->Executar();\r\n }\r\n return $status;\r\n } else {\r\n return false;\r\n }\r\n }", "public function listar_productosMayorMenor($ordenar_producto, $p_id_seccion) {\n \n try {\n if($ordenar_producto == 1)\n {\n $sql = \"\n select \n distinct p.id_producto, \n p.descripcion,\n p.stock_actual,\n v.precio,\n i.cantidad\n from \n al_producto p inner join precio_venta_producto v\n on\n p.id_producto = v.id_producto left join al_inventario i\n on\n p.id_producto = i.id_producto inner join al_seccion s\n on\n p.id_seccion = s.id_seccion \n where\n p.id_seccion = $p_id_seccion;\n \";\n }\n if($ordenar_producto == 2)\n {\n $sql = \"\n select \n distinct p.id_producto, \n p.descripcion,\n p.stock_actual,\n v.precio,\n i.cantidad\n from \n al_producto p inner join precio_venta_producto v\n on\n p.id_producto = v.id_producto left join al_inventario i\n on\n p.id_producto = i.id_producto inner join al_seccion s\n on\n p.id_seccion = s.id_seccion \n where\n p.id_seccion = $p_id_seccion\n order by\n v.precio desc;\n \";\n }\n if($ordenar_producto == 3)\n {\n $sql = \"\n select \n distinct p.id_producto, \n p.descripcion,\n p.stock_actual,\n v.precio,\n i.cantidad\n from \n al_producto p inner join precio_venta_producto v\n on\n p.id_producto = v.id_producto left join al_inventario i\n on\n p.id_producto = i.id_producto inner join al_seccion s\n on\n p.id_seccion = s.id_seccion \n where\n p.id_seccion = $p_id_seccion\n order by\n v.precio asc \n \";\n }\n\n \n $sentencia = $this->dblink->prepare($sql);\n $sentencia->execute();\n $resultado = $sentencia->fetchAll(PDO::FETCH_ASSOC);\n return $resultado;\n } catch (Exception $exc) {\n throw $exc;\n }\n }", "function bajarPagina($id, $confirmado) {\n global $textos;\n\n $pagina = new Pagina($id);\n $destino = \"/ajax\" . $pagina->urlBase . \"/down\";\n $respuesta = \"\";\n\n if (!$confirmado) {\n $titulo = HTML::frase($pagina->titulo, \"negrilla\");\n $titulo = preg_replace(\"/\\%1/\", $titulo, $textos->id(\"CONFIRMAR_MODIFICACION\"));\n $codigo = HTML::campoOculto(\"procesar\", \"true\");\n $codigo .= HTML::campoOculto(\"id\", $id);\n $codigo .= HTML::parrafo($titulo);\n $codigo .= HTML::parrafo(HTML::boton(\"chequeo\", $textos->id(\"ACEPTAR\")), \"margenSuperior\");\n $codigo = HTML::forma($destino, $codigo);\n\n $respuesta[\"generar\"] = true;\n $respuesta[\"codigo\"] = $codigo;\n $respuesta[\"destino\"] = \"#cuadroDialogo\";\n $respuesta[\"titulo\"] = $textos->id(\"MODIFICAR_PAGINA\");\n $respuesta[\"ancho\"] = 200;\n $respuesta[\"alto\"] = 120;\n } else {\n\n if ($pagina->bajar()) {\n $respuesta[\"error\"] = false;\n ;\n $respuesta[\"accion\"] = \"recargar\";\n } else {\n $respuesta[\"error\"] = true;\n $respuesta[\"mensaje\"] = $textos->id(\"ERROR_DESCONOCIDO\");\n }\n }\n\n Servidor::enviarJSON($respuesta);\n}", "function listarSolicitudObligacionPagoSol()\r\n {\r\n $this->procedimiento = 'tes.ft_solicitud_obligacion_pago_sel';\r\n $this->transaccion = 'TES_SOOBPGSOL_SEL';\r\n $this->tipo_procedimiento = 'SEL';//tipo de transaccion\r\n\r\n $this->setParametro('id_funcionario_usu', 'id_funcionario_usu', 'int4');\r\n $this->setParametro('tipo_interfaz', 'tipo_interfaz', 'varchar');\r\n\r\n //Definicion de la lista del resultado del query\r\n $this->captura('id_obligacion_pago', 'int4');\r\n $this->captura('id_proveedor', 'int4');\r\n $this->captura('desc_proveedor', 'varchar');\r\n $this->captura('estado', 'varchar');\r\n $this->captura('tipo_obligacion', 'varchar');\r\n $this->captura('id_moneda', 'int4');\r\n $this->captura('moneda', 'varchar');\r\n $this->captura('obs', 'varchar');\r\n $this->captura('porc_retgar', 'numeric');\r\n $this->captura('id_subsistema', 'int4');\r\n $this->captura('nombre_subsistema', 'varchar');\r\n $this->captura('id_funcionario', 'int4');\r\n $this->captura('desc_funcionario1', 'text');\r\n $this->captura('estado_reg', 'varchar');\r\n $this->captura('porc_anticipo', 'numeric');\r\n $this->captura('id_estado_wf', 'int4');\r\n $this->captura('id_depto', 'int4');\r\n $this->captura('nombre_depto', 'varchar');\r\n $this->captura('num_tramite', 'varchar');\r\n $this->captura('id_proceso_wf', 'int4');\r\n $this->captura('fecha_reg', 'timestamp');\r\n $this->captura('id_usuario_reg', 'int4');\r\n $this->captura('fecha_mod', 'timestamp');\r\n $this->captura('id_usuario_mod', 'int4');\r\n $this->captura('usr_reg', 'varchar');\r\n $this->captura('usr_mod', 'varchar');\r\n $this->captura('fecha', 'date');\r\n $this->captura('numero', 'varchar');\r\n $this->captura('tipo_cambio_conv', 'numeric');\r\n $this->captura('id_gestion', 'integer');\r\n $this->captura('comprometido', 'varchar');\r\n $this->captura('nro_cuota_vigente', 'numeric');\r\n $this->captura('tipo_moneda', 'varchar');\r\n $this->captura('total_pago', 'numeric');\r\n $this->captura('pago_variable', 'varchar');\r\n $this->captura('id_depto_conta', 'integer');\r\n $this->captura('total_nro_cuota', 'integer');\r\n $this->captura('fecha_pp_ini', 'date');\r\n $this->captura('rotacion', 'integer');\r\n $this->captura('id_plantilla', 'integer');\r\n $this->captura('desc_plantilla', 'varchar');\r\n $this->captura('desc_funcionario', 'text');\r\n $this->captura('ultima_cuota_pp', 'numeric');\r\n $this->captura('ultimo_estado_pp', 'varchar');\r\n $this->captura('tipo_anticipo', 'varchar');\r\n $this->captura('ajuste_anticipo', 'numeric');\r\n $this->captura('ajuste_aplicado', 'numeric');\r\n $this->captura('monto_estimado_sg', 'numeric');\r\n $this->captura('id_obligacion_pago_extendida', 'integer');\r\n $this->captura('desc_contrato', 'text');\r\n $this->captura('id_contrato', 'integer');\r\n $this->captura('obs_presupuestos', 'varchar');\r\n $this->captura('uo_ex', 'varchar');\r\n\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "private function preparar_texto($texto)\n\t{\n\t\t$desplazamiento=($this->pagina_actual-1)*$this->registros_a_mostrar;\n\t\n\t\t$this->texto=Herramientas::reemplazar_primera_ocurrencia(\"SELECT\", \"SELECT SQL_CALC_FOUND_ROWS\", $texto);\n\t\t$this->texto.=\" LIMIT \".$this->registros_a_mostrar.\" OFFSET \".$desplazamiento;\t\t\n\t}", "public function pagModificar($id) {\n $salidaPlanta= salidaPlanta::findOrFail($id);\n $invernadero= $salidaPlanta->invernadero;\n $invernaderos= invernaderoPlantula::select('id','nombre')->orderBy('nombre', 'asc')->get();\n $fechaSiembraSeleccionada=Carbon::createFromFormat('Y-m-d H:i:s', $salidaPlanta->siembra->fecha);\n\n $siembraSeleccionada = array(\n 'id_siembra'=>$salidaPlanta->id_siembraPlantula,\n 'variedad'=>$salidaPlanta->siembra->variedad,\n 'nombre'=>$salidaPlanta->siembra->cultivo->nombre,\n 'fecha'=>$fechaSiembraSeleccionada->format('d/m/Y')\n );\n\n $siembras = siembraPlantula::where('id_invernaderoPlantula',$salidaPlanta->id_invernaderoPlantula)->orderBy('fecha','desc')->get();\n $siembrasTodas=array();\n foreach ($siembras as $siembra) {\n\n $fechaSiembraToda=Carbon::createFromFormat('Y-m-d H:i:s', $siembra->fecha);\n\n array_push($siembrasTodas,array(\n 'id_siembra' => $siembra->id,\n 'variedad' => $siembra->variedad,\n 'nombre' => $siembra->cultivo->nombre,\n 'fecha' => $fechaSiembraToda->format('d/m/Y'))\n\n );\n }\n\n $fecha=Carbon::createFromFormat('Y-m-d H:i:s', $salidaPlanta->fecha);\n $salidaPlanta->fecha=$fecha->format('d/m/Y');\n\n\n return view('Plantula/SalidaPlanta/modificar')->with([\n 'invernadero' => $invernadero,\n 'siembras' => $siembrasTodas,\n 'siembraSeleccionada' => $siembraSeleccionada,\n 'salidaPlanta' => $salidaPlanta,\n ]);\n }", "public function pagesOnly() {}", "public static function pesquisaTodos($request){\n $externa = \"https://www.seminovosbh.com.br/resultadobusca/index/\";\n\n //Filtro veículo\n if($request->veiculo == \"carro\")\n $externa .= \"veiculo/carro/\";\n if($request->veiculo == \"moto\")\n $externa .= \"veiculo/moto/\";\n if($request->veiculo == \"caminhao\")\n $externa .= \"veiculo/caminhao/\";\n \n //Filtro estado de conservação\n if($request->estado_conservacao == \"0km\")\n $externa .= \"estado-conservacao/0km/\";\n if($request->estado_conservacao == \"seminovo\")\n $externa .= \"estado-conservacao/seminovo/\";\n\n //Filtro de marca e modelo\n $externa .= \"marca/\".$request->marca.\"/\";\n $externa .= \"modelo/\".$request->modelo.\"/\";\n\n //Filtro de cidade\n if(isset($request->cidade))\n $externa .= \"cidade/\".$request->cidade.\"/\";\n \n //Filtro de valores\n if(isset($request->valor1) && isset($request->valor2))\n $externa .= \"valor1/\".$request->valor1.\"/valor2/\".$request->valor2.\"/\";\n \n //Filtro de anos\n if(isset($request->ano1) && isset($request->ano2))\n $externa .= \"ano1/\".$request->ano1.\"/ano2/\".$request->ano2.\"/\";\n \n //Filtro de tipo de usuário\n if($request->usuario == \"particular\")\n $externa .= \"usuario/particular/\";\n else if($request->usuario == \"revenda\")\n $externa .= \"usuario/revenda/\";\n else \n $externa .= \"usuario/todos/\";\n \n //Maior quantidade de registros possíveis\n $externa .= \"qtdpag/50/\";\n\n //Escolhe a página\n if(isset($request->pagina))\n $externa .= \"pagina/\".$request->pagina.\"/\";\n \n //Extrai os dados da página e retira deles a lista de carros resultante\n $resultados = file_get_contents($externa);\n $resultados_filtro = explode('<dd class=\"titulo-busca\">', $resultados);\n unset($resultados_filtro[0]);\n\n //Pega a quantidade total de páginas da consulta\n $aux1 = explode('<strong class=\"total\">', $resultados);\n $aux2 = explode('</strong>', $aux1[1]);\n $totalPaginas = $aux2[0];\n\n //Cria o array que será utilizado como retorno e informa na primeira posição qual a quantidade de páginas para o usuário navegar entre os resultados\n $compilado = array();\n $compilado[0] = array(\"totalpaginas\" => $totalPaginas);\n $i = 1;\n\n //Para cada resultado, separa-se o título e o código do anúncio para utilizar no outro endpoint \n foreach($resultados_filtro as $resultado){\n $resto = explode('</dd>', $resultado);\n $linha = $resto[0];\n\n $arrayCodigo = explode('/', $linha);\n $codigo = $arrayCodigo[1].\"/\".$arrayCodigo[2].\"/\".$arrayCodigo[3].\"/\".$arrayCodigo[4].\"/\".$arrayCodigo[5].\"/\";\n\n $aux1 = explode('<h4>', $linha);\n $aux2 = explode('</h4>', $aux1[1]);\n $titulo = strip_tags($aux2[0]);\n\n $compilado[$i] = array(\"codigo\"=> $codigo, \"titulo\" => $titulo);\n $i++;\n }\n\n return response()->json($compilado, 200);\n }", "public function EliminarProductos($ids)\n {\n $resultado = array();\n $em = $this->getDoctrine()->getManager();\n\n if ($ids != \"\") {\n $ids = explode(',', $ids);\n $cant_total = 0;\n $cant_eliminada = 0;\n foreach ($ids as $producto_id) {\n if ($producto_id != \"\") {\n $cant_total++;\n $entity = $this->getDoctrine()->getRepository('IcanBundle:Producto')\n ->find($producto_id);\n if ($entity != null) {\n\n //Cotizaciones\n $cotizaciones = $this->getDoctrine()->getRepository('IcanBundle:CotizacionProducto')\n ->ListarCotizaciones($producto_id);\n if (count($cotizaciones) == 0) {\n //Eliminar foto\n $foto_eliminar = $entity->getImagen();\n if ($foto_eliminar != \"\") {\n $dir = 'uploads/productos/';\n if (is_file($dir . $foto_eliminar)) {\n unlink($dir . $foto_eliminar);\n //unlink($dir . \"portada-\" . $foto_eliminar);\n //unlink($dir . \"thumb-\" . $foto_eliminar);\n }\n }\n //Eliminar ficha\n $ficha_eliminar = $entity->getFicha();\n if ($ficha_eliminar != \"\") {\n $dir = 'uploads/productos/';\n if (is_file($dir . $ficha_eliminar)) {\n unlink($dir . $ficha_eliminar);\n }\n }\n\n //Eliminar las imagenes\n $productoimagenes = $this->getDoctrine()->getRepository('IcanBundle:ProductoImagen')\n ->ListarImagenes($producto_id);\n foreach ($productoimagenes as $productoimagen) {\n //Eliminar foto\n $foto_eliminar = $productoimagen->getImagen();\n if ($foto_eliminar != \"\") {\n $dir = 'uploads/productos/';\n if (is_file($dir . $foto_eliminar)) {\n unlink($dir . $foto_eliminar);\n //unlink($dir . \"portada-\" . $foto_eliminar);\n //unlink($dir . \"thumb-\" . $foto_eliminar);\n }\n }\n $em->remove($productoimagen);\n }\n\n //Eliminar los productos relacionados\n $relacionados = $this->getDoctrine()->getRepository('IcanBundle:ProductoRelacion')\n ->ListarRelacionados($producto_id);\n foreach ($relacionados as $relacionado) {\n $em->remove($relacionado);\n }\n\n //Eliminar los productos relacionados\n $productorelacionados = $this->getDoctrine()->getRepository('IcanBundle:ProductoRelacion')\n ->ListarProductosRelacionado($producto_id);\n foreach ($productorelacionados as $relacionado) {\n $em->remove($relacionado);\n }\n\n //Eliminar vistas\n $producto_views = $this->getDoctrine()->getRepository('IcanBundle:ProductoView')\n ->ListarViewsDeProducto($producto_id);\n foreach ($producto_views as $producto_view) {\n $em->remove($producto_view);\n }\n\n //Eliminar descuentos\n $descuentos = $this->getDoctrine()->getRepository('IcanBundle:DescuentoProducto')\n ->ListarDescuentos($producto_id);\n foreach ($descuentos as $descuento) {\n $em->remove($descuento);\n }\n\n $em->remove($entity);\n $cant_eliminada++;\n }\n\n }\n }\n }\n }\n $em->flush();\n if ($cant_eliminada == 0) {\n $resultado['success'] = false;\n $resultado['error'] = \"No se pudo eliminar los productos, porque tienen cotizaciones asociadas\";\n } else {\n $resultado['success'] = true;\n\n $mensaje = ($cant_eliminada == $cant_total) ? \"La operación se ha realizado correctamente\" : \"La operación se ha realizado correctamente. Pero atención no se pudo eliminar todos los productos asociados porque tienen cotizaciones asociadas\";\n $resultado['message'] = $mensaje;\n }\n return $resultado;\n }", "public function Comprobarpago($pago) {\n $user = Session::getSession(\"User\");\n if (null != $user) {\n\n $where = \" WHERE Id_pago = '$pago->Id_pago'\";\n $response = $this->db->select1(\"*\", 'pagos', $where, null);\n if (is_array($response)) {\n $response = $response['results'];\n //A qui cargaremos los datos a actualizar \n $value = \"Pago = :Pago, Estatus = :Estatus, Fecha_pago = :Fecha_pago, Proxima_fecha = :Proxima_fecha\";\n $where = \" WHERE Id_pago = '$pago->Id_pago'\";\n //Comprobamos si tenemos datos \n if (0 == count($response)) {\n echo 'Datos erroneos del sistema';\n } else {\n\n $array = array(\n $pago->Pago,\n $pago->Estatus,\n //La fecha actualmente que se esta pagando\n $pago->Fecha_pago,\n //La proxima fecha a que se va a pagar apartir de la ultima fecha que se pago \n $pago->Proxima_fecha,\n );\n\n // print_r($array);\n $data = $this->db->update(\"pagos\", $array, $value, $where);\n // $data = false;\n if (is_bool($data)) {\n //Correcion de datos tengo que agregar un ID\n $value = \"(`Nombre`, `Mes_pago`, `Cantidad`, `Fecha_pagada`, `Folio`)VALUES (:Nombre, :Mes_pago, :Cantidad, :Fecha_pagada, :Folio)\";\n $array = array(\n $pago->Nombre,\n $pago->Mes,\n $pago->Pago,\n $pago->Fecha_pago,\n $pago->Folio\n );\n // print_r($array);\n $data2 = $this->db->insert1(\"catalogo_pagos\", $array, $value);\n\n if (is_bool($data2)) {\n return 0;\n } else {\n return $data2;\n }\n } else {\n\n return $data;\n }\n }\n }\n }\n }", "function getListaPags() {\n\t\t\t\n\t\t$arrPaginas = array();\n\t\t\t\n\t\t$inf = NULL;\n\t\t$sup = NULL;\n\t\t\t\n\t\t$tmp01 = floor($this->listap/2);\n\t\t\t\n\t\t// se o highlight estiver no meio da seleção\n\t\tif ($this->pagina - $tmp01 >= 1 && $this->pagina + $tmp01 <= $this->totalp){\n\t\t\t$inf = $this->pagina-$tmp01;\n\t\t\t$sup = $this->pagina+$tmp01;\n\t\t}\n\t\telse {\n\t\t\t// se estiver no lado esquerdo\n\t\t\tif ($this->pagina - $tmp01 < 1) {\n\t\t\t\t$inf = 1;\n\t\t\t\t$sup = ($this->totalp < $this->listap) ? $this->totalp : $this->listap ;\n\t\t\t}\n\t\t\t// se estiver no lado direito\n\t\t\telse if ($this->pagina + $tmp01 > $this->totalp) {\n\t\t\t\t$inf = ($this->totalp < $this->listap) ? 1 : $this->totalp-($this->listap-1) ;\n\t\t\t\t$sup = $this->totalp;\n\t\t\t}\t\t\t\t\n\t\t}\n\t\t\t\n\t\tfor ($x=$inf,$y=0;$x<=$sup;$x++,$y++) {\n\t\t\t$arrPaginas[$y] = $x;\n\t\t}\n\t\t\n\t\treturn $arrPaginas;\n\t\t\t\t\n\t\t// ALGORITMO LISTA DE PAGINAS - FIM\n\t}", "public function findPagoDetalleAseo()\r\n\t\t{\r\n\t\t\t$codigoPresupuestario = self::getCodigoPresupuestarioAseo();\r\n\r\n\t\t\t$registers = [];\r\n\t\t\t// Pagos con periodos mayores a cero\r\n\t\t\t$registers = self::findPagoDetallePeriodoMayorCeroInmueble($codigoPresupuestario, [12]);\r\n\t\t\tif ( !self::guardarConsultaRecaudacion($registers) ) {\r\n\t\t\t\tself::errorCargarData(Yii::t('backend', 'Aseo periodo mayores a cero'));\r\n\t\t\t}\r\n\r\n\t\t\t//$registers = [];\r\n\t\t\t// Pagos con periodos iguales a cero\r\n\t\t\t// $registers = self::findPagoDetallePeriodoIgualCeroInmueble($codigoPresupuestario, [12]);\r\n\t\t\t// if ( !self::guardarConsultaRecaudacion($registers) ) {\r\n\t\t\t// \tself::errorCargarData(Yii::t('backend', 'Aseo periodo iguales a cero'));\r\n\t\t\t// }\r\n\r\n\r\n\t\t\t$registers = [];\r\n\t\t\t$registers = self::findPagoDetalleVarioImpuestoModel([12]);\r\n\t\t\tif ( !self::guardarConsultaRecaudacion($registers) ) {\r\n\t\t\t\tself::errorCargarData(Yii::t('backend', 'Aseo por varios'));\r\n\t\t\t}\r\n\r\n\t\t}", "public function pagina( $pagina = 1 )\n\t{\n\t\tfunction paginator_botao($label = null, $position = 1 ){\n\t\t\t$ini = \"\n\t\t\t\t\t<li class='page-item'>\n\t\t\t\t\t\t<a class='page-link' href=$position>\"; \n\t\t\t\t\t\t\n\t\t\t$final = \" </a>\n\t\t\t </li>\";\n\t\t\t$botao = $ini . $label . $final;\n\t\t\t\n\t\t\t//var_dump($botao);\n\t\t\t//exit;\n\n\t\t\treturn $botao;\n\t\t}\n\n\t\t// para limitar\n\t\t$pagina = isset($pagina) ? (int) $pagina : 1;\n\t\tif($pagina <= 1) $pagina = 1;\n\n\t\t$reg_por_pag = 14;\n\t\t$bot_por_pag = 5;\n\n\t\t# define se o primeiro botao está ou nao desativado\n\t\tif( $pagina == 1 ){\n\t\t\t$data['btnA'] = 'disable';\n\t\t} else {\n\t\t\t$data['btnA'] = '';\n\t\t}\n\t\t# Carrega o Model Pessoa\n\t\t$this->load->model('pessoa_model', 'pessoa');\n\t\t$qtd_reg = $this->pessoa->get_qtde_teste(); // nao precisa fazer outro select para contar total\n\t\t$qtde_paginas = (int) ceil($qtd_reg / $reg_por_pag);\n\n\t\tif($pagina > $qtde_paginas) $pagina = 1;\n\n\t\t// INICIO DA PAGINA SERVIRA PARA APONTAR PARA O REGISTRO A SER EXIBIDO\n\t\t$inicio_pagina = ($pagina - 1) * $reg_por_pag;\n\n\t\t$this->load->model('pessoa_model', 'pessoa');\n\t\t$data['pessoas'] = $this->pessoa->get_people_pag($inicio_pagina, $reg_por_pag);\n\n\n\t\tif( $pagina == $qtde_paginas ) {\n\t\t\t$data['btnP'] = 'disable';\n\t\t} else {\n\t\t\t$data['btnP'] = '';\n\t\t}\n\t\t\n\t\t// Conteudo = \"<input id='btnOculta_\" + lin + \"' type='button' value='novo' class='btn btn-default' onclick='Ocultar(this, \\\"OcultaNovoMedicamento_1\\\")' style='float:left' />\";\n\t\t$btnA = \"\";\n\t\t$hrefBtnA = \"<?php echo base_url(\" . \"pessoas/pagina/)\" ;\n\t\t$pagina_anterior = '';\n\t\t// paginator já ira pronto para o HTML, não haverá a necessidade de <?php echo > dentro \n\t\n\t\t$botao_primeiro = \"\n\t\t\t\t\t<li class='page-item'>\n\t\t\t\t\t\t<a class='page-link' \n\t\t href= '1' >\t\t\t\t\t\t\n\t\t Primeiro\n\t\t </a>\n\t\t </li>\n\t\t\"; \n\n\t\t$botao_ultimo = paginator_botao( 'Ultimo', $qtde_paginas);\n\n\t\t//$botao = array();\n\t\t// estava dando um erro aqui 22/07/2020 de offset\n\t\t\n\n\t\tfor($i = 1; $i<= $qtde_paginas; $i ++){\n\t\t\t$botao[$i] = paginator_botao( \"$i\" , $i );\n\t\t}\n\n\t\t$botao_prev = paginator_botao( '&#10218', ($pagina - 1) );\n\t\t$botao_next = paginator_botao( '&#10219', ($pagina + 1) );\n\t\t\n\n\t\t$paginatorInicio = \"\n\t\t <nav aria-label='...'>\n\t\t\t\t<ul class='pagination justify-content-center'>\n\t\t\"; \n\t\t$paginatorFinal = \"\n\t\t </ul>\n\t\t </nav>\t\n\t\t\"; \n\t\t$paginator = $paginatorInicio . $paginatorFinal;\n\n\t\t$ord = $pagina;\n\t\t//echo $ord;\n\t\t//exit;\n\n\t\t\n\t\t$botoes = '';\n\n\t\tif($pagina > 1 ){\n\t\t\t if ($pagina < $qtde_paginas-$bot_por_pag){\n\t\t\t\tfor ( $i=$pagina ; $i <= ($pagina + $bot_por_pag); $i++ ){\n\t\t\t\t\t$botoes .= $botao[$i];\n\t\t\t\t\t//echo $botoes . '<br>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$paginator = $paginatorInicio . \n\t\t\t\t$botao_primeiro .\n\t\t\t\t$botao_prev .\n\t\t\t\t$botoes . \n\t\t\t\t$botao_next .\n\t\t\t\t$botao_ultimo .\n\t\t\t\t$paginatorFinal;\n\t\t\t }\telse {\n\t\t\t\t$pagina = $qtde_paginas-$bot_por_pag + 1;\n\t\t\t }\n\t\t}\n\n\t\tif($pagina === 1){\n\t\t\tfor ( $i=1 ; $i <= $bot_por_pag; $i++ ){\n\t\t\t\t$botoes .= $botao[$i];\n\t\t\t}\n\t\t\t$paginator = $paginatorInicio . \n\t\t\t $botoes . \n\t\t\t\t\t\t $botao_next .\n\t\t\t\t\t\t $botao_ultimo .\n\t\t\t\t\t\t $paginatorFinal;\n\t\t}\n\n\t\tif(($pagina === $qtde_paginas) or ($pagina === $qtde_paginas-$bot_por_pag+1) ){\n\t\t\tfor ( $i=$qtde_paginas-$bot_por_pag ; $i <= $qtde_paginas; $i++ ){\n\t\t\t\tif($pagina < $qtde_paginas){\n\t\t\t\t\t$botoes .= $botao[$i];\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$paginator = $paginatorInicio . \n\t\t\t\t\t\t $botao_primeiro .\n\t\t\t\t\t\t $botao_prev .\n\t\t\t\t\t\t $botoes . \n\t\t\t\t\t\t $paginatorFinal;\n\t\t}\n\n\n\t\t$data['paginator'] = $paginator;\n\t\t$data['qtde_botoes'] = $bot_por_pag;\n\t\t$data['qtde_paginas']= $qtde_paginas;\n\t\t$data['pagina'] = $pagina;\n\t\t$data['qtd_reg'] = $qtd_reg;\n\n\n\n\t\t//Carregamos a view listarpessoa e passamos como parametro a array pessoa que guarda todos os pessoa da db pessoa\n\t\t$this->load->view('/template/cabecalho');\n\t\t#$this->load->view('barra_usuario');\n\t\t$this->load->view('listar_pessoas', $data);\n\t\t$this->load->view('/template/rodape');\n\t}", "function listar_originales_limit_para_generador($inicial,$cantidad,$id_tipo_simbolo) {\n\t\t\t\n\t\tif ($id_tipo_simbolo==99) { $sql_tipo=''; } \n\t\telse { $sql_tipo='AND imagenes.id_tipo_imagen='.$id_tipo_simbolo.''; }\n\t\t\t\n\t\t$query = \"SELECT palabra_imagen.*, \n\t\timagenes.id_imagen,imagenes.id_colaborador,imagenes.imagen,imagenes.extension,imagenes.id_tipo_imagen,\n\t\timagenes.estado,imagenes.registrado,imagenes.id_licencia,imagenes.id_autor,imagenes.tags_imagen,\n\t\timagenes.tipo_pictograma,imagenes.validos_senyalectica,imagenes.original_filename,\n\t\tpalabras.*\n\t\tFROM palabra_imagen, imagenes, palabras\n\t\tWHERE imagenes.estado=1\n\t\tAND palabras.id_palabra=palabra_imagen.id_palabra\n\t\t$sql_tipo\n\t\tAND palabra_imagen.id_imagen=imagenes.id_imagen\n\t\tORDER BY palabra_imagen.id_imagen asc\n\t\tLIMIT $inicial,$cantidad\";\n\t\t\n\t\t//$query = \"SELECT palabra_imagen.*, imagenes.*, palabras.*\n//\t\tFROM palabra_imagen, imagenes, palabras\n//\t\tWHERE imagenes.estado=1\n//\t\tAND palabra_imagen.id_palabra=8762\n//\t\tAND palabras.id_palabra=palabra_imagen.id_palabra\n//\t\tAND palabra_imagen.id_imagen=imagenes.id_imagen\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "function pagarcredito($idempleado,$money,$idencargado, $caja){\r\n\t$iduser = substr($idempleado, 1);\r\n\t$onoma=$caja->nameUser($iduser);\r\n\t$idMov=$caja->insert_movimiento(\"entrada\",$money,\"Cobrado Credito \".$onoma,9,$idencargado);\r\n\t$caja->insert_mov_credito($idMov,-$money,$iduser,1,\"HR\");\r\n\t//$response = loadtickets($caja,$iduser);\t\r\n\t$response = loadmovimientos($caja,$iduser);\t\r\n\t$totalTickets=$caja->total_cuenta($iduser);\r\n\t$response[\"TotalTickets\"]=$totalTickets;\r\n\treturn $response;\t\r\n}", "public function reorderChildren()\n {\n $sql = \"select ID_PAGE from \" . $this->mode . \"PAGE where PAG_IDPERE=\" . $this->getID() . \" order by PAG_POIDS\";\n $stmt = $this->dbh->prepare(\"update \" . $this->mode . \"PAGE set PAG_POIDS=:PAG_POIDS where ID_PAGE=:ID_PAGE\");\n $PAG_POIDS = 1;\n $stmt->bindParam(':PAG_POIDS', $PAG_POIDS, PDO::PARAM_INT);\n foreach ($this->dbh->query($sql)->fetchAll(PDO::FETCH_COLUMN) as $ID_PAGE) {\n $stmt->bindValue(':ID_PAGE', $ID_PAGE, PDO::PARAM_INT);\n $stmt->execute();\n $PAG_POIDS ++;\n }\n }", "public function index(Request $request)\n {\n //\n\n /*\n * $preguntas = Pregunta::paginate(5);+\n $preguntas = Pregunta::orderBy('id','DESC')->paginate(5);\n */\n\n\n\n $titulo = $request->get('titulo');\n $tema_id = $request->get('tema_id');\n\n $preguntas = Pregunta::orderBy('id', 'DESC')\n ->titulo($titulo)\n ->tema_id($tema_id)\n ->paginate(10);\n/*\n $preguntas= DB::table('preguntas')\n ->join('temas','preguntas.tema_id','=','temas.id')\n ->select('preguntas.titulo','preguntas.descripcion','preguntas.puntuacionPregu','preguntas.user_id','preguntas.tema_id','temas.nombreTema')\n ->get();*/\n\n\n\n\n return view('index',['preguntas' => $preguntas]);\n }", "function listarObligacionPagoCotizacion(){\n\t\t$this->procedimiento='adq.f_cotizacion_sel';\n\t\t$this->transaccion='ADQ_OBPGCOT_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t$this->setCount(false);\n\t\t\n\t\t$this->setParametro('id_cotizacion','id_cotizacion','int4');\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_obligacion_pago','int4');\t \n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function obtener_post($post_por_pagina, $conexion) {\n $inicio = (pagina_actual() > 1) ? pagina_actual() * $post_por_pagina - $post_por_pagina : 0;\n $sentencia = $conexion->prepare(\"SELECT * FROM imagenes ORDER BY idImg DESC LIMIT $inicio, $post_por_pagina\");\n $sentencia->execute();\n return $sentencia->fetchAll();\n}" ]
[ "0.6366425", "0.61286443", "0.6070932", "0.60588753", "0.60412765", "0.60246855", "0.5995573", "0.59791434", "0.5965463", "0.5898063", "0.58923334", "0.5890007", "0.5868854", "0.5865253", "0.5859058", "0.583705", "0.5820905", "0.580117", "0.57949877", "0.57899576", "0.5783308", "0.5770031", "0.5762155", "0.57566756", "0.5746449", "0.572427", "0.5714003", "0.57043344", "0.56866", "0.5684513", "0.5677534", "0.5675176", "0.5674269", "0.5673883", "0.5667185", "0.5657451", "0.5653029", "0.56420606", "0.5641611", "0.56385684", "0.56260085", "0.5617742", "0.5613577", "0.5608056", "0.558542", "0.5582806", "0.5575182", "0.5573996", "0.55669147", "0.5543514", "0.5517302", "0.5513422", "0.5504715", "0.54995495", "0.5487383", "0.5482572", "0.54803836", "0.5478405", "0.5468735", "0.5456771", "0.5455028", "0.5453606", "0.5451971", "0.5447963", "0.5444084", "0.54351056", "0.5428573", "0.541974", "0.54194283", "0.5415899", "0.5411514", "0.5405038", "0.5404502", "0.5384615", "0.5384517", "0.5381832", "0.53737676", "0.53737676", "0.537357", "0.5372111", "0.53707045", "0.5363359", "0.53558964", "0.5347252", "0.5346863", "0.5344478", "0.5339804", "0.5326835", "0.5324563", "0.5314115", "0.53135854", "0.53135324", "0.5308742", "0.5293038", "0.5288623", "0.5287022", "0.5282148", "0.5281198", "0.52798074", "0.52795005", "0.52660406" ]
0.0
-1
permite baixar apenas os pedidos pagos
public function saveAvaliacao($param) { $transaction = \Yii::$app->db->beginTransaction(); try { // CADASTRO -------------------------------------------------------- if(!($CB19_ID = $param['CB19_ID'])) { // salva a avaliacao $CB19AVALIACAO = new CB19AVALIACAO(); $CB19AVALIACAO->setAttribute('CB19_EMPRESA_ID', $this->user->id_company); $CB19AVALIACAO->setAttribute('CB19_NOME', $param['CB19_NOME']); $CB19AVALIACAO->setAttribute('CB19_STATUS', 1); $CB19AVALIACAO->save(); $CB19_ID = $CB19AVALIACAO->CB19_ID; // salva os itens da avaliação - pode nao ter itens, só exibe um campo de texto para avaliar if (!empty($param['AVALIACAO-ITENS'])) { foreach ($param['AVALIACAO-ITENS'] as $item) { $CB20ITEMAVALIACAO = new CB20ITEMAVALIACAO(); $CB20ITEMAVALIACAO->setAttribute('CB20_AVALIACAO_ID', $CB19_ID); $CB20ITEMAVALIACAO->setAttribute('CB20_TIPO_AVALICAO_ID', $item); $CB20ITEMAVALIACAO->setAttribute('CB20_STATUS', 1); $CB20ITEMAVALIACAO->save(); } } // EDICAO ---------------------------------------------------------- } else { // salva a avaliacao $CB19AVALIACAO = CB19AVALIACAO::findOne($CB19_ID); $CB19AVALIACAO->setAttribute('CB19_EMPRESA_ID', $this->user->id_company); $CB19AVALIACAO->setAttribute('CB19_NOME', $param['CB19_NOME']); $CB19AVALIACAO->setAttribute('CB19_STATUS', 1); $CB19AVALIACAO->save(); // desativa todos os itens antes de add/ativar CB20ITEMAVALIACAO::updateAll(['CB20_STATUS' => 0], 'CB20_AVALIACAO_ID = ' . $CB19_ID); // salva os itens da avaliação - pode nao ter itens, só exibe um campo de texto para avaliar if (!empty($param['AVALIACAO-ITENS'])) { foreach ($param['AVALIACAO-ITENS'] as $item) { // verifica se o item existe desativado e ativa / se nao cria if(!$CB20ITEMAVALIACAO = CB20ITEMAVALIACAO::find()->where("CB20_AVALIACAO_ID = $CB19_ID AND CB20_TIPO_AVALICAO_ID = $item")->one()) { $CB20ITEMAVALIACAO = new CB20ITEMAVALIACAO(); $CB20ITEMAVALIACAO->setAttribute('CB20_AVALIACAO_ID', $CB19_ID); $CB20ITEMAVALIACAO->setAttribute('CB20_TIPO_AVALICAO_ID', $item); } $CB20ITEMAVALIACAO->setAttribute('CB20_STATUS', 1); $CB20ITEMAVALIACAO->save(); } } } $transaction->commit(); return json_encode(['status' => true]); } catch (\Exception $exc) { $transaction->rollBack(); return json_encode(['status' => false]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function corrigirPlanosPagto()\n\t{\n\t\t$this->dbcrosier->trans_start();\n\n\t\t$query = $this->dbcrosier->query(\"SELECT * FROM ekt_venda WHERE cond_pag = '0.99'\") or $this->exit_db_error();\n\t\t$result = $query->result_array();\n\n\t\t// Pega todos os produtos da ekt_produto para o $mesano\n\t\t$i = 0;\n\t\tforeach ($result as $r) {\n\t\t\ttry {\n\t\t\t\t$query = $this->dbcrosier->query('SELECT * FROM ven_venda WHERE pv = ? AND json_data.\"$->>mesano\" = ?', array(\n\t\t\t\t\t$r['NUMERO'],\n\t\t\t\t\t$r['mesano']\n\t\t\t\t)) or $this->exit_db_error();\n\t\t\t\t$naVenVenda = $query->result_array();\n\t\t\t\tif (count($naVenVenda) == 0) {\n\t\t\t\t\t$this->logger->info(\"Não encontrado para pv = '\" . $r['NUMERO'] . \"' e mesano = '\" . $r['mesano'] . \"'\");\n\t\t\t\t} else if (count($naVenVenda) == 1) {\n\t\t\t\t\tif ($naVenVenda[0]['plano_pagto_id'] == 2) {\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t$this->logger->info(\"Atualizando o pv = '\" . $r['NUMERO'] . \"' e mesano = '\" . $r['mesano'] . \"'\");\n\t\t\t\t\t\t$this->dbcrosier->query(\"UPDATE ven_venda SET plano_pagto_id = 158 WHERE id = ?\", $naVenVenda[0]['id']) or $this->exit_db_error();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->logger->info(\"Mais de um encontrado para pv = '\" . $r['NUMERO'] . \"' e mesano = '\" . $r['mesano'] . \"'\");\n\t\t\t\t\texit();\n\t\t\t\t}\n\t\t\t} catch (Exception $e) {\n\t\t\t\tprint_r($e->getMessage());\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\n\t\t$this->logger->info(PHP_EOL . PHP_EOL . \"TOTAL ATUALIZADO: \" . $i);\n\n\t\t$this->dbcrosier->trans_complete();\n\t}", "function getPagosanteriores() {\n $where = \" WHERE 1\";\n $array = \"\";\n\n $columns = \"`Clave_catalogo`, `Nombre`, `Email`, `Cantidad`, `Fecha_pagada`, `Id_pago` \";\n $response = $this->db->select3($columns, 'catalogo_pagos', $where, $array);\n return $response;\n }", "function getPagos($id_afiliado){\n\t\t$sql = \n\t\t\"SELECT\n\t\t\t$this->_tablename.agencia,\n\t\t\t$this->_tablename.terminal,\n\t\t\t$this->_tablename.nro_transaccion,\n\t\t\t$this->_tablename.fecha_pago,\n\t\t\t$this->_tablename.importe\n\t\tFROM\n\t\t\t$this->_tablename\n\t\tINNER JOIN \n\t\t\ttarjetas ON($this->_tablename.id_tarjeta = tarjetas.id_tarjeta)\n\t\tWHERE \n\t\t\ttarjetas.id_afiliado = '$id_afiliado'\";\n\t\t\n\t\treturn $this->getQuery($sql);\t\n\t}", "public function pagos($pagos = null)\r\n\t{\r\n\t\t/*if (isset($this->relations)) {\r\n\t\t\t$relationTypes = key($this->relations);\r\n\t\t\tif (in_array('manyToMany', $relationTypes)) {\r\n\t\t\t\t$relation = $this->relations['manyToMany'];\r\n\t\t\t\tif (is_a($pagos, 'Usuario')) {\r\n\t\t\t\t} elseif (is_array($pagos)) {\r\n\t\t\t\t\t\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t}*/\r\n\r\n\t\tif ($pagos) {\r\n\t\t\tif (is_a($pagos, 'Pago')) {\r\n\t\t\t\t$this->savePagoUsuario($pagos);\r\n\t\t\t} elseif (is_array($pagos)) {\r\n\t\t\t\tforeach ($pagos as $pago) {\r\n\t\t\t\t\t$this->savePagoUsuario($pago);\r\n\t\t\t\t}\r\n\t\t\t} \t\t\t\r\n\t\t\treturn 1;\r\n\t\t} \r\n\r\n\t\t$pagoUsuario = new PagoUsuario;\r\n\t\t$pagosUsuario = $pagoUsuario->findBy('codigo_usuario', $this->codigoUsuario);\r\n\r\n\t\t$pagos = [];\r\n\t\tforeach ($pagosUsuario as $pagoUsuario) {\r\n\t\t\t$pago = $pagoUsuario->pago();\r\n\t\t\t$pagos[] = $pago;\r\n\t\t}\r\n\t\treturn $pagos;\r\n\t}", "public function RelatorioContasPagarPorFornecedor($where,$codigo){\n\t\t\t\t\n\t\t$dba = $this->dba;\n\n\t\t$vet = array();\n\n\n\t\t$sql =\"SELECT \n\t\t\t\td.emissao,\n\t\t\t\td.vencimento,\n\t\t\t\td.numero,\n\t\t\t\tsum(d.valordoc) as valordoc,\n\t\t\t\td.numero_nota,\n\t\t\t\tf.codigo,\n\t\t\t\tf.nome,\n\t\t\t\td.parcial1,\n\t\t\t\td.parcial2,\n\t\t\t\td.parcial3,\n\t\t\t\td.parcial4,\n\t\t\t\td.parcial5,\n\t\t\t\td.data_parcial1,\n\t\t\t\td.data_parcial2,\n\t\t\t\td.data_parcial3,\n\t\t\t\td.data_parcial4,\n\t\t\t\td.data_parcial5\n\t\t\tFROM\n\t\t\t\tduplic d\n\t\t\t\t\tinner join\n\t\t\t\tfornecedores f ON (f.codigo = d.cedente)\n\t\t\t\t\".$where.\"\n\t\t\t\t\tand f.codigo = \".$codigo.\"\n\t\t\tgroup by d.numero , d.numero_nota , d.emissao , f.codigo , f.nome , d.tipo , d.vencimento , d.parcial1 , d.parcial2 , d.parcial3 , d.parcial4 , d.parcial5 , d.data_parcial1 , d.data_parcial2 , d.data_parcial3 , d.data_parcial4 , d.data_parcial5\";\n\t\t\n\t\t$res = $dba->query($sql);\n\n\t\t$num = $dba->rows($res); \n\n\t\t$i = 0;\n\t\t\t\n\t\twhile($dup = ibase_fetch_object($res)){\t\t\n\t\t\t\n\t\t\t$numero = $dup->NUMERO;\n\t\t\t$valordoc = $dup->VALORDOC;\n\t\t\t$numnota = $dup->NUMERO_NOTA;\n\t\t\t$emissao\t = $dup->EMISSAO;\n\t\t\t$codfor = $dup->CODIGO;\n\t\t\t$nomfor = $dup->NOME;\t\t\t\t\t\n\t\t\t$vencimento = $dup->VENCIMENTO;\n\t\t\t$parcial1 = $dup->PARCIAL1;\n\t\t\t$parcial2 = $dup->PARCIAL2;\n\t\t\t$parcial3 = $dup->PARCIAL3;\n\t\t\t$parcial4 = $dup->PARCIAL4;\n\t\t\t$parcial5 = $dup->PARCIAL5;\n\t\t\t$data_parcial1 = $dup->DATA_PARCIAL1;\n\t\t\t$data_parcial2 = $dup->DATA_PARCIAL2;\n\t\t\t$data_parcial3 = $dup->DATA_PARCIAL3;\n\t\t\t$data_parcial4 = $dup->DATA_PARCIAL4;\n\t\t\t$data_parcial5 = $dup->DATA_PARCIAL5;\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$duplic = new Duplic();\t\t\t\n\n\t\t\t$duplic->setNumero($numero);\n\t\t\t$duplic->setValorDoc($valordoc);\n\t\t\t$duplic->setNumeroNota($numnota);\n\t\t\t$duplic->setCodFornecedor($codfor);\n\t\t\t$duplic->setNomeFornevedor($nomfor);\n\t\t\t$duplic->setEmissao($emissao);\n\t\t\t$duplic->setVencimento($vencimento);\n\t\t\t$duplic->setParcial1($parcial1);\n\t\t\t$duplic->setParcial2($parcial2);\n\t\t\t$duplic->setParcial3($parcial3);\n\t\t\t$duplic->setParcial4($parcial4);\n\t\t\t$duplic->setParcial5($parcial5);\n\t\t\t$duplic->setDataParcial1($data_parcial1);\n\t\t\t$duplic->setDataParcial2($data_parcial2);\n\t\t\t$duplic->setDataParcial3($data_parcial3);\n\t\t\t$duplic->setDataParcial4($data_parcial4);\n\t\t\t$duplic->setDataParcial5($data_parcial5);\t\n\t\t\t\n\t\t\t$vet[$i++] = $duplic;\n\n\t\t}\n\n\t\treturn $vet;\n\n\t}", "abstract public function preparePagination();", "public function generar_link_pago()\n {\n\n $items = array();\n $ids = '';\n if (Input::get('id'))\n {\n $pago = Pago::find(Input::get('id'));\n $item = array(\n \"title\" => $pago->nombre,\n \"description\" => $pago->descripcion,\n \"quantity\" => 1,\n \"currency_id\" => \"MEX\",\n \"unit_price\" => doubleval($pago->monto)\n );\n $ids = $pago->id;\n array_push($items, $item);\n }\n else\n {\n $pagos = Auth::user()->userable->pagos->filter(function($pago) {\n return $pago->pagado == false;\n });\n\n foreach ($pagos as $pago) {\n\n $item = array(\n \"title\" => $pago->nombre,\n \"description\" => $pago->descripcion,\n \"quantity\" => 1,\n \"currency_id\" => \"MEX\",\n \"unit_price\" => doubleval($pago->monto)\n );\n $ids = $ids . $pago->id . \"-\";\n array_push($items, $item);\n }\n }\n\n if (Config::get('params.prueba_pago'))\n {\n $referer = Url::route('obtener_pago_prueba');\n }\n else\n {\n $referer = Request::header('referer');\n }\n\n $preference_data = array(\n \"items\" => $items,\n \"payer\" => array(\n \"name\" => Auth::user()->userable->nombre,\n \"email\" => Auth::user()->email,\n ),\n \"back_urls\" => array(\n \"success\" => $referer,\n \"failure\" => $referer,\n \"pending\" => $referer,\n ),\n \"external_reference\" => $ids,\n );\n\n $preference = $this->checkout->generar_preferencia($preference_data);\n if (isset($preference))\n {\n $link = $preference['response'][Config::get('payment.init_point')];\n return Redirect::away($link);\n }\n else\n {\n Session::flash('error', 'Ocurrio un error al tratar de generar el pago.');\n return Redirect::back();\n }\n }", "public function ListarProductosParaPromocion($start, $limit, $sSearch, $iSortCol_0, $sSortDir_0, $categoria_id, $marca_id, $productos_id)\n {\n $arreglo_resultado = array();\n $cont = 0;\n\n $lista = $this->getDoctrine()->getRepository('IcanBundle:Producto')\n ->ListarProductosParaPromocion($start, $limit, $sSearch, $iSortCol_0, $sSortDir_0, $categoria_id, $marca_id, $productos_id);\n\n foreach ($lista as $value) {\n $producto_id = $value->getProductoId();\n\n $nombre = $value->getNombre();\n $categoria = ($value->getCategoria() != null) ? $value->getCategoria()->getNombre() : \"\";\n $marca = ($value->getMarca() != null) ? $value->getMarca()->getNombre() : \"\";\n $estado = ($value->getEstado()) ? 1 : 0;\n $precio = $value->getPrecio();\n $fecha = $value->getFechapublicacion() != \"\" ? $value->getFechapublicacion()->format(\"d/m/Y H:i\") : \"\";\n $views = $value->getViews();\n\n $ruta = $this->ObtenerURL();\n $dir = 'uploads/productos/';\n $imagen = $ruta . $dir . $value->getImagen();\n\n\n $acciones = '<a href=\"javascript:;\" class=\"add importar-producto m-portlet__nav-link btn m-btn m-btn--hover-success m-btn--icon m-btn--icon-only m-btn--pill\" title=\"Agregar producto relacionado\"\n data-id=\"' . $producto_id . '\" data-nombre=\"' . $nombre . '\" data-categoria=\"' . $categoria . '\"\n data-marca=\"' . $marca . '\" data-estado=\"' . $estado . '\" data-imagen=\"' . $imagen . '\"\n data-precio=\"' . $precio . '\" data-fecha=\"' . $fecha . '\" data-views=\"' . $views . '\"> <i class=\"la la-plus\"></i> </a> ';\n\n $arreglo_resultado[$cont] = array(\n \"id\" => $producto_id,\n \"nombre\" => $nombre,\n \"categoria\" => $categoria,\n \"marca\" => $marca,\n \"estado\" => $estado,\n \"imagen\" => $imagen,\n \"precio\" => number_format($precio, 0, ',', '.'),\n \"fechapublicacion\" => $fecha,\n \"views\" => $views,\n \"acciones\" => $acciones\n );\n\n $cont++;\n }\n\n return $arreglo_resultado;\n }", "public function primerPagoStripe($metodo)\n {\n $cliente=Customer::create([\n 'payment_method' => $metodo,\n ]);\n // aqui lo guarlo en mi DB\n $c=new Cliente();\n $c->token=$cliente->id;\n $c->save();\n // se realiza el pago en formato entero .. ej. 20$ son 2000 , los ultimos 2 ceros son los decimales\n // 512$ son 51200\n $this->pagoStripe($cliente->id,$metodo, 1100);\n \n }", "function pagocobrobancossaldos($periodo,$ejer,$moneda,$cuenta,$opc){\n\t\tswitch($opc){\n\t\t\tcase 1://cargo\n\t\t\t\t$mov=\"Cargo M.E.\";\n\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$mov=\"Abono M.E\";\n\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$mov=\"Abono\";\n\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t$mov=\"Cargo\";\n\t\t\tbreak;\n\t\t}\n\t\t\t$sql=$this->query(\"select m.IdPoliza,m.Cuenta,sum(m.Importe) importe,m.TipoMovto,c.description,p.relacionExt,p.concepto,p.idperiodo,c.manual_code\n\t\t\tfrom cont_movimientos m,cont_polizas p,cont_accounts c,cont_config conf\n\t\t\twhere m.cuenta=c.account_id and c.currency_id=\".$moneda.\" and c.`main_father`=conf.CuentaBancos and m.TipoMovto='\".$mov.\"'\n\t\t\tand m.IdPoliza=p.id and p.activo=1 and m.Activo=1 and p.idperiodo<=\".$periodo.\" and m.Cuenta=\".$cuenta.\"\n\t\t\tand p.id not in(select id from cont_polizas where concepto='POLIZA DE AJUSTE POR DIFERENCIA CAMBIARIA' and idperiodo=\".$periodo.\")\n\t\t\tgroup by m.Cuenta,p.idperiodo,m.TipoMovto\");\n\t\t\treturn $sql;\n\t\t}", "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}", "function epagoped($mysqli,$fecha,$ref,$monto,$iva,$total,$saldoi,$factu,$mpago,$sfactu,$cte,$saldof,$arch=NULL){\n\t//define los montos de pago\n $pagoiva = defiva($monto,$saldoi,$monto);\n //definicion del status de pago\n if($monto<$saldoi){$status = 35;}else{$status = 40;};\n\t\t\ttry{\n\t\t\t\t$mysqli->autocommit(false);\n\t\t\t//la referencia es pedido\n\t\t\t\t$tipoper=1;\n\t\t\t//movimientos de diario\n\t\t\t\t//cargo en entrada de efectivo segun metodo de pago\n\t\t\t\t\t$cuenta1=metpago($mpago);\n\t\t\t\t\t$tipom1=0;\n\t\t\t\t\toperdiario($mysqli, $cuenta1, $tipoper, $tipom1, $ref, $monto, $fecha,$sfactu);\n\t\t\t//abono a clientes\n\t\t\t\t\t$cuenta4=\"105.01\";\n\t\t\t\t\t$tipom4=1;\n\t\t\t\t\toperdiario($mysqli,$cuenta4,$tipoper,$tipom4,$ref,$monto,$fecha,$sfactu,$cte);\n\t\t\t\t//cargo a iva trasladado no cobrado\n\t\t\t\t\t$cuenta2=\"209.01\";\n\t\t\t\t\t$tipom2=0;\n\t\t\t\t\toperdiario($mysqli,$cuenta2,$tipoper,$tipom2,$ref,$iva,$fecha,$sfactu);\n\t\t\t\t//abono a iva trasladado\n\t\t\t\t\t$cuenta3=\"208.01\";\n\t\t\t\t\t$tipom3=1;\n\t\t\t\t\toperdiario($mysqli,$cuenta3,$tipoper,$tipom3,$ref,$iva,$fecha,$sfactu);\n\t\t\t//actualizacion en pedidos\n\t\t\t\t\tif($arch!=NULL){\n\t\t\t\t\t $mysqli->query(\"UPDATE pedidos SET status=$status,fechapago='$fecha',\n factura='$factu',saldo=$saldof,arch='$arch' WHERE idpedidos='$ref'\");}else {\n $mysqli->query(\"UPDATE pedidos SET status=$status,fechapago='$fecha',\n factura='$factu',saldo=$saldof WHERE idpedidos='$ref'\");\n\t\t\t\t\t }\n\t\t\t//efectuar la operacion\n\t\t\t\t$mysqli->commit();\n\t\t\t\t$resul=0;\n\t\t\t}catch (Exception $e) {\n\t\t\t\t\t//error en las operaciones de bd\n\t\t\t\t $mysqli->rollback();\n\t\t\t\t \t$resul=-2;\n\t\t\t\t}\n\treturn $resul;\n}", "public function verPagosUsuario($id){\n $local = Local_User::findorfail($id);\n\n //Validación Encargado, Premium, Bloqueado\n $locales = Local_User::where('user_id', Auth::user()->id)\n ->where('estado', '!=', 'Desvinculado')\n ->where('local_id', $local->local_id)\n ->where('rol', 'Encargado')\n ->first();\n\n if (empty($locales)) {\n session()->flash('danger', 'Usted no tiene privilegios suficientes.');\n return redirect()->action('HomeController@index');\n }elseif($locales->Local->cuenta != 'Premium'){\n session()->flash('danger', 'Opción sólo para locales premium.');\n return redirect()->action('UsuarioController@empaques', ['id' => $local->local_id]);\n }elseif($locales->Local->estado == 'Bloqueado'){\n session()->flash('danger', 'El local se encuentra temporalmente bloqueado.');\n return redirect()->action('UsuarioController@misLocales');\n }\n //fin validación\n\n\n\n $pagos = Pago::where('local_user_id', $id)->orderBy('pagoHasta', 'desc')->paginate(10);\n\n\n if($pagos->count() == 0) {\n session()->flash('danger', 'Aún no se registran pagos');\n return redirect()->route('usuario.local.empaques', ['id' => $local->local_id]);\n //return redirect()->action('UsuarioController@misLocales');\n }else{\n //Query para obtener la última fecha pagada\n $lastPagoHasta = Pago::select('pagoHasta')->where('local_user_id', $id)->orderBy('pagoHasta', 'desc')->take(1)->get();\n\n //editamos la fecha\n $lastPagoHasta = $lastPagoHasta[0]['pagoHasta'] . ' 00:00:00';\n\n //verificamos si la persona tomó un turno después de la última fecha pagada\n $deuda=Planilla_Turno_User::where('local_user_id', $id)->where('created_at', '>', $lastPagoHasta)->count();\n\n //si count es arriba de 0 es porque tomó un turno y aún no paga\n if($deuda > 0 && $local->Local->cuenta == 'Premium'){\n $deuda = \"Si\";\n }else{\n $deuda = \"No\";\n }\n\n $meses = array('Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic');\n $months = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');\n\n foreach ($pagos as $pago){\n $pago->fechaPago= date('d-m-Y', strtotime($pago->fechaPago));\n $pago->pagoDesde= str_replace($months, $meses, date('d-M-Y', strtotime($pago->pagoDesde)));\n $pago->pagoHasta= str_replace($months, $meses, date('d-M-Y', strtotime($pago->pagoHasta)));\n }\n return view ('usuario.ver-pagos')\n ->with('pagos', $pagos)\n ->with('local', $local)\n ->with('deuda', $deuda);\n }\n }", "public function permisos($pagina = false) {\n $this->_acl->acceso('gestionar_permisos');\n\n if (!$this->filtrarInt($pagina)) {\n $pagina = false;\n } else {\n $pagina = (int) $pagina;\n }\n\n $this->getLibrary('paginador');\n $paginador = new Paginador();\n\n $this->_view->assign('permisos', $paginador->paginar($this->_aclm->getPermisos(), $pagina, 10));\n $this->_view->assign('titulo', 'MigraGest');\n $this->_view->renderizar('permisos', 'acl');\n }", "private function verificarPago($usuarioId, $mentoriaId)\n {\n $pagado = false;\n \n\t\t$em = $this->getDoctrine()->getManager();\n $pagoCompleto = $this->get('pagos')->verificarPagoProducto($this->get('pagos')->getProductoId('programa_orientacion'), $usuarioId);\n \n if($pagoCompleto)\n {\n\t\t\t// Verificar tipo de mentor para verificar pago\n $dql = \"SELECT r.id rolId, u.id mentorId FROM vocationetBundle:Mentorias m\n JOIN vocationetBundle:Usuarios u WITH m.usuarioMentor = u.id\n JOIN vocationetBundle:Roles r WITH u.rol = r.id\n WHERE m.id = :mentoriaId\"; \n $query = $em->createQuery($dql);\n $query->setParameter('mentoriaId', $mentoriaId);\n $query->setMaxResults(1);\n $mentorRol = $query->getResult();\n if($mentorRol)\n {\n $mentorRol = $mentorRol[0]['rolId'];\n\n if($mentorRol == 2)\n {\n\t\t\t\t\t// Validar pago de producto individual\n\t\t\t\t\t$productoId = $this->get('pagos')->getProductoId('mentoria_profesional'); // Producto: Mentoría con experto en orientación vocacional\n\t\t\t\t\t$pagado = $this->get('pagos')->verificarPagoProducto($productoId, $usuarioId);\n\t\t\t\t}\n\t\t\t\telseif($mentorRol == 3) // Mentor de orientacion vocacional\n\t\t\t\t{\n\t\t\t\t\t$pagado = true;\n\t\t\t\t}\n }\n }\n else\n {\n // Verificar tipo de mentor para verificar pago\n $dql = \"SELECT r.id rolId, u.id mentorId FROM vocationetBundle:Mentorias m\n JOIN vocationetBundle:Usuarios u WITH m.usuarioMentor = u.id\n JOIN vocationetBundle:Roles r WITH u.rol = r.id\n WHERE m.id = :mentoriaId\"; \n $query = $em->createQuery($dql);\n $query->setParameter('mentoriaId', $mentoriaId);\n $query->setMaxResults(1);\n $mentorRol = $query->getResult();\n if($mentorRol)\n {\n $mentorId = $mentorRol[0]['mentorId'];\n $mentorRol = $mentorRol[0]['rolId'];\n }\n \n if($mentorRol == 2) // Mentor experto\n {\n $productoId = $this->get('pagos')->getProductoId('mentoria_profesional'); // Producto: Mentoría con profesional\n \n // Validar pago de producto individual para el mentor seleccionado\n $pagado = $this->get('pagos')->verificarPagoProducto($productoId, $usuarioId, $mentorId);\n }\n elseif($mentorRol == 3) // Mentor de orientacion vocacional\n {\n $productoId = $this->get('pagos')->getProductoId('mentoria_ov'); // Producto: Mentoría con experto en orientación vocacional\n \n // Validar pago de producto individual\n $pagado = $this->get('pagos')->verificarPagoProducto($productoId, $usuarioId);\n }\n }\n \n return $pagado;\n }", "function paginador($pagina, $orden = NULL, $nombreOrden = NULL, $consultaGlobal = NULL, $cantidadRegistros = NULL) {\n global $configuracion;\n\n $item = '';\n $respuesta = array();\n $objeto = new FacturaVenta();\n\n $registros = $configuracion['GENERAL']['registrosPorPagina'];\n\n if (!empty($cantidadRegistros)) {\n $registros = (int) $cantidadRegistros;\n }\n\n if (isset($pagina)) {\n $pagina = $pagina;\n } else {\n $pagina = 1;\n }\n\n if (isset($consultaGlobal) && $consultaGlobal != '') {\n\n $data = explode('[', $consultaGlobal);\n $datos = $data[0];\n $palabras = explode(' ', $datos);\n\n if ($data[1] != '') {\n $condicionales = explode('|', $data[1]);\n\n $condicion = '(';\n $tam = sizeof($condicionales) - 1;\n for ($i = 0; $i < $tam; $i++) {\n $condicion .= $condicionales[$i] . ' REGEXP \"(' . implode('|', $palabras) . ')\" ';\n if ($i != $tam - 1) {\n $condicion .= ' OR ';\n }\n }\n $condicion .= ')';\n\n $consultaGlobal = $condicion;\n } else {\n $consultaGlobal = '(p.nombre REGEXP \"(' . implode('|', $palabras) . ')\")';\n }\n } else {\n $consultaGlobal = '';\n }\n\n if (!isset($nombreOrden)) {\n $nombreOrden = $objeto->ordenInicial;\n }\n\n\n if (isset($orden) && $orden == 'ascendente') {//ordenamiento\n $objeto->listaAscendente = true;\n } else {\n $objeto->listaAscendente = false;\n }\n\n if (isset($nombreOrden) && $nombreOrden == 'estado') {//ordenamiento\n $nombreOrden = 'activo';\n }\n\n $registroInicial = ($pagina - 1) * $registros;\n\n\n $arregloItems = $objeto->listar($registroInicial, $registros, array('0'), $consultaGlobal, $nombreOrden);\n\n if ($objeto->registrosConsulta) {//si la consulta trajo registros\n $datosPaginacion = array($objeto->registrosConsulta, $registroInicial, $registros, $pagina);\n $item .= $objeto->generarTabla($arregloItems, $datosPaginacion);\n }\n\n $respuesta['error'] = false;\n $respuesta['accion'] = 'insertar';\n $respuesta['contenido'] = $item;\n $respuesta['idContenedor'] = '#tablaRegistros';\n $respuesta['idDestino'] = '#contenedorTablaRegistros';\n $respuesta['paginarTabla'] = true;\n\n Servidor::enviarJSON($respuesta);\n}", "public function AnularOrdenDePago(OrdenDePago $op)\n {\n \t$detalleDePago\t=\t$op->GetDetalleDePago();\n \t\n \tforeach ($detalleDePago as $d)\n \t{\n \t\t$PagoTipoId\t=\t$d->PagoTipoId;\n \t\t\n \t\t// si es un tipo de pago: Cheque propio (id = 1)\n \t\tif($PagoTipoId == 1)\n \t\t{\n \t\t\t$Cheque\t\t= Doctrine::getTable('Cheque')->FindOneById($d->ChequeId);\n \t\t\tif(!is_object($Cheque))\n \t\t\t\tthrow new Exception('No existe el cheque para anular');\n \t\t\t \n \t\t\t$Cheque->Estado\t=\t'Anulado';\n \t\t\t$Cheque->FechaAnulacion\t=\tdate('Y-m-d');\n \t\t\t$Cheque->save();\n \t\t}\n \t\t// si pago con cheque tercero en cartera, cambiar estado\n \t\tif($PagoTipoId == 4)\n \t\t{\n \t\t\t$Cheque\t\t= Doctrine::getTable('Cheque')->FindOneById($d->ChequeId);\n \t\t\tif(!is_object($Cheque))\n \t\t\t\tthrow new Exception('No existe el cheque para anular');\n \t\t\t \n \t\t\t$Cheque->Estado\t=\t'En cartera';\n \t\t\t$Cheque->save();\n \t\t}\n \t\t\n \t\t// si pague con retencion, la creo nuevamente al anular\n \t\tif(($PagoTipoId == 6)||($PagoTipoId ==7)||($PagoTipoId == 8)\n \t\t\t\t||($PagoTipoId == 9)||($PagoTipoId == 10)||($PagoTipoId == 11))\n \t\t{\n \t\t\t\n \t\t\t$detalle\t\t= Doctrine::getTable('CobranzaDetalle')->FindOneById($d->RetencionUtilizadaId);\n \t\t\tif(!is_object($detalle))\n \t\t\t\tthrow new Exception('No existe la retencion');\n \t\t\t// se marca la retencion utilizada\n \t\t\t$detalle->RetencionUtilizada\t=\t'NO';\n \t\t\t$detalle->save();\n \t\t}\n \t\t\n \t\t// si es efectivo, incrementar saldo en efectivo\n \t\tif($PagoTipoId == 2)\n \t\t{\n \t\t\t$Configuracion = Doctrine::GetTable ( 'Configuracion' )->FindOneByNombre('SaldoEfectivo');\n \t\t\t$Configuracion->Valor +=\t$d->Importe;\n \t\t\t$Configuracion->save();\n \t\t\t\n \t\t\t$data['Detalle'] = 'OP #' . $op->Id . ' anulada';\n \t\t\t$data['Importe']\t=\t$d->Importe;\n \t\t\t$data['Saldo']\t=\t$Configuracion->Valor;\n \t\t\t$data['Debe']\t=\t$data['Importe'];\n \t\t\t\n \t\t\t$g = new Classes_GestionEconomicaManager();\n \t\t\t$g->AddHistorialEfectivo($data);\n \t\t}\n \t\t\n \t\t// si es un tipo de pago: transferencia (id = 13),\n \t\t// - actualizar saldo de la cuenta de banco asociada\n \t\tif($PagoTipoId == 13)\n \t\t{\n \t\t\tlist($banco, $cuenta)\t=\texplode('-', $d->Detalle);\n \t\t\t\n \t\t\tif(isset($cuenta) && is_numeric($cuenta))\n \t\t\t{\n \t\t\n \t\t\t\t$banco\t\t= Doctrine::getTable('Banco')->FindOneByNumeroDeCuenta($cuenta);\n \t\t\t\tif(!is_object($banco))\n \t\t\t\t\tthrow new Exception('El banco ingresado no existe');\n \t\t\n \t\t\t\t$ctacte\t\t=\tnew Classes_CuentaCorrienteManager();\n \t\t\t\t$data['Debe']\t=\t$d->Importe;\n \t\t\t\t$data['Saldo']\t=\t$banco->SaldoCuenta;\n \t\t\t\t$data['BancoId']\t=\t$banco->Id;\n \t\t\t\t$data['Detalle']\t=\t'Tranferencia bancaria de OP '.$op->Numero. ' anulada';\n \t\t\t\t$ctacte->AddConceptoBancoCuentaCorriente($data);\n \t\t\t}\n \t\t}\n \t\t\n \t}\n }", "public function pagos(Request $request){\n /* Creating a query to the database, but not executing it. */\n $pagos = PensionFondoPago::where('fondo_id','=',$this->id);\n if($request->fechaIni != '')\n /* Adding a filter to the query. */\n $pagos = $pagos->whereBetween('fecha_movimiento', [$request->fechaIni, $request->fechaFin]);\n /* Adding a filter to the query, and then executing it. */\n $pagos = $pagos->orderBy('fecha_movimiento','desc')->paginate(10);\n return $pagos;\n }", "public function MediosPagosPorId()\n{\n\tself::SetNames();\n\t$sql = \" select * from mediospagos where codmediopago = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codmediopago\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "function ModificarPaginas($pags){\n\t\t$this->ConectarBD();\n\t\t$sql=\"DELETE FROM EMPLEADOS_PAGINA WHERE EMP_USER='\".$this->EMP_USER.\"'\";\n\t\t$this->mysqli->query($sql);\n\t\tfor ($i=0;$i<count($pags);$i++){\n\t\t\t$sql=\"INSERT INTO EMPLEADOS_PAGINA(EMP_USER,PAGINA_ID) VALUES ('\".$this->EMP_USER.\"', \".ConsultarIDPagina($pags[$i]).\")\";\n\n\t\t\t$this->mysqli->query($sql);\n\t\t}\n\t}", "public function pagar()\n\t{\n\t\tif ( ! $this->Auth->user() )\n\t\t{\n\t\t\t$this->Session->write('Flujo.loginPending', array('controller' => 'reservas', 'action' => 'add'));\n\t\t\t$this->redirect(array('controller' => 'usuarios', 'action' => 'login'));\n\t\t}\n\n\t\t/**\n\t\t * Comprueba que existan productos en el carro\n\t\t */\n\t\t$productos\t\t\t= $this->Carro->productos('reserva');\n\t\tif ( empty($productos['reserva']) )\n\t\t{\n\t\t\t$this->redirect(array('action' => 'add'));\n\t\t}\n\n\t\t/**\n\t\t * Comprueba si existe una compra en proceso\n\t\t */\n\t\tif ( ( $id = $this->Session->read('Flujo.Reserva.compra_id') ) && $this->Reserva->DetalleCompra->Compra->pendiente($id) )\n\t\t{\n\t\t\t$this->Reserva->DetalleCompra->Compra->id\t\t\t= $id;\n\t\t}\n\n\t\t/**\n\t\t * Guarda la compra en estado pendiente\n\t\t */\n\t\t$compra\t\t\t\t= $this->Reserva->DetalleCompra->Compra->registrarCarro($productos, null, 0, true);\n\t\t$this->Session->write('Flujo.Reserva.compra_id', $compra['Compra']['id']);\n\n\t\t/**\n\t\t * Si existe error al guardar la compra, devuelve al usuario a la pagina de resumen\n\t\t * para reintentar la operacion\n\t\t */\n\t\tif ( ! $compra )\n\t\t{\n\t\t\t$this->redirect(array('action' => 'resumen'));\n\t\t}\n\n\t\t/**\n\t\t * Verifica si es necesario pasar por webpay\n\t\t */\n\t\tif ( $compra['Compra']['total'] )\n\t\t{\n\t\t\t/**\n\t\t\t * Datos necesarios para comenzar el flujo con webpay\n\t\t\t */\n\t\t\t$webpay\t\t\t= array(\n\t\t\t\t'gateway'\t\t\t=> Router::url($this->Transbank->cgiPath['pago'], true),\n\t\t\t\t'oc'\t\t\t\t=> $compra['Compra']['id'],\n\t\t\t\t'monto'\t\t\t\t=> sprintf('%d00', $compra['Compra']['total']),\n\t\t\t\t'exito'\t\t\t\t=> Router::url(array('controller' => 'reservas', 'action' => 'exito'), true),\n\t\t\t\t'fracaso'\t\t\t=> Router::url(array('controller' => 'reservas', 'action' => 'fracaso'), true)\n\t\t\t);\n\n\t\t\t$this->layout\t\t= 'ajax';\n\t\t\t$this->set(compact('webpay'));\n\t\t}\n\n\t\t/**\n\t\t * Si la reserva no tiene seleccion de productos, pasa al detalle de reserva\n\t\t */\n\t\telse\n\t\t{\n\t\t\t$this->Reserva->DetalleCompra->Compra->cambiarEstado($compra['Compra']['id'], 'PAGADO', null, true, false);\n\t\t\t$this->redirect(array('action' => 'exito', $compra['Compra']['id']));\n\t\t}\n\t}", "public function ListarProductosParaCotizacion($start, $limit, $sSearch, $iSortCol_0, $sSortDir_0, $categoria_id, $marca_id, $productos_id)\n {\n $arreglo_resultado = array();\n $cont = 0;\n\n $lista = $this->getDoctrine()->getRepository('IcanBundle:Producto')\n ->ListarProductosParaCotizacion($start, $limit, $sSearch, $iSortCol_0, $sSortDir_0, $categoria_id, $marca_id, $productos_id);\n\n foreach ($lista as $value) {\n $producto_id = $value->getProductoId();\n\n $nombre = $value->getNombre();\n $categoria = ($value->getCategoria() != null) ? $value->getCategoria()->getNombre() : \"\";\n $marca = ($value->getMarca() != null) ? $value->getMarca()->getNombre() : \"\";\n $estado = ($value->getEstado()) ? 1 : 0;\n $precio = $value->getPrecio();\n $fecha = $value->getFechapublicacion() != \"\" ? $value->getFechapublicacion()->format(\"d/m/Y H:i\") : \"\";\n $views = $value->getViews();\n\n $ruta = $this->ObtenerURL();\n $dir = 'uploads/productos/';\n $imagen = $ruta . $dir . $value->getImagen();\n\n\n $acciones = '<a href=\"javascript:;\" class=\"add importar-producto m-portlet__nav-link btn m-btn m-btn--hover-success m-btn--icon m-btn--icon-only m-btn--pill\" title=\"Agregar producto relacionado\"\n data-id=\"' . $producto_id . '\" data-nombre=\"' . $nombre . '\" data-categoria=\"' . $categoria . '\"\n data-marca=\"' . $marca . '\" data-estado=\"' . $estado . '\" data-imagen=\"' . $imagen . '\"\n data-precio=\"' . $precio . '\" data-fecha=\"' . $fecha . '\" data-views=\"' . $views . '\"> <i class=\"la la-plus\"></i> </a> ';\n\n $arreglo_resultado[$cont] = array(\n \"id\" => $producto_id,\n \"nombre\" => $nombre,\n \"categoria\" => $categoria,\n \"marca\" => $marca,\n \"estado\" => $estado,\n \"imagen\" => $imagen,\n \"precio\" => number_format($precio, 0, ',', '.'),\n \"fechapublicacion\" => $fecha,\n \"views\" => $views,\n \"acciones\" => $acciones\n );\n\n $cont++;\n }\n\n return $arreglo_resultado;\n }", "abstract public function getPaginate($premiereEntree, $messageTotal, $where);", "function listarSolicitudObligacionPago()\r\n {\r\n $this->procedimiento = 'tes.ft_solicitud_obligacion_pago_sel';\r\n $this->transaccion = 'TES_SOOBPG_SEL';\r\n $this->tipo_procedimiento = 'SEL';//tipo de transaccion\r\n\r\n\r\n $this->setParametro('id_funcionario_usu', 'id_funcionario_usu', 'int4');\r\n $this->setParametro('tipo_interfaz', 'tipo_interfaz', 'varchar');\r\n $this->setParametro('historico', 'historico', 'varchar');\r\n\r\n //Definicion de la lista del resultado del query\r\n $this->captura('id_obligacion_pago', 'int4');\r\n $this->captura('id_proveedor', 'int4');\r\n $this->captura('desc_proveedor', 'varchar');\r\n $this->captura('estado', 'varchar');\r\n $this->captura('tipo_obligacion', 'varchar');\r\n $this->captura('id_moneda', 'int4');\r\n $this->captura('moneda', 'varchar');\r\n $this->captura('obs', 'varchar');\r\n $this->captura('porc_retgar', 'numeric');\r\n $this->captura('id_subsistema', 'int4');\r\n $this->captura('nombre_subsistema', 'varchar');\r\n $this->captura('id_funcionario', 'int4');\r\n $this->captura('desc_funcionario1', 'text');\r\n $this->captura('estado_reg', 'varchar');\r\n $this->captura('porc_anticipo', 'numeric');\r\n $this->captura('id_estado_wf', 'int4');\r\n $this->captura('id_depto', 'int4');\r\n $this->captura('nombre_depto', 'varchar');\r\n $this->captura('num_tramite', 'varchar');\r\n $this->captura('id_proceso_wf', 'int4');\r\n $this->captura('fecha_reg', 'timestamp');\r\n $this->captura('id_usuario_reg', 'int4');\r\n $this->captura('fecha_mod', 'timestamp');\r\n $this->captura('id_usuario_mod', 'int4');\r\n $this->captura('usr_reg', 'varchar');\r\n $this->captura('usr_mod', 'varchar');\r\n $this->captura('fecha', 'date');\r\n $this->captura('numero', 'varchar');\r\n $this->captura('tipo_cambio_conv', 'numeric');\r\n $this->captura('id_gestion', 'integer');\r\n $this->captura('comprometido', 'varchar');\r\n $this->captura('nro_cuota_vigente', 'numeric');\r\n $this->captura('tipo_moneda', 'varchar');\r\n $this->captura('total_pago', 'numeric');\r\n $this->captura('pago_variable', 'varchar');\r\n $this->captura('id_depto_conta', 'integer');\r\n $this->captura('total_nro_cuota', 'integer');\r\n $this->captura('fecha_pp_ini', 'date');\r\n $this->captura('rotacion', 'integer');\r\n $this->captura('id_plantilla', 'integer');\r\n $this->captura('desc_plantilla', 'varchar');\r\n $this->captura('ultima_cuota_pp', 'numeric');\r\n $this->captura('ultimo_estado_pp', 'varchar');\r\n $this->captura('tipo_anticipo', 'varchar');\r\n $this->captura('ajuste_anticipo', 'numeric');\r\n $this->captura('ajuste_aplicado', 'numeric');\r\n $this->captura('monto_estimado_sg', 'numeric');\r\n $this->captura('id_obligacion_pago_extendida', 'integer');\r\n $this->captura('desc_contrato', 'text');\r\n $this->captura('id_contrato', 'integer');\r\n $this->captura('obs_presupuestos', 'varchar');\r\n $this->captura('codigo_poa', 'varchar');\r\n $this->captura('obs_poa', 'varchar');\r\n $this->captura('uo_ex', 'varchar');\r\n //Funcionario responsable de el plan de pagos\r\n $this->captura('id_funcionario_responsable', 'integer');\r\n $this->captura('desc_fun_responsable', 'text');\r\n\r\n $this->captura('id_conformidad', 'int4');\r\n $this->captura('conformidad_final', 'text');\r\n $this->captura('fecha_conformidad_final', 'date');\r\n $this->captura('fecha_inicio', 'date');\r\n $this->captura('fecha_fin', 'date');\r\n $this->captura('observaciones', 'varchar');\r\n $this->captura('fecha_certificacion_pres', 'date');\r\n\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "public function paginate($orderBy = 'nome', $perPage = 10);", "function listarObligacionPagoSol()\n {\n $this->objParam->defecto('ordenacion', 'id_obligacion_pago');\n $this->objParam->defecto('dir_ordenacion', 'asc');\n\n $this->objParam->addParametro('id_funcionario_usu', $_SESSION[\"ss_id_funcionario\"]);\n\n\n if ($this->objParam->getParametro('tipo_interfaz') == 'obligacionPagoUnico') {\n $this->objParam->addFiltro(\"obpg.tipo_obligacion = ''pago_unico''\");\n }\n\n if ($this->objParam->getParametro('tipo_interfaz') == 'obligacionPagoSol') {\n $this->objParam->addFiltro(\"obpg.tipo_obligacion in (''pago_directo'',''rrhh'')\");\n }\n\n if ($this->objParam->getParametro('tipo_interfaz') == 'obligacionPagoAdq') {\n $this->objParam->addFiltro(\"obpg.tipo_obligacion = ''adquisiciones''\");\n }\n\n if ($this->objParam->getParametro('id_obligacion_pago') != '') {\n $this->objParam->addFiltro(\"obpg.id_obligacion_pago = \" . $this->objParam->getParametro('id_obligacion_pago'));\n }\n\n if ($this->objParam->getParametro('filtro_campo') != '') {\n $this->objParam->addFiltro($this->objParam->getParametro('filtro_campo') . \" = \" . $this->objParam->getParametro('filtro_valor'));\n }\n if ($this->objParam->getParametro('id_gestion') != '') {\n $this->objParam->addFiltro(\"obpg.id_gestion = \" . $this->objParam->getParametro('id_gestion') . \" \");\n\n }\n\n //(may)para internacionales SP, SPD, SPI\n if ($this->objParam->getParametro('tipo_interfaz') == 'obligacionPagoS') {\n $this->objParam->addFiltro(\"obpg.tipo_obligacion in (''sp'')\");\n }\n if ($this->objParam->getParametro('tipo_interfaz') == 'solicitudObligacionPagoUnico') {\n $this->objParam->addFiltro(\"obpg.tipo_obligacion in (''spd'')\");\n }\n\n if ($this->objParam->getParametro('tipo_interfaz') == 'obligacionPagoInterS') {\n $this->objParam->addFiltro(\"obpg.tipo_obligacion in (''spi'')\");\n }\n\n //03/12/2020 (may) para pagos POC\n if ($this->objParam->getParametro('tipo_interfaz') == 'obligacionPagoPOC') {\n $this->objParam->addFiltro(\"obpg.tipo_obligacion in (''pago_poc'')\");\n }\n\n //filtro breydi.vasquez 07/01/2020 \n $this->objParam->getParametro('tramite_sin_presupuesto_centro_c') != '' && $this->objParam->addFiltro(\"obpg.presupuesto_aprobado = ''sin_presupuesto_cc'' \");\n //\n \n if($this->objParam->getParametro('tipoReporte')=='excel_grid' || $this->objParam->getParametro('tipoReporte')=='pdf_grid'){\n $this->objReporte = new Reporte($this->objParam,$this);\n $this->res = $this->objReporte->generarReporteListado('MODObligacionPago','listarObligacionPagoSol');\n } else{\n $this->objFunc=$this->create('MODObligacionPago');\n \n $this->res=$this->objFunc->listarObligacionPagoSol($this->objParam);\n }\n $this->res->imprimirRespuesta($this->res->generarJson());\n }", "public function Carregar_Pagina() : void\n {\n $view = $this->Retornar_Pagina();\n \n $view->set_peca_id($this->obj_contato_anunciante->get_obj_peca()->get_id());\n \n $view->Executar();\n }", "public function pedidos($id, $page)\n {\n \n //\n if(!(Gate::denies('read_franqueado'))){\n\n //Selecionar franquia com segurança\n $franquia = Auth::user()\n ->franquia()\n ->where('franquias.id', $id)\n ->first(); \n\n //Verifica se tem permissão na franquia-----------------------------\n if($franquia){\n\n /* ----------------- Inicia Conexão WC ----------------------- */\n $consumer_secret = $this->decrypt($franquia->consumer_secret); \n\n $woocommerce = new Client(\n $franquia->store_url, \n $franquia->consumer_key, \n $consumer_secret,\n [\n 'wp_api' => true,\n 'version' => 'wc/v3',\n ]\n );\n\n /* ----------------- FIM Inicia Conexão WC ----------------------- */\n\n if(!isset($page)){\n $page = 1;\n } \n\n //$pedidos = $woocommerce->get('products'); \n $pedidos = $woocommerce->get('orders', array('per_page'=>50, 'page'=>$page)); \n\n $woocommerceHeaders = $woocommerce->http->getResponse()->getHeaders();\n\n $totalPages = $woocommerceHeaders['X-WP-TotalPages']; \n\n\n //LOG ------------------------------------------------------\n $this->log(\"franqueado.pedidosFranqueado=\".$franquia);\n //----------------------------------------------------------\n\n return view('franqueado.pedido', \n array(\n 'franquia' => $franquia, \n 'pedidos' => $pedidos,\n 'page' => $page,\n 'totalPages' => $totalPages,\n 'linkPaginate' => 'franqueados/'.$franquia->id.'/pedidos/',\n ));\n\n }else{\n return view('errors.403');\n }\n //---------------------------------------------------------------------------------------------------\n \n }\n else{\n return view('errors.403');\n }\n }", "public function traerModulos()\n {\n $modeloPermisos = new \\App\\Models\\ModeloPermisos();\n $permisos = $modeloPermisos->traerDePerfil($_SESSION[\"id_perfil\"], $_SESSION[\"id_cliente\"]);\n\n // Modulos a lo que tiene acceso el usuario\n $modeloModulos = new \\App\\Models\\ModeloModulos();\n $i = 0;\n $modulos = []; // Modulos en general al que tiene acceso\n $hijos = []; // SubModulos de '$modulos' al que tiene acceso\n foreach ($permisos as $permiso)\n {\n // Obtenemos un modulo padre\n $modulosHijos = $modeloModulos->traerHijos($permiso[\"id_modulo\"], $permiso[\"id_cliente\"]);\n $j = 0;\n // Obtenemos los hijos del modulo padre\n foreach ($modulosHijos as $nhijos)\n {\n // Guardamos hijos\n $hijos[$j++] = [\"modulo\" => $nhijos[\"modulo\"], \"url\" => $nhijos[\"url\"]];\n }\n // Guardamos padres\n $modulos[$i++] = [\"modulo\" => $permiso[\"modulo\"], \"hijos\" => $hijos];\n $j = 0;\n $hijos = [];\n }\n // Limpiar aquellos modulos sin hijos\n $nmodulos = []; // Datos para el menu\n $i = 0;\n foreach ($modulos as $modulo)\n {\n if (empty($modulo[\"hijos\"]))\n continue;\n $nmodulos[$i++] = [\"modulo\" => $modulo[\"modulo\"], \"hijos\" => $modulo[\"hijos\"]];\n }\n\n return $nmodulos;\n }", "public function paginar_get(){\n\n $this->load->helper('paginacion');\n\n $pagina = $cliente_id = $this->uri->segment(3); // parametro #3\n $por_pagina = $cliente_id = $this->uri->segment(4); // parametro #4\n\n $campos = array('id','nombre','telefono1'); // campos de la tabla\n\n $respuesta = paginar_todo( 'clientes', $pagina, $por_pagina, $campos ); // helper\n $this->response( $respuesta ); // imprime el resultado de lo que se obtuvo\n }", "public function actionListado(){\n $model = new Cuenta();\n if(Yii::$app->request->post('consulta')!=NULL){ \n $this->layout = 'printlayout';\n $pdf = new mPDF('utf-8','A4-L',0,'',10,10,10,10);\n $movimientos = $model->getListado(Yii::$app->request->post('consulta'));\n $movPerPage=25;\n $misMovimientos = array_chunk($movimientos,$movPerPage,true);\n $numPages = count($misMovimientos);\n $anyoActual = Cuenta::getDb()->createCommand( 'SELECT contActual()' )->queryScalar();\n foreach($misMovimientos as $key=>$valor){\n $ultimo=false;\n if(($key+1)==$numPages){\n $ultimo=true;\n }\n \n $content = $this->render('imprimir', [\n 'model' => $model,'movimientos'=>$valor,'mpdf'=>$pdf,'ultimo'=>$ultimo,'anyoactual'=>$anyoActual,\n ]);\n //$pdf->SetHeader('Movimientos del año 2015');\n $pdf->SetHTMLHeader($this::$CABECERA,'',true);\n $pdf->SetFooter('Página '.($key+1).' de '.$numPages.'->'.'{PAGENO}');\n $pdf->WriteHTML($content);\n \n if(!$ultimo){\n $pdf->AddPage();\n }\n }\n \n $pdf->Output();\n exit;\n \n \n \n /****************************************************************************************/\n \n }\n /**Pagina de filtrado************************/\n return $this->render('listado', [\n 'model' => $model, 'tipos'=>$model->getTipos(),\n ]);\n }", "public function do_paging()\n {\n }", "function asignar_pago_adelantado($acceso,$id_contrato){\n\t$cable=conexion();\n\t$acceso1=conexion();\n\t$cable->objeto->ejecutarSql(\"select id_pago,costo_cobro,id_cont_serv from vista_pago_ser where id_contrato='$id_contrato' and id_serv='ZZZ00001'\");\n\twhile($row=row($cable)){\n\t\n\t\t$id_pago=trim($row['id_pago']);\n\t\t$id_cont_serv_deuda=trim($row['id_cont_serv']);\n\t\t$monto_pago=trim($row['costo_cobro'])+0;\n\t\t\n\t\t//echo \"<br>:$id_pago:$monto_pago:$id_cont_serv_deuda\";\n\t\t//echo \"<br>:select tipo_costo,id_cont_serv,(((cant_serv * costo_cobro)-descu) - pagado ) as costo from vista_contratodeu where id_contrato='$id_contrato' and status_con_ser='DEUDA' and costo_cobro>0 order by tipo_serv ,fecha_inst:<br>\";\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t$acceso1->objeto->ejecutarSql(\"select tipo_costo,id_cont_serv,(((cant_serv * costo_cobro)-descu) - pagado ) as costo from vista_contratodeu where id_contrato='$id_contrato' and status_con_ser='DEUDA' and (((cant_serv * costo_cobro)-descu) - pagado )>0 order by tipo_serv ,fecha_inst\");\n\t\twhile($row=row($acceso1)){\n\t\t\t$id_cont_serv=trim($row['id_cont_serv']);\n\t\t\t$tipo_costo=trim($row['tipo_costo']);\n\t\t\t$costo=trim($row['costo'])+0;\n\t\t\t//echo \"<br>id_cont_serv:$id_cont_serv:costo:$costo<br>\";\n\t\t\tif($monto_pago>=$costo){\n\t\t\t\t$id_select=$id_select.\"=@$id_cont_serv\";\n\t\t\t\t$acceso->objeto->ejecutarSql(\"Update contrato_servicio_deuda Set apagar=0, pagado=pagado+'$costo' where id_cont_serv='$id_cont_serv'\");\n\t\t\t\t$acceso->objeto->ejecutarSql(\"insert into pago_factura(id_pago,id_cont_serv,costo_cobro_serv) values ('$id_pago','$id_cont_serv','$costo')\");\n\t\t\t\t$acceso->objeto->ejecutarSql(\"update contrato_servicio_deuda set status_con_ser='PAGADO' where id_cont_serv='$id_cont_serv' and ((cant_serv * costo_cobro)-descu)=pagado\");\n\t\t\t\t$monto_pago=$monto_pago-$costo;\n\t\t\t}\n\t\t\telse if($monto_pago>0){\n\t\t\t\t$id_select=$id_select.\"=@$id_cont_serv\";\n\t\t\t\t$acceso->objeto->ejecutarSql(\"Update contrato_servicio_deuda Set apagar=0, pagado=pagado+'$monto_pago' where id_cont_serv='$id_cont_serv'\");\n\t\t\t\t\n\t\t\t\t$cable->objeto->ejecutarSql(\"select costo_cobro_serv from pago_factura where id_pago='$id_pago' and id_cont_serv='$id_cont_serv'\");\n\t\t\t\tif($row=row($cable)){\n\t\t\t\t\t$costo_cobro_serv1=trim($row['costo_cobro_serv'])+0;\n\t\t\t\t\t//echo \"<BR>ENTRO ACT<BR>update pago_factura set costo_cobro_serv=costo_cobro_serv+$costo_cobro_serv1 where id_pago='$id_pago' and id_cont_serv='$id_cont_serv';\";\n\t\t\t\t\t$acceso->objeto->ejecutarSql(\"update pago_factura set costo_cobro_serv=costo_cobro_serv+$costo_cobro_serv1 where id_pago='$id_pago' and id_cont_serv='$id_cont_serv'\");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$acceso->objeto->ejecutarSql(\"insert into pago_factura(id_pago,id_cont_serv,costo_cobro_serv) values ('$id_pago','$id_cont_serv','$monto_pago')\");\n\t\t\t\t}\n\t\t\t\t$acceso->objeto->ejecutarSql(\"update contrato_servicio_deuda set status_con_ser='PAGADO' where id_cont_serv='$id_cont_serv' and ((cant_serv * costo_cobro)-descu)=pagado\");\n\t\t\t\t$monto_pago=0;\n\t\t\t}\n\t\t}\n\t\t$acceso->objeto->ejecutarSql(\"select id_pago from contrato_servicio_deuda where id_cont_serv='$id_cont_serv_deuda'\");\n\t\t$row=row($acceso);\n\t\t$id_pago_ade=trim($row['id_pago']);\n\t\t\t//echo \"<br>:$monto_pago:<br>\";\n\t\tif($monto_pago>0){\n\t\t\t$acceso->objeto->ejecutarSql(\"update pago_factura set costo_cobro_serv=$monto_pago where id_cont_serv='$id_cont_serv_deuda' \");\n\t\t\t$acceso->objeto->ejecutarSql(\"update contrato_servicio_deuda set costo_cobro=$monto_pago, pagado=$monto_pago where id_cont_serv='$id_cont_serv_deuda'\");\n\t\t\t\n\t\t\tactualizar_monto_pago($acceso,$id_pago_ade);\n\t\t}else{\n\t\t\t\n\t\t\t$acceso->objeto->ejecutarSql(\"delete from pago_factura where id_cont_serv='$id_cont_serv_deuda'\");\n\t\t\t$acceso->objeto->ejecutarSql(\"delete from contrato_servicio_deuda where id_cont_serv='$id_cont_serv_deuda'\");\n\t\t\t//echo \"delete from pagos where id_pago='$id_pago_ade'<br><br>\";\n\t\t\t$acceso->objeto->ejecutarSql(\"delete from pagos where id_pago='$id_pago_ade'\");\n\t\t}\n\n\t}//while inicial\n}", "public function pagamento($pagamento){\n curl_setopt($this->curl, CURLOPT_URL, $this->url.\"payments\");\n curl_setopt($this->curl, CURLOPT_POST, 1);\n curl_setopt($this->curl, CURLOPT_HTTPHEADER, array(\n \"Content-Type: application/json\",\n \"Authorization: Bearer \".$this->token,\n \"X-Api-Version: 2\",\n \"X-Resource-Token: \".$this->recipientToken,\n ));\n\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, json_encode($pagamento));\n\n $temp = curl_exec($this->curl);\n $resp = json_decode($temp);\n\n return $resp;\n }", "public function ListarProductosParaRelacionados($start, $limit, $sSearch, $iSortCol_0, $sSortDir_0, $categoria_id, $marca_id, $productos_id)\n {\n $arreglo_resultado = array();\n $cont = 0;\n\n $lista = $this->getDoctrine()->getRepository('IcanBundle:Producto')\n ->ListarProductosParaRelacionados($start, $limit, $sSearch, $iSortCol_0, $sSortDir_0, $categoria_id, $marca_id, $productos_id);\n\n foreach ($lista as $value) {\n $producto_id = $value->getProductoId();\n\n $nombre = $value->getNombre();\n $categoria = ($value->getCategoria() != null) ? $value->getCategoria()->getNombre() : \"\";\n $marca = ($value->getMarca() != null) ? $value->getMarca()->getNombre() : \"\";\n $estado = ($value->getEstado()) ? 1 : 0;\n $precio = number_format($value->getPrecio(), 0, ',', '.');\n $fecha = $value->getFechapublicacion() != \"\" ? $value->getFechapublicacion()->format(\"d/m/Y H:i\") : \"\";\n $views = $value->getViews();\n\n $ruta = $this->ObtenerURL();\n $dir = 'uploads/productos/';\n $imagen = $ruta . $dir . $value->getImagen();\n\n\n $acciones = '<a href=\"javascript:;\" class=\"add importar-producto m-portlet__nav-link btn m-btn m-btn--hover-success m-btn--icon m-btn--icon-only m-btn--pill\" title=\"Agregar producto relacionado\"\n data-id=\"' . $producto_id . '\" data-nombre=\"' . $nombre . '\" data-categoria=\"' . $categoria . '\"\n data-marca=\"' . $marca . '\" data-estado=\"' . $estado . '\" data-imagen=\"' . $imagen . '\"\n data-precio=\"' . $precio . '\" data-fecha=\"' . $fecha . '\" data-views=\"' . $views . '\"> <i class=\"la la-plus\"></i> </a> ';\n\n $arreglo_resultado[$cont] = array(\n \"id\" => $producto_id,\n \"nombre\" => $nombre,\n \"categoria\" => $categoria,\n \"marca\" => $marca,\n \"estado\" => $estado,\n \"imagen\" => $imagen,\n \"precio\" => $precio,\n \"fechapublicacion\" => $fecha,\n \"views\" => $views,\n \"acciones\" => $acciones\n );\n\n $cont++;\n }\n\n return $arreglo_resultado;\n }", "function requestAllDadosProduto($page, $itensPorPagina)\n {\n\n $conn = new db_conect();\n $query = 'SELECT \n produto.codigo AS codigo,\n produto.nome AS produto, \n produto.preco, \n qntd_disponivel,\n qntd_min_vendida,\n categoria,\n tipo_venda,\n data_producao,\n data_validade,\n cliente.cpf AS vendedor_fk, \n cliente.nome AS vendedor, \n produto.data_cadastro AS data_anuncio, \n produto.avaliacao AS avaliacao_produto, \n produto.num_vendas AS num_vendas_produto, \n produto.num_visualizacao AS visualizacoes, \n caminho_foto AS foto \n FROM produto \n INNER JOIN cliente ON cliente.CPF = produto.produtor_fk \n INNER JOIN img_produto ON img_produto.produto_fk = produto.codigo \n WHERE \n produtor_fk = \"' . base64_decode($_SESSION['log_id']) . '\" \n AND \n caminho_foto = (SELECT caminho_foto FROM img_produto WHERE produto_fk = produto.codigo LIMIT 1) \n ORDER BY data_anuncio ASC LIMIT ' . $page . ', ' . $itensPorPagina . ';';\n\n\n $result = $conn->selectCustom($query);\n return $result;\n }", "public function pagar($id)\n {\n\n $com = Comisiones::where('id','=',$id)->first();\n\n $last = Comisiones::select('recibo')->where('estatus','=',2)->orderby('recibo', 'desc')->max('recibo');\n if ($last != NULL) {\n $last1 = $last;\n //$last = array_pop($last);\n } else {\n $last1 = 0;\n }\n\n $recibo = $last1 + 1;\n\n\n $a = Atenciones::where('id','=',$com->id_atencion)->first();\n $a->pagado =2;\n $resa = $a->update();\n \n\n $p = Comisiones::find($id);\n $p->estatus =2;\n $p->recibo = $recibo;\n $p->fecha_pago = date('Y-m-d');\n $res = $p->update();\n \n return back();\n\n //\n }", "function pagination(){}", "public function pedidosPorAsignar()\n {\n //pedidos no asignados (Estado 1)\n $porAsignar = \\App\\Pedido::select('id', 'estado', 'usuario_id', 'repartidor_id', 'estado_pago', 'created_at')\n ->with(['usuario' => function ($query) {\n $query->select('id', 'nombre');\n }])\n ->where('estado_pago','aprobado')\n ->where('estado',1)\n ->whereNull('repartidor_id')\n ->where(DB::raw(\"PERIOD_DIFF(DATE_FORMAT(now(), '%y%m') ,DATE_FORMAT(created_at, '%y%m'))\"), '<=', 1)\n ->orderBy('id', 'desc')\n ->take(10)\n ->get();\n\n\n return response()->json(['porAsignar'=>$porAsignar], 200);\n \n }", "public function getPaginas($OficialiaDto, $param, $estado) {\n $inicia = false;\n $orden = \" \";\n $campos = \" a.cveAdscripcion, a.desAdscripcion, o.cveOficialia, o.desOficilia, o.cveDistrito, d.desDistrito, o.cveMunicipio, m.desMunicipio, e.cveEstado, e.desEstado \";\n $orden .= \" o inner join tbladscripciones a on a.cveAdscripcion = o.cveAdscripcion \";\n $orden .= \" left join tblmunicipios m on m.cveMunicipio = o.cveMunicipio \";\n $orden .= \" left join tbldistritos d on d.cveDistrito = o.cveDistrito \";\n $orden .= \" left join tblestados e on e.cveEstado = d.cveEstado AND e.cveEstado = m.cveMunicipio \";\n $orden .= \" where a.activo = 'S' \";\n $orden .= \" AND o.activo = 'S' \";\n if ($estado != \"\")\n $orden .= \" AND e.cveEstado = \" . $estado . \" \";\n if ($OficialiaDto->getCveMunicipio() != \"\")\n $orden .= \" AND o.cveMunicipio = \" . $OficialiaDto->getCveMunicipio() . \" \";\n if ($OficialiaDto->getCveDistrito() != \"\")\n $orden .= \" AND o.cveDistrito = \" . $OficialiaDto->getCveDistrito() . \" \";\n if ($OficialiaDto->getDesOficilia() != \"\")\n $orden .= \" AND o.desOficilia like '%\" . $OficialiaDto->getDesOficilia() . \"%' \";\n $OficialiaDao = new OficialiaDAO();\n $param[\"paginacion\"] = false;\n $oficialia = new OficialiaDTO();\n $numTot = $OficialiaDao->selectOficialia($oficialia, $orden, null, null, \" count(o.cveOficialia) as totalCount \");\n $Pages = (int) $numTot[0]['totalCount'] / $param[\"cantxPag\"];\n $restoPages = $numTot[0]['totalCount'] % $param[\"cantxPag\"];\n $totPages = $Pages + (($restoPages > 0) ? 1 : 0);\n\n $json = \"\";\n $json .= '{\"type\":\"OK\",';\n $json .= '\"totalCount\":\"' . $numTot[0]['totalCount'] . '\",';\n $json .= '\"data\":[';\n $x = 1;\n\n if ($totPages >= 1) {\n for ($index = 1; $index <= $totPages; $index++) {\n\n $json .= \"{\";\n $json .= '\"pagina\":' . json_encode(utf8_encode($index)) . \"\";\n $json .= \"}\";\n $x++;\n if ($x <= ($totPages )) {\n $json .= \",\";\n }\n }\n $json .= \"],\";\n $json .= '\"pagina\":{\"total\":\"\"},';\n $json .= '\"total\":\"' . ($index - 1) . '\"';\n $json .= \"}\";\n } else {\n $json .= \"]}\";\n }\n return $json;\n }", "public function ListarProductos($start, $limit, $sSearch, $iSortCol_0, $sSortDir_0, $categoria_id, $marca_id)\n {\n $arreglo_resultado = array();\n $cont = 0;\n\n $lista = $this->getDoctrine()->getRepository('IcanBundle:Producto')\n ->ListarProductos($start, $limit, $sSearch, $iSortCol_0, $sSortDir_0, $categoria_id, $marca_id);\n\n\n foreach ($lista as $value) {\n $producto_id = $value->getProductoId();\n\n $acciones = $this->ListarAcciones($producto_id);\n\n $ruta = $this->ObtenerURL();\n $dir = 'uploads/productos/';\n $imagen = $ruta . $dir . $value->getImagen();\n\n $acciones1 = '';\n $ficha = $value->getFicha();\n if ($ficha != \"\") {\n $acciones1 = ' <a href=\"' . $this->generateUrl('descargarFichaProducto', array('producto_id' => $producto_id)) . '\" target=\"_blank\" class=\"download m-portlet__nav-link btn m-btn m-btn--hover-accent m-btn--icon m-btn--icon-only m-btn--pill\" title=\"Descargar ficha\"><i class=\"la la-download\"></i></a>';\n }\n\n $arreglo_resultado[$cont] = array(\n \"id\" => $producto_id,\n \"nombre\" => $value->getNombre(),\n \"categoria\" => ($value->getCategoria() != null) ? $value->getCategoria()->getNombre() : \"\",\n \"marca\" => ($value->getMarca() != null) ? $value->getMarca()->getNombre() : \"\",\n \"estado\" => ($value->getEstado()) ? 1 : 0,\n \"imagen\" => $imagen,\n \"precio\" => number_format($value->getPrecio(), 0, ',', '.'),\n \"fechapublicacion\" => $value->getFechapublicacion() != \"\" ? $value->getFechapublicacion()->format(\"d/m/Y H:i\") : \"\",\n \"views\" => $value->getViews(),\n \"acciones\" => $acciones . $acciones1\n );\n\n $cont++;\n }\n\n return $arreglo_resultado;\n }", "protected function selectPagos($tabla) {\n $getproducto = $this->_db->query(\"SELECT deuda.Id_cliente as dni, nombre as nombre, apellidos as apellido, \n direccion as direccion, telefono as telefono, celular as celular, deuda.total as deuda\n FROM $tabla as pagos \n INNER JOIN venta as venta ON venta.Id_deuda = pagos.Id_deuda\n INNER JOIN productoventa as prodventa ON venta.cod_busqueda = prodventa.cod_busqueda\n INNER JOIN deuda as deuda ON deuda.Id_deuda = venta.Id_deuda\n INNER JOIN cliente as cliente ON cliente.Id_cliente = deuda.Id_cliente where pagos.estado = 0 and pagos.Fecha_Pago = CURDATE()\n GROUP BY cliente.Id_cliente\n ORDER BY deuda.Fecha_deuda\");\n $this->_db->cerrar();\n return $getproducto->fetchall();\n }", "function getPagos() {\n $where = \" WHERE 1\";\n $array = \"\";\n $columns = \"`Id_pago`, `Nombre`, `Email`, `Fecha_anterior`, `Pago`, `Proxima_fecha`, `Estatus`, `Id_cliente`\";\n $response = $this->db->select3($columns, 'pagos', $where, $array);\n return $response;\n }", "function listarRelacionProceso(){\n $this->objParam->defecto('ordenacion','id_relacion_proceso_pago');\n $this->objParam->defecto('dir_ordenacion','asc');\n\n\n if($this->objParam->getParametro('tipoReporte')=='excel_grid' || $this->objParam->getParametro('tipoReporte')=='pdf_grid'){\n $this->objReporte = new Reporte($this->objParam,$this);\n $this->res = $this->objReporte->generarReporteListado('MODObligacionPago','listarRelacionProceso');\n } else{\n $this->objFunc=$this->create('MODObligacionPago');\n\n $this->res=$this->objFunc->listarRelacionProceso($this->objParam);\n }\n $this->res->imprimirRespuesta($this->res->generarJson());\n }", "function paginateWithExtra($size = 15);", "public function PagarCompras()\n{\n\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\tself::SetNames();\n\t\t$sql = \" update compras set \"\n\t\t.\" fechavencecredito = '0000-00-00', \"\n\t\t.\" statuscompra = ? \"\n\t\t.\" where \"\n\t\t.\" codcompra = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $statuscompra);\n\t\t$stmt->bindParam(2, $codcompra);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$statuscompra = strip_tags(\"PAGADA\");\n\t\t$stmt->execute();\n\n\t\theader(\"Location: compraspendientes?mesage=1\");\n\t\texit;\n\n\t} else {\n\n\t\theader(\"Location: compraspendientes?mesage=2\");\n\t\texit;\n\t}\n\n}", "public function MediosPagosId()\n\t{\n\t\tself::SetNames();\n\t\t$sql = \" select * from mediospagos where codmediopago = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_GET[\"formapagove\"]) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\n\t\t{\n\t\t\techo \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t\t{\n\t\t\t\t\t$this->p[] = $row;\n\t\t\t\t}\n\t\t\t\treturn $this->p;\n\t\t\t\t$this->dbh=null;\n\t\t\t}\n\t\t}", "public function gera_pagamentos_renovacao()\n {\n $this->FinanceiroPagamento->geraPagamentoRenovacaoMatriculas();\n }", "public function consultaPaginas(){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT * FROM tbpaginas order by idpaginas\";\n $sql = $this->conexao->query($sql);\n $dados = array();\n\n while ($row = $sql->fetch_assoc()) {\n\n $dado = array();\n $dado['idpaginas'] = $row['idpaginas'];\n $dado['paginas'] = $row['nome_paginas'];\n $dado['url'] = $row['paginas'];\n $dados[] = $dado;\n }\n\n return $dados;\n\n }", "public function paginate()\n {\n }", "public function EliminarMediosPagos()\n\t\t{\n\n\t\t\t$sql = \" select codmediopago from ventas where codmediopago = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->execute( array(base64_decode($_GET[\"codmediopago\"])) );\n\t\t\t$num = $stmt->rowCount();\n\t\t\tif($num == 0)\n\t\t\t{\n\n\t\t\t\t$sql = \" delete from mediospagos where codmediopago = ? \";\n\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t$stmt->bindParam(1,$codmediopago);\n\t\t\t\t$codmediopago = base64_decode($_GET[\"codmediopago\"]);\n\t\t\t\t$stmt->execute();\n\n\t\t\t\theader(\"Location: mediospagos?mesage=1\");\n\t\t\t\texit;\n\n\t\t\t}else {\n\n\t\t\t\theader(\"Location: mediospagos?mesage=2\");\n\t\t\t\texit;\n\t\t\t}\n\n\t\t}", "public function index()\n {\n $user = Auth::user();\n\n if(!$user == null)\n {\n\n $id_opcion = 9010;\n $idperfil = auth()->user()->id_perfil;\n $emailclien = auth()->user()->email;\n $perfiles = Opcperfil::where('id_perfil', '=', $idperfil)\n ->where('id_opcion','=', $id_opcion)->get();\n \n $operfiles = Perfil::orderBy('id_perfil')\n ->paginate(5);\n // ->get();\n return view('perfiles.t_perfiles', compact('perfiles', 'operfiles'));\n } else {\n return Redirect::to('home'); \n }\n\n }", "public static function paginado_usuario(){\n\t\t $page = 1; //inicializamos la variable $page a 1 por default\n\t\t if(array_key_exists('pg', $_GET)){\n\t\t $page = $_GET['pg']; //si el valor pg existe en nuestra url, significa que estamos en una pagina en especifico.\n\t\t }\n\t\t //ahora que tenemos en que pagina estamos obtengamos los resultados:\n\t\t // a) el numero de registros en la tabla\n\t\t $mysqli = new mysqli(\"localhost\",\"root\",\"slam2018\",\"corgran\");\n\t\t if ($mysqli->connect_errno) {\n\t\t\t\tprintf(\"Connect failed: %s\\n\", $mysqli->connect_error);\n\t\t\t\texit();\n\t\t\t}\n\n\n\t\t $conteo_query = $mysqli->query(\"SELECT COUNT(*) as conteo FROM usuarios\");\n\t\t $conteo = \"\";\n\t\t if($conteo_query){\n\t\t \twhile($obj = $conteo_query->fetch_object()){ \n\t\t \t \t$conteo =$obj->conteo; \n\t\t \t}\n\t\t }\n\t\t $conteo_query->close(); \n\t\t unset($obj); \n \t\t\n\t\t //ahora dividimos el conteo por el numero de registros que queremos por pagina.\n\t\t $max_num_paginas = intval($conteo/10); //en esto caso 10\n\t\t\t\n\t\t // ahora obtenemos el segmento paginado que corresponde a esta pagina\n\t\t $segmento = $mysqli->query(\"SELECT * FROM usuarios LIMIT \".(($page-1)*10).\", 10 \");\n $resultado=[];\n\t\t //ya tenemos el segmento, ahora le damos output.\n\t\t if($segmento){\n\t\t\t // echo '<table>';\n\t\t\t while($obj2 = $segmento->fetch_object())\n\t\t\t {\n\t\t\t \t$obj_usu = new usuario($obj2->id_usuario,$obj2->tipo_usu,$obj2->nombre,$obj2->clave);\n $resultado[]=$obj_usu;\n\t\t\t /* echo '<tr>\n\t\t\t <td>'.$obj2->id_usuario.'</td>\n\t\t\t <td>'.$obj2->tipo_usu.'</td>\n\t\t\t <td>'.$obj2->nombre.'</td>\n\t\t\t </tr>'; \n\t\t\t */ }\n\t\t\t // echo '</table><br/><br/>';\n\t\t\t}\n\t\n\t\t //ahora viene la parte importante, que es el paginado\n\t\t //recordemos que $max_num_paginas fue previamente calculado.\n\t\t for($i=0; $i<$max_num_paginas;$i++){\n\n\t\t echo '<a href=\"index.php?pg='.($i+1).'\">'.($i+1).'</a> | ';\n\t\t \n\t\t } \n\t\t echo '<div>-------------------------- PAginacion------------------------------------------------</div>'; \n return $resultado; \n \n }", "public static function pageTbhotelCliente($inicio, $pag, $rgtro)\n {\n $str=\"\";\n $str = \"select * from \".self::$tablename;\n if (trim($inicio) <> \"\")\n {\n // ojo cambiar las xxx por campo de busqueda \n $str.= \" Where xxxxx like '%$inicio%'\";\n $str.= \"\t or xxxxx like '%$inicio%'\";\n } \n $str .= \" order by xxxxx desc limit \" . $pag . \",\" . $rgtro;\n $cnx = dbcon();\n $rr = mysqli_query($cnx, $str);\n $array1 = array();\n $cn = 0;\n while ($rx = mysqli_fetch_array($rr))\n { \n $array1[$cn] = new tbhotelClienteData();\n $array1[$cn]->cons = $cn;\n $array1[$cn]->idnitHotel = $rx['idnitHotel'];\n $array1[$cn]->nitHotel = $rx['nitHotel'];\n $array1[$cn]->idCiudad = $rx['idCiudad'];\n $array1[$cn]->nomHotel = $rx['nomHotel'];\n $array1[$cn]->dirHotel = $rx['dirHotel'];\n $array1[$cn]->telHotel1 = $rx['telHotel1'];\n $array1[$cn]->telHotel2 = $rx['telHotel2'];\n $array1[$cn]->correoHotel = $rx['correoHotel'];\n $array1[$cn]->tipoHotel = $rx['tipoHotel'];\n $array1[$cn]->Administrador = $rx['Administrador'];\n $array1[$cn]->idRedes = $rx['idRedes'];\n $array1[$cn]->aforo = $rx['aforo'];\n $array1[$cn]->tipoHabitaciones = $rx['tipoHabitaciones'];\n $array1[$cn]->status = $rx['status'];\n $cn++;\n } // fin del Ciclo\n return $array1;\n }", "public function bppersona($id_per,$nperson,$pagina=null)\n {\n $id_persona=($id_per); \n $datatram2=DB::select('SELECT distinct t.IDTRAMITE,t.COSTO_TRAM,t.TRAMOSERV,t.ENLINEA,t.Ambito,t.AMBITO_MUN_CLAVE,t.COSTO_TRAM,t.COSTO_CANTIDAD,t.Denominacion,t.PRINFIN_URL,t.PREGES_URL,t.CHAT_URL,t.PRINFIN,t.PREGES,t.CHAT,t.PRESENCIAL,t.PRINFIN_SEITS,t.TIPOTRAM,t.PREGES_SEITS\n FROM TBGEM_CITRAMITE t\n INNER JOIN TBGEM_CITRAM_PERFIL TT ON TT.IDTRAMITE = t.IDTRAMITE\n INNER JOIN TBGEM_CIPERFIL TM ON TM.ID_PERFIL = TT.ID_PERFIL\n WHERE t.BAJA = 0\n AND TM.ID_PERFIL='.$id_persona.'\n order by t.denominacion');\n\n\n\n\n // return $datatram;\n $count = sizeof($datatram2);\n $nper =($nperson);\n $tram_x_pag=9;\n $paginas =$count/9;\n $paginas=ceil($paginas);\n $id_persona=($id_per);\n $pagina=($pagina);\n $inicia=($pagina-1)*$tram_x_pag;\n\n\n $datatram=DB::select('SELECT distinct t.IDTRAMITE,t.COSTO_TRAM,t.TRAMOSERV,t.ENLINEA,t.Ambito,t.AMBITO_MUN_CLAVE,t.COSTO_TRAM,t.COSTO_CANTIDAD,t.Denominacion,t.PRINFIN_URL,t.PREGES_URL,t.CHAT_URL,t.PRINFIN,t.PREGES,t.CHAT,t.PRESENCIAL,t.PRINFIN_SEITS,t.TIPOTRAM,t.PREGES_SEITS\n FROM TBGEM_CITRAMITE t\n INNER JOIN TBGEM_CITRAM_PERFIL TT ON TT.IDTRAMITE = t.IDTRAMITE\n INNER JOIN TBGEM_CIPERFIL TM ON TM.ID_PERFIL = TT.ID_PERFIL\n WHERE t.BAJA = 0\n AND TM.ID_PERFIL='.$id_persona.'\n order by t.denominacion\n OFFSET '.$inicia.' ROWS FETCH FIRST '.$tram_x_pag.' ROW ONLY');\n\n\n \n\n return view('VistasRetys.personatarjeta')\n /*->with(['dataper'=>$datapersona])*/\n ->with(['id_persona'=>$id_persona])\n ->with(['datatram'=>$datatram])\n ->with(['count'=>$count])\n ->with(['nper'=>$nper])\n ->with(['paginas'=>$paginas])\n ->with(['pagina'=>&$pagina]);\n }", "public function ListarComprasPag()\n\t{\n\t\tself::SetNames();\t\t\n\t\t$sql = \" SELECT compras.codcompra, compras.subtotalivasic, compras.subtotalivanoc, compras.ivac, compras.totalivac, compras.descuentoc, compras.totaldescuentoc, compras.totalc, compras.statuscompra, compras.fechavencecredito, compras.fechacompra, proveedores.nomproveedor, SUM(detallecompras.cantcompra) AS articulos FROM (compras INNER JOIN proveedores ON compras.codproveedor = proveedores.codproveedor) INNER JOIN usuarios ON compras.codigo = usuarios.codigo LEFT JOIN detallecompras ON detallecompras.codcompra = compras.codcompra WHERE compras.statuscompra = 'PAGADA' GROUP BY compras.codcompra\";\n foreach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\treturn $this->p;\n\t\t$this->dbh=null;\t \n}", "function deletaPagamento($idpedido){\n //$conexao = $c->conexao();\n\n $sql = \"UPDATE tbpedido_pagamento SET status='D' WHERE idpedido ='$idpedido' \";\n\n $mensagem = \"O Pagamento do Pedido $idpedido foi deletado!\";\n $this->salvaLog($mensagem);\n\n return $this->conexao->query($sql);\n }", "public function paginateAllDeleted($postsPerPage);", "public function procesarPagos(){ \n\t\trequire_once './core/SimpleXLSX.php';\n\t\t$dato=\"\";\n\t\t$fecha=\"\";\n\t\t$reg=0;\n\t\t$act=0;\n\t\t$count1=0;\n\t\t$aporte0=new Aporte($this->adapter);\n\t\t$porCruzar= $aporte0->contarCruceAportes();\n\t\tif (isset($porCruzar) && count($porCruzar)>=1)\n {\n\t\t\t\t foreach($porCruzar as $aporte)\n\t\t\t\t {\n\t\t\t\t\t $count1 = $aporte->aporteID;\n\t\t\t\t }\n\t\t\t }\n\t\t\n\t\tif ( $xlsx = SimpleXLSX::parse( './uploads/Datos.xlsx' ) ) {\n\t\t\t \n\t foreach ( $xlsx->rows() as $r => $row ) {\n\t\t\n\t\tif ($r > 0)\n\t\t{\n\t\t\tif ($row[5]!= 'Depósito')\n\t\t\t{\n\t\t\t\t$fecha = substr($row[3], 0, 19) ;\n\t\t\t\t$fecha = str_replace(\".\",\":\",$fecha);\n\t\t\t\t$fecha = substr_replace($fecha, \" \", 10, 1);\n\t\t\t\t\t//echo $fecha.':'.$row[5].'|||'.$fecha .'<br/>';\n\t\t\t\t\t\n\t\t\t\t$aporte=new Aporte($this->adapter);\n\t\t\t\t$aporte->setTransactionID($row[4]);\n\t\t\t\t$aporte->setBank($row[14]);\n\t\t\t\t$aporte->setRegisteredDate($fecha);\n\t\t\t\t$aporte->setValue($row[6]);\n\t\t\t\t$aporte->setAccount($row[13]);\n\t\t\t\t\n\t\t\t\t$save=$aporte->updateCruce(); // Manda a actualizar la moto en el modelo\n\t\t\t\tif ($save == TRUE)\n\t\t\t\t{\n\t\t\t\t\t$act = $act+1;\n\t\t\t\t}\n\t\t\t\t$reg = $reg+1;\t\n\t\t\t\t//$dato = \"UPDATE aporte set \\\"transactionId\\\"='\".$row[4].\"', \\\"bank\\\"='\".$row[14].\"', \\\"registeredDate\\\"='\".$fecha.\"', \\\"bankValidated\\\"='true' WHERE \\\"account\\\"='\".$row[13].\"' AND \\\"value\\\"='\".$row[6].\"' AND \\\"bankValidated\\\"='false' AND \\\"callCenterValidated\\\"='false' AND \\\"transactionId\\\"= '0';\";\n\t\t\t\t//echo strval($save) . '<br/>';\n\t\t\t\ttry{\n\t\t\t\t$payment=new Payment($this->adapter);\n\t\t\t\t$payment->setTransactionID($row[4]);\n\t\t\t\t$payment->setValue($row[6]);\n\t\t\t\t$payment->setCedula($row[10]);\n\t\t\t\t$payment->setBank($row[14]);\n\t\t\t\t$payment->setAccount($row[13]);\n\t\t\t\t$payment->setRegisteredDate($fecha);\n\t\t\t\t$payment->setIsMatched('false');\n\t\t\t\t$payment->setIsActive('true');\n\t\t\t\t$save=$payment->save();\n\t\t\t\t}\n\t\t\t\tcatch (Exception $e) {\n\t\t\t\t\t//echo 'Excepción capturada: ', $e->getMessage(), \"\\n\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t}\n\t\t} else {\n\t\techo SimpleXLSX::parseError();\n\t\t}\n\t\t\t$count2=0;\n\t\t$aporte1=new Aporte($this->adapter);\n\t\t$porCruzar1= $aporte1->contarCruceAportes();\n\t\tif (isset($porCruzar1) && count($porCruzar1)>=1)\n {\n\t\t\t\t foreach($porCruzar1 as $aporte)\n\t\t\t\t {\n\t\t\t\t\t $count2 = $aporte->aporteID;\n\t\t\t\t }\n\t\t\t }\n\t\t$payment0=new Payment($this->adapter);\n\t $save=$payment0->updateMatch();\n\t\n\t\t$aporte1->phpAlert('Registros econtrados en excel: ' .$reg \n\t\t.'\\nRegistros procesados desde el excel: ' .$act\n\t\t.'\\nAportes pendientes por cruzar antes del cruce: ' .$count1\n\t\t.'\\nAportes pendientes de cruzar luego del cruce: ' .$count2\n\t\t.'\\nTOTAL CRUZADOS en esta carga: ' .($count1 - $count2),\n\t\t$this->baseUrl(\"BandejaCallcenters\", \"index\")); // Alerta y redirige\n //$this->redirect(\"BandejaBancos\", \"index\"); // COntrolador + Vista\n }", "public function listar_mis_pedidos() {\n \n try {\n $sql = \"\n select \n c.nro_documento,\n c.nombre,\n c.correo,\n c.telefono_celular,\n p.direccion_entrega,\n p.referencia_entrega,\n p.observacion,\n d.descripcion,\n c.cod_distrito,\n f.descripcion,\n p.importe_total,\n p.fecha_pedido,\n p.nro_pedido,\n p.cantidad_productos,\n p.estado,\n p.id_pedido\n from \n cliente c inner join pedido p\n on\n c.id_cliente = p.id_cliente inner join distrito d\n on\n c.cod_distrito = d.cod_distrito inner join forma_pago f\n on\n f.id_forma_pago = p.id_forma_pago\n where\n p.estado = 'PENDIENTE' and c.id_cliente = '$_SESSION[cliente_id]'; \n \";\n $sentencia = $this->dblink->prepare($sql);\n $sentencia->execute();\n $resultado = $sentencia->fetchAll(PDO::FETCH_ASSOC);\n return $resultado;\n } catch (Exception $exc) {\n throw $exc;\n }\n }", "function setComprobantePagoARegistroPago() {\n\t\tglobal $bd;\t\t\n\t\tglobal $x_correlativo_comprobante;\n\t\t$correlatico_comprobante = $x_correlativo_comprobante;\n\t\t$x_array_comprobante = $_POST['p_comprobante'];\n\t\t$id_registro_pago = $_POST['idregistro_pago'];\n\n\t\t$idtipo_comprobante_serie = $x_array_comprobante['idtipo_comprobante_serie'];\n\t\t\n\t\t$sqlrp=\"update registro_pago set idtipo_comprobante_serie=\".$idtipo_comprobante_serie.\" where idregistro_pago=\".$id_registro_pago;\n\t\t$idregistro_pago=$bd->xConsulta_NoReturn($sqlrp);\n\t}", "public function index()\n {\n /* $permisos = Permiso::where('user_id', $user->id)->orderBy('created_at', 'ASC')->paginate(10);\n return view('/permisos', compact('permisos', 'user'));\n $permiso [] = DB::table('permisos')->pluck('user_id');\n $user= User::where('id', $permiso);\n return view('dir.permisos.index', compact('user'))->with('permisos', Permiso::paginate(10));\n //return $permiso;*/\n $datas = DB::table('permisos as P')\n ->select('P.fecha_ausencia', 'P.tipo', 'P.created_at', 'P.cargo', 'P.aprobado', 'U.nombre', 'U.id','P.id as pid')\n ->where('aprobado', 0)\n ->join('users as U', 'U.id', '=', 'P.user_id')\n ->orderBy('P.created_at', 'DESC')\n ->paginate(10);\n return view('dir.permisos.index', compact('datas'));\n }", "function perfiles($acceso){\n\t$acceso->objeto->ejecutarSql(sql(\"modulo ORDER BY nombremodulo\"));\t\n\treturn seguridadPerfil($acceso);\n}", "function agenda_liste_paginer($id_agenda=0, $annee_choisie=0, $mois_choisi=0, $filtre='-1', $separateur='&nbsp;|&nbsp;', $ancre=NULL, $tri='normal') {\n\tstatic $count_page = 0;\n\n\tif ($id_agenda == 0)\n\t\treturn $count_page;\n\n\t$evenements = agenda_recenser_evenement(0);\n\t$count_evt = count($evenements);\n\n\t$pagination = NULL;\n\tif ($count_evt == 0)\n\t\treturn $pagination;\n\n\tif ($ancre)\n\t\t$pagination .= '<a class=\"ancre\" name=\"pagination_'.$ancre.'\" id=\"pagination_'.$ancre.'\"></a>';\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\t}\n\n\n\t$annee_courante = 0;\n\t$nouvelle_annee = FALSE;\n\t$count_page = 0;\n\n\tfor ($i=1;$i<=$count_evt;$i++) {\n\t\t$j = ($tri == 'inverse') ? $count_evt - $i + 1 : $i;\n\t\tif (($filtre == '-1') || \n\t\t\t(($filtre == '0') && (!$evenements[$j]['categorie'])) ||\n\t\t\t(($filtre != '-1') && ($filtre != '0') && (preg_match(\"/<$filtre>/\",$evenements[$j]['categorie']) > 0))) {\n\n\n\t\t\t$annee_redac = $evenements[$j]['saison'];\n\t\t\t$annee_evt = $evenements[$j]['annee'];\n\t\t\t$mois_evt = $evenements[$j]['mois'];\n\t\t\tif ($annee_redac != $annee_courante) {\n\t\t\t\t$nouvelle_annee = TRUE;\n\t\t\t\t$count_page += 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$nouvelle_annee = FALSE;\n\t\t\t}\n\n\t\t\tif ($nouvelle_annee) {\n\t\t\t\tif ($annee_courante != 0) {\n\t\t\t\t\t$pagination .= $separateur;\n\t\t\t\t}\n\t\t\t\tif ($annee_redac == $annee_choisie) {\n\t\t\t\t\t$pagination .= '<span class=\"on\">'.$evenements[$j]['lien_page'].'</span>';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$arg_option = NULL;\n\t\t\t\t\tif ($filtre != '-1') $arg_option = '&amp;categorie='.$filtre;\n\t\t\t\t\tif ($ancre) $arg_option .= '#pagination_'.$ancre;\n\t\t\t\t\tif (intval($debut_saison) != 1) $annee_evt = (intval($mois_evt) < intval($debut_saison)) ? strval(intval($annee_evt)-1) : $annee_evt;\n\t\t\t\t\t$pagination .= '<a class=\"ajax\" href=\"spip.php?page=agenda&amp;id_rubrique='.$contexte_aff['id_rubrique'].'&amp;annee='.$annee_evt.'&amp;mois='.$debut_saison.$arg_option.'\">'.$evenements[$j]['lien_page'].'</a>';\n\t\t\t\t}\n\t\t\t$annee_courante = $annee_redac;\n\t\t\t}\n\t\t}\n\t}\n\treturn $pagination;\n}", "public function show($id)\n {\n $mob = Mobiliarios::find($id);\n //Pagos\n $montoTotal = Pagos::where('mobiliario_id',$id)->sum('monto');\n $interTotal = Pagos::where('mobiliario_id',$id)->sum('interes');\n $moraTotal = Pagos::where('mobiliario_id',$id)->sum('mora');\n $cuotas = Pagos::where('mobiliario_id',$id)->count();\n $cuotasc = Pagos::where('mobiliario_id',$id)->where('caja_id', '>',0)->count();\n $cuotasb = Pagos::where('mobiliario_id',$id)->where('banco_id', '>',0)->count();\n $pagoss = Pagos::where('mobiliario_id',$id)->orderBy('created_at','asc')->get();\n $listac = Pagos::where('mobiliario_id',$id)->where('caja_id', '>',0)->orderBy('created_at','asc')->paginate(8);\n $listab = Pagos::where('mobiliario_id',$id)->where('banco_id', '>',0)->orderBy('created_at','asc')->paginate(8);\n $cc = Pagos::where('mobiliario_id',$id)->where('caja_id', '>',0)->sum('monto');\n $cb = Pagos::where('mobiliario_id',$id)->where('banco_id', '>',0)->sum('monto');\n $ic = Pagos::where('mobiliario_id',$id)->where('caja_id', '>',0)->sum('interes');\n $ib = Pagos::where('mobiliario_id',$id)->where('banco_id', '>',0)->sum('interes');\n $mc = Pagos::where('mobiliario_id',$id)->where('caja_id', '>',0)->sum('mora');\n $mb = Pagos::where('mobiliario_id',$id)->where('banco_id', '>',0)->sum('mora');\n //Reparaciones\n $totalreparacion = Reparaciones::where('mobiliario_id',$id)->count();\n $reparar = Reparaciones::where('mobiliario_id',$id)->orderBy('fecha_deposito','asc')->paginate(8);\n $totreparc = Reparaciones::where('mobiliario_id',$id)->where('credito',true)->count();\n $valreparc = Reparaciones::where('mobiliario_id',$id)->where('credito',true)->sum('precio');\n $totreparn = Reparaciones::where('mobiliario_id',$id)->where('credito',false)->count();\n $valreparn = Reparaciones::where('mobiliario_id',$id)->where('credito',false)->sum('precio');\n $ivatotal = Reparaciones::where('mobiliario_id',$id)->sum('iva');\n\n $totpagorep = Reparaciones::join('pagoreparaciones','reparaciones.id','=','pagoreparaciones.reparacion_id')->where('mobiliario_id', $id)->count();\n $prereptot = Reparaciones::join('pagoreparaciones','reparaciones.id','=','pagoreparaciones.reparacion_id')->where('mobiliario_id', $id)->sum('monto');\n $pagosp = Reparaciones::join('pagoreparaciones','reparaciones.id','=','pagoreparaciones.reparacion_id')->where('mobiliario_id', $id)->get();\n $totalc = $cc + $ic + $mc;\n $totalb = $cb + $ib + $mb;\n $valtotal = $valreparn + $valreparc;\n $hoy = Carbon::now();\n return view('Mobiliarios.show',\n compact(\n 'mob',\n 'montoTotal',\n 'interTotal',\n 'cuotas',\n 'moraTotal',\n 'pagoss',\n 'cuotasc',\n 'cuotasb',\n 'listac',\n 'listab',\n 'totalc',\n 'totalb',\n 'cc',\n 'cb',\n 'ic',\n 'ib',\n 'mc',\n 'mb',\n 'totalreparacion',\n 'reparar',\n 'totreparn',\n 'totreparc',\n 'valreparc',\n 'valreparn',\n 'valtotal',\n 'totpagorep',\n 'prereptot',\n 'ivatotal',\n 'pagosp',\n 'hoy'\n ));\n }", "function ListaCuentasxpagarInactivas() {\n\n\t$sql = \"SELECT a.id, a.descripcion, a.fecha, a.total, b.descripcion AS nombre_proveedor\n\t\t\tFROM cuentaxpagar a\n\t\t\tINNER JOIN proveedor b ON a.proveedor_id = b.id\n\t\t\tWHERE a.estado = 'PAGADO'\";\n\n\t$db = new conexion();\n\t$result = $db->consulta($sql);\n\t$num = $db->encontradas($result);\n\n\t$respuesta->datos = [];\n\t$respuesta->mensaje = \"\";\n\t$respuesta->codigo = \"\";\n\n\tif ($num != 0) {\n\t\tfor ($i=0; $i < $num; $i++) {\n\t\t\t$respuesta->datos[] = mysql_fetch_array($result);\n\t\t}\n\n\t\t$respuesta->mensaje = \"Ok\";\n\t\t$respuesta->codigo = 1;\n\t} else {\n\t\t$respuesta->mensaje = \"No existen registros de cuentas por pagar!\";\n\t\t$respuesta->codigo = 0;\n\t}\n\n\treturn json_encode($respuesta);\n}", "public static function obtenerPagados(){\n $criteria = new CDbCriteria;\n $criteria->condition = 'estado = '.self::ORDER_OPEN.' OR estado = '.self::ORDER_CLOSED;\n //Ademas de los pagados agrego los pendientes de pagar con transferencia\n //.' || (estado = '.self::ORDER_OPEN.' AND id_medio_pago = 3)';\n return PedidoOnline::model()->findAll($criteria);\n }", "function epagoc($mysqli,$fecha,$ref,$monto,$iva,$total,$saldoi,$factu,$mpago,$sfactu,$prov,$folio,$montop,\n $saldof,$cta,$arch=NULL,$comi=NULL,$civa=NULL){\n\t//define los montos de pago\n\t$pagoiva = defiva($monto,$saldoi,$montop);\n\t//definicion del status de pago\n\tif($montop<$saldoi){$status = 90;}else{$status = 99;};\n\t\t\ttry{\n\t\t\t\t$mysqli->autocommit(false);\n\t\t\t//la referencia es oc\n\t\t\t\t$tipoper=0;\n\t\t\t//movimientos de diario\n\t\t\t\t//cargo en salida de efectivo de recursos segun metodo de pago\n\t\t\t\t\t$cuenta1=metpago($mpago);\n\t\t\t\t\t//tipo 0 es debe\n\t\t\t\t\t$tipom1=1;\n\t\t\t\t\toperdiario($mysqli,$cuenta1,$tipoper,$tipom1,$ref,$montop,$fecha,$sfactu,$cta);\n\t\t\t\t//abono a proveedores\n\t\t\t\t\t$cuenta2=\"201.01\";\n\t\t\t\t\t$tipom2=0;\n\t\t\t\t\toperdiario($mysqli,$cuenta2,$tipoper,$tipom2,$ref,$montop,$fecha,$sfactu,$prov);\n\t\t\t\t//abono a iva acreditable por pagar\n\t\t\t\t\t$cuenta3=\"119.01\";\n\t\t\t\t\t$tipom3=1;\n\t\t\t\t\toperdiario($mysqli,$cuenta3,$tipoper,$tipom3,$ref,$pagoiva,$fecha,$sfactu);\n\t\t\t\t//cargo a iva acreditable pagado\n\t\t\t\t\t$cuenta4=\"118.01\";\n\t\t\t\t\t$tipom4=0;\n\t\t\t\t\toperdiario($mysqli,$cuenta4,$tipoper,$tipom4,$ref,$pagoiva,$fecha,$sfactu);\n\t\t\t\t//movimientos de comisiones, si las hay, siempre se factura\n\t\t\t\t\tif($comi!=NULL){\n\t\t\t\t\t //cargo a bancos\n\t\t\t\t\t $cuentacomi=\"102.01\";\n\t\t\t\t\t $tipomc=1;\n\t\t\t\t\t $comitot = $comi+$civa;\n\t\t\t\t\t operdiario($mysqli,$cuentacomi,$tipoper,$tipomc,$ref,$comitot,$fecha,1,NULL,'comisiones banc');\n\t\t\t\t\t //abono a gastos financieros e iva pagado\n\t\t\t\t\t operdiario($mysqli,\"701.10\",$tipoper,0,$ref,$comi,$fecha,1,NULL,'comisiones banc');\n\t\t\t\t\t operdiario($mysqli,\"118.01\",$tipoper,0,$ref,$civa,$fecha,1,NULL,'comisiones banc');\t\t\t\t\t \n\t\t\t\t\t}\n\t\t\t\t//actualizacion de orden de compra\n\t\t\t\t$archm;\n\t\t\t\tif($arch!=NULL){\n\t\t\t\t\t$archm= substr($arch,11);\n\t\t\t\t}else{$archm = NULL;}\n\t\t\t\t\t$mysqli->query(\"UPDATE oc SET status=$status,fechapago='$fecha',saldo=$saldof,factura='$factu',arch='$archm',foliomov='$folio' WHERE idoc='$ref'\");\t\t\t\t\n\t\t\t//efectuar la operacion\n\t\t\t\t$mysqli->commit();\n\t\t\t\t$resul=0;\n\t\t\t}catch (Exception $e) {\n\t\t\t\t\t//error en las operaciones de bd\n\t\t\t\t $mysqli->rollback();\n\t\t\t\t \t$resul=-2;\n\t\t\t\t}\n\treturn $resul;\n}", "public function pagomesalum(Request $request)\n {\n $hoy = Carbon::now();\n $today = $hoy->format('Y-m-d');\n $mesactual = $hoy->format('m');\n\n //id del alumno\n $id = $request->id_alum;\n //sacamos informacion de nivel por el costo \n $infoa = Alumnos::where('id', $id)->first();\n $nivel = Nivel::find($infoa->nivel);\n $costoN = $nivel->costo;\n $Pagoinscripcion = Pagos::where('id_usuario', $infoa->id)->where('id_nivel', $infoa->nivel)->where('tipo', 1)->first();\n $Pagocolegiatura = Pagos::where('id_usuario', $infoa->id)->where('id_nivel', $infoa->nivel)->where('tipo', 2)->orderBy('id', 'desc')->first();\n $montoInscripcion = $Pagoinscripcion->monto;\n if ($Pagocolegiatura != null) {\n $montoColegiatura = $Pagocolegiatura->monto;\n $idPagoColegiatura = $Pagocolegiatura->id;\n $idEstatusp = $Pagocolegiatura->estatus;\n $ultimoM = $Pagocolegiatura->mes;\n } else {\n $montoColegiatura = null;\n $idPagoColegiatura = null;\n $idEstatusp = null;\n $ultimoM = null;\n }\n $idPagoInscripcion = $Pagoinscripcion->id;\n $primer_pago = Carbon::createFromFormat('d/m/Y', $nivel->finicio)->format('m');\n\n $ultimo_pago = Carbon::createFromFormat('d/m/Y', $nivel->ffin)->format('m');\n\n //calculando meses de nivel\n $start = date($nivel->finicio);\n $inicio = 'd/m/Y';\n\n $end = date($nivel->ffin);\n $fin = 'd/m/Y';\n\n $finicio = Carbon::createFromFormat($inicio, $start);\n $ffin = Carbon::createFromFormat($fin, $end);\n\n $meses = $finicio->diffInMonths($ffin) + 1;\n\n $CostoC = $meses * $costoN;\n // //sacamos registro del ultimo pago\n // $info = Pagos::where('id_usuario',$id)->where('id_nivel',$nivel->id)->where('tipo',2)->orderBy('id','desc')->first();\n\n // // $info2 = Pagos::where('id_usuario',$id)->where('id_nivel',$nivel->id)->where('tipo',1)->orderBy('id','desc')->first();\n\n\n // if($info == null){\n // $numeroinf = 0;\n // }else{\n // $numeroinf = 1;\n // }\n\n // if($numeroinf != 0){\n // $mp = Carbon::parse($info->fecha_pago);\n // $mes_pago = $mp->format('m');\n // }\n\n\n //lo que el usuario teclea\n $abono = $request->pago;\n $inscripcionR = $request->debeinsc;\n // si el abono es igual ala colegiatura le pone estatus 1 si no 2\n // if($abono == $costoN){\n // $estatus = 1; \n // }else{\n // $estatus = 2;\n // }\n\n\n ///////////////////////////////////////////////////////// pago nuevo\n\n if ($inscripcionR == null) {\n } else {\n $this->inscripcionupdate($inscripcionR, $montoInscripcion, $idPagoInscripcion, $mesactual, $today, $id, $nivel->id);\n //si no se captura colegiatura\n }\n\n $this->abonoupdate($abono, $montoColegiatura, $idPagoColegiatura, $idEstatusp, $mesactual, $ultimoM, $today, $id, $nivel->id, $CostoC, $primer_pago, $ultimo_pago, $costoN);\n\n\n\n\n\n\n ///////////////////////////////////////////////////////// pago anterior\n // //pagar primer mes si solo pago inscripcion detecta si algun dato tipo colegiatura\n // if($numeroinf != 0){\n // // si cuando paga es el mismo mes\n // if($info->mes == $mesactual){\n // //y ya esta pagado crea registros de siguiente mes correspondiente\n // if($info->estatus == 1){\n // //si abonado es igual actualiza a 1\n // if(($abono)==$costoN){\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => $estatus,\n // 'monto' => $abono,\n // 'mes' => $info->mes+1,\n // 'tipo' => 2]);\n // return back();\n // }else\n // // si el abono es menor crea con estatus 2\n // if(($abono)<$costoN){\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => $estatus,\n // 'monto' => $abono,\n // 'mes' => $info->mes+1,\n // 'tipo' => 2]);\n // return back();\n // }else\n // // si abono es mayor crea a sts 1 y la diferencia crea registro del siguiente mes\n // if ($abono>$costoN) {\n\n // if(is_int($abono/$costoN) == true){\n // $mesesApagar = $abono/$costoN;\n // $meses_corridos = $info->mes + 1;\n // for ($i=0; $i < $mesesApagar ; $i++) { \n // $aux = 0;\n\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $meses_corridos + $i,\n // 'tipo' => 2]);\n // $aux++;\n // }\n // }else{\n\n // $mesesApagarC= explode(\".\", $abono/$costoN);\n // $numeroMeses = $mesesApagarC[0]+1;\n\n // for ($i=0; $i < $numeroMeses; $i++) { \n // if($i == ($numeroMeses-1)){\n // $residuo = $abono%$costoN;\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 2,\n // 'monto' => $residuo,\n // 'mes' => $info->mes+$numeroMeses,\n // 'tipo' => 2]);\n // }else{\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $info->mes+$i+1,\n // 'tipo' => 2]); \n // }\n // }\n // }\n // }\n // return back();\n // }// si no esta pagado hace condiciones\n // else{ \n // ////////////////////////////////////////////// \n // //si el monto que tenia mas el abonado es igual actualiza a 1\n // if(($abono+$info->monto)==$costoN){\n\n // $pagoupdate = array_merge($request->all(),array(\n // 'fecha_pago' => $today,\n // 'estatus'=>1,\n // 'monto' => ($abono+$info->monto)));\n\n // $pag = Pagos::find($info->id);\n // $pag->update($pagoupdate);\n // return back();\n // }else\n // // si el monto que tenia mas el abonado es menor actualiza monto\n // if(($abono+$info->monto)<$costoN){\n // $pagoupdate = array_merge($request->all(),array(\n // 'fecha_pago' => $today,\n // 'monto' => ($abono+$info->monto)));\n\n // $pag = Pagos::find($info->id);\n // $pag->update($pagoupdate);\n // return back();\n // }else\n // // si el monto que tenia mas el abonado es mayor actualiza a 1 y la diferencia crea registro del siguiente mes\n // if (($abono+$info->monto)>$costoN) {\n // $pagoupdate = array_merge($request->all(),array(\n // 'fecha_pago' => $today,\n // 'estatus'=>1,\n // 'monto' => $costoN));\n // $pag = Pagos::find($info->id);\n // $pag->update($pagoupdate);\n\n // $faltante = $costoN - $info->monto;\n // $abonado2 = $abono - $faltante;\n // if(is_int($abonado2/$costoN) == true){\n // $mesesApagar = $abonado2/$costoN;\n // $meses_corridos = $info->mes + 1;\n // for ($i=0; $i < $mesesApagar ; $i++) { \n // $aux = 0;\n\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $meses_corridos + $i,\n // 'tipo' => 2]);\n // $aux++;\n // }\n // }else{\n\n // $mesesApagarC= explode(\".\", $abonado2/$costoN);\n // $numeroMeses = $mesesApagarC[0]+1;\n // //si abonado 2 es menor ala colegitura solo se agrega el reg del lo restante si no agrega registros de meses +\n // if($abonado2<$costoN){\n // $residuo = $abonado2%$costoN;\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 2,\n // 'monto' => $abonado2,\n // 'mes' => $info->mes+$numeroMeses,\n // 'tipo' => 2]);\n // }else{\n // for ($i=0; $i < $numeroMeses; $i++) { \n // if($i == ($numeroMeses-1)){\n // $residuo = $abonado2%$costoN;\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 2,\n // 'monto' => $residuo,\n // 'mes' => $info->mes+$numeroMeses,\n // 'tipo' => 2]);\n // }else{\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $info->mes+$i+1,\n // 'tipo' => 2]); \n // }\n // }\n // }\n\n // }\n // }\n // return back();\n // }\n // ///////////////////////////////////////\n // }// si no es del mismo mes crea la siguiente dependiente del mes\n // else{\n // if($mes_pago == $mesactual && $mes_pago != $info->mes){\n // if($info->estatus == 1){\n // //si abonado es igual actualiza a 1\n // if(($abono)==$costoN){\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => $estatus,\n // 'monto' => $abono,\n // 'mes' => $info->mes+1,\n // 'tipo' => 2]);\n // return back();\n // }else\n // // si el abono es menor crea con estatus 2\n // if(($abono)<$costoN){\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => $estatus,\n // 'monto' => $abono,\n // 'mes' => $info->mes+1,\n // 'tipo' => 2]);\n // return back();\n // }else\n // // si abono es mayor crea a sts 1 y la diferencia crea registro del siguiente mes\n // if ($abono>$costoN) {\n\n // if(is_int($abono/$costoN) == true){\n // $mesesApagar = $abono/$costoN;\n // $meses_corridos = $info->mes + 1;\n // for ($i=0; $i < $mesesApagar ; $i++) { \n // $aux = 0;\n\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $meses_corridos + $i,\n // 'tipo' => 2]);\n // $aux++;\n // }\n // }else{\n\n // $mesesApagarC= explode(\".\", $abono/$costoN);\n // $numeroMeses = $mesesApagarC[0]+1;\n\n // for ($i=0; $i < $numeroMeses; $i++) { \n // if($i == ($numeroMeses-1)){\n // $residuo = $abonado2%$costoN;\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 2,\n // 'monto' => $residuo,\n // 'mes' => $info->mes+$numeroMeses,\n // 'tipo' => 2]);\n // }else{\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $info->mes+$i+1,\n // 'tipo' => 2]); \n // }\n // }\n // }\n // }\n // return back();\n // }else{//\n // //si el monto que tenia mas el abonado es igual actualiza a 1\n // if(($abono+$info->monto)==$costoN){\n\n // $pagoupdate = array_merge($request->all(),array(\n // 'fecha_pago' => $today,\n // 'estatus'=>1,\n // 'monto' => ($abono+$info->monto)));\n\n // $pag = Pagos::find($info->id);\n // $pag->update($pagoupdate);\n // return back();\n // }else\n // // si el monto que tenia mas el abonado es menor actualiza monto\n // if(($abono+$info->monto)<$costoN){\n // $pagoupdate = array_merge($request->all(),array(\n // 'fecha_pago' => $today,\n // 'monto' => ($abono+$info->monto)));\n\n // $pag = Pagos::find($info->id);\n // $pag->update($pagoupdate);\n // return back();\n // }else\n // // si el monto que tenia mas el abonado es mayor actualiza a 1 y la diferencia crea registro del siguiente mes\n // if (($abono+$info->monto)>$costoN) {\n // $pagoupdate = array_merge($request->all(),array(\n // 'fecha_pago' => $today,\n // 'estatus'=>1,\n // 'monto' => $costoN));\n // $pag = Pagos::find($info->id);\n // $pag->update($pagoupdate);\n\n // $faltante = $costoN - $info->monto;\n // $abonado2 = $abono - $faltante;\n // if(is_int($abonado2/$costoN) == true){\n // $mesesApagar = $abonado2/$costoN;\n // $meses_corridos = $info->mes + 1;\n // for ($i=0; $i < $mesesApagar ; $i++) { \n // $aux = 0;\n\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $meses_corridos + $i,\n // 'tipo' => 2]);\n // $aux++;\n // }\n // }else{\n\n // $mesesApagarC= explode(\".\", $abonado2/$costoN);\n // $numeroMeses = $mesesApagarC[0]+1;\n // //si abonado 2 es menor ala colegitura solo se agrega el reg del lo restante si no agrega registros de meses +\n // if($abonado2<$costoN){\n // $residuo = $abonado2%$costoN;\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 2,\n // 'monto' => $abonado2,\n // 'mes' => $info->mes+$numeroMeses,\n // 'tipo' => 2]);\n // }else{\n // for ($i=0; $i < $numeroMeses; $i++) { \n // if($i == ($numeroMeses-1)){\n // $residuo = $abonado2%$costoN;\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 2,\n // 'monto' => $residuo,\n // 'mes' => $info->mes+$numeroMeses,\n // 'tipo' => 2]);\n // }else{\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $info->mes+$i+1,\n // 'tipo' => 2]); \n // }\n // }\n // }\n\n // }\n // }\n // return back(); \n // }//\n\n // }else{\n // //pago mes normal correspondiente\n // Pagos::create(\n // ['id_usuario' => $id,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => $estatus,\n // 'monto' => $abono,\n // 'mes' => $hoy->format('m'),\n // 'tipo' => 2]);\n // return back();\n // }\n // }\n // }else{\n // //si no crea registro del primer mes de colegiatura\n // //si el curso ya empezo y paga un mes despues o dependiendo guarda el mes que entra\n // if($primer_pago >= $mesactual){\n // if(($abono)==$costoN){\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => $estatus,\n // 'monto' => $abono,\n // 'mes' => $primer_pago,\n // 'tipo' => 2]);\n // return back();\n // }else\n // // si el abono es menor crea con estatus 2\n // if(($abono)<$costoN){\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => $estatus,\n // 'monto' => $abono,\n // 'mes' => $primer_pago,\n // 'tipo' => 2]);\n // return back();\n // }else\n // // si abono es mayor crea a 1 y la diferencia crea registro del siguiente mes\n // if (($abono)>$costoN) {\n\n // if(is_int($abono/$costoN) == true){\n // $mesesApagar = $abono/$costoN;\n // $meses_corridos = $info2->mes;\n // for ($i=0; $i < $mesesApagar ; $i++) { \n // $aux = 0;\n\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $meses_corridos + $i,\n // 'tipo' => 2]);\n // $aux++;\n // }\n // }else{\n\n // $mesesApagarC= explode(\".\", $abono/$costoN);\n // $numeroMeses = $mesesApagarC[0]+1;\n\n // for ($i=0; $i < $numeroMeses; $i++) { \n // if($i == ($numeroMeses-1)){\n // $residuo = $abono%$costoN;\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 2,\n // 'monto' => $residuo,\n // 'mes' => $info2->mes+($numeroMeses-1),\n // 'tipo' => 2]);\n // }else{\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $info2->mes+$i,\n // 'tipo' => 2]); \n // }\n // }\n // }\n // }\n // return back();\n\n // }else{\n // if(($abono)==$costoN){\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => $estatus,\n // 'monto' => $abono,\n // 'mes' => $mesactual,\n // 'tipo' => 2]);\n // return back();\n // }else\n // // si el abono es menor crea con estatus 2\n // if(($abono)<$costoN){\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => $estatus,\n // 'monto' => $abono,\n // 'mes' => $mesactual,\n // 'tipo' => 2]);\n // return back();\n // }else\n // // si abono es mayor crea a 1 y la diferencia crea registro del siguiente mes\n // if (($abono)>$costoN) {\n\n // if(is_int($abono/$costoN) == true){\n // $mesesApagar = $abono/$costoN;\n // $meses_corridos = $info2->mes;\n // for ($i=0; $i < $mesesApagar ; $i++) { \n // $aux = 0;\n\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $meses_corridos + $i,\n // 'tipo' => 2]);\n // $aux++;\n // }\n // }else{\n\n // $mesesApagarC= explode(\".\", $abono/$costoN);\n // $numeroMeses = $mesesApagarC[0]+1;\n\n // for ($i=0; $i < $numeroMeses; $i++) { \n // if($i == ($numeroMeses-1)){\n // $residuo = $abonado2%$costoN;\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 2,\n // 'monto' => $residuo,\n // 'mes' => $info2->mes+$numeroMeses,\n // 'tipo' => 2]);\n // }else{\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $info2->mes+$i,\n // 'tipo' => 2]); \n // }\n // }\n // }\n // }\n // return back();\n // }\n // }\n ////////////////////////////////////////////////// fin pago anterior\n }", "public function getPaginated();", "function listarObligacioPagoCombos(){\n $this->objParam->defecto('ordenacion','id_obligacion_pago');\n\n $this->objParam->defecto('dir_ordenacion','asc');\n if($this->objParam->getParametro('tipoReporte')=='excel_grid' || $this->objParam->getParametro('tipoReporte')=='pdf_grid'){\n $this->objReporte = new Reporte($this->objParam, $this);\n $this->res = $this->objReporte->generarReporteListado('MODObligacionPago','listarObligacioPagoCombos');\n } else{\n $this->objFunc=$this->create('MODObligacionPago');\n $this->res=$this->objFunc->listarObligacioPagoCombos();\n }\n\n /*if($this->objParam->getParametro('_adicionar')!=''){\n\n $respuesta = $this->res->getDatos();\n\n array_unshift ( $respuesta, array( 'id_proveedor'=>'0',\n 'rotulo_comercial'=>'Todos', 'desc_proveedor'=>'Todos'\n ));\n //\t\tvar_dump($respuesta);\n $this->res->setDatos($respuesta);\n }*/\n\n $this->res->imprimirRespuesta($this->res->generarJson());\n }", "public function militaresPorPostoGraduacaoDaOMeOMSubordAministrativamentePag($codOM, $postoGraduacao, $linha_inicial, $linhas_por_pagina, $buscaNIP, $buscaPessoa, $tipo)\n {\n $buscaNIP = Helper::formataNipsSemPontos($buscaNIP);\n $resultado = array();\n $stmt = $this->dao->militaresPorPostoGraduacaoDaOMeOMSubordAministrativamentePag($codOM, $postoGraduacao, $linha_inicial, $linhas_por_pagina, $buscaNIP, $buscaPessoa, $tipo);\n \n // var_dump($codOM, $postoGraduacao, $linha_inicial, $linhas_por_pagina, $buscaNIP, $buscaPessoa);\n $lista = array();\n while ($row = $stmt->fetch()) {\n \n $mil = new Militar($row->NRONIP);\n $mil->setNipCodficado(Helper::encrypt($row->NRONIP));\n $mil->setNomeGuerra(utf8_encode($row->NOMEGUERRA));\n $mil->setNomePessoa(utf8_encode($row->NOMPESSOA));\n // Posto/Grad\n $mil->getPatente()->setCodCorpo($row->CODCORPO);\n $mil->getPatente()->setQuadro($row->QUADRO);\n $mil->getPatente()->setCodPostoGraduacao($row->CODPOSTOGRADUACAO);\n $mil->getPatente()->setAperfeicoamento($row->APERFEICOAMENTO);\n $mil->getPatente()->setEspecialidade($row->ESPECIALIDADE);\n $mil->getPatente()->setPge($row->PGE);\n // OM\n $mil->getOm()->setCodOM($row->CODOM);\n $mil->getOm()->setNomeOM(utf8_encode($row->NOMOM));\n $mil->getOm()->setNomeAbreviado(utf8_encode($row->NOMABREVIADO));\n \n $lista[] = $mil;\n }\n \n // return $resultado;\n return $lista;\n }", "private function telaPerfilGerente()\r\n {\r\n //Carregando as lojas do banco de dados\r\n $repositorio = $this->getDoctrine()->getRepository('DCPBundle:Quebra');\r\n\r\n $sql = $repositorio->createQueryBuilder('l')\r\n ->select('l.id')\r\n ->groupby('l.id')\r\n ->getquery();\r\n\r\n $resultado = $sql->getResult();\r\n\r\n $loja = array();\r\n $contLoja = 0;\r\n foreach($resultado as $data)\r\n {\r\n if (!in_array($data, $loja))\r\n {\r\n $loja[$contLoja] = $data[\"id\"];\r\n $contLoja++;\r\n }\r\n }\r\n \r\n return $loja;\r\n }", "function identificar_pago_cli_mercantil($acceso,$id_cuba,$abrev_cuba){\n\t$acceso2=conexion();\n\t\n\t\tsession_start();\n\t\t$ini_u = $_SESSION[\"ini_u\"]; \n\t\tif($ini_u==''){\n\t\t\t$ini_u =\"AA\";\n\t\t}\n\t$acceso->objeto->ejecutarSql(\"select *from pagodeposito where (id_pd ILIKE '$ini_u%') ORDER BY id_pd desc\"); \n\t$id_pd = $ini_u.verCoo($acceso,\"id_pd\");\n\t$login = $_SESSION[\"login\"]; \n\t$fecha= date(\"Y-m-d\");\n\t$hora= date(\"H:i:s\");\n\t\n\t$palabra_clave='DEPOSITO EN EFECTIVO';\n\t$palabra_clave1='DEPO-FACIL ELECTRONICO';\n\t//ECHO \" select * from vista_tablabancos where id_cuba='$id_cuba' and descrip_tb ilike 'REC. INT. CARGO CUENTA%'\";\n\t$acceso2->objeto->ejecutarSql(\" select * from vista_tablabancos where id_cuba='$id_cuba' and (descrip_tb ilike '$palabra_clave%' or descrip_tb ilike '$palabra_clave1%' )AND (Status_tb='REGISTRADO' or status_tb='NO RELACIONADO')order by id_tb \");\n\t\twhile($row=row($acceso2)){\n\t\t\t$abrev_cuba=trim($row[\"abrev_cuba\"]);\n\t\t\t$id_tb=trim($row[\"id_tb\"]);\n\t\t\t//echo \"<br>$abrev_cuba:\";\n\t\t\t$fecha_tb=trim($row[\"fecha_tb\"]);\n\t\t\t$referencia_tb=trim($row[\"referencia_tb\"]);\n\t\t\t$monto_tb=trim($row[\"monto_tb\"]);\n\t\t\t$descrip_tb=trim($row[\"descrip_tb\"]);\n\t\t\t$valor=explode($palabra_clave,$descrip_tb);\n\t\t\t$ini=substr($referencia_tb, 0, 3);\n\t\t\t$nro_contrato='00000000000000000000000000';\n\t\t\t//echo \"<br>:$referencia_tb:\";\n\t\t\t//if($ini=='000'){\n\t\t\t\t//$nro_contrato=\t$ano=substr($referencia_tb, 3, 8);\n\t\t\t\t$nro_contrato=\t$referencia_tb;\n\t\t\t\tif(strlen($nro_contrato)!=8 && strlen($nro_contrato)!=7){\n\t\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//\techo \"<br>nro_contrato:$nro_contrato:\";\n\t\t\t//}\n\t\t\t//echo \"<br>$referencia_tb: select * from contrato where nro_contrato ilike '%$nro_contrato%' \";\n\t\t\t$acceso->objeto->ejecutarSql(\" select * from contrato where nro_contrato ilike '%$nro_contrato%' \");\n\t\t\tif($row=row($acceso)){\n\t\t\t\t$id_contrato=trim($row[\"id_contrato\"]);\n\t\t\t\t$acceso->objeto->ejecutarSql(\"insert into pagodeposito(id_pd,id_contrato,fecha_reg,hora_reg,login_reg,fecha_dep,banco,numero_ref,status_pd,tipo_dt,monto_dep,obser_p,id_tb,fecha_conf,hora_conf,login_conf) values \n\t\t\t\t('$id_pd','$id_contrato','$fecha','$hora','$login','$fecha_tb','$id_cuba','$referencia_tb','CONFIRMADO','DEPOSITO','$monto_tb','$descrip_tb','$id_tb','$fecha','$hora','$login')\");\t\n\t\t\t\t$acceso->objeto->ejecutarSql(\"update tabla_bancos set status_tb='CONCILIADO' , tipo_tb='CLIENTES' where id_tb='$id_tb'\");\t\n\t\t\t\t$id_pd=$ini_u.verCoo_inc($acceso,$id_pd);\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$acceso->objeto->ejecutarSql(\"update tabla_bancos set status_tb='NO RELACIONADO', tipo_tb='CLIENTES' where id_tb='$id_tb'\");\t\n\t\t\t}\n\t\t}\n\treturn $cad;\t\n}", "public function formaPagamento($idpedido){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT a.nome,b.* FROM tbclientes a, tbpedidos b where a.reg = b.reg and idpedido = '$idpedido' \";\n $sql = $this->conexao->query($sql);\n $row = $sql->fetch_assoc();\n $dados = array();\n\n $dado = array();\n $dado['nome'] = $row['nome'];\n $dado['idpedido'] = $row['idpedido'];\n $dado['comanda'] = $row['comanda'];\n $dado['reg'] = $row['reg'];\n $dado['status'] = $row['status'];\n $dado['valor'] = number_format($row['valor'],2, \",\", \".\");\n $dado['tipo'] = $row['tipo'];\n $dado['titulo'] = strtoupper($row['titulo']);\n $dado['comanda'] = $row['comanda'];\n $dados[] = $dado;\n\n return $dados;\n\n }", "public function ObtenerPagina($aiPaginaActual = 1, $aiItemsPorPagina = 10, $asCampoOrdenacion = \"\", $asTipoOrdenacion = \"\")\n\t{\n\t\treturn $this->_db->ProyectosArchivosObtenerPagina($this->_WherePDO, $aiPaginaActual, $aiItemsPorPagina, $asCampoOrdenacion, $asTipoOrdenacion);\n\t}", "protected function buildPagination() {}", "protected function buildPagination() {}", "public function RelatorioContasPagarEmissao($where,$dtemi){\n\t\t\t\t\n\t\t$dba = $this->dba;\n\n\t\t$vet = array();\n\n\n\t\t$sql =\"SELECT \n\t\t\t\td.emissao,\n\t\t\t\td.vencimento,\n\t\t\t\td.numero,\n\t\t\t\tsum(d.valordoc) as valordoc,\n\t\t\t\td.numero_nota,\n\t\t\t\tf.codigo,\n\t\t\t\tf.nome\n\t\t\tFROM\n\t\t\t\tduplic d\n\t\t\t\t\tinner join\n\t\t\t\tfornecedores f ON (f.codigo = d.cedente)\n\t\t\t\".$where.\" and d.emissao = '\".$dtemi.\"'\n\t\t\tgroup by d.numero , d.numero_nota , d.emissao , f.codigo , f.nome , d.tipo,d.vencimento\";\n\t\t\n\t\t$res = $dba->query($sql);\n\n\t\t$num = $dba->rows($res); \n\n\t\t$i = 0;\n\t\t\t\n\t\twhile($dup = ibase_fetch_object($res)){\t\t\n\t\t\t\n\t\t\t$numero = $dup->NUMERO;\n\t\t\t$valordoc = $dup->VALORDOC;\n\t\t\t$numnota = $dup->NUMERO_NOTA;\n\t\t\t$emissao\t = $dup->EMISSAO;\n\t\t\t$codfor = $dup->CODIGO;\n\t\t\t$nomfor = $dup->NOME;\t\t\t\t\t\n\t\t\t$vencimento = $dup->VENCIMENTO;\n\t\t\t\n\t\t\t$duplic = new Duplic();\t\t\t\n\n\t\t\t$duplic->setNumero($numero);\n\t\t\t$duplic->setValorDoc($valordoc);\n\t\t\t$duplic->setNumeroNota($numnota);\n\t\t\t$duplic->setCodFornecedor($codfor);\n\t\t\t$duplic->setNomeFornevedor($nomfor);\n\t\t\t$duplic->setEmissao($emissao);\n\t\t\t$duplic->setVencimento($vencimento);\n\t\t\t\n\t\t\t$vet[$i++] = $duplic;\n\n\t\t}\n\n\t\treturn $vet;\n\n\t}", "public function listarFormasPagamento($idpedido){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT * FROM tbpedido_pagamento c,tbformas_pagamento b where c.idpedido = '$idpedido' and c.forma = b.idforma_pagamento; \";\n $sql = $this->conexao->query($sql);\n \n $dados = array();\n\n // $troco = number_format($row['troco'],2,\",\", \".\");\n \n if (mysqli_num_rows($sql) > 0) {\n\n while ($row = $sql->fetch_assoc()){\n $valor = number_format($row['valor'], 2, \",\", \".\");\n $dado = array();\n $dado['forma'] = $row['forma'];\n $dado['forma_descricao'] = $row['forma_descricao'];\n // $dado['troco'] = $troco;\n $dado['status'] = $row['status'];\n $dado['valor'] = $valor;\n $dado['idforma'] = $row['idforma'];\n $dado['idpedido'] = $row['idpedido'];\n $dados[] = $dado;\n\n }\n\n\n }\n\n\n return $dados;\n\n }", "public function buscarPorFavoritos($pagina = 1 , $elementos_por_pagina = 5 ){\n\n $query = $this->createQueryBuilder('m')\n ->where('m.favorito = true')\n ->orderBy('m.creado' , 'DESC')\n ->addOrderBy('m.nombre' , 'ASC')\n ->getQuery();\n\n return $this->paginacion($query , $pagina , $elementos_por_pagina);\n\n }", "function findAllOrdersDescPaginated();", "public function Carregar_Pagina()\r\n {\r\n if (Controller_Header_Usuario::Verificar_Autenticacao()) {\r\n $status = Controller_Header_Usuario::Verificar_Status_Usuario();\r\n if ($status != 0) {\r\n $view = new View_Meu_Plano($status);\r\n \r\n $planos = DAO_Plano::BuscarTodos();\r\n \r\n if (!empty($planos) AND $planos != false) {\r\n $view->set_planos($planos);\r\n }\r\n \r\n $view->set_plano_id(Login_Session::get_entidade_plano());\r\n \r\n $view->Executar();\r\n }\r\n return $status;\r\n } else {\r\n return false;\r\n }\r\n }", "function bajarPagina($id, $confirmado) {\n global $textos;\n\n $pagina = new Pagina($id);\n $destino = \"/ajax\" . $pagina->urlBase . \"/down\";\n $respuesta = \"\";\n\n if (!$confirmado) {\n $titulo = HTML::frase($pagina->titulo, \"negrilla\");\n $titulo = preg_replace(\"/\\%1/\", $titulo, $textos->id(\"CONFIRMAR_MODIFICACION\"));\n $codigo = HTML::campoOculto(\"procesar\", \"true\");\n $codigo .= HTML::campoOculto(\"id\", $id);\n $codigo .= HTML::parrafo($titulo);\n $codigo .= HTML::parrafo(HTML::boton(\"chequeo\", $textos->id(\"ACEPTAR\")), \"margenSuperior\");\n $codigo = HTML::forma($destino, $codigo);\n\n $respuesta[\"generar\"] = true;\n $respuesta[\"codigo\"] = $codigo;\n $respuesta[\"destino\"] = \"#cuadroDialogo\";\n $respuesta[\"titulo\"] = $textos->id(\"MODIFICAR_PAGINA\");\n $respuesta[\"ancho\"] = 200;\n $respuesta[\"alto\"] = 120;\n } else {\n\n if ($pagina->bajar()) {\n $respuesta[\"error\"] = false;\n ;\n $respuesta[\"accion\"] = \"recargar\";\n } else {\n $respuesta[\"error\"] = true;\n $respuesta[\"mensaje\"] = $textos->id(\"ERROR_DESCONOCIDO\");\n }\n }\n\n Servidor::enviarJSON($respuesta);\n}", "public function listar_productosMayorMenor($ordenar_producto, $p_id_seccion) {\n \n try {\n if($ordenar_producto == 1)\n {\n $sql = \"\n select \n distinct p.id_producto, \n p.descripcion,\n p.stock_actual,\n v.precio,\n i.cantidad\n from \n al_producto p inner join precio_venta_producto v\n on\n p.id_producto = v.id_producto left join al_inventario i\n on\n p.id_producto = i.id_producto inner join al_seccion s\n on\n p.id_seccion = s.id_seccion \n where\n p.id_seccion = $p_id_seccion;\n \";\n }\n if($ordenar_producto == 2)\n {\n $sql = \"\n select \n distinct p.id_producto, \n p.descripcion,\n p.stock_actual,\n v.precio,\n i.cantidad\n from \n al_producto p inner join precio_venta_producto v\n on\n p.id_producto = v.id_producto left join al_inventario i\n on\n p.id_producto = i.id_producto inner join al_seccion s\n on\n p.id_seccion = s.id_seccion \n where\n p.id_seccion = $p_id_seccion\n order by\n v.precio desc;\n \";\n }\n if($ordenar_producto == 3)\n {\n $sql = \"\n select \n distinct p.id_producto, \n p.descripcion,\n p.stock_actual,\n v.precio,\n i.cantidad\n from \n al_producto p inner join precio_venta_producto v\n on\n p.id_producto = v.id_producto left join al_inventario i\n on\n p.id_producto = i.id_producto inner join al_seccion s\n on\n p.id_seccion = s.id_seccion \n where\n p.id_seccion = $p_id_seccion\n order by\n v.precio asc \n \";\n }\n\n \n $sentencia = $this->dblink->prepare($sql);\n $sentencia->execute();\n $resultado = $sentencia->fetchAll(PDO::FETCH_ASSOC);\n return $resultado;\n } catch (Exception $exc) {\n throw $exc;\n }\n }", "function listarSolicitudObligacionPagoSol()\r\n {\r\n $this->procedimiento = 'tes.ft_solicitud_obligacion_pago_sel';\r\n $this->transaccion = 'TES_SOOBPGSOL_SEL';\r\n $this->tipo_procedimiento = 'SEL';//tipo de transaccion\r\n\r\n $this->setParametro('id_funcionario_usu', 'id_funcionario_usu', 'int4');\r\n $this->setParametro('tipo_interfaz', 'tipo_interfaz', 'varchar');\r\n\r\n //Definicion de la lista del resultado del query\r\n $this->captura('id_obligacion_pago', 'int4');\r\n $this->captura('id_proveedor', 'int4');\r\n $this->captura('desc_proveedor', 'varchar');\r\n $this->captura('estado', 'varchar');\r\n $this->captura('tipo_obligacion', 'varchar');\r\n $this->captura('id_moneda', 'int4');\r\n $this->captura('moneda', 'varchar');\r\n $this->captura('obs', 'varchar');\r\n $this->captura('porc_retgar', 'numeric');\r\n $this->captura('id_subsistema', 'int4');\r\n $this->captura('nombre_subsistema', 'varchar');\r\n $this->captura('id_funcionario', 'int4');\r\n $this->captura('desc_funcionario1', 'text');\r\n $this->captura('estado_reg', 'varchar');\r\n $this->captura('porc_anticipo', 'numeric');\r\n $this->captura('id_estado_wf', 'int4');\r\n $this->captura('id_depto', 'int4');\r\n $this->captura('nombre_depto', 'varchar');\r\n $this->captura('num_tramite', 'varchar');\r\n $this->captura('id_proceso_wf', 'int4');\r\n $this->captura('fecha_reg', 'timestamp');\r\n $this->captura('id_usuario_reg', 'int4');\r\n $this->captura('fecha_mod', 'timestamp');\r\n $this->captura('id_usuario_mod', 'int4');\r\n $this->captura('usr_reg', 'varchar');\r\n $this->captura('usr_mod', 'varchar');\r\n $this->captura('fecha', 'date');\r\n $this->captura('numero', 'varchar');\r\n $this->captura('tipo_cambio_conv', 'numeric');\r\n $this->captura('id_gestion', 'integer');\r\n $this->captura('comprometido', 'varchar');\r\n $this->captura('nro_cuota_vigente', 'numeric');\r\n $this->captura('tipo_moneda', 'varchar');\r\n $this->captura('total_pago', 'numeric');\r\n $this->captura('pago_variable', 'varchar');\r\n $this->captura('id_depto_conta', 'integer');\r\n $this->captura('total_nro_cuota', 'integer');\r\n $this->captura('fecha_pp_ini', 'date');\r\n $this->captura('rotacion', 'integer');\r\n $this->captura('id_plantilla', 'integer');\r\n $this->captura('desc_plantilla', 'varchar');\r\n $this->captura('desc_funcionario', 'text');\r\n $this->captura('ultima_cuota_pp', 'numeric');\r\n $this->captura('ultimo_estado_pp', 'varchar');\r\n $this->captura('tipo_anticipo', 'varchar');\r\n $this->captura('ajuste_anticipo', 'numeric');\r\n $this->captura('ajuste_aplicado', 'numeric');\r\n $this->captura('monto_estimado_sg', 'numeric');\r\n $this->captura('id_obligacion_pago_extendida', 'integer');\r\n $this->captura('desc_contrato', 'text');\r\n $this->captura('id_contrato', 'integer');\r\n $this->captura('obs_presupuestos', 'varchar');\r\n $this->captura('uo_ex', 'varchar');\r\n\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "private function preparar_texto($texto)\n\t{\n\t\t$desplazamiento=($this->pagina_actual-1)*$this->registros_a_mostrar;\n\t\n\t\t$this->texto=Herramientas::reemplazar_primera_ocurrencia(\"SELECT\", \"SELECT SQL_CALC_FOUND_ROWS\", $texto);\n\t\t$this->texto.=\" LIMIT \".$this->registros_a_mostrar.\" OFFSET \".$desplazamiento;\t\t\n\t}", "public function pagModificar($id) {\n $salidaPlanta= salidaPlanta::findOrFail($id);\n $invernadero= $salidaPlanta->invernadero;\n $invernaderos= invernaderoPlantula::select('id','nombre')->orderBy('nombre', 'asc')->get();\n $fechaSiembraSeleccionada=Carbon::createFromFormat('Y-m-d H:i:s', $salidaPlanta->siembra->fecha);\n\n $siembraSeleccionada = array(\n 'id_siembra'=>$salidaPlanta->id_siembraPlantula,\n 'variedad'=>$salidaPlanta->siembra->variedad,\n 'nombre'=>$salidaPlanta->siembra->cultivo->nombre,\n 'fecha'=>$fechaSiembraSeleccionada->format('d/m/Y')\n );\n\n $siembras = siembraPlantula::where('id_invernaderoPlantula',$salidaPlanta->id_invernaderoPlantula)->orderBy('fecha','desc')->get();\n $siembrasTodas=array();\n foreach ($siembras as $siembra) {\n\n $fechaSiembraToda=Carbon::createFromFormat('Y-m-d H:i:s', $siembra->fecha);\n\n array_push($siembrasTodas,array(\n 'id_siembra' => $siembra->id,\n 'variedad' => $siembra->variedad,\n 'nombre' => $siembra->cultivo->nombre,\n 'fecha' => $fechaSiembraToda->format('d/m/Y'))\n\n );\n }\n\n $fecha=Carbon::createFromFormat('Y-m-d H:i:s', $salidaPlanta->fecha);\n $salidaPlanta->fecha=$fecha->format('d/m/Y');\n\n\n return view('Plantula/SalidaPlanta/modificar')->with([\n 'invernadero' => $invernadero,\n 'siembras' => $siembrasTodas,\n 'siembraSeleccionada' => $siembraSeleccionada,\n 'salidaPlanta' => $salidaPlanta,\n ]);\n }", "public function pagesOnly() {}", "public function Comprobarpago($pago) {\n $user = Session::getSession(\"User\");\n if (null != $user) {\n\n $where = \" WHERE Id_pago = '$pago->Id_pago'\";\n $response = $this->db->select1(\"*\", 'pagos', $where, null);\n if (is_array($response)) {\n $response = $response['results'];\n //A qui cargaremos los datos a actualizar \n $value = \"Pago = :Pago, Estatus = :Estatus, Fecha_pago = :Fecha_pago, Proxima_fecha = :Proxima_fecha\";\n $where = \" WHERE Id_pago = '$pago->Id_pago'\";\n //Comprobamos si tenemos datos \n if (0 == count($response)) {\n echo 'Datos erroneos del sistema';\n } else {\n\n $array = array(\n $pago->Pago,\n $pago->Estatus,\n //La fecha actualmente que se esta pagando\n $pago->Fecha_pago,\n //La proxima fecha a que se va a pagar apartir de la ultima fecha que se pago \n $pago->Proxima_fecha,\n );\n\n // print_r($array);\n $data = $this->db->update(\"pagos\", $array, $value, $where);\n // $data = false;\n if (is_bool($data)) {\n //Correcion de datos tengo que agregar un ID\n $value = \"(`Nombre`, `Mes_pago`, `Cantidad`, `Fecha_pagada`, `Folio`)VALUES (:Nombre, :Mes_pago, :Cantidad, :Fecha_pagada, :Folio)\";\n $array = array(\n $pago->Nombre,\n $pago->Mes,\n $pago->Pago,\n $pago->Fecha_pago,\n $pago->Folio\n );\n // print_r($array);\n $data2 = $this->db->insert1(\"catalogo_pagos\", $array, $value);\n\n if (is_bool($data2)) {\n return 0;\n } else {\n return $data2;\n }\n } else {\n\n return $data;\n }\n }\n }\n }\n }", "public static function pesquisaTodos($request){\n $externa = \"https://www.seminovosbh.com.br/resultadobusca/index/\";\n\n //Filtro veículo\n if($request->veiculo == \"carro\")\n $externa .= \"veiculo/carro/\";\n if($request->veiculo == \"moto\")\n $externa .= \"veiculo/moto/\";\n if($request->veiculo == \"caminhao\")\n $externa .= \"veiculo/caminhao/\";\n \n //Filtro estado de conservação\n if($request->estado_conservacao == \"0km\")\n $externa .= \"estado-conservacao/0km/\";\n if($request->estado_conservacao == \"seminovo\")\n $externa .= \"estado-conservacao/seminovo/\";\n\n //Filtro de marca e modelo\n $externa .= \"marca/\".$request->marca.\"/\";\n $externa .= \"modelo/\".$request->modelo.\"/\";\n\n //Filtro de cidade\n if(isset($request->cidade))\n $externa .= \"cidade/\".$request->cidade.\"/\";\n \n //Filtro de valores\n if(isset($request->valor1) && isset($request->valor2))\n $externa .= \"valor1/\".$request->valor1.\"/valor2/\".$request->valor2.\"/\";\n \n //Filtro de anos\n if(isset($request->ano1) && isset($request->ano2))\n $externa .= \"ano1/\".$request->ano1.\"/ano2/\".$request->ano2.\"/\";\n \n //Filtro de tipo de usuário\n if($request->usuario == \"particular\")\n $externa .= \"usuario/particular/\";\n else if($request->usuario == \"revenda\")\n $externa .= \"usuario/revenda/\";\n else \n $externa .= \"usuario/todos/\";\n \n //Maior quantidade de registros possíveis\n $externa .= \"qtdpag/50/\";\n\n //Escolhe a página\n if(isset($request->pagina))\n $externa .= \"pagina/\".$request->pagina.\"/\";\n \n //Extrai os dados da página e retira deles a lista de carros resultante\n $resultados = file_get_contents($externa);\n $resultados_filtro = explode('<dd class=\"titulo-busca\">', $resultados);\n unset($resultados_filtro[0]);\n\n //Pega a quantidade total de páginas da consulta\n $aux1 = explode('<strong class=\"total\">', $resultados);\n $aux2 = explode('</strong>', $aux1[1]);\n $totalPaginas = $aux2[0];\n\n //Cria o array que será utilizado como retorno e informa na primeira posição qual a quantidade de páginas para o usuário navegar entre os resultados\n $compilado = array();\n $compilado[0] = array(\"totalpaginas\" => $totalPaginas);\n $i = 1;\n\n //Para cada resultado, separa-se o título e o código do anúncio para utilizar no outro endpoint \n foreach($resultados_filtro as $resultado){\n $resto = explode('</dd>', $resultado);\n $linha = $resto[0];\n\n $arrayCodigo = explode('/', $linha);\n $codigo = $arrayCodigo[1].\"/\".$arrayCodigo[2].\"/\".$arrayCodigo[3].\"/\".$arrayCodigo[4].\"/\".$arrayCodigo[5].\"/\";\n\n $aux1 = explode('<h4>', $linha);\n $aux2 = explode('</h4>', $aux1[1]);\n $titulo = strip_tags($aux2[0]);\n\n $compilado[$i] = array(\"codigo\"=> $codigo, \"titulo\" => $titulo);\n $i++;\n }\n\n return response()->json($compilado, 200);\n }", "public function EliminarProductos($ids)\n {\n $resultado = array();\n $em = $this->getDoctrine()->getManager();\n\n if ($ids != \"\") {\n $ids = explode(',', $ids);\n $cant_total = 0;\n $cant_eliminada = 0;\n foreach ($ids as $producto_id) {\n if ($producto_id != \"\") {\n $cant_total++;\n $entity = $this->getDoctrine()->getRepository('IcanBundle:Producto')\n ->find($producto_id);\n if ($entity != null) {\n\n //Cotizaciones\n $cotizaciones = $this->getDoctrine()->getRepository('IcanBundle:CotizacionProducto')\n ->ListarCotizaciones($producto_id);\n if (count($cotizaciones) == 0) {\n //Eliminar foto\n $foto_eliminar = $entity->getImagen();\n if ($foto_eliminar != \"\") {\n $dir = 'uploads/productos/';\n if (is_file($dir . $foto_eliminar)) {\n unlink($dir . $foto_eliminar);\n //unlink($dir . \"portada-\" . $foto_eliminar);\n //unlink($dir . \"thumb-\" . $foto_eliminar);\n }\n }\n //Eliminar ficha\n $ficha_eliminar = $entity->getFicha();\n if ($ficha_eliminar != \"\") {\n $dir = 'uploads/productos/';\n if (is_file($dir . $ficha_eliminar)) {\n unlink($dir . $ficha_eliminar);\n }\n }\n\n //Eliminar las imagenes\n $productoimagenes = $this->getDoctrine()->getRepository('IcanBundle:ProductoImagen')\n ->ListarImagenes($producto_id);\n foreach ($productoimagenes as $productoimagen) {\n //Eliminar foto\n $foto_eliminar = $productoimagen->getImagen();\n if ($foto_eliminar != \"\") {\n $dir = 'uploads/productos/';\n if (is_file($dir . $foto_eliminar)) {\n unlink($dir . $foto_eliminar);\n //unlink($dir . \"portada-\" . $foto_eliminar);\n //unlink($dir . \"thumb-\" . $foto_eliminar);\n }\n }\n $em->remove($productoimagen);\n }\n\n //Eliminar los productos relacionados\n $relacionados = $this->getDoctrine()->getRepository('IcanBundle:ProductoRelacion')\n ->ListarRelacionados($producto_id);\n foreach ($relacionados as $relacionado) {\n $em->remove($relacionado);\n }\n\n //Eliminar los productos relacionados\n $productorelacionados = $this->getDoctrine()->getRepository('IcanBundle:ProductoRelacion')\n ->ListarProductosRelacionado($producto_id);\n foreach ($productorelacionados as $relacionado) {\n $em->remove($relacionado);\n }\n\n //Eliminar vistas\n $producto_views = $this->getDoctrine()->getRepository('IcanBundle:ProductoView')\n ->ListarViewsDeProducto($producto_id);\n foreach ($producto_views as $producto_view) {\n $em->remove($producto_view);\n }\n\n //Eliminar descuentos\n $descuentos = $this->getDoctrine()->getRepository('IcanBundle:DescuentoProducto')\n ->ListarDescuentos($producto_id);\n foreach ($descuentos as $descuento) {\n $em->remove($descuento);\n }\n\n $em->remove($entity);\n $cant_eliminada++;\n }\n\n }\n }\n }\n }\n $em->flush();\n if ($cant_eliminada == 0) {\n $resultado['success'] = false;\n $resultado['error'] = \"No se pudo eliminar los productos, porque tienen cotizaciones asociadas\";\n } else {\n $resultado['success'] = true;\n\n $mensaje = ($cant_eliminada == $cant_total) ? \"La operación se ha realizado correctamente\" : \"La operación se ha realizado correctamente. Pero atención no se pudo eliminar todos los productos asociados porque tienen cotizaciones asociadas\";\n $resultado['message'] = $mensaje;\n }\n return $resultado;\n }", "function getListaPags() {\n\t\t\t\n\t\t$arrPaginas = array();\n\t\t\t\n\t\t$inf = NULL;\n\t\t$sup = NULL;\n\t\t\t\n\t\t$tmp01 = floor($this->listap/2);\n\t\t\t\n\t\t// se o highlight estiver no meio da seleção\n\t\tif ($this->pagina - $tmp01 >= 1 && $this->pagina + $tmp01 <= $this->totalp){\n\t\t\t$inf = $this->pagina-$tmp01;\n\t\t\t$sup = $this->pagina+$tmp01;\n\t\t}\n\t\telse {\n\t\t\t// se estiver no lado esquerdo\n\t\t\tif ($this->pagina - $tmp01 < 1) {\n\t\t\t\t$inf = 1;\n\t\t\t\t$sup = ($this->totalp < $this->listap) ? $this->totalp : $this->listap ;\n\t\t\t}\n\t\t\t// se estiver no lado direito\n\t\t\telse if ($this->pagina + $tmp01 > $this->totalp) {\n\t\t\t\t$inf = ($this->totalp < $this->listap) ? 1 : $this->totalp-($this->listap-1) ;\n\t\t\t\t$sup = $this->totalp;\n\t\t\t}\t\t\t\t\n\t\t}\n\t\t\t\n\t\tfor ($x=$inf,$y=0;$x<=$sup;$x++,$y++) {\n\t\t\t$arrPaginas[$y] = $x;\n\t\t}\n\t\t\n\t\treturn $arrPaginas;\n\t\t\t\t\n\t\t// ALGORITMO LISTA DE PAGINAS - FIM\n\t}", "public function findPagoDetalleAseo()\r\n\t\t{\r\n\t\t\t$codigoPresupuestario = self::getCodigoPresupuestarioAseo();\r\n\r\n\t\t\t$registers = [];\r\n\t\t\t// Pagos con periodos mayores a cero\r\n\t\t\t$registers = self::findPagoDetallePeriodoMayorCeroInmueble($codigoPresupuestario, [12]);\r\n\t\t\tif ( !self::guardarConsultaRecaudacion($registers) ) {\r\n\t\t\t\tself::errorCargarData(Yii::t('backend', 'Aseo periodo mayores a cero'));\r\n\t\t\t}\r\n\r\n\t\t\t//$registers = [];\r\n\t\t\t// Pagos con periodos iguales a cero\r\n\t\t\t// $registers = self::findPagoDetallePeriodoIgualCeroInmueble($codigoPresupuestario, [12]);\r\n\t\t\t// if ( !self::guardarConsultaRecaudacion($registers) ) {\r\n\t\t\t// \tself::errorCargarData(Yii::t('backend', 'Aseo periodo iguales a cero'));\r\n\t\t\t// }\r\n\r\n\r\n\t\t\t$registers = [];\r\n\t\t\t$registers = self::findPagoDetalleVarioImpuestoModel([12]);\r\n\t\t\tif ( !self::guardarConsultaRecaudacion($registers) ) {\r\n\t\t\t\tself::errorCargarData(Yii::t('backend', 'Aseo por varios'));\r\n\t\t\t}\r\n\r\n\t\t}", "public function pagina( $pagina = 1 )\n\t{\n\t\tfunction paginator_botao($label = null, $position = 1 ){\n\t\t\t$ini = \"\n\t\t\t\t\t<li class='page-item'>\n\t\t\t\t\t\t<a class='page-link' href=$position>\"; \n\t\t\t\t\t\t\n\t\t\t$final = \" </a>\n\t\t\t </li>\";\n\t\t\t$botao = $ini . $label . $final;\n\t\t\t\n\t\t\t//var_dump($botao);\n\t\t\t//exit;\n\n\t\t\treturn $botao;\n\t\t}\n\n\t\t// para limitar\n\t\t$pagina = isset($pagina) ? (int) $pagina : 1;\n\t\tif($pagina <= 1) $pagina = 1;\n\n\t\t$reg_por_pag = 14;\n\t\t$bot_por_pag = 5;\n\n\t\t# define se o primeiro botao está ou nao desativado\n\t\tif( $pagina == 1 ){\n\t\t\t$data['btnA'] = 'disable';\n\t\t} else {\n\t\t\t$data['btnA'] = '';\n\t\t}\n\t\t# Carrega o Model Pessoa\n\t\t$this->load->model('pessoa_model', 'pessoa');\n\t\t$qtd_reg = $this->pessoa->get_qtde_teste(); // nao precisa fazer outro select para contar total\n\t\t$qtde_paginas = (int) ceil($qtd_reg / $reg_por_pag);\n\n\t\tif($pagina > $qtde_paginas) $pagina = 1;\n\n\t\t// INICIO DA PAGINA SERVIRA PARA APONTAR PARA O REGISTRO A SER EXIBIDO\n\t\t$inicio_pagina = ($pagina - 1) * $reg_por_pag;\n\n\t\t$this->load->model('pessoa_model', 'pessoa');\n\t\t$data['pessoas'] = $this->pessoa->get_people_pag($inicio_pagina, $reg_por_pag);\n\n\n\t\tif( $pagina == $qtde_paginas ) {\n\t\t\t$data['btnP'] = 'disable';\n\t\t} else {\n\t\t\t$data['btnP'] = '';\n\t\t}\n\t\t\n\t\t// Conteudo = \"<input id='btnOculta_\" + lin + \"' type='button' value='novo' class='btn btn-default' onclick='Ocultar(this, \\\"OcultaNovoMedicamento_1\\\")' style='float:left' />\";\n\t\t$btnA = \"\";\n\t\t$hrefBtnA = \"<?php echo base_url(\" . \"pessoas/pagina/)\" ;\n\t\t$pagina_anterior = '';\n\t\t// paginator já ira pronto para o HTML, não haverá a necessidade de <?php echo > dentro \n\t\n\t\t$botao_primeiro = \"\n\t\t\t\t\t<li class='page-item'>\n\t\t\t\t\t\t<a class='page-link' \n\t\t href= '1' >\t\t\t\t\t\t\n\t\t Primeiro\n\t\t </a>\n\t\t </li>\n\t\t\"; \n\n\t\t$botao_ultimo = paginator_botao( 'Ultimo', $qtde_paginas);\n\n\t\t//$botao = array();\n\t\t// estava dando um erro aqui 22/07/2020 de offset\n\t\t\n\n\t\tfor($i = 1; $i<= $qtde_paginas; $i ++){\n\t\t\t$botao[$i] = paginator_botao( \"$i\" , $i );\n\t\t}\n\n\t\t$botao_prev = paginator_botao( '&#10218', ($pagina - 1) );\n\t\t$botao_next = paginator_botao( '&#10219', ($pagina + 1) );\n\t\t\n\n\t\t$paginatorInicio = \"\n\t\t <nav aria-label='...'>\n\t\t\t\t<ul class='pagination justify-content-center'>\n\t\t\"; \n\t\t$paginatorFinal = \"\n\t\t </ul>\n\t\t </nav>\t\n\t\t\"; \n\t\t$paginator = $paginatorInicio . $paginatorFinal;\n\n\t\t$ord = $pagina;\n\t\t//echo $ord;\n\t\t//exit;\n\n\t\t\n\t\t$botoes = '';\n\n\t\tif($pagina > 1 ){\n\t\t\t if ($pagina < $qtde_paginas-$bot_por_pag){\n\t\t\t\tfor ( $i=$pagina ; $i <= ($pagina + $bot_por_pag); $i++ ){\n\t\t\t\t\t$botoes .= $botao[$i];\n\t\t\t\t\t//echo $botoes . '<br>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$paginator = $paginatorInicio . \n\t\t\t\t$botao_primeiro .\n\t\t\t\t$botao_prev .\n\t\t\t\t$botoes . \n\t\t\t\t$botao_next .\n\t\t\t\t$botao_ultimo .\n\t\t\t\t$paginatorFinal;\n\t\t\t }\telse {\n\t\t\t\t$pagina = $qtde_paginas-$bot_por_pag + 1;\n\t\t\t }\n\t\t}\n\n\t\tif($pagina === 1){\n\t\t\tfor ( $i=1 ; $i <= $bot_por_pag; $i++ ){\n\t\t\t\t$botoes .= $botao[$i];\n\t\t\t}\n\t\t\t$paginator = $paginatorInicio . \n\t\t\t $botoes . \n\t\t\t\t\t\t $botao_next .\n\t\t\t\t\t\t $botao_ultimo .\n\t\t\t\t\t\t $paginatorFinal;\n\t\t}\n\n\t\tif(($pagina === $qtde_paginas) or ($pagina === $qtde_paginas-$bot_por_pag+1) ){\n\t\t\tfor ( $i=$qtde_paginas-$bot_por_pag ; $i <= $qtde_paginas; $i++ ){\n\t\t\t\tif($pagina < $qtde_paginas){\n\t\t\t\t\t$botoes .= $botao[$i];\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$paginator = $paginatorInicio . \n\t\t\t\t\t\t $botao_primeiro .\n\t\t\t\t\t\t $botao_prev .\n\t\t\t\t\t\t $botoes . \n\t\t\t\t\t\t $paginatorFinal;\n\t\t}\n\n\n\t\t$data['paginator'] = $paginator;\n\t\t$data['qtde_botoes'] = $bot_por_pag;\n\t\t$data['qtde_paginas']= $qtde_paginas;\n\t\t$data['pagina'] = $pagina;\n\t\t$data['qtd_reg'] = $qtd_reg;\n\n\n\n\t\t//Carregamos a view listarpessoa e passamos como parametro a array pessoa que guarda todos os pessoa da db pessoa\n\t\t$this->load->view('/template/cabecalho');\n\t\t#$this->load->view('barra_usuario');\n\t\t$this->load->view('listar_pessoas', $data);\n\t\t$this->load->view('/template/rodape');\n\t}", "function listar_originales_limit_para_generador($inicial,$cantidad,$id_tipo_simbolo) {\n\t\t\t\n\t\tif ($id_tipo_simbolo==99) { $sql_tipo=''; } \n\t\telse { $sql_tipo='AND imagenes.id_tipo_imagen='.$id_tipo_simbolo.''; }\n\t\t\t\n\t\t$query = \"SELECT palabra_imagen.*, \n\t\timagenes.id_imagen,imagenes.id_colaborador,imagenes.imagen,imagenes.extension,imagenes.id_tipo_imagen,\n\t\timagenes.estado,imagenes.registrado,imagenes.id_licencia,imagenes.id_autor,imagenes.tags_imagen,\n\t\timagenes.tipo_pictograma,imagenes.validos_senyalectica,imagenes.original_filename,\n\t\tpalabras.*\n\t\tFROM palabra_imagen, imagenes, palabras\n\t\tWHERE imagenes.estado=1\n\t\tAND palabras.id_palabra=palabra_imagen.id_palabra\n\t\t$sql_tipo\n\t\tAND palabra_imagen.id_imagen=imagenes.id_imagen\n\t\tORDER BY palabra_imagen.id_imagen asc\n\t\tLIMIT $inicial,$cantidad\";\n\t\t\n\t\t//$query = \"SELECT palabra_imagen.*, imagenes.*, palabras.*\n//\t\tFROM palabra_imagen, imagenes, palabras\n//\t\tWHERE imagenes.estado=1\n//\t\tAND palabra_imagen.id_palabra=8762\n//\t\tAND palabras.id_palabra=palabra_imagen.id_palabra\n//\t\tAND palabra_imagen.id_imagen=imagenes.id_imagen\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "function pagarcredito($idempleado,$money,$idencargado, $caja){\r\n\t$iduser = substr($idempleado, 1);\r\n\t$onoma=$caja->nameUser($iduser);\r\n\t$idMov=$caja->insert_movimiento(\"entrada\",$money,\"Cobrado Credito \".$onoma,9,$idencargado);\r\n\t$caja->insert_mov_credito($idMov,-$money,$iduser,1,\"HR\");\r\n\t//$response = loadtickets($caja,$iduser);\t\r\n\t$response = loadmovimientos($caja,$iduser);\t\r\n\t$totalTickets=$caja->total_cuenta($iduser);\r\n\t$response[\"TotalTickets\"]=$totalTickets;\r\n\treturn $response;\t\r\n}", "public function reorderChildren()\n {\n $sql = \"select ID_PAGE from \" . $this->mode . \"PAGE where PAG_IDPERE=\" . $this->getID() . \" order by PAG_POIDS\";\n $stmt = $this->dbh->prepare(\"update \" . $this->mode . \"PAGE set PAG_POIDS=:PAG_POIDS where ID_PAGE=:ID_PAGE\");\n $PAG_POIDS = 1;\n $stmt->bindParam(':PAG_POIDS', $PAG_POIDS, PDO::PARAM_INT);\n foreach ($this->dbh->query($sql)->fetchAll(PDO::FETCH_COLUMN) as $ID_PAGE) {\n $stmt->bindValue(':ID_PAGE', $ID_PAGE, PDO::PARAM_INT);\n $stmt->execute();\n $PAG_POIDS ++;\n }\n }", "function listarObligacionPagoCotizacion(){\n\t\t$this->procedimiento='adq.f_cotizacion_sel';\n\t\t$this->transaccion='ADQ_OBPGCOT_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t$this->setCount(false);\n\t\t\n\t\t$this->setParametro('id_cotizacion','id_cotizacion','int4');\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_obligacion_pago','int4');\t \n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function index(Request $request)\n {\n //\n\n /*\n * $preguntas = Pregunta::paginate(5);+\n $preguntas = Pregunta::orderBy('id','DESC')->paginate(5);\n */\n\n\n\n $titulo = $request->get('titulo');\n $tema_id = $request->get('tema_id');\n\n $preguntas = Pregunta::orderBy('id', 'DESC')\n ->titulo($titulo)\n ->tema_id($tema_id)\n ->paginate(10);\n/*\n $preguntas= DB::table('preguntas')\n ->join('temas','preguntas.tema_id','=','temas.id')\n ->select('preguntas.titulo','preguntas.descripcion','preguntas.puntuacionPregu','preguntas.user_id','preguntas.tema_id','temas.nombreTema')\n ->get();*/\n\n\n\n\n return view('index',['preguntas' => $preguntas]);\n }", "function obtener_post($post_por_pagina, $conexion) {\n $inicio = (pagina_actual() > 1) ? pagina_actual() * $post_por_pagina - $post_por_pagina : 0;\n $sentencia = $conexion->prepare(\"SELECT * FROM imagenes ORDER BY idImg DESC LIMIT $inicio, $post_por_pagina\");\n $sentencia->execute();\n return $sentencia->fetchAll();\n}" ]
[ "0.63670135", "0.61290604", "0.60711175", "0.60591596", "0.6041709", "0.6026482", "0.59963846", "0.5979023", "0.59657943", "0.5898914", "0.5894131", "0.5891553", "0.58703494", "0.58650833", "0.58602935", "0.58383495", "0.5821982", "0.58014363", "0.5795225", "0.5791302", "0.57844114", "0.5770013", "0.5763536", "0.57580084", "0.57460636", "0.57254374", "0.57150215", "0.57049584", "0.5685888", "0.5685839", "0.56778246", "0.56763625", "0.56753385", "0.5675207", "0.566718", "0.56579936", "0.5653831", "0.5643223", "0.564179", "0.5639817", "0.56258506", "0.5617389", "0.5614217", "0.56083333", "0.5585258", "0.558396", "0.55757684", "0.5575084", "0.55671835", "0.5544365", "0.5518671", "0.55130076", "0.5505075", "0.5500445", "0.5487159", "0.548253", "0.54811317", "0.54784375", "0.54701614", "0.54566765", "0.5456338", "0.5452366", "0.54505426", "0.5449774", "0.5444828", "0.54366666", "0.5428886", "0.542097", "0.54196554", "0.5416162", "0.54120594", "0.54057777", "0.54037434", "0.5386275", "0.5384194", "0.538102", "0.5375006", "0.5375006", "0.5372994", "0.5371608", "0.5370716", "0.53634745", "0.5358049", "0.53490806", "0.53468657", "0.5345845", "0.53407973", "0.5327067", "0.53265995", "0.53153837", "0.53149045", "0.53144157", "0.5309925", "0.5294243", "0.5290169", "0.52873677", "0.5282559", "0.52817076", "0.5280975", "0.5278865", "0.52661943" ]
0.0
-1
Generates the configuration tree builder.
public function getConfigTreeBuilder() { $treeBuilder = new TreeBuilder(); $rootNode = $treeBuilder->root('deployer'); $this->addServerSection($rootNode); $this->addFarmSection($rootNode); $this->addProjectSection($rootNode); return $treeBuilder; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getConfigTreeBuilder()\n {\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder('chameleon_system_core');\n $root = $treeBuilder->getRootNode();\n $root->isRequired();\n\n $root\n ->children()\n ->scalarNode('vendor_dir')->end()\n ->scalarNode('redirectstrategy')\n ->defaultValue('registershutdown')\n ->end()\n ->scalarNode('query_modifier_order_by_class')->end()\n ->arrayNode('pdo')\n ->children()\n ->scalarNode('mysql_attr_init_command')->end()\n ->end()\n ->end()\n ->append($this->getCronjobConfig())\n ->append($this->getMailTargetTransformationServiceConfig())\n ->append($this->getMailerConfig())\n ->append($this->getGoogleMapsApiConfig())\n ->append($this->getBackendConfig())\n ->append($this->getModuleExecutionConfig())\n ->append($this->getResourceCollectionConfig())\n ;\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder(): TreeBuilder\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('exsyst_dynamic_class_generation');\n\n $rootNode\n ->children()\n ->scalarNode('cache_directory')->defaultValue('%kernel.cache_dir%/exsyst-clsgen')->end()\n ->scalarNode('temporary_directory')->defaultValue('%kernel.cache_dir%/exsyst-clsgen')->end()\n ->end()\n ;\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('responsive_image');\n\n // Add basic configurations.\n $rootNode\n ->children()\n ->booleanNode('debug')\n ->defaultFalse()\n ->end()\n ->booleanNode('cache_bust')\n ->defaultFalse()\n ->end()\n ->variableNode('image_entity_class')\n ->defaultValue([])\n ->end()\n ->enumNode('image_driver')\n ->defaultValue('gd')\n ->values(['gd', 'imagick'])\n ->end()\n ->integerNode('image_compression')\n ->defaultValue(90)\n ->min(0)->max(100)\n ->end()\n ->scalarNode('image_directory')\n ->defaultValue('images')\n ->end()\n ->scalarNode('image_styles_directory')\n ->defaultValue('styles')\n ->end()\n ->arrayNode('breakpoints')\n ->prototype('scalar')->end()\n ->end()\n ->arrayNode('image_styles')\n ->prototype('array')\n ->children()\n ->integerNode('width')\n ->min(1)\n ->end()\n ->integerNode('height')\n ->min(1)\n ->end()\n ->enumNode('effect')\n ->defaultValue('scale')\n ->values(['scale', 'crop'])\n ->end()\n ->booleanNode('greyscale')\n ->defaultFalse()\n ->end()\n ->end()\n ->end()\n ->end()\n ->variableNode('picture_sets')->end()\n ->arrayNode('crop_focus_widget')\n ->children()\n ->booleanNode('include_js_css')\n ->defaultTrue()\n ->end()\n ->booleanNode('display_coordinates')\n ->defaultTrue()\n ->end()\n ->end()\n ->end()\n ->append($this->addAWSNode())\n ->end()\n ;\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('venice_app');\n\n $mappingNode = $rootNode->children()->arrayNode('entity_mapping')->useAttributeAsKey('name');\n $mappingNode->prototype('array')->children()\n ->scalarNode('entity')->isRequired()->end()\n ->arrayNode('map')->useAttributeAsKey('name')->prototype('scalar');\n\n $rootNode->children()\n ->arrayNode('forms_override')\n ->defaultValue([])\n ->useAttributeAsKey('venice_forms_override')\n ->prototype('scalar');\n\n $rootNode->children()\n ->arrayNode('entity_forms')\n ->defaultValue([])\n ->useAttributeAsKey('venice_entity_forms')\n ->prototype('scalar');\n\n $rootNode->children()\n ->arrayNode('entity_override')\n ->defaultValue([])\n ->useAttributeAsKey('venice_entity_override')\n ->prototype('scalar');\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('coffee_bike_dachser');\n\n $rootNode\n ->children()\n ->scalarNode('dachser_branch_number')->end()\n ->scalarNode('dachser_gln_number')->end()\n ->scalarNode('dachser_branch_number_full')->end()\n ->scalarNode('dachser_sftp_host')->end()\n ->scalarNode('dachser_sftp_port')->end()\n ->scalarNode('dachser_sftp_username')->end()\n ->scalarNode('dachser_sftp_password')->end()\n ->scalarNode('dachser_sftp_remote_in_path')->end()\n ->scalarNode('dachser_sftp_remote_out_path')->end()\n ->scalarNode('dachser_sftp_remote_in_save_path')->end()\n ->scalarNode('dachser_sftp_local_in_path')->end()\n ->scalarNode('dachser_sftp_local_out_path')->end()\n ->scalarNode('dachser_sftp_local_in_save_path')->end()\n ->scalarNode('dachser_sftp_local_in_tmp')->end()\n ->end()\n ;\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\n {\n // to stick with strict snake_case to make sure it works.\n if (method_exists(TreeBuilder::class, 'getRootNode')) {\n $treeBuilder = new TreeBuilder('meteo_concept_h_captcha');\n $rootNode = $treeBuilder->getRootNode();\n } else {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('meteo_concept_h_captcha');\n }\n\n $rootNode\n ->children()\n ->arrayNode('hcaptcha')\n ->info(\"The configuration value of your hCaptcha account (visit https://dashboard.hcaptcha.com to find them).\")\n ->children()\n ->scalarNode('site_key')\n ->info(\"The site key for this website.\")\n ->defaultValue(null)\n ->end()\n ->scalarNode('secret')\n ->info(\"The secret used to authenticate requests to hCaptcha verification endpoint.\")\n ->isRequired()\n ->cannotBeEmpty()\n ->end()\n ->end()\n ->end()\n ->end()\n ;\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\n {\n return new TreeBuilder();\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('graphql');\n\n //@formatter:off\n $rootNode\n ->children()\n ->arrayNode('schemas')\n ->requiresAtLeastOneElement()\n ->useAttributeAsKey('name')\n ->arrayPrototype()\n ->children()\n ->scalarNode('sdl')\n ->info('Path to the SDL graphql definition')\n ->end()\n ->scalarNode('route')\n ->defaultValue(self::DEFAULT_ROUTE)\n ->treatNullLike(self::DEFAULT_ROUTE)\n ->end()\n ->arrayNode('resolvers')\n ->useAttributeAsKey('type')\n ->isRequired()\n ->requiresAtLeastOneElement()\n ->beforeNormalization()\n ->always(function($resolvers){\n return $this->normalizeResolvers($resolvers);\n })\n ->end()\n ->prototype('scalar')->end()\n ->validate()\n ->always(function($resolvers){\n $this->validateResolvers($resolvers);\n return $resolvers;\n })\n ->end()\n ->end()\n ->end()\n ->end()\n ->end()\n ;\n //@formatter:on\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\n {\n if (Kernel::VERSION_ID >= 40300) {\n $treeBuilder = new TreeBuilder('sfcod_email_engine');\n $rootNode = $treeBuilder->getRootNode();\n } else {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('sfcod_email_engine');\n }\n\n $this->addMainSender($rootNode);\n $this->addSendersSection($rootNode);\n $this->addTemplatesSection($rootNode);\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\n\t{\n\t\t$treeBuilder = new TreeBuilder();\n\t\t$rootNode = $treeBuilder->root('core');\n\t\t$rootNode\n\t\t\t->children()\n\t\t\t\t->booleanNode('require_dev_dependencies')->defaultValue(false)->end()\n\t\t\t\t->arrayNode('debug')\n\t\t\t\t\t->addDefaultsIfNotSet()\n\t\t\t\t\t->children()\n\t\t\t\t\t\t->booleanNode('exceptions')->defaultValue(false)->end()\n\t\t\t\t\t->end()\n\t\t\t\t->end()\n\t\t\t\t->arrayNode('twig')\n\t\t\t\t\t->addDefaultsIfNotSet()\n\t\t\t\t\t->children()\n\t\t\t\t\t\t->booleanNode('debug')->defaultValue(null)->end()\n\t\t\t\t\t\t->booleanNode('auto_reload')->defaultValue(null)->end()\n\t\t\t\t\t\t->booleanNode('enable_debug_extension')->defaultValue(false)->end()\n\t\t\t\t\t->end()\n\t\t\t\t->end()\n\t\t\t->end()\n\t\t;\n\t\treturn $treeBuilder;\n\t}", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $treeBuilder->root('e_xpansion_core')\n ->children()\n ->arrayNode('parameters')\n ->children()\n ->arrayNode('core_chat_color_codes')\n ->useAttributeAsKey('name')\n ->prototype('scalar')\n ->end()\n ->end()\n ->arrayNode('core_chat_glyph_icons')\n ->useAttributeAsKey('name')\n ->prototype('scalar')\n ->end()\n ->end()\n ->end()\n ->end()\n ->end();\n return $treeBuilder;\n }", "abstract public function generateConfiguration();", "public function getConfigTreeBuilder()\n\t{\n\t\t$treeBuilder = new TreeBuilder();\n\t\t$rootNode = $treeBuilder->root('highlight');\n\n\t\t$rootNode\n\t\t\t->children()\n\t\t\t\t\t->arrayNode('providers')\n\t\t\t\t\t\t ->performNoDeepMerging()\n\t\t\t\t\t\t //->addDefaultsIfNotSet()\n\t\t\t\t\t\t ->prototype('scalar')->end()\n\t\t\t\t\t\t ->defaultValue(array('geshi','pygment','highlight'))\n\t\t\t\t\t->end()\n\t\t\t->end();\n\t\t\t\t\t\t\n\t\t$this->addGlobalSection($rootNode);\n\t\t$this->addGeshiSection($rootNode);\n\t\t$this->addHighlightSection($rootNode);\n\t\t$this->addPygmentSection($rootNode);\n\t\t$this->addHttpAppspotSection($rootNode);\n\t\t$this->addHttpHilitemeSection($rootNode);\n\t\t\n\t\treturn $treeBuilder;\n\t}", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n\n $rootNode = $treeBuilder->root('myowncode_turbosms');\n $rootNode\n ->children()\n ->scalarNode('login')\n ->isRequired()\n ->cannotBeEmpty()\n ->end()\n ->scalarNode('password')\n ->isRequired()\n ->cannotBeEmpty()\n ->end()\n ->scalarNode('sender')\n ->isRequired()\n ->cannotBeEmpty()\n ->end()\n ->scalarNode('debug')\n ->defaultFalse()\n ->end()\n ->scalarNode('save_to_db')\n ->defaultTrue()\n ->end()\n ->scalarNode('wsdl')\n ->isRequired()\n ->cannotBeEmpty()\n ->end()\n ->end();\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('vars');\n\n $rootNode\n\t\t\t\t->addDefaultsIfNotSet()\n ->children()\n\t\t\t\t\t->scalarNode('language')->isRequired()->cannotBeEmpty()\n\t\t\t\t\t->end()\n\t\t\t\t\t->scalarNode('source')->isRequired()->cannotBeEmpty()\n\t\t\t\t\t->end()\n\t\t\t\t\t->scalarNode('provider')->defaultValue('pygment')\n\t\t\t\t\t->end()\n ->end();\n\n return $treeBuilder; \n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('deploy');\n $rootNode\n ->children()\n ->append($this->getTargetsNode())\n ->end()\n ;\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\n {\n\n $treeBuilder = new TreeBuilder();\n\n $keePassConfig = $treeBuilder->root('KeePass');\n\n $keePassConfig->children()\n ->append($this->addKeePassNode())\n ->scalarNode('cache_folder')\n ->defaultValue('@data_folder@/cache')\n ->end()\n ->scalarNode('data_folder')\n ->defaultValue('%HOME%/.KeePassCli')\n ->end()\n ->scalarNode('app_folder')\n ->defaultValue(realpath(sprintf('%s/../../',dirname(__FILE__))))\n ->end()\n ->end();\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $root = $treeBuilder->root('light_saml_sp');\n\n $root\n ->children()\n ->arrayNode('username_mapper')\n ->defaultValue([\n ClaimTypes::EMAIL_ADDRESS,\n ClaimTypes::ADFS_1_EMAIL,\n ClaimTypes::COMMON_NAME,\n ClaimTypes::WINDOWS_ACCOUNT_NAME,\n 'urn:oid:0.9.2342.19200300.100.1.3',\n 'uid',\n 'urn:oid:1.3.6.1.4.1.5923.1.1.1.6',\n SimpleUsernameMapper::NAME_ID,\n ])\n ->prototype('scalar')->end()\n ->end()\n ->end()\n ;\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\n {\n $builder = new TreeBuilder();\n $root = $builder->root('phraseanet');\n $nodeBuilder = $root->children();\n\n $this->addSdkNode($nodeBuilder);\n\n return $builder;\n }", "public function getConfigTreeBuilder()\n\t {\n\t $treeBuilder = new TreeBuilder();\n\t $rootNode = $treeBuilder->root('data_tables');\n\n\t $rootNode\n\t ->children()\n\t ->arrayNode('entities')\n\t\t\t\t\t\t->prototype('array')\n\t\t ->children()\n\t\t\t\t\t\t\t\t->scalarNode('name')\n\t\t\t\t\t\t\t\t\t->cannotBeEmpty()\n\t\t\t\t\t\t\t\t->end()\n\t\t\t\t\t\t\t\t->arrayNode('columns')\n\t\t\t\t\t\t\t\t\t->prototype('scalar')\n\t\t\t\t\t\t\t\t\t\t->cannotBeEmpty()\n\t\t\t\t\t\t\t\t\t->end()\n ->defaultValue([])\n\t\t\t\t\t\t\t\t->end()\n\t\t\t\t\t\t\t\t->arrayNode('search_columns')\n\t\t\t\t\t\t\t\t\t->prototype('scalar')\n\t\t\t\t\t\t\t\t\t\t->cannotBeEmpty()\n\t\t\t\t\t\t\t\t\t->end()\n\t\t\t\t\t\t\t\t->end()\n\t\t\t\t\t\t\t\t->scalarNode('post_process')\n ->defaultValue('')\n\t\t\t\t\t\t\t\t->end()\n\t\t\t\t\t\t\t\t->scalarNode('user_limit')\n\t\t\t\t\t\t\t\t\t->defaultValue(0)\n\t\t\t\t\t\t\t\t->end()\n\t\t\t\t\t\t\t\t->arrayNode('associative_columns')\n\t\t\t\t\t\t\t\t\t->prototype('array')\n\t\t\t\t\t\t\t\t\t\t->children()\n\t\t\t\t\t\t\t\t\t\t\t->scalarNode('field')\n\t\t\t\t\t\t\t\t\t\t\t\t->cannotBeEmpty()\n\t\t\t\t\t\t\t\t\t\t\t->end()\n\t\t\t\t\t\t\t\t\t\t\t->scalarNode('table')\n\t\t\t\t\t\t\t\t\t\t\t\t->cannotBeEmpty()\n\t\t\t\t\t\t\t\t\t\t\t->end()\n\t\t\t\t\t\t\t\t\t\t\t->scalarNode('target_field')\n\t\t\t\t\t\t\t\t\t\t\t\t->cannotBeEmpty()\n\t\t\t\t\t\t\t\t\t\t\t->end()\n\t\t\t\t\t\t\t\t\t\t\t->arrayNode('target_fields')\n\t\t\t\t\t\t\t\t\t\t\t\t->prototype('scalar')\n\t\t\t\t\t\t\t\t\t\t\t\t\t->cannotBeEmpty()\n\t\t\t\t\t\t\t\t\t\t\t\t->end()\n\t\t\t\t\t\t\t\t\t\t\t->end()\n\t\t\t\t\t\t\t\t\t\t\t->scalarNode('join_type')\n\t\t\t\t\t\t\t\t\t\t\t->end()\n\t\t\t\t\t\t\t\t\t\t->end()\n\t\t\t\t\t\t\t\t\t->end()\n\t\t\t\t\t\t\t\t->end()\n\t\t ->end()\n\t\t\t\t\t\t->end()\n\t ->end()\n\t ->end();\n\n\t return $treeBuilder;\n\t }", "public function getConfigTreeBuilder()\r\n {\r\n $treeBuilder = new TreeBuilder();\r\n $rootNode = $treeBuilder->root('kitano_payment_sips');\r\n\r\n $this->addConfigSection($rootNode);\r\n $this->addBinSection($rootNode);\r\n\r\n return $treeBuilder;\r\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $root = $treeBuilder->root('comindware_tracker');\n\n $this->addConnectionsNode($root);\n\n $root->end();\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder('doctrine_mongodb');\n $rootNode = $treeBuilder->getRootNode();\n\n $this->addDocumentManagersSection($rootNode);\n $this->addConnectionsSection($rootNode);\n $this->addResolveTargetDocumentsSection($rootNode);\n $this->addTypesSection($rootNode);\n\n $rootNode\n ->children()\n ->scalarNode('proxy_namespace')->defaultValue('MongoDBODMProxies')->end()\n ->scalarNode('proxy_dir')->defaultValue('%kernel.cache_dir%/doctrine/odm/mongodb/Proxies')->end()\n ->scalarNode('auto_generate_proxy_classes')\n ->defaultValue(ODMConfiguration::AUTOGENERATE_EVAL)\n ->beforeNormalization()\n ->always(static function ($v) {\n if ($v === false) {\n return ODMConfiguration::AUTOGENERATE_EVAL;\n }\n\n if ($v === true) {\n return ODMConfiguration::AUTOGENERATE_FILE_NOT_EXISTS;\n }\n\n return $v;\n })\n ->end()\n ->end()\n ->scalarNode('hydrator_namespace')->defaultValue('Hydrators')->end()\n ->scalarNode('hydrator_dir')->defaultValue('%kernel.cache_dir%/doctrine/odm/mongodb/Hydrators')->end()\n ->scalarNode('auto_generate_hydrator_classes')\n ->defaultValue(ODMConfiguration::AUTOGENERATE_NEVER)\n ->beforeNormalization()\n ->always(static function ($v) {\n if ($v === false) {\n return ODMConfiguration::AUTOGENERATE_NEVER;\n }\n\n if ($v === true) {\n return ODMConfiguration::AUTOGENERATE_ALWAYS;\n }\n\n return $v;\n })\n ->end()\n ->end()\n ->scalarNode('persistent_collection_namespace')->defaultValue('PersistentCollections')->end()\n ->scalarNode('persistent_collection_dir')->defaultValue('%kernel.cache_dir%/doctrine/odm/mongodb/PersistentCollections')->end()\n ->scalarNode('auto_generate_persistent_collection_classes')->defaultValue(ODMConfiguration::AUTOGENERATE_NEVER)->end()\n ->scalarNode('fixture_loader')\n ->defaultValue(ContainerAwareLoader::class)\n ->beforeNormalization()\n ->ifTrue(static function ($v) {\n return ! ($v === ContainerAwareLoader::class || in_array(ContainerAwareLoader::class, class_parents($v)));\n })\n ->then(static function ($v) {\n throw new LogicException(sprintf('The %s class is not a subclass of the ContainerAwareLoader', $v));\n })\n ->end()\n ->end()\n ->scalarNode('default_document_manager')->end()\n ->scalarNode('default_connection')->end()\n ->scalarNode('default_database')->defaultValue('default')->end()\n ->arrayNode('default_commit_options')\n ->addDefaultsIfNotSet()\n ->children()\n ->booleanNode('j')->end()\n ->integerNode('timeout')->end()\n ->scalarNode('w')->end()\n ->integerNode('wtimeout')->end()\n // Deprecated options\n ->booleanNode('fsync')->info('Deprecated. Please use the \"j\" option instead.')->end()\n ->scalarNode('safe')->info('Deprecated. Please use the \"w\" option instead.')->end()\n ->end()\n ->end()\n ->arrayNode('controller_resolver')\n ->canBeDisabled()\n ->children()\n ->booleanNode('auto_mapping')\n ->defaultTrue()\n ->info('Set to false to disable using route placeholders as lookup criteria when the object id doesn\\'t match the argument name')\n ->end()\n ->end()\n ->end()\n ->end();\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\r\n {\r\n $tree = new TreeBuilder();\r\n\r\n $tree->root('three_scale')\r\n ->children()\r\n ->scalarNode('provider_key')->defaultValue(false)->isRequired()->end()\r\n ->arrayNode('client')\r\n ->children()\r\n ->scalarNode('class')->end()\r\n ->end()\r\n ->end()\r\n ->end();\r\n\r\n return $tree;\r\n }", "public function getConfigTreeBuilder()\n {\n $tb = new TreeBuilder('sherlockode_advanced_content');\n $root = $tb->getRootNode();\n\n $root\n ->children()\n ->arrayNode('entity_class')\n ->isRequired()\n ->children()\n ->scalarNode('content')\n ->isRequired()\n ->cannotBeEmpty()\n ->end()\n ->scalarNode('content_version')\n ->isRequired()\n ->cannotBeEmpty()\n ->end()\n ->scalarNode('scope')\n ->isRequired()\n ->cannotBeEmpty()\n ->end()\n ->scalarNode('page_type')\n ->isRequired()\n ->cannotBeEmpty()\n ->end()\n ->scalarNode('page')\n ->isRequired()\n ->cannotBeEmpty()\n ->end()\n ->scalarNode('page_version')\n ->isRequired()\n ->cannotBeEmpty()\n ->end()\n ->scalarNode('page_meta')\n ->isRequired()\n ->cannotBeEmpty()\n ->end()\n ->scalarNode('page_meta_version')\n ->isRequired()\n ->cannotBeEmpty()\n ->end()\n ->end()\n ->end()\n ->arrayNode('upload')\n ->children()\n ->scalarNode('image_directory')\n ->cannotBeEmpty()\n ->end()\n ->scalarNode('uri_prefix')\n ->cannotBeEmpty()\n ->end()\n ->end()\n ->end()\n ->arrayNode('init_command')\n ->addDefaultsIfNotSet()\n ->children()\n ->scalarNode('directory')\n ->defaultValue('var/acb')\n ->end()\n ->scalarNode('files_directory')\n ->defaultValue('var/acb/files')\n ->end()\n ->booleanNode('allow_update')\n ->defaultFalse()\n ->end()\n ->end()\n ->end()\n ->arrayNode('templates')\n ->addDefaultsIfNotSet()\n ->children()\n ->scalarNode('tools')\n ->cannotBeEmpty()\n ->defaultValue('@SherlockodeAdvancedContent/Tools/index.html.twig')\n ->end()\n ->end()\n ->end()\n ->arrayNode('default_options')\n ->addDefaultsIfNotSet()\n ->children()\n ->scalarNode('wysiwyg_toolbar')\n ->defaultValue('basic')\n ->validate()\n ->ifNotInArray(['basic', 'standard', 'full'])\n ->thenInvalid('Invalid wysiwyg toolbar option %s')\n ->end()\n ->end()\n ->booleanNode('date_include_time')\n ->defaultTrue()\n ->end()\n ->end()\n ->end()\n ->arrayNode('field_types')\n ->useAttributeAsKey('code')\n ->arrayPrototype()\n ->children()\n ->booleanNode('enabled')->defaultTrue()->end()\n ->scalarNode('icon')->end()\n ->end()\n ->end()\n ->end()\n ->arrayNode('scopes')\n ->addDefaultsIfNotSet()\n ->children()\n ->booleanNode('enabled')\n ->defaultFalse()\n ->end()\n ->end()\n ->end()\n ->arrayNode('mime_type_group')\n ->useAttributeAsKey('name')\n ->arrayPrototype()\n ->scalarPrototype()->end()\n ->end()\n ->end()\n ->end()\n ;\n\n return $tb;\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n\n $root = $treeBuilder->root('security');\n\n $root\n ->children()\n ->arrayNode('firewalls')\n ->children()\n ->arrayNode('api_auth_by_key')\n ->children()\n ->arrayNode('keys')\n ->prototype('array')\n ->children()\n ->scalarNode('key')->end()\n ->scalarNode('name')->end()\n ->arrayNode('roles')\n ->defaultValue([])\n ->prototype('scalar')->end()\n ->end()\n ->end()\n ->end()\n ->end()\n ->end()\n ->end()\n ->arrayNode('dao_auth')\n ->children()\n ->arrayNode('users')\n ->useAttributeAsKey('username')\n ->prototype('array')\n ->children()\n ->scalarNode('username')->end()\n ->scalarNode('password')->end()\n ->arrayNode('roles')\n ->defaultValue([])\n ->prototype('scalar')->end()\n ->end()\n ->end()\n ->end()\n ->end()\n ->end()\n ->end()\n ->end()\n ->end()\n ->end();\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder(): TreeBuilder\n {\n $builder = new TreeBuilder();\n\n $builder->root('best_it_ct_customer_prices')\n ->children()\n ->scalarNode('cache_service_id')\n ->defaultValue('cache.app')\n ->info('Please provide the service id for your cache adapter.')\n ->end()\n ->scalarNode('client_service_id')\n ->info('Please provide the service id for your commercetools client.')\n ->isRequired()\n ->cannotBeEmpty()\n ->end()\n ->scalarNode('query')\n ->defaultValue('container=\"{container}-{currencyValue}-{customerValue}\"')\n ->info('Please provide the search query. You can use placeholder in your query')\n ->end()\n ->scalarNode('container')\n ->defaultValue('customer-prices')\n ->info('Please provide the name of the custom object container where the prices are saved.')\n ->end()\n ->arrayNode('fields')\n ->addDefaultsIfNotSet()\n ->children()\n ->scalarNode('article')\n ->defaultValue('article')\n ->info(\n 'Please provide the name of the custom object value field which saves the ' .\n 'article id.'\n )\n ->end()\n ->scalarNode('customer')\n ->defaultValue('customer')\n ->info(\n 'Please provide the name of the custom object value field which saves the ' .\n 'customer id.'\n )\n ->end()\n ->scalarNode('currency')\n ->defaultValue('currency')\n ->info(\n 'Please provide the name of the custom object value field which saves the ' .\n 'currency.'\n )\n ->end()\n ->scalarNode('prices')\n ->defaultValue('prices')\n ->info(\n 'Please provide the name of the custom object value field which saves the ' .\n 'money objects for the price.'\n )\n ->end()\n ->end()\n ->end()\n ->end();\n\n return $builder;\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('zym_user', 'array');\n $rootNode\n ->children()\n ->scalarNode('db_driver')->cannotBeOverwritten()->isRequired()->cannotBeEmpty()->end()\n ->end();\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('parameters');\n\n // google params\n $google = $rootNode->children()->arrayNode('google');\n if ($this->action !== 'listProjects') {\n $google->isRequired();\n }\n\n // billable bigquery project\n $param = $google->children()->scalarNode('projectId');\n if ($this->action !== 'listProjects') {\n $param->isRequired()->cannotBeEmpty();\n }\n\n // cloud storage bucket\n $param = $google->children()->scalarNode('storage');\n if ($this->action !== 'listBuckets' && $this->action !== 'listProjects') {\n $param->isRequired()->cannotBeEmpty();\n }\n\n // location\n $param = $google->children()->scalarNode('location');\n\n if ($this->action !== 'listBuckets' && $this->action !== 'listProjects') {\n $param->defaultValue('US');\n }\n\n // queries\n $rootNode\n ->children()\n ->arrayNode('queries')\n ->prototype('array')\n ->children()\n ->integerNode('id')\n ->min(0)\n ->end()\n ->scalarNode('name')\n ->isRequired()\n ->cannotBeEmpty()\n ->end()\n ->scalarNode('query')\n ->isRequired()\n ->cannotBeEmpty()\n ->end()\n ->scalarNode('outputTable')\n ->end()\n ->booleanNode('flattenResults')\n ->defaultValue(true)\n ->end()\n ->booleanNode('incremental')\n ->defaultValue(false)\n ->end()\n ->arrayNode('primaryKey')\n ->prototype('scalar')\n ->end()\n ->end()\n ->booleanNode('enabled')\n ->defaultValue(true)\n ->end()\n ->booleanNode('useLegacySql')\n ->defaultValue(true)\n ->end()\n ->end()\n ->end()\n ->end()\n ;\n\n $rootNode->children()\n ->integerNode('retriesCount')\n ->min(0)\n ->defaultValue(5)\n ->end()\n ;\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n\n $root = $treeBuilder->root('git_deploy_project');\n $root->children()\n ->booleanNode('npm')->defaultNull()->end()\n ->booleanNode('composer')->defaultNull()->end()\n ->arrayNode('scripts')\n ->fixXmlConfig('script')\n ->arrayPrototype()\n ->beforeNormalization()\n ->ifString()->then(function($v) {\n return [\n 'command' => $v,\n ];\n })\n ->end()\n ->children()\n ->arrayNode('command')\n ->isRequired()\n ->beforeNormalization()\n ->castToArray()\n ->end()\n ->variablePrototype()->end()\n ->end() // Command\n ->arrayNode('trigger')\n ->beforeNormalization()\n ->castToArray()\n ->end()\n ->arrayPrototype()\n ->beforeNormalization()\n ->castToArray()\n ->ifString()->then(function($v) {\n return [\n 'path' => $v,\n ];\n })\n ->end()\n ->children()\n ->variableNode('path')->isRequired()->end()\n ->variableNode('trigger')->end()\n ->booleanNode('exact')->defaultTrue()->end()\n ->end()\n ->end()\n ->end() // Trigger\n ->end()\n ->end() // Script Array Prototype\n ->end() // Scripts Array Node\n ->end();\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder('piedweb_conversation');\n $treeBuilder\n ->getRootNode()\n ->children()\n ->scalarNode('entity_message')->defaultValue('PiedWeb\\ConversationBundle\\Entity\\Message')->end()\n ->scalarNode('notification_emailTo')->defaultNull()->end()\n ->scalarNode('notification_interval')\n ->defaultValue('P12H')\n ->info(\"DateInterval's format\")\n ->end()\n ->arrayNode('form')\n ->end()\n ->scalarNode('form_message')\n ->defaultValue('PiedWeb\\ConversationBundle\\Form\\MessageForm')\n ->end()\n ->scalarNode('form_ms-message')\n ->defaultValue('PiedWeb\\ConversationBundle\\Form\\MultiStepMessageForm')\n ->end()\n ->scalarNode('form_newsletter')\n ->defaultValue('PiedWeb\\ConversationBundle\\Form\\NewsletterForm')\n ->end()\n ->scalarNode('possible_origins')->defaultNull()->end()\n ->end()\n ;\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('dtc_grid');\n\n $rootNode\n ->children()\n ->arrayNode('jq_grid')\n ->children()\n ->arrayNode('css')\n ->prototype('scalar')->end()\n ->end()\n ->arrayNode('js')\n ->prototype('scalar')->end()\n ->end()\n ->end()\n ->end()\n ->scalarNode('purl')\n ->defaultValue('https://cdnjs.cloudflare.com/ajax/libs/purl/2.3.1/purl.min.js')\n ->end()\n ->arrayNode('jquery')\n ->addDefaultsIfNotSet()\n ->children()\n ->scalarNode('url')\n ->defaultValue('https://code.jquery.com/jquery-3.3.1.min.js')\n ->end()\n ->scalarNode('integrity')\n ->defaultValue('sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=')\n ->end()\n ->scalarNode('crossorigin')\n ->defaultValue('anonymous')\n ->end()\n ->end()\n ->end()\n ->arrayNode('datatables')\n ->addDefaultsIfNotSet()\n ->children()\n ->scalarNode('class')->defaultNull()->end()\n ->arrayNode('css')\n ->prototype('scalar')->end()\n ->defaultValue(['https://cdn.datatables.net/1.10.19/css/dataTables.bootstrap.min.css'])\n ->end()\n ->arrayNode('js')\n ->prototype('scalar')->end()\n ->defaultValue(['https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js',\n 'https://cdn.datatables.net/1.10.19/js/dataTables.bootstrap.min.js', ])\n ->end()\n ->end()\n ->end()\n ->arrayNode('theme')\n ->addDefaultsIfNotSet()\n ->children()\n ->arrayNode('css')\n ->prototype('scalar')->end()\n ->defaultValue(['https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css'])\n ->end()\n ->arrayNode('js')\n ->prototype('scalar')->end()\n ->defaultValue(['https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js'])\n ->end()\n ->end()\n ->end()\n ->scalarNode('page_div_style')->defaultValue('margin: 10px')->end()\n ->end();\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $node = $treeBuilder->root('px_cron_request');\n $node\n ->children()\n ->scalarNode('encryption_key')->isRequired()->end()\n ->arrayNode('cronjobs')\n ->prototype('array')\n ->children()\n ->scalarNode('job')->isRequired()->end()\n ->scalarNode('name')->isRequired()->end()\n ->booleanNode('symfonyCommand')->defaultValue(false)->end()\n ->end()\n ->end()\n ->end()\n ->end();\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder('rompetomp_inertia');\n $treeBuilder->getRootNode()\n ->children()\n ->scalarNode('root_view')->defaultValue('app.html.twig')->end()\n ->arrayNode('ssr')\n ->addDefaultsIfNotSet()\n ->children()\n ->booleanNode('enabled')->defaultFalse()->end()\n ->scalarNode('url')->defaultValue('')->end()\n ->end()\n ->end()\n ->end();\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\n {\n $mergeConfig = $this->shouldMergeConfig();\n $treeType = 'variable';\n\n if ($mergeConfig) {\n $treeType = 'array';\n }\n\n // Most recent versions of TreeBuilder have a constructor\n if (\\method_exists(TreeBuilder::class, '__construct')) {\n $treeBuilder = new TreeBuilder('aws', $treeType);\n } else { // which is not the case for older versions\n $treeBuilder = new TreeBuilder;\n $treeBuilder->root('aws', $treeType);\n }\n\n // If not AWS_MERGE_CONFIG, return empty, variable TreeBuilder\n if (!$mergeConfig) {\n return $treeBuilder;\n }\n\n if (method_exists($treeBuilder, 'getRootNode')) {\n $rootNode = $treeBuilder->getRootNode();\n } else {\n $rootNode = $treeBuilder->root('aws', $treeType);\n }\n\n // Define TreeBuilder to allow config validation and merging\n $rootNode\n ->ignoreExtraKeys(false)\n ->children()\n ->variableNode('credentials')->end()\n ->variableNode('debug')->end()\n ->variableNode('stats')->end()\n ->scalarNode('endpoint')->end()\n ->variableNode('endpoint_discovery')->end()\n ->arrayNode('http')\n ->children()\n ->floatNode('connect_timeout')->end()\n ->booleanNode('debug')->end()\n ->booleanNode('decode_content')->end()\n ->integerNode('delay')->end()\n ->variableNode('expect')->end()\n ->variableNode('proxy')->end()\n ->scalarNode('sink')->end()\n ->booleanNode('synchronous')->end()\n ->booleanNode('stream')->end()\n ->floatNode('timeout')->end()\n ->scalarNode('verify')->end()\n ->end()\n ->end()\n ->scalarNode('profile')->end()\n ->scalarNode('region')->end()\n ->integerNode('retries')->end()\n ->scalarNode('scheme')->end()\n ->scalarNode('service')->end()\n ->scalarNode('signature_version')->end()\n ->variableNode('ua_append')->end()\n ->variableNode('validate')->end()\n ->scalarNode('version')->end()\n ->end()\n ;\n\n //Setup config trees for each of the services\n foreach (array_column(Aws\\manifest(), 'namespace') as $awsService) {\n $rootNode\n ->children()\n ->arrayNode($awsService)\n ->ignoreExtraKeys(false)\n ->children()\n ->variableNode('credentials')->end()\n ->variableNode('debug')->end()\n ->variableNode('stats')->end()\n ->scalarNode('endpoint')->end()\n ->variableNode('endpoint_discovery')->end()\n ->arrayNode('http')\n ->children()\n ->floatNode('connect_timeout')->end()\n ->booleanNode('debug')->end()\n ->booleanNode('decode_content')->end()\n ->integerNode('delay')->end()\n ->variableNode('expect')->end()\n ->variableNode('proxy')->end()\n ->scalarNode('sink')->end()\n ->booleanNode('synchronous')->end()\n ->booleanNode('stream')->end()\n ->floatNode('timeout')->end()\n ->scalarNode('verify')->end()\n ->end()\n ->end()\n ->scalarNode('profile')->end()\n ->scalarNode('region')->end()\n ->integerNode('retries')->end()\n ->scalarNode('scheme')->end()\n ->scalarNode('service')->end()\n ->scalarNode('signature_version')->end()\n ->variableNode('ua_append')->end()\n ->variableNode('validate')->end()\n ->scalarNode('version')->end()\n ->end()\n ->end()\n ->end()\n ;\n }\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('kunstmaan_admin');\n\n $rootNode\n ->fixXmlConfig('admin_locale')\n ->fixXmlConfig('menu_item')\n ->children()\n ->scalarNode('admin_password')->end()\n ->scalarNode('dashboard_route')->end()\n ->arrayNode('admin_locales')\n ->defaultValue(array('en'))\n ->prototype('scalar')->end()\n ->end()\n ->arrayNode('session_security')\n ->addDefaultsIfNotSet()\n ->children()\n ->booleanNode('ip_check')->defaultFalse()->end()\n ->booleanNode('user_agent_check')->defaultFalse()->end()\n ->end()\n ->end()\n ->scalarNode('default_admin_locale')->cannotBeEmpty()->defaultValue('en')->end()\n ->booleanNode('enable_console_exception_listener')->defaultTrue()->end()\n ->arrayNode('menu_items')\n ->defaultValue([])\n ->useAttributeAsKey('route', false)\n ->prototype('array')\n ->children()\n ->scalarNode('route')->isRequired()->end()\n ->scalarNode('label')->isRequired()->end()\n ->scalarNode('role')->defaultNull()->end()\n ->arrayNode('params')->defaultValue([])->prototype('scalar')->end()->end()\n ->scalarNode('parent')->defaultValue('KunstmaanAdminBundle_modules')->end()\n ->end()\n ->end()\n ->end()\n ->end();\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder('etrias_cqrs');\n\n // Keep compatibility with symfony/config < 4.2\n if (!method_exists($treeBuilder, 'getRootNode')) {\n $rootNode = $treeBuilder->root('etrias_cqrs');\n } else {\n $rootNode = $treeBuilder->getRootNode();\n }\n\n $rootNode\n ->isRequired()\n ->children()\n ->arrayNode('cache')\n ->children()\n ->scalarNode('items_adapter')\n ->isRequired()\n ->info('service to store items (Symfony\\Component\\Cache\\Adapter\\AdapterInterface)')\n ->end()\n ->scalarNode('tags_adapter')\n ->isRequired()\n ->info('service to store tags (Symfony\\Component\\Cache\\Adapter\\AdapterInterface)')\n ->end()\n ->scalarNode('encoder')\n ->defaultValue('serialize')\n ->isRequired()\n ->info('service to store tags (Symfony\\Component\\Cache\\Adapter\\AdapterInterface)')\n ->end()\n ->arrayNode('default')\n ->isRequired()\n ->children()\n ->integerNode('expires_after')\n ->defaultValue(0)\n ->info('TTL in seconds')\n ->end()\n ->scalarNode('expires_at')\n ->defaultNull()\n ->info('A datetime string format')\n ->end()\n ->scalarNode('name_strategy')\n ->defaultValue(ReflectionStrategy::class)\n ->end()\n ->scalarNode('name_xpr')->defaultNull()->end()\n ->arrayNode('tags')\n ->prototype('scalar')->end()\n ->info('Expression format (services and security is available)')\n ->end()\n ->end()\n ->end()\n ->arrayNode('commands')\n ->useAttributeAsKey('command')\n ->arrayPrototype()\n ->children()\n ->integerNode('expires_after')\n ->defaultValue(0)\n ->info('TTL in seconds')\n ->end()\n ->scalarNode('expires_at')\n ->defaultNull()\n ->info('A datetime string format')\n ->end()\n ->scalarNode('name_strategy')\n ->defaultValue(ReflectionStrategy::class)\n ->end()\n ->scalarNode('name_xpr')->defaultNull()->end()\n ->arrayNode('tags')\n ->scalarPrototype()\n ->info('Expression format (services and security is available)')\n ->end()\n ->end()\n ->end()\n ->end()\n ->end()\n ->end()\n ;\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\n {\n if (\\method_exists(TreeBuilder::class, 'getRootNode')) {\n $treeBuilder = new TreeBuilder('data_grid');\n $rootNode = $treeBuilder->getRootNode();\n } else {\n // BC layer for symfony/config 4.1 and older\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('data_grid');\n }\n $rootNode\n ->children()\n ->arrayNode('instances')\n ->normalizeKeys(false)\n ->useAttributeAsKey('name')\n ->arrayPrototype()\n ->children()\n ->scalarNode('template')->defaultValue('@DataGrid/grid.blocks.html.twig')->end()\n ->scalarNode('no_data_message')->defaultValue('No data found')->end()\n ->booleanNode('pagination_enabled')->defaultValue(true)->end()\n ->integerNode('pagination_limit')->defaultValue(10)->end()\n ->scalarNode('translation_domain')->defaultNull()->end()\n ->end()\n ->end()\n ->end();\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('system_socket');\n\n $rootNode\n ->children()\n ->scalarNode('queue_name')\n ->cannotBeEmpty()\n ->defaultValue('erp_to_socket_appeal')\n ->end()\n ->end()\n ;\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\r\n {\r\n $treeBuilder = new TreeBuilder();\r\n $rootNode = $treeBuilder->root('app_language');\r\n\r\n $this->addLanguageSection($rootNode);\r\n\r\n return $treeBuilder;\r\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $this->root = $treeBuilder->root(\"rms_push_notifications\");\n\n $this->addAndroid();\n $this->addiOS();\n $this->addMac();\n $this->addBlackberry();\n $this->addWindowsphone();\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\n {\n $builder = new TreeBuilder('rs_di_extra', 'array');\n $builder\n ->getRootNode()\n ->children()\n ->arrayNode('locations')\n ->addDefaultsIfNotSet()\n ->children()\n ->booleanNode('all_bundles')->defaultFalse()->end()\n ->arrayNode('bundles')\n ->beforeNormalization()\n ->ifString()\n ->then(function ($v) {\n return preg_split('/\\s*,\\s*/', $v);\n })\n ->end()\n ->prototype('scalar')->end()\n ->end()\n ->arrayNode('disallow_bundles')\n ->beforeNormalization()\n ->ifString()\n ->then(function ($v) {\n return preg_split('/\\s*,\\s*/', $v);\n })\n ->end()\n ->prototype('scalar')->end()\n ->end()\n ->arrayNode('directories')\n ->beforeNormalization()\n ->ifString()\n ->then(function ($v) {\n return preg_split('/\\s*,\\s*/', $v);\n })\n ->end()\n ->prototype('scalar')->end()\n ->end()\n ->arrayNode('exclude_directories')\n ->beforeNormalization()\n ->ifString()\n ->then(function ($v) {\n return preg_split('/\\s*,\\s*/', $v);\n })\n ->end()\n ->prototype('scalar')->end()\n ->end()\n ->arrayNode('exclude_files')\n ->beforeNormalization()\n ->ifString()\n ->then(function ($v) {\n return preg_split('/\\s*,\\s*/', $v);\n })\n ->end()\n ->prototype('scalar')->end()\n ->end()\n ->end()\n ->end()\n ->end()\n ->end()\n ;\n return $builder;\n }", "public function getConfigTreeBuilder(): TreeBuilder\n {\n $treeBuilder = new TreeBuilder('knp_gaufrette');\n if (method_exists($treeBuilder, 'getRootNode')) {\n $rootNode = $treeBuilder->getRootNode();\n } else {\n // BC for symfony/config < 4.2\n $rootNode = $treeBuilder->root('knp_gaufrette');\n }\n\n $rootNode\n ->ignoreExtraKeys()\n ->fixXmlConfig('factory', 'factories')\n ->children()\n ->arrayNode('factories')\n ->prototype('scalar')->end()\n ->end()\n ->end()\n ->end()\n ;\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder(): TreeBuilder\n {\n $treeBuilder = new TreeBuilder();\n $treeBuilder->root('s_redbull_api_doc')\n ->children()\n ->arrayNode('documentation')\n ->children()\n ->arrayNode('info')\n ->children()\n ->scalarNode('title')->end()\n ->scalarNode('description')->end()\n ->scalarNode('termsOfService')->end()\n ->arrayNode('contact')\n ->children()\n ->scalarNode('name')->end()\n ->scalarNode('url')->end()\n ->scalarNode('email')->end()\n ->end()\n ->end()\n ->arrayNode('license')\n ->children()\n ->scalarNode('name')->end()\n ->scalarNode('url')->end()\n ->end()\n ->end()\n ->scalarNode('version')->end()\n ->end()\n ->end()\n ->end()\n ->end()\n ;\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('qcharts_frontend');\n\n // Here you should define the parameters that are allowed to\n // configure your bundle. See the documentation linked above for\n // more information on that topic.\n\n $defaultValue = [\n 'fos_user_ui'=>false\n ];\n\n $rootNode\n ->treatNullLike($defaultValue)\n ->children()\n ->scalarNode('fos_user_ui')\n ->defaultValue(false)\n ->info(\"boolean value, true if you're using FOSUserBundle and wish to use QCharts User's UI\")\n ->end()\n ->end()\n ;\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder(): TreeBuilder\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('shopping_feature_flag');\n\n $rootNode\n ->children()\n ->arrayNode('providers')\n ->children()\n ->arrayNode('cookie')\n ->children()\n ->arrayNode('values')\n ->useAttributeAsKey('featureFlag')\n ->arrayPrototype()\n ->isRequired()\n ->beforeNormalization()->castToArray()->end()\n ->scalarPrototype()\n ->beforeNormalization()->always(function($value) { return (string) $value; })->end()\n ->cannotBeEmpty()\n ->end()\n ->end()\n ->end()\n ->end()\n ->end()\n ->arrayNode('userAgent')\n ->children()\n ->arrayNode('values')\n ->useAttributeAsKey('featureFlag')\n ->arrayPrototype()\n ->isRequired()\n ->beforeNormalization()->castToArray()->end()\n ->scalarPrototype()\n ->beforeNormalization()->always(function($value) { return (string) $value; })->end()\n ->cannotBeEmpty()\n ->end()\n ->end()\n ->end()\n ->end()\n ->end()\n ->end()\n ->end()\n ->end();\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $treeBuilder->root('dtl_distance_time')\n ->children()\n ->scalarNode('normalized_distance_unit')\n ->defaultValue('m')\n ->end()\n ;\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder(): TreeBuilder\n {\n if(method_exists(TreeBuilder::class, '__construct'))\n {\n $treeBuilder = new TreeBuilder('ns_flash');\n $rootNode = $treeBuilder->getRootNode();\n }\n /**\n * Included for backward-compatibility with SF3\n */\n else\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('ns_flash');\n }\n\n $rootNode\n ->children()\n ->scalarNode('template')->defaultValue('@NSFlash/Messages/index.html.twig')->cannotBeEmpty()->end()\n ->end();\n\n return $treeBuilder;\n }", "public function getConfigTree()\n {\n $tb = new TreeBuilder();\n $root = $tb->root('vich_geographical');\n \n $root\n ->children()\n ->arrayNode('orm')\n ->useAttributeAsKey('id')\n ->prototype('array')\n ->performNoDeepMerging()\n ->children()\n ->scalarNode('enabled')->defaultTrue()->end()\n ->end()\n ->end()\n ->end()\n ->arrayNode('twig')\n ->performNoDeepMerging()\n ->addDefaultsIfNotSet()\n ->children()\n ->scalarNode('enabled')->defaultFalse()->end()\n ->end()\n ->end()\n ->arrayNode('class')\n ->addDefaultsIfNotSet()\n ->children()\n ->scalarNode('query_service')\n ->cannotBeEmpty()\n ->defaultValue('Vich\\\\GeographicalBundle\\\\QueryService\\\\GoogleQueryService')\n ->end()\n ->scalarNode('map_renderer')\n ->cannotBeEmpty()\n ->defaultValue('Vich\\\\GeographicalBundle\\\\Map\\\\Renderer\\\\GoogleMapRenderer')\n ->end()\n ->end()\n ->end()\n ->end()\n ;\n \n return $tb->buildTree();\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('resque');\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\r\n {\r\n $treeBuilder = new TreeBuilder();\r\n $rootNode = $treeBuilder->root('jt_api');\r\n\r\n // Here you should define the parameters that are allowed to\r\n // configure your bundle. See the documentation linked above for\r\n // more information on that topic.\r\n\r\n return $treeBuilder;\r\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('d4m_ebay');\n\n $rootNode\n ->children()\n ->scalarNode('session_token')->defaultValue('')->end()\n ->scalarNode('session_mode')->defaultValue('sandbox')->end()\n ->arrayNode('session_credentials')\n ->children()\n ->scalarNode('name')->end()\n ->scalarNode('appId')->end()\n ->scalarNode('devId')->end()\n ->scalarNode('certId')->end()\n ->end()\n ->end();\n\n return $treeBuilder;\n }", "private function generateConfig()\n {\n if ('' == $this->config->getName()) {\n throw new \\InvalidArgumentException('No module name given');\n }\n $target = sprintf(\n '%s/app/code/%s/%s/%s/etc/config.xml',\n $this->config->getPath(),\n $this->config->getCodePool(),\n $this->config->getNamespace(),\n $this->config->getName() \n );\n \n $this->renderFile($this->skeletonDir, 'config.xml', $target, array(\n 'config' => $this->config,\n ));\n \n \n $target = sprintf(\n '%s/app/etc/modules/%s_%s.xml',\n $this->config->getPath(),\n $this->config->getNamespace(),\n $this->config->getName() \n );\n \n $this->renderFile($this->skeletonDir, 'Module.xml', $target, array(\n 'config' => $this->config,\n )); \n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder('symfony_open_tracing');\n /** @var ArrayNodeDefinition $rootNode */\n $rootNode = $treeBuilder->getRootNode();\n\n // Basic Sentry configuration\n $rootNode\n ->children()\n ->scalarNode('service_name')->end()\n ->scalarNode('enabled')->defaultTrue()->end()\n ->arrayNode('tracer_config')\n ->children()\n ->arrayNode('sampler')\n ->children()\n ->scalarNode('type')->defaultValue('const')->end()\n ->scalarNode('param')->defaultTrue()->end()\n ->end()\n ->end()\n ->arrayNode('local_agent')\n ->children()\n ->scalarNode('reporting_host')->defaultNull()->end()\n ->scalarNode('reporting_port')->defaultNull()->end()\n ->end()\n ->end()\n ->scalarNode('logging')->defaultTrue()->end()\n ->scalarNode('trace_id_header')->defaultNull()->end()\n ->scalarNode('baggage_header_prefix')->defaultNull()->end()\n ->scalarNode('debug_id_header_key')->defaultNull()->end()\n ->end()\n ->end()\n ->arrayNode('http_listener_skipped_routes')\n ->beforeNormalization()->castToArray()->end()\n ->prototype('scalar')->end()\n ->end()\n ->end();\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('rabbitmq_persist');\n\n $rootNode->children()\n ->scalarNode('host')\n ->defaultValue('localhost')\n ->end()\n ->scalarNode('port')\n ->defaultValue('5672')\n ->end()\n ->scalarNode('user')\n ->defaultValue('guest')\n ->end()\n ->scalarNode('password')\n ->defaultValue('guest')\n ->end()\n ->scalarNode('vhost')\n ->defaultValue('/')\n ->end()\n ->booleanNode('insist')\n ->defaultFalse()\n ->end()\n ->scalarNode('login_method')\n ->defaultValue('AMQPLAIN')\n ->end()\n ->scalarNode('login_response')\n ->defaultValue(null)\n ->end()\n ->scalarNode('locale')\n ->defaultValue('en_US')\n ->end()\n ->floatNode('connection_timeout')\n ->defaultValue(3)\n ->end()\n ->floatNode('read_write_timeout')\n ->defaultValue(3)\n ->end()\n ->scalarNode('exchange')\n ->defaultValue('analytics')\n ->end()\n ->scalarNode('routingKey')\n ->defaultValue('actions')\n ->end()\n ->end();\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('doctrine_fixtures');\n\n $rootNode\n ->children()\n ->arrayNode('exclude_from_purge')\n ->info('Table names to be excluded from purge.')\n ->prototype('scalar')->end()\n ->defaultValue([])\n ->end()\n ->end()\n ;\n\n return $treeBuilder;\n }", "public function getConfigTreeBuilder(): TreeBuilder\n {\n $tb = new TreeBuilder('security');\n $rootNode = $tb->getRootNode();\n\n $rootNode\n ->children()\n ->scalarNode('access_denied_url')->defaultNull()->example('/foo/error403')->end()\n ->enumNode('session_fixation_strategy')\n ->values([SessionAuthenticationStrategy::NONE, SessionAuthenticationStrategy::MIGRATE, SessionAuthenticationStrategy::INVALIDATE])\n ->defaultValue(SessionAuthenticationStrategy::MIGRATE)\n ->end()\n ->booleanNode('hide_user_not_found')->defaultTrue()->end()\n ->booleanNode('erase_credentials')->defaultTrue()->end()\n ->booleanNode('enable_authenticator_manager')->setDeprecated('symfony/security-bundle', '6.2', 'The \"%node%\" option at \"%path%\" is deprecated.')->defaultTrue()->end()\n ->arrayNode('access_decision_manager')\n ->addDefaultsIfNotSet()\n ->children()\n ->enumNode('strategy')\n ->values($this->getAccessDecisionStrategies())\n ->end()\n ->scalarNode('service')->end()\n ->scalarNode('strategy_service')->end()\n ->booleanNode('allow_if_all_abstain')->defaultFalse()->end()\n ->booleanNode('allow_if_equal_granted_denied')->defaultTrue()->end()\n ->end()\n ->validate()\n ->ifTrue(fn ($v) => isset($v['strategy'], $v['service']))\n ->thenInvalid('\"strategy\" and \"service\" cannot be used together.')\n ->end()\n ->validate()\n ->ifTrue(fn ($v) => isset($v['strategy'], $v['strategy_service']))\n ->thenInvalid('\"strategy\" and \"strategy_service\" cannot be used together.')\n ->end()\n ->validate()\n ->ifTrue(fn ($v) => isset($v['service'], $v['strategy_service']))\n ->thenInvalid('\"service\" and \"strategy_service\" cannot be used together.')\n ->end()\n ->end()\n ->end()\n ;\n\n $this->addPasswordHashersSection($rootNode);\n $this->addProvidersSection($rootNode);\n $this->addFirewallsSection($rootNode, $this->factories);\n $this->addAccessControlSection($rootNode);\n $this->addRoleHierarchySection($rootNode);\n\n return $tb;\n }", "public function getConfigTreeBuilder(): TreeBuilder\n {\n return new TreeBuilder(\"password_validator\");\n }", "protected function generateBreezeConfig()\n {\n\n $genConfPath = $this->getGeneratorConfigPath();\n $this->infoMessage(\"Creating generator conf file in $genConfPath.\");\n\n $galaxy = $this->getContextVar(\"galaxy\");\n $planet = $this->getContextVar(\"planet\");\n $createFile = $this->getContextVar(\"createFile\");\n\n $prefixes = $this->getTablePrefixes();\n $mainPrefix = array_shift($prefixes);\n\n\n DeveloperWizardBreezeGeneratorHelper::spawnConfFile($genConfPath, [\n \"galaxyName\" => $galaxy,\n \"planetName\" => $planet,\n \"createFilePath\" => $createFile,\n \"prefix\" => $mainPrefix,\n \"otherPrefixes\" => $prefixes,\n ]);\n return null;\n }", "protected function buildTypolinkConfiguration() {}", "public function getConfigTree()\n {\n $treeBuilder = new TreeBuilder();\n $treeBuilder\n ->root('melnikov_poppler', 'array')\n ->children()\n ->scalarNode('pdfunite_path')\n ->defaultValue('/opt/poppler19/bin/pdfunite')\n ->end()\n ->end()\n ->end();\n\n return $treeBuilder->buildTree();\n }", "protected function generateConfiguration()\n {\n if (!in_array($this->format, array('yml', 'xml', 'php'))) {\n return;\n }\n\n $target = sprintf(\n '%s/Resources/config/routing/%s.%s',\n $this->bundle->getPath(),\n strtolower(str_replace('\\\\', '_', $this->entity)),\n $this->format\n );\n\n $this->renderFile('rest/config/routing.'.$this->format.'.twig', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n ));\n }", "public function end(): ConfigTreeBuilder\n {\n return $this->tree;\n }", "public function describe()\n {\n # create new node builder\n $nodeBuilder = new NodeBuilder('weightSelectorBuilder',$this->eventDispatcher,$this->repo,$this->utilities,$this->generator,$this->locale,$this->database,$this->templateLoader);\n \n # bind this definition as the parent of nodebuilder\n $nodeBuilder->setParent($this);\n \n # return node builder to continue chain\n return $nodeBuilder;\n }", "public function getConfigTreeBuilder(): TreeBuilder\n {\n $treeBuilder = new TreeBuilder();\n /** @var ArrayNodeDefinition $rootNode */\n $rootNode = $treeBuilder->root('symfony_apm_agent');\n\n $rootNode\n ->children()\n ->scalarNode('open_transaction_listener')\n ->defaultValue(OpenTransactionListener::class)\n ->end()\n ->scalarNode('close_transaction_listener')\n ->defaultValue(CloseTransactionListener::class)\n ->end()\n ->scalarNode('open_transaction_factory')\n ->defaultValue(OpenTransactionFactory::class)\n ->end()\n ->scalarNode('server_url')\n ->defaultValue('http://localhost:8200')\n ->end()\n ->end()\n ;\n\n $rootNode\n ->children()\n ->arrayNode('listener_priorities')\n ->addDefaultsIfNotSet()\n ->children()\n ->scalarNode('request')->defaultValue(0)->end()\n ->scalarNode('terminate')->defaultValue(20)->end()\n ->end()\n ->end()\n ->end()\n ;\n\n\n return $treeBuilder;\n }", "protected function addConfigParameterNode()\n {\n \t$builder = new TreeBuilder();\n \t$node = $builder->root('config');\n \n \t$node\n \t\t->treatTrueLike(array('form' => array(\n \t\t\t'type' => \"ASF\\WebsiteBundle\\Form\\Type\\ConfigType\",\n \t\t\t'name' => 'website_config_type'\n \t\t)))\n \t\t->treatFalseLike(array('form' => array(\n \t\t\t'type' => \"ASF\\WebsiteBundle\\Form\\Type\\ConfigType\",\n \t\t\t'name' => 'website_config_type'\n \t\t)))\n \t\t->addDefaultsIfNotSet()\n \t\t->children()\n \t\t\t->arrayNode('form')\n \t\t\t\t->addDefaultsIfNotSet()\n \t\t\t\t->children()\n \t\t\t\t\t->scalarNode('type')\n \t\t\t\t\t\t->defaultValue('ASF\\WebsiteBundle\\Form\\Type\\ConfigType')\n \t\t\t\t\t->end()\n \t\t\t\t\t->scalarNode('name')\n \t\t\t\t\t\t->defaultValue('website_config_type')\n \t\t\t\t\t->end()\n \t\t\t\t\t->arrayNode('validation_groups')\n \t\t\t\t\t\t->prototype('scalar')->end()\n \t\t\t\t\t\t->defaultValue(array(\"Default\"))\n \t\t\t\t\t->end()\n \t\t\t\t->end()\n \t\t\t->end()\n \t\t->end()\n \t;\n \n \treturn $node;\n }", "public function testSetconfiguration() {\n\n\t\t$hashConfig = array(\n\t\t\t'key_left' \t\t=>\t'custom_left',\n\t\t\t'key_right'\t\t=>\t'custom_right',\n\t\t\t'key_id'\t\t=>\t'custom_id',\n\t\t\t'key_parent'\t=>\t'custom_parent'\n\t\t);\n\t\t$objBuilder = new LeftRightTreeTraversal\\TreeBuilder();\n\t\t$objBuilder->setConfiguration($hashConfig);\n\n\t\t$objBuilder->addNode(new LeftRightTreeTraversal\\Node(0));\n\t\t$objBuilder->addNode(new LeftRightTreeTraversal\\Node(1));\n\t\t$objBuilder->setChildById(1, 0);\n\n\t\t$arrayResult = $objBuilder->compute()->export();\n\n\t\t$this->array($arrayResult)\n\t\t\t->size->isEqualTo(2);\n\n\t\tforeach ($arrayResult as $hash) {\n\t\t\t$this->array($hash)\n\t\t\t\t->hasKey('custom_id')\n\t\t\t\t->hasKey('custom_left')\n\t\t\t\t->hasKey('custom_right');\n\t\t}\n\n\t\t/*\n\t\t * Same test, using __construct() to set the configuration\n\t\t */\n\n\t\t$hashConfig = array(\n\t\t\t\t'key_left' \t\t=>\t'custom_left',\n\t\t\t\t'key_right'\t\t=>\t'custom_right',\n\t\t\t\t'key_id'\t\t=>\t'custom_id',\n\t\t\t\t'key_parent'\t=>\t'custom_parent'\n\t\t);\n\t\t$objBuilder = new LeftRightTreeTraversal\\TreeBuilder($hashConfig);\n\n\t\t$objBuilder->addNode(new LeftRightTreeTraversal\\Node(0));\n\t\t$objBuilder->addNode(new LeftRightTreeTraversal\\Node(1));\n\t\t$objBuilder->setChildById(1, 0);\n\n\t\t$arrayResult = $objBuilder->compute()->export();\n\n\t\t$this->array($arrayResult)\n\t\t->size->isEqualTo(2);\n\n\t\tforeach ($arrayResult as $hash) {\n\t\t\t$this->array($hash)\n\t\t\t->hasKey('custom_id')\n\t\t\t->hasKey('custom_left')\n\t\t\t->hasKey('custom_right');\n\t\t}\n\t}", "public function generateConfigCommand()\n {\n $this->outputLine('Making the following config settings:');\n foreach ($this->configSettings as $key => $value) {\n $this->h5pFramework->setOption($key, $value);\n $this->outputLine(\"<b>$key:</b> $value\");\n }\n }", "public function configureBuilder();", "public function buildConfigurationSummary();", "protected function buildFsTree()\n {\n mkdir($this->config_path, 0755, true);\n mkdir($this->compiledViewsPath(), 0755, true);\n }", "private function generateConfig() {\n $config_json = array(\n 'version' => '1.0.0',\n 'name' => $this->gateway_name,\n 'description' => '',\n 'authors' => [],\n 'currencies' => ['USD'],\n 'signup_url' => 'https://google.com'\n );\n\n foreach($config_json as $key => $value) {\n if($key == 'authors' && isset($this->config['authors'])) {\n foreach($this->config[\"authors\"] as $config_author) {\n $config_entry = array(\n \"name\" => \"\",\n \"url\" => \"\"\n );\n \n if(isset($config_author['name'])) {\n $config_entry[\"name\"] = $config_author['name'];\n \n if(isset($config_author[\"url\"])) {\n $config_entry[\"url\"] = $config_author['url'];\n }\n $config_json[\"authors\"][] = $config_entry;\n }\n }\n }\n else {\n if(isset($this->config[$key])) {\n $config_json[$key] = $this->config[$key];\n }\n }\n }\n\n return json_encode($config_json);\n }", "public function configure(ArrayNodeDefinition $builder)\n {\n }", "public function configure(ArrayNodeDefinition $builder)\n {\n $builder\n ->children()\n ->scalarNode('screenshot_path')->end()\n ->arrayNode('json')\n ->children()\n ->scalarNode('filename')->defaultValue('report.json')->end()\n ->scalarNode('output_path')->defaultValue('build/tests')->end()\n ->scalarNode('profiler_path')->defaultValue('build/behat/profiler')->end()\n ->end()\n ->end()\n ->arrayNode('manual')\n ->children()\n ->scalarNode(\"filename\")->isRequired()->end()\n ->scalarNode(\"path\")->isRequired()->end()\n ->scalarNode(\"tagname\")->isRequired()->end()\n ->scalarNode(\"screenshot_path\")->isRequired()->end()\n ->end()\n ->end()\n ;\n }", "public function build() {\n $config = $this->getConfiguration();\n return [\n '#theme' => 'helloadvanced',\n '#text' => isset($config['text']) ? $config['text'] : NULL,\n '#person' => isset($config['person']) ? $config['person'] : NULL,\n '#session' => isset($config['session']) ? $config['session'] : NULL,\n ];\n }", "public function createConfig()\n\t{\n\t}", "protected function build()\n {\n $this->global_variables = (new GlobalVariablesGenerator)->generate();\n }", "private function build_tree()\n\t\t{\n\t\t\t$this->html_result .= '<ul class=\"'.$this->style.'_ul_first\" onkeydown=\"return input_main_key(event,\\''.$this->internal_id.'\\')\">';\n\n\t\t\t//==================================================================\n\t\t\t// Always first this row in tree ( edit mode only )\n\t\t\t//==================================================================\n\t\t\tif ($this->edit_mode)\n\t\t\t{\n\t\t\t\t$this->html_result .= '<div class=\"'.$this->style.'_interow\" id=\"'.$this->internal_id.'INT_0\" OnClick=\"add_new_node(\\''.$this->internal_id.'\\',0)\"></div>';\n\t\t\t}\n\t\t\t//==================================================================\n\t\t\t\n\t\t\t$this->scan_level(0,$this->get_any_child(1));\n\n\t\t\t$this->html_result .= '<ul class=\"'.$this->style.'_ul\">';\n\t\t}", "protected function configure() {\n // $this->addArguments(array(\n // new sfCommandArgument('my_arg', sfCommandArgument::REQUIRED, 'My argument'),\n // ));\n\n $this->addOptions(array(\n new sfCommandOption('application', null, sfCommandOption::PARAMETER_REQUIRED, 'The application name'),\n new sfCommandOption('env', null, sfCommandOption::PARAMETER_REQUIRED, 'The environment', 'dev'),\n new sfCommandOption('connection', null, sfCommandOption::PARAMETER_REQUIRED, 'The connection name', 'propel'),\n // add your own options here\n ));\n\n $this->namespace = 'u';\n $this->name = 'build-all';\n $this->briefDescription = '';\n $this->detailedDescription = <<<EOF\nThe [export-orders|INFO] task does things.\nCall it with:\n\n [php symfony u:build-all|INFO]\nEOF;\n }", "public function build()\n {\n\n if ($this->html)\n return $this->html;\n\n if (count($this->data) == 0) {\n $this->html .= '<ul id=\"'.$this->id.'\" class=\"wgt_tree\" >'.NL;\n $this->html .= '</ul>'.NL;\n\n return $this->html;\n }\n\n $html = '';\n\n $html .= '<ul id=\"'.$this->id.'\" class=\"wgt_tree\" >'.NL;\n\n\n foreach ($this->data as $id => $row) {\n\n $entry = $this->buildTreeNode($row);\n\n $html .= <<<HTML\n<li id=\"{$this->id}_{$id}\" >\n\n {$entry}\n <ul id=\"{$this->id}_{$id}_tree\" ></ul>\n\n</li>\n\nHTML;\n\n\n }\n\n $html .= '</ul>'.NL;\n\n\n $this->html = $html;\n\n return $this->html;\n\n }", "protected function builders() {\n return [\n DrupalCoreRecommendedBuilder::class,\n DrupalDevDependenciesBuilder::class,\n DrupalPinnedDevDependenciesBuilder::class,\n ];\n }", "protected function config_generate()\n\t{\n\t\t// Check if Database is supported by Sphinx\n\t\tif ($this->db->get_sql_layer() =='mysql' || $this->db->get_sql_layer() == 'mysql4' || $this->db->get_sql_layer() == 'mysqli')\n\t\t{\n\t\t\t$this->dbtype = 'mysql';\n\t\t}\n\t\telse if ($this->db->get_sql_layer() == 'postgres')\n\t\t{\n\t\t\t$this->dbtype = 'pgsql';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->config_file_data = $this->user->lang('FULLTEXT_SPHINX_WRONG_DATABASE');\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check if directory paths have been filled\n\t\tif (!$this->config['fulltext_sphinx_data_path'])\n\t\t{\n\t\t\t$this->config_file_data = $this->user->lang('FULLTEXT_SPHINX_NO_CONFIG_DATA');\n\t\t\treturn false;\n\t\t}\n\n\t\tinclude($this->phpbb_root_path . 'config.' . $this->php_ext);\n\n\t\t/* Now that we're sure everything was entered correctly,\n\t\tgenerate a config for the index. We use a config value\n\t\tfulltext_sphinx_id for this, as it should be unique. */\n\t\t$config_object = new \\phpbb\\search\\sphinx\\config($this->config_file_data);\n\t\t$config_data = array(\n\t\t\t'source source_phpbb_' . $this->id . '_main' => array(\n\t\t\t\tarray('type',\t\t\t\t\t\t$this->dbtype . ' # mysql or pgsql'),\n\t\t\t\t// This config value sql_host needs to be changed incase sphinx and sql are on different servers\n\t\t\t\tarray('sql_host',\t\t\t\t\t$dbhost . ' # SQL server host sphinx connects to'),\n\t\t\t\tarray('sql_user',\t\t\t\t\t'[dbuser]'),\n\t\t\t\tarray('sql_pass',\t\t\t\t\t'[dbpassword]'),\n\t\t\t\tarray('sql_db',\t\t\t\t\t\t$dbname),\n\t\t\t\tarray('sql_port',\t\t\t\t\t$dbport . ' # optional, default is 3306 for mysql and 5432 for pgsql'),\n\t\t\t\tarray('sql_query_pre',\t\t\t\t'SET NAMES \\'utf8\\''),\n\t\t\t\tarray('sql_query_pre',\t\t\t\t'UPDATE ' . SPHINX_TABLE . ' SET max_doc_id = (SELECT MAX(post_id) FROM ' . POSTS_TABLE . ') WHERE counter_id = 1'),\n\t\t\t\tarray('sql_query_range',\t\t\t'SELECT MIN(post_id), MAX(post_id) FROM ' . POSTS_TABLE . ''),\n\t\t\t\tarray('sql_range_step',\t\t\t\t'5000'),\n\t\t\t\tarray('sql_query',\t\t\t\t\t'SELECT\n\t\t\t\t\t\tp.post_id AS id,\n\t\t\t\t\t\tp.forum_id,\n\t\t\t\t\t\tp.topic_id,\n\t\t\t\t\t\tp.poster_id,\n\t\t\t\t\t\tp.post_visibility,\n\t\t\t\t\t\tCASE WHEN p.post_id = t.topic_first_post_id THEN 1 ELSE 0 END as topic_first_post,\n\t\t\t\t\t\tp.post_time,\n\t\t\t\t\t\tp.post_subject,\n\t\t\t\t\t\tp.post_subject as title,\n\t\t\t\t\t\tp.post_text as data,\n\t\t\t\t\t\tt.topic_last_post_time,\n\t\t\t\t\t\t0 as deleted\n\t\t\t\t\tFROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tp.topic_id = t.topic_id\n\t\t\t\t\t\tAND p.post_id >= $start AND p.post_id <= $end'),\n\t\t\t\tarray('sql_query_post',\t\t\t\t''),\n\t\t\t\tarray('sql_query_post_index',\t\t'UPDATE ' . SPHINX_TABLE . ' SET max_doc_id = $maxid WHERE counter_id = 1'),\n\t\t\t\tarray('sql_query_info',\t\t\t\t'SELECT * FROM ' . POSTS_TABLE . ' WHERE post_id = $id'),\n\t\t\t\tarray('sql_attr_uint',\t\t\t\t'forum_id'),\n\t\t\t\tarray('sql_attr_uint',\t\t\t\t'topic_id'),\n\t\t\t\tarray('sql_attr_uint',\t\t\t\t'poster_id'),\n\t\t\t\tarray('sql_attr_uint',\t\t\t\t'post_visibility'),\n\t\t\t\tarray('sql_attr_bool',\t\t\t\t'topic_first_post'),\n\t\t\t\tarray('sql_attr_bool',\t\t\t\t'deleted'),\n\t\t\t\tarray('sql_attr_timestamp',\t\t\t'post_time'),\n\t\t\t\tarray('sql_attr_timestamp',\t\t\t'topic_last_post_time'),\n\t\t\t\tarray('sql_attr_string',\t\t\t'post_subject'),\n\t\t\t),\n\t\t\t'source source_phpbb_' . $this->id . '_delta : source_phpbb_' . $this->id . '_main' => array(\n\t\t\t\tarray('sql_query_pre',\t\t\t\t''),\n\t\t\t\tarray('sql_query_range',\t\t\t''),\n\t\t\t\tarray('sql_range_step',\t\t\t\t''),\n\t\t\t\tarray('sql_query',\t\t\t\t\t'SELECT\n\t\t\t\t\t\tp.post_id AS id,\n\t\t\t\t\t\tp.forum_id,\n\t\t\t\t\t\tp.topic_id,\n\t\t\t\t\t\tp.poster_id,\n\t\t\t\t\t\tp.post_visibility,\n\t\t\t\t\t\tCASE WHEN p.post_id = t.topic_first_post_id THEN 1 ELSE 0 END as topic_first_post,\n\t\t\t\t\t\tp.post_time,\n\t\t\t\t\t\tp.post_subject,\n\t\t\t\t\t\tp.post_subject as title,\n\t\t\t\t\t\tp.post_text as data,\n\t\t\t\t\t\tt.topic_last_post_time,\n\t\t\t\t\t\t0 as deleted\n\t\t\t\t\tFROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tp.topic_id = t.topic_id\n\t\t\t\t\t\tAND p.post_id >= ( SELECT max_doc_id FROM ' . SPHINX_TABLE . ' WHERE counter_id=1 )'),\n\t\t\t),\n\t\t\t'index index_phpbb_' . $this->id . '_main' => array(\n\t\t\t\tarray('path',\t\t\t\t\t\t$this->config['fulltext_sphinx_data_path'] . 'index_phpbb_' . $this->id . '_main'),\n\t\t\t\tarray('source',\t\t\t\t\t\t'source_phpbb_' . $this->id . '_main'),\n\t\t\t\tarray('docinfo',\t\t\t\t\t'extern'),\n\t\t\t\tarray('morphology',\t\t\t\t\t'none'),\n\t\t\t\tarray('stopwords',\t\t\t\t\t''),\n\t\t\t\tarray('min_word_len',\t\t\t\t'2'),\n\t\t\t\tarray('charset_type',\t\t\t\t'utf-8'),\n\t\t\t\tarray('charset_table',\t\t\t\t'U+FF10..U+FF19->0..9, 0..9, U+FF41..U+FF5A->a..z, U+FF21..U+FF3A->a..z, A..Z->a..z, a..z, U+0149, U+017F, U+0138, U+00DF, U+00FF, U+00C0..U+00D6->U+00E0..U+00F6, U+00E0..U+00F6, U+00D8..U+00DE->U+00F8..U+00FE, U+00F8..U+00FE, U+0100->U+0101, U+0101, U+0102->U+0103, U+0103, U+0104->U+0105, U+0105, U+0106->U+0107, U+0107, U+0108->U+0109, U+0109, U+010A->U+010B, U+010B, U+010C->U+010D, U+010D, U+010E->U+010F, U+010F, U+0110->U+0111, U+0111, U+0112->U+0113, U+0113, U+0114->U+0115, U+0115, U+0116->U+0117, U+0117, U+0118->U+0119, U+0119, U+011A->U+011B, U+011B, U+011C->U+011D, U+011D, U+011E->U+011F, U+011F, U+0130->U+0131, U+0131, U+0132->U+0133, U+0133, U+0134->U+0135, U+0135, U+0136->U+0137, U+0137, U+0139->U+013A, U+013A, U+013B->U+013C, U+013C, U+013D->U+013E, U+013E, U+013F->U+0140, U+0140, U+0141->U+0142, U+0142, U+0143->U+0144, U+0144, U+0145->U+0146, U+0146, U+0147->U+0148, U+0148, U+014A->U+014B, U+014B, U+014C->U+014D, U+014D, U+014E->U+014F, U+014F, U+0150->U+0151, U+0151, U+0152->U+0153, U+0153, U+0154->U+0155, U+0155, U+0156->U+0157, U+0157, U+0158->U+0159, U+0159, U+015A->U+015B, U+015B, U+015C->U+015D, U+015D, U+015E->U+015F, U+015F, U+0160->U+0161, U+0161, U+0162->U+0163, U+0163, U+0164->U+0165, U+0165, U+0166->U+0167, U+0167, U+0168->U+0169, U+0169, U+016A->U+016B, U+016B, U+016C->U+016D, U+016D, U+016E->U+016F, U+016F, U+0170->U+0171, U+0171, U+0172->U+0173, U+0173, U+0174->U+0175, U+0175, U+0176->U+0177, U+0177, U+0178->U+00FF, U+00FF, U+0179->U+017A, U+017A, U+017B->U+017C, U+017C, U+017D->U+017E, U+017E, U+0410..U+042F->U+0430..U+044F, U+0430..U+044F, U+4E00..U+9FFF'),\n\t\t\t\tarray('min_prefix_len',\t\t\t\t'0'),\n\t\t\t\tarray('min_infix_len',\t\t\t\t'0'),\n\t\t\t),\n\t\t\t'index index_phpbb_' . $this->id . '_delta : index_phpbb_' . $this->id . '_main' => array(\n\t\t\t\tarray('path',\t\t\t\t\t\t$this->config['fulltext_sphinx_data_path'] . 'index_phpbb_' . $this->id . '_delta'),\n\t\t\t\tarray('source',\t\t\t\t\t\t'source_phpbb_' . $this->id . '_delta'),\n\t\t\t),\n\t\t\t'indexer' => array(\n\t\t\t\tarray('mem_limit',\t\t\t\t\t$this->config['fulltext_sphinx_indexer_mem_limit'] . 'M'),\n\t\t\t),\n\t\t\t'searchd' => array(\n\t\t\t\tarray('compat_sphinxql_magics'\t,\t'0'),\n\t\t\t\tarray('listen'\t,\t\t\t\t\t($this->config['fulltext_sphinx_host'] ? $this->config['fulltext_sphinx_host'] : 'localhost') . ':' . ($this->config['fulltext_sphinx_port'] ? $this->config['fulltext_sphinx_port'] : '9312')),\n\t\t\t\tarray('log',\t\t\t\t\t\t$this->config['fulltext_sphinx_data_path'] . 'log/searchd.log'),\n\t\t\t\tarray('query_log',\t\t\t\t\t$this->config['fulltext_sphinx_data_path'] . 'log/sphinx-query.log'),\n\t\t\t\tarray('read_timeout',\t\t\t\t'5'),\n\t\t\t\tarray('max_children',\t\t\t\t'30'),\n\t\t\t\tarray('pid_file',\t\t\t\t\t$this->config['fulltext_sphinx_data_path'] . 'searchd.pid'),\n\t\t\t\tarray('max_matches',\t\t\t\t(string) SPHINX_MAX_MATCHES),\n\t\t\t\tarray('binlog_path',\t\t\t\t$this->config['fulltext_sphinx_data_path']),\n\t\t\t),\n\t\t);\n\n\t\t$non_unique = array('sql_query_pre' => true, 'sql_attr_uint' => true, 'sql_attr_timestamp' => true, 'sql_attr_str2ordinal' => true, 'sql_attr_bool' => true);\n\t\t$delete = array('sql_group_column' => true, 'sql_date_column' => true, 'sql_str2ordinal_column' => true);\n\t\tforeach ($config_data as $section_name => $section_data)\n\t\t{\n\t\t\t$section = $config_object->get_section_by_name($section_name);\n\t\t\tif (!$section)\n\t\t\t{\n\t\t\t\t$section = $config_object->add_section($section_name);\n\t\t\t}\n\n\t\t\tforeach ($delete as $key => $void)\n\t\t\t{\n\t\t\t\t$section->delete_variables_by_name($key);\n\t\t\t}\n\n\t\t\tforeach ($non_unique as $key => $void)\n\t\t\t{\n\t\t\t\t$section->delete_variables_by_name($key);\n\t\t\t}\n\n\t\t\tforeach ($section_data as $entry)\n\t\t\t{\n\t\t\t\t$key = $entry[0];\n\t\t\t\t$value = $entry[1];\n\n\t\t\t\tif (!isset($non_unique[$key]))\n\t\t\t\t{\n\t\t\t\t\t$variable = $section->get_variable_by_name($key);\n\t\t\t\t\tif (!$variable)\n\t\t\t\t\t{\n\t\t\t\t\t\t$variable = $section->create_variable($key, $value);\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$variable->set_value($value);\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$variable = $section->create_variable($key, $value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->config_file_data = $config_object->get_data();\n\n\t\treturn true;\n\t}", "public function buildNodes() {\n\t\t// build pip nodes\n\t\t$this->buildPluginNodes();\n\t\t\n\t\t// remove package\n\t\t$this->buildPackageNode();\n\t}", "public function generateConfigCache()\n\t{\n\t\t// Generate the class/template laoder cache file\n\t\t$objCacheFile = new \\File('system/cache/config/autoload.php', true);\n\t\t$objCacheFile->write('<?php '); // add one space to prevent the \"unexpected $end\" error\n\n\t\tforeach (\\ModuleLoader::getActive() as $strModule)\n\t\t{\n\t\t\t$strFile = 'system/modules/' . $strModule . '/config/autoload.php';\n\n\t\t\tif (file_exists(TL_ROOT . '/' . $strFile))\n\t\t\t{\n\t\t\t\t$objCacheFile->append(static::readPhpFileWithoutTags($strFile));\n\t\t\t}\n\t\t}\n\n\t\t// Close the file (moves it to its final destination)\n\t\t$objCacheFile->close();\n\n\t\t// Generate the module loader cache file\n\t\t$objCacheFile = new \\File('system/cache/config/modules.php', true);\n\t\t$objCacheFile->write(\"<?php\\n\\n\");\n\n\t\t$objCacheFile->append(sprintf(\"static::\\$active = %s;\\n\", var_export(\\ModuleLoader::getActive(), true)));\n\t\t$objCacheFile->append(sprintf(\"static::\\$disabled = %s;\", var_export(\\ModuleLoader::getDisabled(), true)));\n\n\t\t// Close the file (moves it to its final destination)\n\t\t$objCacheFile->close();\n\n\t\t// Generate the config cache file\n\t\t$objCacheFile = new \\File('system/cache/config/config.php', true);\n\t\t$objCacheFile->write('<?php '); // add one space to prevent the \"unexpected $end\" error\n\n\t\tforeach (\\ModuleLoader::getActive() as $strModule)\n\t\t{\n\t\t\t$strFile = 'system/modules/' . $strModule . '/config/config.php';\n\n\t\t\tif (file_exists(TL_ROOT . '/' . $strFile))\n\t\t\t{\n\t\t\t\t$objCacheFile->append(static::readPhpFileWithoutTags($strFile));\n\t\t\t}\n\t\t}\n\n\t\t// Close the file (moves it to its final destination)\n\t\t$objCacheFile->close();\n\n\t\t// Generate the page mapping array\n\t\t$arrMapper = array();\n\t\t$objPages = \\PageModel::findPublishedRootPages();\n\n\t\tif ($objPages !== null)\n\t\t{\n\t\t\twhile ($objPages->next())\n\t\t\t{\n\t\t\t\t$strBase = ($objPages->dns ?: '*');\n\n\t\t\t\tif ($objPages->fallback)\n\t\t\t\t{\n\t\t\t\t\t$arrMapper[$strBase . '/empty.fallback'] = $strBase . '/empty.' . $objPages->language;\n\t\t\t\t}\n\n\t\t\t\t$arrMapper[$strBase . '/empty.' . $objPages->language] = $strBase . '/empty.' . $objPages->language;\n\t\t\t}\n\t\t}\n\n\t\t// Generate the page mapper file\n\t\t$objCacheFile = new \\File('system/cache/config/mapping.php', true);\n\t\t$objCacheFile->write(sprintf(\"<?php\\n\\nreturn %s;\\n\", var_export($arrMapper, true)));\n\t\t$objCacheFile->close();\n\n\t\t// Add a log entry\n\t\t$this->log('Generated the config cache', __METHOD__, TL_CRON);\n\t}", "private function createConfiguration()\n {\n $this->createVrpayecommercePluginConfig();\n $this->Form();\n }", "protected function configure()\n {\n // $this->addArguments(array(\n // new sfCommandArgument('my_arg', sfCommandArgument::REQUIRED, 'My argument'),\n // ));\n\n $this->addOptions(array(\n new sfCommandOption('application', null, sfCommandOption::PARAMETER_REQUIRED, 'The application name'),\n new sfCommandOption('env', null, sfCommandOption::PARAMETER_REQUIRED, 'The environment', 'dev'),\n new sfCommandOption('connection', null, sfCommandOption::PARAMETER_REQUIRED, 'The connection name', 'doctrine'),\n // add your own options here\n ));\n\n $this->namespace = 'project';\n $this->name = 'nestedset-categories';\n $this->briefDescription = 'reorganization of categories to NestedSet behavior';\n $this->detailedDescription = <<<EOF\nreorganization of categories to NestedSet behavior\n [php symfony project:nestedset-categories|INFO]\nEOF;\n }", "public function actionGenerateModuleConfig()\n {\n $detectedModules = $this->actionDetectModules();\n\n $modules = Module::model()->findAll(new CDbCriteria(array(\n 'order' => 'name',\n 'condition' => 'enabled = true',\n )));\n $config = array();\n foreach ($modules as $module) {\n if (!isset($detectedModules[$module->name])) continue;\n $config[$module->name] = array(\n 'class' => $detectedModules[$module->name]\n );\n }\n $str = \"<?php\\nreturn \" . var_export($config, true) . \"\\n?>\";\n file_put_contents(Yii::getPathOfAlias('runtime.cache') . '/modules.php', $str);\n }", "public function setAsBuilder() {\r\n\t\t$this->setFrontEnd(false);\r\n\t\t$this->RenderWhole = true;\r\n\t\t$this->setMenuTemplate(__DIR__ . '/myNavigationBuilder.latte');\r\n\t}", "protected function configure() {\n\n $this->xmlconfig = array(\n \"name\" => array(\"xpath\" => \"mads:authority/mads:name\", \"class_name\" => \"mads_name\"),\n\n \"permanent\" => array(\"xpath\" => \"mads:affiliation[mads:position = 'permanent resident']\",\n \"class_name\" => \"mads_affiliation\"),\n \"current\" => array(\"xpath\" => \"mads:affiliation[mads:position != 'permanent resident']\",\n \"class_name\" => \"mads_affiliation\"),\n \"netid\" => array(\"xpath\" => \"mads:identifier[@type='netid']\"),\n );\n }", "public function generate() \r\n\t{\t\r\n\t\tparent::generate();\r\n\t\r\n\t\t$this->schemaXml = new SimpleXMLElement(file_get_contents( $this->_xmlFile ));\r\n\t\t\r\n\t\t//parse object types\r\n\t\tforeach ($this->schemaXml->children() as $reflectionType) \r\n\t\t{\r\n\t\t\tswitch($reflectionType->getName())\r\n\t\t\t{\r\n\t\t\t\tcase \"enums\":\r\n\t\t\t\t\t//create enum classes\r\n\t\t\t\t\tforeach($reflectionType->children() as $enums_node)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->writeEnum($enums_node);\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"classes\":\r\n\t\t\t\t\t//create object classes\r\n\t\t\t\t\tforeach($reflectionType->children() as $classes_node)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->writeObjectClass($classes_node);\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"services\":\r\n\t\t\t\t\t//implement services (api actions)\r\n\t\t\t\t\tforeach($reflectionType->children() as $services_node)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->writeService($services_node);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//write main class (if needed, this can also be included in the static sources folder if not dynamic)\r\n\t\t\t\t\t$this->writeMainClass($reflectionType->children());\r\n\t\t\t\tbreak;\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->addFile('KalturaTypes.js', $this->enumTypes);\r\n\t\t$this->addFile('KalturaVO.js', $this->voClasses);\r\n\t\t$this->addFile('KalturaServices.js', $this->serviceClasses);\r\n\t\t$this->addFile('KalturaClient.js', $this->mainClass);\r\n\t\t//write project file (if needed, this can also be included in the static sources folder if not dynamic)\r\n\t\t$this->writeProjectFile();\r\n\t}", "public static function builder();", "public function generateYmlConfiguration()\n {\n $this->setSource(new WmsSource());\n $wmsconf = new WmsInstanceConfiguration();\n $wmsconf->setType(strtolower($this->getType()));\n $wmsconf->setTitle($this->title);\n $wmsconf->setIsBaseSource($this->isBasesource());\n\n $options = new WmsInstanceConfigurationOptions();\n $options->setUrl($this->configuration[\"url\"])\n ->setProxy($this->proxy)\n ->setVisible($this->visible)\n ->setFormat($this->getFormat())\n ->setInfoformat($this->infoformat)\n ->setTransparency($this->transparency)\n ->setOpacity($this->opacity / 100)\n ->setTiled($this->tiled);\n\n if (isset($this->configuration[\"vendor\"])) {\n $options->setVendor($this->configuration[\"vendor\"]);\n }\n\n $wmsconf->setOptions($options);\n\n if (!key_exists(\"children\", $this->configuration)) {\n $num = 0;\n $rootlayer = new WmsInstanceLayer();\n $rootlayer->setTitle($this->title)\n ->setId($this->getId() . \"_\" . $num)\n ->setMinScale(!isset($this->configuration[\"minScale\"]) ? null : $this->configuration[\"minScale\"])\n ->setMaxScale(!isset($this->configuration[\"maxScale\"]) ? null : $this->configuration[\"maxScale\"])\n ->setSelected(!isset($this->configuration[\"visible\"]) ? false : $this->configuration[\"visible\"])\n ->setPriority($num)\n ->setWmslayersource(new WmsLayerSource())\n ->setWmsInstance($this);\n $rootlayer->setToggle(false);\n $rootlayer->setAllowtoggle(true);\n $this->addLayer($rootlayer);\n foreach ($this->configuration[\"layers\"] as $layerDef) {\n $num++;\n $layer = new WmsInstanceLayer();\n $layersource = new WmsLayerSource();\n $layersource->setName($layerDef[\"name\"]);\n if (isset($layerDef[\"legendurl\"])) {\n $style = new Style();\n $style->setName(null);\n $style->setTitle(null);\n $style->setAbstract(null);\n $legendUrl = new LegendUrl();\n $legendUrl->setWidth(null);\n $legendUrl->setHeight(null);\n $onlineResource = new OnlineResource();\n $onlineResource->setFormat(null);\n $onlineResource->setHref($layerDef[\"legendurl\"]);\n $legendUrl->setOnlineResource($onlineResource);\n $style->setLegendUrl($legendUrl);\n $layersource->addStyle($style);\n }\n $layer->setTitle($layerDef[\"title\"])\n ->setId($this->getId() . '-' . $num)\n ->setMinScale(!isset($layerDef[\"minScale\"]) ? null : $layerDef[\"minScale\"])\n ->setMaxScale(!isset($layerDef[\"maxScale\"]) ? null : $layerDef[\"maxScale\"])\n ->setSelected(!isset($layerDef[\"visible\"]) ? false : $layerDef[\"visible\"])\n ->setInfo(!isset($layerDef[\"queryable\"]) ? false : $layerDef[\"queryable\"])\n ->setParent($rootlayer)\n ->setWmslayersource($layersource)\n ->setWmsInstance($this);\n $layer->setAllowinfo($layer->getInfo() !== null && $layer->getInfo() ? true : false);\n $rootlayer->addSublayer($layer);\n $this->addLayer($layer);\n }\n $children = array($this->generateLayersConfiguration($rootlayer));\n $wmsconf->setChildren($children);\n } else {\n $wmsconf->setChildren($this->configuration[\"children\"]);\n }\n $this->configuration = $wmsconf->toArray();\n }", "public function getBuilderConfig()\n {\n return $this->builder_config;\n }", "private function getConfigNode() {\n// $jsonConfig = \\CloudConfig::get(\"platform/proxy_shequ\", \"test\");\n// $config = json_decode($jsonConfig, true);\n $array = \\Yosymfony\\Toml\\Toml::Parse(__DIR__ . '/../config.toml');\n\n foreach ($array as $key => $value) {\n if ($key == \"common\") {\n\n $ex = explode(\":\", $value['redis_host']);\n $this->redisHost = $ex[0];\n $this->redisPort = $ex[1];\n\n if (isset($value['redis_auth'])) {\n $this->redisAuth = $value['redis_auth'];\n }\n\n if (isset($value['slow_limit'])) {\n $this->slow_limit = (int) $value['slow_limit'];\n }\n\n if (isset($value['big_limit'])) {\n $this->big_limit = (int) $value['big_limit'];\n }\n\n $this->RECORD_QUERY = $value['record_query'];\n } else {//nodes\n// $node = $key;\n foreach ($value['db'] as $db) {\n $this->getEntry($db, $value);\n }\n }\n }\n if (isset($array['common']['include_path'])) {\n $this->getConfigChildNode($array['common']['include_path']);\n }\n }", "public function __construct(ConfigTreeBuilder $tree)\n {\n $this->tree = $tree;\n }", "public function configure(ArrayNodeDefinition $builder)\n {\n //nothing to configure\n }", "public function buildJavascriptConfiguration() {}", "public function buildJavascriptConfiguration() {}", "public function buildJavascriptConfiguration() {}" ]
[ "0.7528792", "0.73049206", "0.72124696", "0.70483494", "0.7025038", "0.7012615", "0.6973417", "0.6945826", "0.68797654", "0.68684536", "0.6863819", "0.6863366", "0.6855712", "0.68030804", "0.6794495", "0.67527676", "0.6741344", "0.67340124", "0.6716738", "0.6703568", "0.6685213", "0.66738737", "0.6665576", "0.6662926", "0.6653944", "0.66413313", "0.6622073", "0.6619318", "0.661917", "0.6602133", "0.65942323", "0.6584732", "0.6579865", "0.65638715", "0.6556946", "0.6550517", "0.6543995", "0.65393263", "0.6534072", "0.6527039", "0.6509024", "0.6498385", "0.64973235", "0.6476601", "0.6456036", "0.6441737", "0.6431634", "0.6409593", "0.63776225", "0.63725054", "0.63715833", "0.63686806", "0.6347057", "0.63229316", "0.6286224", "0.6248193", "0.6221619", "0.6162701", "0.6044448", "0.6021304", "0.6002354", "0.59442514", "0.5910506", "0.58427954", "0.58246934", "0.57586473", "0.5747243", "0.56986743", "0.5673062", "0.5544828", "0.5514116", "0.5504068", "0.5479603", "0.5436093", "0.54350764", "0.5400649", "0.5391456", "0.533675", "0.53363365", "0.5332481", "0.5299732", "0.52831197", "0.5257122", "0.52527046", "0.5236062", "0.5223496", "0.5200543", "0.5194696", "0.51867235", "0.5181132", "0.51662886", "0.51617247", "0.51517683", "0.5140701", "0.5138181", "0.5131318", "0.51117337", "0.51043975", "0.51043975", "0.51043975" ]
0.6695264
20
Get the validation rules that apply to the request.
public function rules() { return [ 'category_id' => ['required', 'numeric'], 'title' => ['required', 'string', 'min:5', 'max:191'], 'author' => ['required', 'string', 'min:2', 'max:80'], 'status'=> ['sometimes'], 'description' => ['sometimes'] ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\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 rules()\n {\n return $this->validationRules;\n }", "public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }", "public static function getRules()\n {\n return (new static)->getValidationRules();\n }", "public function getRules()\n {\n return $this->validation_rules;\n }", "public function getValidationRules()\n {\n return [];\n }", "public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }", "public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }", "public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }", "protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }", "public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }", "public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }", "public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }", "protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }", "public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }", "public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }", "protected function getValidRules()\n {\n return $this->validRules;\n }", "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }", "public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }", "public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n { \n return $this->rules;\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 getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }", "public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }", "public function validationRules()\n {\n return [];\n }", "public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }", "public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n return static::$rules;\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 static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }", "public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }", "protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }", "public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }", "public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }", "public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }", "public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }", "abstract protected function getValidationRules();", "public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }", "public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }", "public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }", "public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }", "public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }", "public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }", "public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }", "public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }", "public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }", "public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }", "public function getValidationRules() : array;", "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }", "public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }", "public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }", "public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }", "public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}", "public function rules()\n {\n $rules = array();\n return $rules;\n }", "public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }", "public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }", "protected function get_validation_rules()\n {\n }", "public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }", "public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }", "public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }", "public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }", "public function defineValidationRules()\n {\n return [];\n }", "public function rules(Request $request)\n {\n return Qc::$rules;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }", "public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }" ]
[ "0.8342703", "0.80143493", "0.7937251", "0.79264987", "0.79233825", "0.79048395", "0.78603816", "0.7790699", "0.77842164", "0.77628785", "0.7737272", "0.7733618", "0.7710535", "0.7691693", "0.76849866", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7675849", "0.76724476", "0.76665044", "0.7657698", "0.7641827", "0.7630892", "0.76293766", "0.7617708", "0.76102096", "0.7607475", "0.7602442", "0.7598732", "0.7597544", "0.75924", "0.75915384", "0.7588146", "0.7581354", "0.7555758", "0.755526", "0.7551423", "0.7546329", "0.7541439", "0.75366044", "0.75363225", "0.7530296", "0.7517988", "0.75155175", "0.7508439", "0.75069886", "0.7505724", "0.749979", "0.7495976", "0.74949056", "0.7492888", "0.7491117", "0.74901396", "0.7489651", "0.7486808", "0.7486108", "0.7479687", "0.7478561", "0.7469412", "0.74635684", "0.74619836", "0.7461325", "0.74591017", "0.7455279", "0.745352", "0.7453257", "0.7449877", "0.74486", "0.7441391", "0.7440429", "0.7435489", "0.7435326", "0.74341524", "0.7430354", "0.7429103", "0.7423808", "0.741936", "0.74152505", "0.7414828", "0.741382", "0.74126065", "0.74105227", "0.740555", "0.7404385", "0.74040926", "0.74015605", "0.73905706", "0.73837525", "0.73732615", "0.7371123", "0.7369176", "0.73619753", "0.73554605", "0.73448825", "0.7344659", "0.73427117", "0.73357755" ]
0.0
-1
try logging in successfully
public function LoginSuccessfulTest(FunctionalTester $I){ $I->am('user'); $I->wantTo('go to register'); $I->lookForwardTo('getting registered successfully'); HelperController::common_login($I, $this->name, $this->email, $this->password); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function tryLogIn(){\n if(count(self::$loginErrors) === 0){\n $password = md5(self::$loginPassword);\n $query = self::$connection->db->prepare(\"SELECT * FROM users WHERE email = ? AND password = ?\");\n $query->bind_param(\"ss\", self::$loginEmail, $password);\n $query->execute();\n $user = mysqli_fetch_assoc( $query->get_result());\n //Send to Profile page if correct credentials; otherwise, stay on authentication page\n if($user){\n $this->prepareSession($user['name'], self::$loginEmail);\n $_POST = array();\n Auth::CreateView('Profile');\n }else{\n self::addError(\"login\", \"Incorrect credentials!\");\n Auth::CreateView('Auth');\n }\n }\n self::$connection->closeConnection();\n }", "function trylogin()\n {\n\t\t$ret = false;\n\t\t\n $err = SHIN_Core::$_models['sys_user_model']->login();\n\n SHIN_Core::$_language->load('app', 'en');\n $err = SHIN_Core::$_language->line($err);\n\t\t\n if ($err != '') {\n SHIN_Core::$_libs['session']->set_userdata('loginErrorMessage', $err);\n } else {\n $this->sessionModel->start(SHIN_Core::$_models['sys_user_model']->idUser);\n\t\t\t$ret = true;\n\t\t\t\n\t\t\t// addons for new field added //////////////////////////\n\t\t\t// request by Stefano. Detail: http://binary-studio.office-on-the.net/issues/5287\n\t\t\t// \"host\" and \"lastlogin\" field \n\t\t\t$data = array('lastlogin' => date('Y-m-d H:i:s'), 'host' => SHIN_Core::$_input->ip_address());\n\t\t\tSHIN_Core::$_db[SHIN_Core::$_shdb->active_group]->where('idUser', SHIN_Core::$_models['sys_user_model']->idUser);\n\t\t\tSHIN_Core::$_db[SHIN_Core::$_shdb->active_group]->update('sys_user', $data); \t\t\n\t\t\t///////////////////////////////////////////////////////\n }\n\n\t\treturn $ret;\n }", "private function login(){\n \n }", "public function _check_login()\n {\n\n }", "public function loginCheck()\n\t{\n\t}", "public function login()\n {\n $authorized = $this->authorize( $_POST );\n if( !empty( $authorized ) && $authorized !== false ){\n $this->register_login_datetime( $authorized );\n ( new Events() )->trigger( 1, true );\n } else {\n ( new Events() )->trigger( 2, true );\n }\n }", "private function checkLogin()\n {\n if ($this->verifySession()) {\n $this->userId = $this->session['id'];\n }\n if ($this->userId === 0) {\n if ($this->verifyCookie()) {\n $this->userId = $this->cookie['userid'];\n $this->createSession();\n }\n }\n }", "private function loginFailed()\n {\n //Login failed...\n }", "public function executeLogin()\n {\n }", "private function LogIn() : bool\n {\n\n //session::close();\n\n\n $not_specified_user_and_pass = empty($this->username) and empty($this->password);\n\n\n if($not_specified_user_and_pass)\n\n return false;\n\n\n $user = $this->user_details($this->username);\n\n\n $username_not_exists = !$user; //Not user\n\n\n if($username_not_exists)\n\n return false;\n\n\n\n $unrecognized_password = !$this->recognized_password();\n\n\n if($unrecognized_password)\n\n return false;\n\n\n $this->id = $user[\"id\"];\n\n return $this->set_session_key($user);\n\n\n\n }", "protected function checkLogin()\n {\n if (LOCATION == 'Live') {\n $this->markTestSkipped('Cannot run in Live environment');\n return;\n }\n $this->loginPage->open()\n ->navigateToContactUsViaSideButton()\n ->open()\n ->verifyPageIsLoaded()\n ->checkPageTitle('log in to My Account')\n ->enterUserId($this->userData['standard']['uid'])\n ->enterUserPassword($this->userData['standard']['pwd'])\n ->clickButton();\n }", "private function attemptLogin($user){\n\n }", "public function log_login()\n {\n if (!$this->config->get('log_logins')) {\n return;\n }\n\n $user_name = $this->get_user_name();\n $user_id = $this->get_user_id();\n\n if (!$user_id) {\n return;\n }\n\n self::write_log('userlogins',\n sprintf('Successful login for %s (ID: %d) from %s in session %s',\n $user_name, $user_id, self::remote_ip(), session_id()));\n }", "public function login();", "public function login();", "protected function loginIfRequested() {}", "public function login()\n {\n $user=$this->getUser();\n\n $this->setScenario('normal');\n if ($user && $user->failed_logins>=3) $this->setScenario('withCaptcha');\n \n if ($this->validate()) {\n $user->failed_logins=0;\n $user->save();\n\n return Yii::$app->user->login($user, $this->rememberMe ? 3600*24*30 : 0);\n } else {\n return false;\n }\n }", "public function check_login()\n\t{\n\t\tif(isset($_SESSION[\"user_id\"]))\n\t\t{\n\t\t $this->_user_id = $_SESSION[\"user_id\"];\n\t\t\t$this->_client = $_SESSION[\"client\"];\n\t\t\t$this->_loged_in = true;\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_loged_in = false;\n\t\t\t$this->_client = false;\n\t\t\tunset($this->_user_id);\n\t\t}\n\t}", "private function check_login()\n {\n if (self::exists('user_id')) {\n $this->user_id = self::get('user_id');\n $this->logged_in = true;\n } else {\n unset($this->user_id);\n $this->logged_in = false;\n }\n }", "private function _login() {\n if( !$this->_connection->getCookieJar()->getCookie( $this->_baseUrl,\n 'auth_tkt', Zend_Http_CookieJar::COOKIE_OBJECT ) ) {\n $this->_connection->setUri( $this->_baseUrl . self::URL_LOGIN );\n $this->_connection->setParameterPost( array(\n 'login_username' => $this->_username,\n 'login_password' => $this->_password,\n 'back' => $this->_baseUrl,\n 'login' => 'Log In' ) );\n $this->_doRequest( Zend_Http_Client::POST );\n if( !$this->_connection->getCookieJar()->getCookie( $this->_baseUrl,\n 'auth_tkt', Zend_Http_CookieJar::COOKIE_OBJECT ) ) {\n throw new Opsview_Remote_Exception( 'Login failed for unknown reason' );\n }\n }\n }", "protected function login()\n {\n $this->send(Response::nick($this->config['nick']));\n $this->send(Response::user(\n $this->config['nick'],\n $this->config['hostname'],\n $this->config['servername'],\n $this->config['realname']\n ));\n }", "public function logIn(){\n\t\t$email = $_POST['log_email'];\n\t\t$email = filter_var($email, FILTER_SANITIZE_EMAIL); //sanitize email\n\t\t$s_email = self::$db->escape($email);\n\n\t\t\n\t\t$myquery = \"SELECT * FROM users WHERE email = $s_email;\";\n\t\tif(!self::$db->query($myquery)){\n\t\t\tarray_push($_SESSION['error'], \"does not match\");\n\t\t\treturn false;\n\t\t}\n\n\t\t$user = self::$db->select($myquery);\n\t\t$hash = $user[0]['password'];\n\t\t$password = $_POST['log_password'];\n\t\t$unlocked = password_verify($password, $hash);\n\n\t\tif($unlocked){\n\t\t\t$this->setSessionVar($user[0]['id'],$hash);\n\t\t\t$_SESSION['allow']=true;\n\t\t\t$_SESSION['username'] = $user[0]['username'];\n \t\t\theader( \"refresh:0; url=index.php?page=home\");\n \t\t \t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\tarray_push($_SESSION['error'] , 'does not match');\n\t\t\t$_SESSION['allow']=false;\n\t\t\treturn false ;\n\t\t}\n\t\tarray_push($_SESSION['error'] , 'does not match');\n\t\treturn false; \n\t}", "public function do_login()\n {\n $this->userObject = new User();\n\n // grab the uID of the person signing in\n $uid = $this->userObject->checkUser($_POST['user_email'], $_POST['user_password']);\n\n // if the uID exists\n if ($uid) {\n\n $this->set('message', 'You logged in!');\n\n // grab the array of user-data from the database\n $user = $this->userObject->getUser($uid);\n\n // leave out the password\n unset($user['password']);\n unset($user[4]);\n\n // if (strlen($_SESSION['redirect']i) > 0) { // basically, if someone types in the url with the funciton after,\n // // supposed to redirect people to the pages they want.\n // $view = $_SESSION['redirect'];\n // unset($_SESSION['redirect']);\n // header('Location: ' . BASE_URL . $view);\n\n // make the SESSION key 'user' and set it equal to the aray of user-data\n $_SESSION['user'] = $user;\n\n header('Location: /index.php/');\n\n } else {\n\n $this->set('error', 'Sorry! Looks like something might be messed up with your Username or Password! :p');\n }\n }", "public function beginLogin() {\n return false;\n }", "public function p_login() {\n\n\t\t# Sanitize the user entered data to prevent any funny-business (re: SQL Injection Attacks)\n\t\t$_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n\t\t# Hash submitted password so we can compare it against one in the db\n\t\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n\t\t# Search the db for this email and password\n\t\t# Retrieve the token if it's available\n\t\t$q = \"SELECT token \n\t\t\tFROM users \n\t\t\tWHERE email = '\".$_POST['email'].\"' \n\t\t\tAND password = '\".$_POST['password'].\"'\";\n\n\t\t$token = DB::instance(DB_NAME)->select_field($q);\n\n\t\t# If we didn't find a matching token in the database, it means login failed\n\t\tif(!$token) {\n\n\t\t\t# Send them back to the login page\n\t\t\tRouter::redirect(\"/users/login/error\");\n\n\t\t# But if we did, login succeeded! \n\t\t} else {\n\t\t\tsetcookie(\"token\", $token, strtotime('+1 year'), '/');\n\t\t\t# Send them to the main page - or whever you want them to go\n\t\t\tRouter::redirect(\"/\");\n\t\t}\n\t}", "protected function hasLoginBeenProcessed() {}", "function ft_hook_loginsuccess() {}", "protected function login( )\r\n {\r\n $this->sendData( 'USER', $this->_nick, $this->_nick . ' ' . $this->_user . ' : ' . $this->_realName );\r\n \r\n $this->sendData( 'NICK', $this->_nick );\r\n \r\n $this->_loggedOn = true;\r\n }", "private function _logUserIn($inputs)\n\t{\n\t\tCraft::log('Logging in user.');\n\n\t\tif (craft()->userSession->login($inputs['username'], $inputs['password']))\n\t\t{\n\t\t\tCraft::log('User logged in successfully.');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tCraft::log('Could not log the user in.', LogLevel::Warning);\n\t\t}\n\t}", "public function login()\n\t{\n\t\tif($this->_identity===null)\n\t\t{\n\t\t\t$this->_identity=new UserIdentity($this->phone,$this->password);\n\t\t\t$this->_identity->authenticate();\n\t\t}\n\t\tif($this->_identity->errorCode===UserIdentity::ERROR_NONE)\n\t\t{\n $duration = 3600*24*30;\n\t\t\tYii::app()->user->login($this->_identity,$duration);\n\t\t\treturn true;\n\t\t}\n\t\t\t\n return false;\n\t}", "public function login(){\n \t\t//TODO redirect if user already logged in\n \t\t//TODO Seut up a form\n \t\t//TODO Try to log in\n \t\t//TODO Redirect\n \t\t//TODO Error message\n \t\t//TODO Set subview and load layout\n\n \t}", "abstract protected function doLogin();", "private function check_the_login(){\n \n if(isset($_SESSION['login_user'])){\n \n $this->login_user = $_SESSION['login_user'];\n $this->signed_in = true;\n \n }else{\n unset($this->login_user);\n $this->signed_in = false;\n }\n \n }", "protected function loginAuthenticate(){\n\n\t\t\n\t}", "public function login()\n {\n }", "public function login()\n {\n }", "public function log_in() {\n\n // Check if the user exists on the database\n if (!$this->does_exist('username')) {\n return \"Username does not exist\";\n }\n\n $user = User::find($this->username, 'username');\n\n // If password matches\n if ($user->password !== $this->password) {\n return \"Sorry, password does not match\";\n }\n\n return true;\n }", "public function login()\n\t{\n\t\tif($this->_identity===null)\n\t\t{\n\t\t\t$this->_identity=new UserIdentity($this->UserName,$this->passWd);\n\t\t\t$this->_identity->authenticate();\n\t\t}\n\t\tif($this->_identity->errorCode===UserIdentity::ERROR_NONE)\n\t\t{\n\t\t\t$duration=$this->rememberMe ? 3600*24*30 : 0; // 30 days\n\t\t\tuser()->login($this->_identity,$duration);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "public static function userLoginSuccess(){\n self::$IntelligenceService->addToIntelligenceStack(self::USER_INTELLIGENCE_LOGIN_KEY, self::USER_INTELLIGENCE_SUCCESS);\n }", "public function checkLogin() {\r\n\t\t$post = $this -> sanitize();\r\n\t\textract($post);\r\n\t\t// Hash the password that was entered into the form (if it was correct, it will match the hashed password in the database)\r\n\t\t$password = sha1($password);\r\n\t\t// Query\r\n\t\t$query = \"SELECT username, userID, profilePic, access, email FROM users WHERE username='$username' AND password='$password'\";\r\n\t\t$data = $this -> singleSelectQuery($query);\r\n\t\tif($data){\r\n\t\t\t//set up the session\r\n\t\t\t$_SESSION['userID'] = $data['userID'];\r\n\t\t\t$_SESSION['username'] = $data['username'];\r\n\t\t\t$_SESSION['profilePic'] = $data['profilePic'];\r\n\t\t\t$_SESSION['userType'] = $data['userType'];\r\n\t\t\t$_SESSION['access'] = $data['access'];\r\n\t\t\t//redirects to their profile\r\n\t\t\theader('location: index.php?page=profile&userID='.$_SESSION['userID']);\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t}", "public function processLogin(): void;", "function check_login(){\n\t\tif(!empty(yii::app()->request->cookies['uid']) && !empty(yii::app()->request->cookies['pass'])){\n\t\t\n\t\t\t//get the user's email\n\t\t\t$email=get_user_by_id(yii::app()->request->cookies['uid'])->email;\n\t\t\t\n\t\t\t//log the user in\n\t\t\tif($this->user_login($email,yii::app()->request->cookies['pass'],true)){\n\t\t\t\t//renew cookies for n days more\n\t\t\t\t$this->remember_login(yii::app()->request->cookies['pass'],true);\n\t\t\t}\n\t\t}\n\t}", "public function login() {\r\n if (!empty($_POST)) {\r\n $username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);\r\n $password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\r\n\r\n $hash = hash('sha512', $password . Configuration::USER_SALT);\r\n unset($password);\r\n\r\n $user = UserModel::getByUsernameAndPasswordHash($username, $hash);\r\n unset($hash);\r\n\r\n if ($user) {\r\n Session::set('user_id', $user->user_id);\r\n Session::set('username', $username);\r\n Session::set('ip', filter_input(INPUT_SERVER, 'REMOTE_ADDR'));\r\n Session::set('ua', filter_input(INPUT_SERVER, 'HTTP_USER_AGENT', FILTER_SANITIZE_STRING));\r\n\r\n Misc::redirect('');\r\n } else {\r\n $this->set('message', 'Nisu dobri login parametri.');\r\n sleep(1);\r\n }\r\n }\r\n }", "protected function isLoginInProgress() {}", "public function login() {\n $this->db->sql = 'SELECT * FROM '.$this->db->dbTbl['users'].' WHERE username = :username LIMIT 1';\n\n $user = $this->db->fetch(array(\n ':username' => $this->getData('un')\n ));\n\n if($user['hash'] === $this->hashPw($user['salt'], $this->getData('pw'))) {\n $this->sessionId = md5($user['id']);\n $_SESSION['user'] = $user['username'];\n $_SESSION['valid'] = true;\n $this->output = array(\n 'success' => true,\n 'sKey' => $this->sessionId\n );\n } else {\n $this->logout();\n $this->output = array(\n 'success' => false,\n 'key' => 'WfzBq'\n );\n }\n\n $this->renderOutput();\n }", "private function _logged_in()\n {\n /*if(someone is logged in)\n RETURN TRUE;*/\n }", "public function login() {\r\n\r\n // signal any observers that the user has logged in\r\n $this->setState(\"login\");\r\n }", "public function login()\n\t{\n $identity = $this->getIdentity();\n if ($identity->ok) {\n\t\t\t$duration = $this->rememberMe ? 3600*24*30 : 0; // 30 days\n\t\t\tYii::app()->user->login($this->getIdentity(), $duration);\n\t\t\treturn true;\n \n\t\t} else\n\t\t\treturn false;\n\t}", "public function doLogin()\n\t{\n\n\t\t$userNameCookie = $this->loginView->getUserNameCookie();\n\t\t$passwordCookie = $this->loginView->getPasswordCookie();\n\n\t\t\n\t\tif(isset($userNameCookie) && isset($passwordCookie))\n\t\t{\n\t\t\t$this->isLoggedIn=$this->authenticate->tryTologin($userNameCookie,$passwordCookie,true);\n\t\t}\n\n\t\t$reqUsername = $this->loginView->getRequestUserName();\n\t\t$reqPass = $this->loginView->getRequestPassword();\n\n\t\tif($this->loginView->userWantsToLogin())\n\t\t{\n\t\t\t$this->isLoggedIn=$this->authenticate->tryTologin($reqUsername,$reqPass);\t\t\t\n\t\t}\n\t\t/* \tSince logout operation requires session variable to be set, after authenticating\n\t\t*\tlogin details, It really should not matter if the message is still 'Bye bye'\n\t\t*/\n\t\telse if(isset($_SESSION['user']) && $this->loginView->userWantsToLogout())\n\t\t{\n\t\t\t\t$this->authenticate->logout();\n\t\t\t\t$this->isLoggedIn = false;\t\t\t\t\n\t\t}\n\t\treturn $this->isLoggedIn;\n\t}", "protected function login() {\n\t\t\t\n\t\t\t// Generate the login string\n\t\t\t$loginString = str_replace( array('{USER}', '{PASS}'), array( $this->user, $this->pass), $this->loginString );\n\t\t\t\n\t\t\t// Send the login data with curl\n\t\t\t$this->c->{$this->loginMethod}($this->loginUrl, $loginString);\n\t\t\t\n\t\t\t// Check if the login worked\n\t\t\tif($this->is_logged_in()) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tdie('Login failed');\n\t\t\t}\n\t\t\t\n\t\t}", "private static function login() {\n if ( !self::validatePost() ) {\n return;\n }\n $_POST['email'] = strtolower($_POST['email']);\n \n $password = Helper::hash($_POST['password'].$_POST['email']);\n \n $result = Database::getUser($_POST['email'],$password);\n \n if ( $result === false || !is_array($result) ) {\n self::setError('Unbekannter Benutzername oder Passwort!<br>');\n return;\n }\n \n if ( count($result) != 1 ) {\n self::setError('Unbekannter Benutzername oder Passwort!<br>');\n return;\n }\n \n $_SESSION['user']['id'] = $result[0]['id'];\n $_SESSION['user']['email'] = $result[0]['email'];\n $_SESSION['user']['nickname'] = $result[0]['nickname'];\n $_SESSION['user']['verified'] = $result[0]['verified'];\n $_SESSION['user']['moderator'] = $result[0]['moderator'];\n $_SESSION['user']['supermoderator'] = $result[0]['supermoderator'];\n $_SESSION['loggedin'] = true;\n self::$loggedin = true;\n }", "public function login() {\n\t\tif(!empty(Session::get('http_response'))) {\n\t\t\thttp_response_code(Session::get('http_response'));\n\t\t\tSession::delete('http_response');\n\t\t}\n\t\tif($_POST && isset($_POST['login']) && isset($_POST['password'])) {\n\t\t\t$user = $this->_model->getLogin(strtolower($_POST['login']));\n\t\t\tif($user && $user->enabled) {\n\t\t\t\tif(hash_equals($user->password,crypt($_POST['password'],$user->password))) {\n\t\t\t\t\tif($user->blocked) {\n\t\t\t\t\t\thttp_response_code(403);\n\t\t\t\t\t\tSession::setMessage(array('alert'=>'warning','icon'=>'exclamation','text'=>\"User is blocked\"));\n\t\t\t\t\t} elseif($user->verified) {\n\t\t\t\t\t\tSession::set('user',$user);\n\t\t\t\t\t\tSession::setMessage(array('alert'=>'success','icon'=>'check','text'=>\"User has logged in successfully\"));\n\t\t\t\t\t\t$redirect = Session::get('login_redirect');\n\t\t\t\t\t\tRouter::redirect(Session::get('login_redirect'));\n\t\t\t\t\t} else {\n\t\t\t\t\t\thttp_response_code(401);\n\t\t\t\t\t\tSession::setMessage(array('alert'=>'warning','icon'=>'exclamation','text'=>\"User is not yet confirmed\"));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\thttp_response_code(401);\n\t\t\t\t\tSession::setMessage(array('alert'=>'danger','icon'=>'ban','text'=>\"Invalid login name or password\"));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thttp_response_code(401);\n\t\t\t\tSession::setMessage(array('alert'=>'danger','icon'=>'ban','text'=>\"Invalid login name or password\"));\n\t\t\t}\t\n\t\t}\n\t}", "public function checkFirstLogin();", "private function compare_with_login()\n {\n }", "function login() {\n $params = $this->objService->get_request_params();\n $isSuccess = $this->objQuery->count('user','email= ? AND password = ?', array($params->email,$params->password));\n echo $isSuccess;\n }", "public function login(){\n\n }", "public function login_action() \n\t{\n $rules = array(\n 'mail' => 'valid_email|required',\n 'pass' => 'required'\n );\n \n \n //validate the info\n $validated = FormValidation::is_valid($_POST, $rules);\n \n // Check if validation was successful\n if($validated !== TRUE): \n \n //exit with an error\n exit(Alert::error(false, true, $validated));\n\n endif;\n\n // they've passed the filter login try and log 'em in\n\t\tUserModel::login(); \n }", "private function checkFirstLogin() {\n\n $count = DB::table('users')->count();\n\n if ($count == 0) {\n\n $password = Hash::make('cciadminpassword');\n\n // insert in users table\n $id = DB::table('users')->insertGetId([\n 'username' => 'admin',\n 'name' => 'Administrator',\n 'password' => $password,\n 'created_at' => \\Carbon\\Carbon::now()\n ]);\n\n // insert in roles table\n DB::table('user_roles')->insert([\n 'user_id' => $id,\n 'role' => 'administrator',\n 'created_at' => \\Carbon\\Carbon::now()\n ]);\n\n // insert project status codes\n DB::table('project_status')->insert([\n [ 'status' => 'New' ],\n [ 'status' => 'Quoted' ],\n [ 'status' => 'Sold' ],\n [ 'status' => 'Engineered' ],\n [ 'status' => 'Lost']\n ]);\n\n return;\n }\n\n else { return; }\n }", "private function checkLogin() {\n if (!$this->checkConfig()) return;\n $config = $this->getConfig();\n\n if (isset($_SESSION['signin/twitter/status']) && $_SESSION['signin/twitter/status']=='verified') {\n\n $screenname = $_SESSION['signin/twitter/request_vars']['screen_name'];\n $twitterid = $_SESSION['signin/twitter/request_vars']['user_id'];\n $oauth_token = $_SESSION['signin/twitter/request_vars']['oauth_token'];\n $oauth_token_secret = $_SESSION['signin/twitter/request_vars']['oauth_token_secret'];\n\n $connection = new TwitterOAuth($config['consumer_key'], $config['consumer_secret'], $oauth_token, $oauth_token_secret);\n\n // check if we already have this Twitter user in our database\n $user = UserQuery::create()->findOneByOAuthSignIn('twitter::' . $twitterid);\n if (!$user) {\n // if not we create a new one\n $user = new User();\n $user->setCreatedAt(time());\n $user->setOAuthSignIn('twitter::' . $twitterid);\n // we use the email field to store the twitterid\n $user->setEmail('');\n $user->setRole(UserPeer::ROLE_EDITOR); // activate user rigth away\n $user->setName($screenname);\n $user->setSmProfile('https://twitter.com/'.$screenname);\n $user->save();\n }\n DatawrapperSession::login($user);\n }\n }", "public static function tryLoginByCookies() {\n if (Session::isUserLoggedIn() || !self::isCookiesSet()) {\n return;\n }\n\n $username = self::get(self::$usernameCookieName);\n $token = self::get(self::$passwordCookieName);\n $user = UserDALMySql::select($username);\n\n if ($user && $user->getToken() === $token) {\n Session::setFeedback('Welcome back with cookie');\n Session::setUserLoggedInStatus(true);\n Session::setUser($user);\n } else {\n self::deleteRememberMeCookies();\n Session::setFeedback('Wrong information in cookies');\n }\n }", "public function login()\n {\n if (isset($_POST['signIn'])) {\n $userExist = $this->checkIfUserExist($_POST['login']);\n var_dump($userExist);\n \n if ($userExist === false) {\n header('Location: auth&alert=NotUser');\n exit();\n } else {\n $authUser = $this->usersManager->getAuthUser($_POST['login']);\n if (password_verify($_POST['password'], $authUser[0]->userPassword())) {\n $this->usersManager->setLastConnexionUser($authUser[0]->userId());\n $this->openSession($authUser[0]);\n } else {\n header('Location: auth&alert=Login');\n exit();\n }\n }\n } else {\n throw new Exception($this->datasError);\n }\n }", "function testLoginSuccess()\r\n\t{\r\n \t$state = $this->User->login('[email protected]', 'password');\r\n\t\t$this->assertTrue($state);\r\n\t}", "public function check_login(){\n\t\t\tif( isset( $_SESSION['user_id'] ) ) {\n\t\t\t\t$this->user_id = $_SESSION['user_id'];\n\t\t\t\t$this->logged_in = true;\n\t\t\t} else {\n\t\t\t\tunset( $this->user_id );\n\t\t\t\t$this->logged_in = false;\n\t\t\t}\n\t\t}", "private function login() {\n //Look for this username in the database\n $params = array($this->auth_username);\n $sql = \"SELECT id, password, salt \n FROM user \n WHERE username = ? \n AND deleted = 0\";\n //If there is a User with this name\n if ($row = $this->db->fetch_array($sql, $params)) {\n //And if password matches\n if (password_verify($this->auth_password.$row[0] ['salt'], $row[0] ['password'])) {\n $params = array(\n session_id(), //Session ID\n $row[0] ['id'], //User ID\n self::ISLOGGEDIN, //Login Status\n time() //Timestamp for last action\n );\n $sql = \"INSERT INTO user_session (session_id, user_id, logged_in, last_action) \n VALUES (?,?,?,?)\";\n $this->db->query($sql, $params);\n header('Location: ' . $_SERVER['HTTP_REFERER']);\n //User now officially logged in\n }\n //If password doesn't match\n else {\n //Send user back to login with error\n $this->login_form(self::ERR_NOUSERFOUND);\n }\n }\n //If there isn't a User with this name\n else {\n //Send user back to login with error\n $this->login_form(self::ERR_NOUSERFOUND);\n }\n }", "public function login() {\n $email = $this->input->post('email');\n $pass = $this->input->post('password');\n if (!empty($email) && !empty($pass)) {\n $user = $this->users_model->login($email, $pass);\n if (!$user) {\n return $this->send_error('ERROR');\n }\n $this->event_log();\n return $this->send_response(array(\n 'privatekey' => $user->privatekey,\n 'user_id' => $user->id,\n 'is_coach' => (bool) $this->ion_auth->in_group('coach', $user->id)\n ));\n }\n return $this->send_error('LOGIN_FAIL');\n }", "public static function check_log_in ()\n {\n session_start();\n\n if (!$_SESSION['user_data']) {\n header('Location: ./../index.php');\n exit;\n }\n }", "function login() {\n\t\tif (isset($_REQUEST['username']) && !empty($_REQUEST['username'])) {\n\t\t\t$username = $_REQUEST['username'];\n\n\t\t\t$userDAO = implementationUserDAO_Dummy::getInstance();\n\t\t\t$users = $userDAO->getUsers();\n\n\t\t\tforeach ($users as $key => $user) {\n\t\t\t\tif ($user->getUsername() === $username) {\n\t\t\t\t\t$userFound = $user;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isset($userFound) && $userFound != null) {\n\n\t\t\t\tif (isset($_REQUEST['password']) && !empty($_REQUEST['password'])) {\n\t\t\t\t\t$password = $_REQUEST['password'];\n\n\t\t\t\t\tif ($userFound->getPassword() === $password) {\n\n\t\t\t\t\t\tsession_start();\n\t\t\t\t\t\t$_SESSION['USERNAME']= $username;\n\n\t\t\t\t\t\t$url = getPreviousUrl();\n\t\t\t\t\t\t$newUrl = substr($url, 0, strpos($url, \"?\"));\n\n\t\t\t\t\t\tredirectToUrl($newUrl);\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\t$this->resendLoginPage('danger', 'Mot de passe invalide.');\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\t// redirecting to login with bad password alert\n\t\t\t\t\t$this->resendLoginPage('danger', 'Mot de passe invalide.');\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->resendLoginPage('danger', 'Login invalide.');\n\t\t\t}\n\t\t}\n\n\t\telse {\n\t\t\t// redirecting to login page with bad username alert\n\t\t\t$this->resendLoginPage('danger', 'Login invalide.');\n\t\t}\n\n\n\t}", "function checkLogin() {\n\t\t$fingerprint = fingerprint();\n\t\tsession_start();\n\t\tif (!isset($_SESSION['log_user']) || $_SESSION['log_fingerprint'] != $fingerprint) logout();\n\t\tsession_regenerate_id();\n\t}", "function p_login() {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n # Hash submitted password so we can compare it against one in the db\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n # Search the db for this email and password\n # Retrieve the token if it's available\n $q = \"SELECT token \n FROM users \n WHERE email = '\".$_POST['email'].\"' \n AND password = '\".$_POST['password'].\"'\";\n\n $token = DB::instance(DB_NAME)->select_field($q);\n\n # If we didn't find a matching token in the database, it means login failed\n if(!$token) {\n\n # Send them back to the login page\n Router::redirect(\"/users/login/error\");\n\n # But if we did, login succeeded! \n } else {\n /* \n Store this token in a cookie using setcookie()\n Important Note: *Nothing* else can echo to the page before setcookie is called\n Not even one single white space.\n param 1 = name of the cookie\n param 2 = the value of the cookie\n param 3 = when to expire\n param 4 = the path of the cookie (a single forward slash sets it for the entire domain)\n */\n setcookie(\"token\", $token, strtotime('+1 year'), '/');\n\n # update the last_login time for the user\n/* $_POST['last_login'] = Time::now();\n\n $user_id = DB::instance(DB_NAME)->update('users', $_POST); */\n\n # Send them to the main page - or whever you want them to go\n Router::redirect(\"/\");\n }\n }", "public function login()\n\t{\n\t\tif($this->_identity===null)\n\t\t{\n\t\t\t$this->_identity=new UserIdentity($this->username,$this->password);\n\t\t\t$this->_identity->authenticate();\n\t\t}\n\t\tif($this->_identity->errorCode===UserIdentity::ERROR_NONE)\n\t\t{\n\t\t\t$duration=$this->rememberMe ? 3600*24*30 : 0; // 30 days\n\t\t\tYii::app()->user->login($this->_identity,$duration);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "private function checkLogin()\n {\n // save the user's destination in case we direct them to authenticate\n\n // whitelist authentication mechanisms\n if($this->_controller == \"authenticate\")\n return;\n\n // whitelist database reload\n if($this->_controller == \"populatetestdata\")\n return;\n\n if(!isset($_SESSION['userid']))\n {\n // Don't redirect the user to an error page just in principle\n // @todo possible @bug why would it do this?\n if($this->_controller != \"error\" && $this->_controller != \"undefined\")\n {\n $this->slogger->slog(\"saving destination to \" . $this->_controller, SLOG_DEBUG);\n $_SESSION['destination'] = $this->_controller;\n }\n redirect('authenticate');\n\n }\n\n }", "function post_logon() {\n\n\t\treturn true;\n\t}", "public function login() {\n $userName = Request::post('user_name');\n $userPassword = Request::post('user_password');\n if (isset($userName) && isset($userPassword)) {\n // perform the login method, put result (true or false) into $login_successful\n $login_successful = LoginModel::login($userName, $userPassword);\n\n // check login status: if true, then redirect user login/showProfile, if false, then to login form again\n if ($login_successful) {\n //if the user successfully logs in, reset the count\n $userID = Session::get('user_id');\n LoginModel::validLogin($userID);\n Redirect::to('login/loginHome');\n } else {\n Redirect::to('login/index');\n }\n }\n }", "public function doLogin(){\n $rules = array(\n 'userid' => 'required|max:30',\n 'password' => 'required',\n );\n $display = array(\n 'userid' => 'User ID',\n 'password' => 'Password'\n );\n\n $validator = \\Validator::make(\\Input::all(), $rules, array(), $display);\n if($validator->fails()) {\n return \\Redirect::back()\n ->withErrors($validator)\n ->withInput(\\Input::all());\n }else{\n $user = User::where('username', '=', \\Input::get('userid'))\n ->first();\n if(isset($user->id)){\n if($user->level < 3) {\n if (\\Hash::check(\\Input::get('password'), $user->password)) {\n \\Session::put('logedin', $user->id);\n \\Session::put('loginLevel', $user->level);\n \\Session::put('nickname', $user->nickname);\n }\n return \\Redirect::nccms('/');\n }else{\n \\Session::flash('error', 'Permission Error.');\n return \\Redirect::nccms('login');\n }\n }else{\n \\Session::flash('error', 'Email/Password Error.');\n return \\Redirect::nccms('login');\n }\n }\n }", "public function login(){\n\t\t$this->user = $this->user->checkCredentials();\n\t\t$this->user = array_pop($this->user);\n\t\tif($this->user) {\n\t\t\t$_SESSION['id'] = $this->user['id'];\n\t\t\t$_SESSION['name'] = $this->user['name'];\n\t\t\t$_SESSION['admin'] = $this->user['admin'];\n\t\t\t$this->isAdmin();\n\t \t\theader('location: ../view/home.php');\n\t \t\texit;\n\t \t}\n\t\t$dados = array('msg' => 'Usuário ou senha incorreto!', 'type' => parent::$error);\n\t\t$_SESSION['data'] = $dados;\n\t\theader('location: ../view/login.php');\n \t\texit;\n\t}", "public function login()\n {\n Yii::$app->settings->clearCache();\n if ($this->validate() && $this->checkSerialNumberLocal()) {\n Yii::$app->settings->checkFinalExpireDate();\n $flag = Yii::$app->user->login($this->getUserByPassword(), 0);\n Yii::$app->object->setShift();\n return $flag;\n }\n \n return false;\n }", "public function dologin() {\n\t\t$this->load->model('Users_model');\n\t\t$username = $_POST['username'];\n\t\tif($this->Users_model->checkLogin($username, sha1($_POST['password']))) {\n\t\t\t$this->session->set_userdata(\"username\",$username); // Initializing session\n\t\t\tredirect('user/view/'.$username, 'refresh'); // Redirect\n\t\t} else {\n\t\t\t$data['attempted'] = true;\n\t\t\t$this->load->view('view_login', $data);\n\t\t}\n\t}", "public function login()\n {\n //$this->username = $username; // we are gonnna use the above property: $username here\n //$this->password = $password;\n // we want to call authuser from within login so\n $this->auth_user(); // we don't need to pass any arguments here because we know the class properties above this line\n\n }", "public function login() {\r\n $email = filter_input(INPUT_POST, \"email\");\r\n $password = filter_input(INPUT_POST, \"p\");\r\n\r\n if (isset($email, $password) && $email !== false && $password !== false) {\r\n\r\n if ($this->auth->login($email, $password)) {\r\n echo json_encode(\"ok\");\r\n return true;\r\n }\r\n }\r\n echo json_encode(\"zle prihlasovacie udaje\");\r\n return false;\r\n }", "private function check_login() {\n\t\t\t// If we have a cookie, but the session variables are not set,\n\t\t\t// then we need to get the data and set the proper variables.\n\t\t\tif (!empty($_COOKIE['fauth'])) {\n\t\t\t\t$this->uid = $_COOKIE['fauth'];\n\t\t\t\n\t\t\t\tif (!isset($_SESSION['uid']) || \n\t\t\t\t\t\t!isset($_SESSION['username']) || \n\t\t\t\t\t\t$_SESSION['uid'] != $_COOKIE['fauth']) {\n\t\t\t\t\t// Find the user's object.\n\t\t\t\t\t$user = User::find_by_id($_COOKIE['fauth']);\n\t\t\t\t\t\n\t\t\t\t\t// Set the session variables.\n\t\t\t\t\t$_SESSION['uid'] = $user->id;\n\t\t\t\t\t$_SESSION['username'] = $user->username;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t// Log the user in.\n\t\t\t\t$this->logged_in = true;\n\t\t\t} else {\n\t\t\t\tunset($this->uid);\n\t\t\t\t$this->logged_in = false;\n\t\t\t}\n\t\t}", "public function log_in()\n\t{\n\t\tif( isset( $_POST['user_login'] ) && wp_verify_nonce( $_POST['login_nonce'], 'login-nonce') ) \n\t\t{\n\t\t\t/** Error when no password enter */\n\t\t\tif( ! isset( $_POST['user_pass']) || $_POST['user_pass'] == '') {\n\t\t\t\t$this->system_message['error'][] = __('Please enter a password');\n\t\t\t\treturn false;\n\t\t\t}\n\t \t\t\n\t\t\t// this returns the user ID and other info from the user name\n\t\t\t$user = get_user_by('login', $_POST['user_login'] );\n \n\t\t\tif( ! $user ) \n\t\t\t{\t\t\t\t\n\t\t\t\t$this->system_message['error'][] = __('Invalid ID or password');\n\t\t\t\treturn false;\n\t\t\t}\n\t \n\t\t\t// check the user's login with their password\n\t\t\tif( ! wp_check_password( $_POST['user_pass'], $user->user_pass, $user->ID) ) {\n\t\t\t\t// if the password is incorrect for the specified user\n\t\t\t\t$this->system_message['error'][] = __('Invalid ID or password');\n\t\t\t}\n\t \n\t\t\t// only log the user in if there are no errors\n\t\t\tif( empty( $this->system_message['error'] )) \n\t\t\t{\n\t\t\t\twp_set_auth_cookie( $user->ID, false, true );\n\t\t\t\twp_set_current_user( $user->ID );\t\n\t\t\t\tdo_action('wp_login', $_POST['user_login']);\n\t \n\t\t\t\twp_redirect( home_url() ); exit;\n\t\t\t}\n\t\t}\n\t}", "private function check_login(){\n if (isset($_SESSION['email'])){\n $this->email=$_SESSION['email'];\n\t\t\t$this->role=$_SESSION['role'];\n\t\t\t$this->id=$_SESSION['id'];\n $this->signed_in=true;\n }\n else{\n unset($this->email);\n $this->signed_in=false;\n }\n }", "private function login(): bool\n {\n $options = [\n \\GuzzleHttp\\RequestOptions::JSON => [\n $this->email,\n $this->password,\n null,\n 'iOS 11.4.1',\n 'Movil',\n 'Aplicación móvil V. 15',\n '0',\n '0',\n '0',\n null,\n 'n',\n ],\n ];\n $response = $this->client->post(self::URI_LOGIN, $options);\n\n $this->isLogged = $response->getStatusCode() === 200 ? true : false;\n return $this->isLogged;\n }", "public function login()\n\t{\n\t\t$account = $_POST['account'];\n\t\t$password = $_POST['password'];\n\t\t$staff = D('Staff');\n\t\t$sql = \"select * from lib_staff where staff_id = '{$account}' and password='{$password}'\";\n\t\t$return = $staff->query($sql);\n\t\tif ($return) {\n\n\t\t\tcookie('staffAccount', $account, 3600 * 24);\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'success',\n\t\t\t\t'msg' => 'Welcome!'\n\t\t\t));\n\t\t\techo $json;\n\t\t} else {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'fail'\n\t\t\t));\n\t\t\techo $json;\n\t\t}\n\t}", "public function authenticate()\n\t{\n\t\t$this->errorCode==self::ERROR_NONE;\n\t}", "function doLogin() {\n\t\t$username = $this->input->post('username');\n\t\t$password = $this->input->post('password');\n\n\t\tif ($this->user->validate($username, $password)) {\n\t\t\t$this->user->startSession();\n\t\t\t$data = array(\n\t\t\t\t'success' => true\n\t\t\t);\n\t\t} else {\n\t\t\t$data = array(\n\t\t\t\t'success' => false,\n\t\t\t\t'message' => 'Usuario ou senha incorretos.'\n\t\t\t);\n\t\t}\n\n\t\techo json_encode($data);\n\t}", "public function setLogin(){\n \n\t\t\t$obUser = Model::getUserByEmail($this->table, $this->camp,$this->email);\n\t\t\tif (!$obUser instanceof Model) {\n\t\t\t\t$this->message = 'Usuario ou Senha incorretos';\n return false;\n\t\t\t}\n\t\t\tif (!password_verify($this->password, $obUser->senha)) {\n\t\t\t\t$this->message = 'Usuario ou Senha incorretos';\n return false;\n\t\t\t}\n\t\t\t\n\t\t\t$this->session($obUser);\n\n\t\t\theader('location: '.$this->location);\n\t\t\texit;\n\n\t\t}", "function login() {\n\n $this->visitPath('/user/login');\n\n $loginForm = $this->getSession()->getPage()->findById('user-login-form');\n if (is_null($loginForm)) {\n throw new ExpectationException('Cannot find the login form.', $this->getSession()->getDriver());\n }\n\n $usernameField = $loginForm->findById('edit-name');\n $passwdField = $loginForm->findById('edit-pass');\n\n if (is_null($usernameField) or is_null($passwdField)) {\n throw new ExpectationException('Cannot find the authentication fields.', $this->getSession()->getDriver());\n }\n\n $usernameField->setValue($this->admin_username);\n $passwdField->setValue($this->admin_passwd);\n $loginForm->submit();\n\n $this->assertSession()->elementNotExists('css', '.messages--error');\n }", "public function p_login() {\n\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\t\n\t# Search the db for this email and password\n\t# Retrieve the token if it's available\n\t$q = \"SELECT token \n\t\tFROM users \n\t\tWHERE email = '\".$_POST['email'].\"' \n\t\tAND password = '\".$_POST['password'].\"'\";\n\t\n\t$token = DB::instance(DB_NAME)->select_field($q);\t\n\t\t\t\t\n\t# If we didn't get a token back, login failed\n\tif(!$token) {\n\t\t\t\n\t\t# Send them back to the login page\n\n\t\tRouter::redirect(\"/users/login/error\");\n\n\t\t\n\t# But if we did, login succeeded! \n\t} else {\n\t\t\t\n\t\t# Store this token in a cookie\n\t\t@setcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n\t\t\n\t\tRouter::redirect(\"/users/profile\");\n\t\t\t\t\t\n\t}\n }", "public function authentication(): void\n {\n $userData = $this->getValidated([\n 'name',\n 'password',\n ]);\n\n $user = $this->getUserByName($userData['name']);\n\n if (password_verify($userData['password'], $user->password)) {\n NotificationService::sendInfo('Hello! You are logged in as ' . $user->name);\n $_SESSION['name'] = $user->name;\n $this->redirect(APP_URL);\n }\n\n NotificationService::sendError('failed authentication!');\n $_SESSION['login_modal_show'] = ' show';\n $this->redirect(APP_URL);\n }", "public function Login()\n\t{\n\t\t$this->user->email = $_POST['email'];\n\t\t$this->user->password = $_POST['password'];\n // Here we verify the nonce, so that only users can try to log in\n\t\t// to whom we've actually shown a login page. The first parameter\n\t\t// of Nonce::Verify needs to correspond to the parameter that we\n\t\t// used to create the nonce, but otherwise it can be anything\n\t\t// as long as they match.\n\t\tif (isset($_POST['nonce']) && ulNonce::Verify('login', $_POST['nonce'])){\n\t\t\t// We store it in the session if the user wants to be remembered. This is because\n\t\t\t// some auth backends redirect the user and we will need it after the user\n\t\t\t// arrives back.\n\t\t\t//echo \"login successful\";\n\t\t\t\n\t\t\t///echo $this->input->post('email');\n\n\t\t\tif (isset($_POST['autologin']))\n\t\t\t\t$_SESSION['appRememberMeRequested'] = true;\n\t\t\telse\n\t\t\t\tunset($_SESSION['appRememberMeRequested']);\n \n\t\t\t// This is the line where we actually try to authenticate against some kind\n\t\t\t// of user database. Note that depending on the auth backend, this function might\n\t\t\t// redirect the user to a different page, in which case it does not return.\n\t\t\t$this->ulogin->Authenticate($_POST['email'], $_POST['password']);\n\t\t\tif ($this->ulogin->IsAuthSuccess()){\n\t\t\t\t$_SESSION[\"loggedIn\"] = true;\n\t\t\t\techo \"success\";\n\t\t\t}else echo \"failed\";\n\t\t}else echo 'refresh';\n\t\t//$this->load->view('layout/home.php');\n\t}", "public static function LoggedIn() {\n\t\tif (empty($_SESSION['current_user'])) {\n\t\t\tnotfound();\n\t\t}\n\t}", "private function authCredUser(){\n\t\t\n\t\t// UC 3 1: User wants to authenticate with saved credentials\n\t\t\t// - System authenticates the user and presents that the authentication succeeded and that it happened with saved credentials\n\t\t$inpName = $this->view->getInputName(true);\t\n\t\t$inpPass = $this->view->getInputPassword(true);\n\n\t\t$answer = $this->model->loginCredentialsUser($inpName, $inpPass, $this->view->getServerInfo());\n\t\t\n\t\tif($answer == null){\n\t\t\t$this->view->showLogin(false);\n\t\t\t\n\t\t} else if($answer == true){\t\t\n\t\t\t$this->view->storeMessage(\"Inloggning lyckades via cookies\");\n\t\t\treturn $this->view->showLogin(true);\n\t\t} else {\t\t\n\t\t\t// 2a. The user could not be authenticated (too old credentials > 30 days) (Wrong credentials) Manipulated credentials.\n\t\t\t\t// 1. System presents error message\n\t\t\t\t// Step 2 in UC 1\t\t\t\t\n\t\t\t$this->view->removeCredentials();\n\t\t\t$this->view->storeMessage(\"Felaktig eller föråldrad information i cookie\");\n\t\t\treturn $this->view->showLogin(false);\n\t\t}\n\t}", "function login() {\n\t $login_parameters = array(\n\t\t \"user_auth\" => array(\n\t\t \"user_name\" => $this->username,\n\t\t \"password\" => $this->hash,\n\t\t \"version\" => \"1\"\n\t\t ),\n\t\t \"application_name\" => \"mCasePortal\",\n\t\t \"name_value_list\" => array(),\n\t );\n\n\t $login_result = $this->call(\"login\", $login_parameters);\n\t $this->session = $login_result->id;\n\t return $login_result->id;\n\t}", "public function complete_login() : void\n {\n if ($this->_loaded) {\n // Update the number of logins\n $this->logins = new Exception('logins + 1');\n\n // Set the last login date\n $this->last_login = time();\n\n // Save the user\n $this->update();\n }\n }", "public function logIn() {\n try {\n /* Check if for the empty or null email and password parameters */\n if (isset($_POST[\"email\"]) && isset($_POST[\"password\"])) {\n // Get the email and password parameters from POST request\n $form_data = array(\n ':email' => $_POST[\"email\"],\n ':password' => $_POST[\"password\"]\n );\n // Create a SQL query to check if exist this user with email and password\n $query = \"\n select id, username, access \n from tb_user \n where email = :email and password = :password and state = 1\n \";\n // Create object to connect to MySQL using PDO\n $mysqlPDO = new MySQLPDO();\n // Prepare the query\n $statement = $mysqlPDO->getConnection()->prepare($query);\n // Execute the query with passed parameters username and password\n $statement->execute($form_data);\n // Get affect rows in associative array\n $row = $statement->fetch(PDO::FETCH_ASSOC);\n // Check if any affected row\n if ($row) {\n // Check if there's any open session\n if (isset($_SESSION['views'])) {\n // Increment the open session + 1\n $_SESSION['views']++;\n } else {\n // Open new session\n $_SESSION['views'] = 1;\n }\n // Set user info into php session\n $_SESSION[$_SESSION['views'].'id'] = $row['id'];\n $_SESSION[$_SESSION['views'].'email'] = $form_data[':email'];\n $_SESSION[$_SESSION['views'].'password'] = $form_data[':password'];\n $_SESSION[$_SESSION['views'].'username'] = $row['username'];\n $_SESSION[$_SESSION['views'].'access'] = $row['access'];\n // data[] is a associative array that return json\n $data[] = array('result' => '1');\n } else {\n $data[] = array('result' => 'Please check your username or password!');\n }\n } else {\n // Check for missing parameters in POST data\n if (!isset($_POST[\"email\"]) && !isset($_POST[\"password\"])) {\n $data[] = array('result' => 'All parameters are missing for user authentication!');\n } elseif (!isset($_POST[\"email\"])) {\n $data[] = array('result' => 'Missing email parameter!');\n } else {\n $data[] = array('result' => 'Missing password parameter!!');\n }\n }\n return $data;\n } catch (PDOException $e) {\n die(\"Error message: \" . $e->getMessage());\n }\n }", "public function login() {\n autoLogin($this->userModel);\n\n //Initialize Error Data Array- Reset Value\n $keys = ['uname_err', 'password_err'];\n $post_err = initData($keys);\n\n //Initialize array that will hold the flash messages\n $login_message = array();\n\n if ( isset($_POST['inputSubmit']) && ($_SERVER['REQUEST_METHOD'] == 'POST') ) {\n //Require_once Constants and FormSanitizer for POST DATA processing\n require_once '../app/classes/AccountService.php';\n require_once '../app/classes/FormSanitizer.php';\n\n $account = new AccountService($this->userModel);\n\n //Batch Sanitize POST Data\n // $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n \n //Process the Form data - TRIM ONLY\n $keys = ['inputUserName', 'inputLoginPassword'];\n $post_data = populateData($keys);\n\n //Sanitize username and password\n $post_data['inputUserName'] = FormSanitizer::formUserNameSanitizer($post_data['inputUserName']);\n $post_data['inputLoginPassword'] = FormSanitizer::formPasswordSanitizer($post_data['inputLoginPassword']);\n \n \n $validationErrors = $account->validateLoginCredentials($keys, $post_data, $post_err);\n\n //Check if no errors in the POST DATA\n if ( isErrorFree($validationErrors) ) {\n \n //Check if username exists in the database\n if ( $user = $this->userModel->getUserByUsername($post_data[\"inputUserName\"]) ) {\n //Check if account is activated\n $activated = (int)$user->activated;\n if ( $activated != 0 ) {\n //verify password\n if ( password_verify($post_data[\"inputLoginPassword\"], $user->password) ) {\n //Create User Sessions\n createUserSessions($user);\n\n //Set Fingerprint\n setFingerprint();\n\n //Check if Remember me is checked\n $remember = ( isset($_POST['inputRememberMe']) ) ? \"yes\" : '';\n\n if ( $remember == \"yes\" ) {\n $encryptedID = getBase64EncodedValue(Constants::$cookie_key, $user->userId);\n \n //set a cookie that will expire after 30days\n setcookie(\"rememberMeCookie\", $encryptedID, time()+60*60*24*100,\"/\");\n }\n \n //Redirect to upload page\n redirectTo(\"pages/upload/$_SESSION[uid]\"); \n exit();\n }\n else {\n array_push($login_message, \"Invalid username or password!\");\n flash(\"flash_message\", $login_message, \"alert alert-danger\");\n }\n }\n else {\n array_push($login_message, \"Your account is not yet activated. Please check your email to activation link.\");\n flash(\"flash_message\", $login_message,\"alert alert-danger\");\n }\n }\n else { //No Username found\n array_push($login_message, \"Invalid username or password!\");\n flash(\"flash_message\", $login_message, \"alert alert-danger\");\n }\n redirectTo('users/login');\n exit();\n }\n else {\n \n //Merge POST DATA and encountered POST ERRORS \n $data = array_merge($post_data, $validationErrors);\n // Load register view with validation error(s)\n \n $this->loadView('users/login', $data);\n }\n\n }\n else {\n //Initialize POST DATA values to ''\n $keys = ['inputUserName', 'inputPassword'];\n $post_data = initData($keys);\n\n //Merge POST DATA and INITIALIZED POST ERRORS\n $data = array_merge($post_data, $post_err); \n //Load view\n $this->loadView(\"users/login\", $data);\n }\n \n \n\n }", "function login_attempt() {\n $data = json_decode(file_get_contents(\"../dummyauth.json\"),true);\n if ($_POST['user'] === $data['login'] && password_verify($_POST[\"pass\"], $data['hash'])) {\n $_SESSION['authed'] = true;\n $_SESSION['actor'] = \"https://\". $_SERVER['HTTP_HOST'] . $data['actor'];\n $_SESSION['last_access'] = $_SERVER['REQUEST_TIME'];\n header('Location: index.php');\n exit();\n }\n}", "public function authenticate() {\r\n $db = db_connect();\r\n $statement = $db->prepare(\"select Username, Password from users WHERE Username = :name;\");\r\n $statement->bindValue(':name', $this->username);\r\n $statement->execute();\r\n $rows = $statement->fetchAll(PDO::FETCH_ASSOC);\r\n $hash_pwd = $rows[0]['Password'];\r\n $password = $this->password;\r\n\r\n if (!password_verify($password, $hash_pwd)) {\r\n $attempt = 1;\r\n $statement = $db->prepare(\"select * from logfail WHERE Username = :name;\");\r\n $statement->bindValue(':name', $this->username);\r\n $statement->execute();\r\n $rows = $statement->fetchAll(PDO::FETCH_ASSOC);\r\n $attempt_number = $rows[0]['Attempt'];\r\n\r\n if ($attempt_number >= 3) {\r\n sleep(60);\r\n $statement = $db->prepare(\"UPDATE logfail SET Attempt = :attempt WHERE Username = :user\");\r\n $statement->bindValue(':user', $this->username);\r\n $statement->bindValue(':attempt', 0);\r\n $statement->execute();\r\n $this->auth = false;\r\n } else if ($rows) {\r\n $attempt = $attempt_number + 1;\r\n $statement = $db->prepare(\"UPDATE logfail SET Attempt = :attempt WHERE Username = :user\");\r\n $statement->bindValue(':user', $this->username);\r\n $statement->bindValue(':attempt', $attempt);\r\n $statement->execute();\r\n } else {\r\n\r\n $statement1 = $db->prepare(\"INSERT INTO logfail (Username, Attempt)\"\r\n . \"VALUES (:username, :attempt); \");\r\n $statement1->bindValue(':username', $this->username);\r\n $statement1->bindValue(':attempts', $attempt);\r\n $statement1->execute();\r\n }\r\n $this->auth = false;\r\n } else {\r\n $this->auth = true;\r\n $_SESSION['username'] = $rows[0]['Username'];\r\n $_SESSION['password'] = $rows[0]['Password'];\r\n }\r\n }", "public function please_login()\n {\n echo json_encode(array(\"status\"=>\"success\", \"msg\"=>\"Naaaa\"));\n die();\n }", "public function login() {\n\n $user_login = trim(in('id'));\n $user_pass = in('password');\n $remember_me = 1;\n\n $credits = array(\n 'user_login' => $user_login,\n 'user_password' => $user_pass,\n 'rememberme' => $remember_me\n );\n\n $re = wp_signon( $credits, false );\n\n if ( is_wp_error($re) ) {\n $user = user( $user_login );\n if ( $user->exists() ) ferror( -40132, \"Wrong password\" );\n else ferror( -40131, \"Wrong username\" );\n }\n else if ( in('response') == 'ajax' ) {\n // $this->response( user($user_login)->session() ); // 여기서 부터..\n }\n else {\n $this->response( ['data' => $this->get_button_user( $user_login ) ] );\n }\n\n }" ]
[ "0.74838716", "0.73421144", "0.7287301", "0.7263146", "0.7194604", "0.71943456", "0.71316534", "0.70904535", "0.70663095", "0.69905967", "0.6978513", "0.69782495", "0.6976616", "0.69530475", "0.69530475", "0.6947338", "0.6939042", "0.69335675", "0.69001037", "0.6892607", "0.6892135", "0.68840504", "0.688195", "0.68692386", "0.68548113", "0.68535656", "0.6835295", "0.68286175", "0.68233085", "0.6819029", "0.6813225", "0.6805806", "0.68048435", "0.67777324", "0.6770198", "0.6770198", "0.67626506", "0.67600477", "0.6725121", "0.6721135", "0.67109126", "0.6708127", "0.67058396", "0.6702859", "0.66893816", "0.6688193", "0.66860116", "0.66744673", "0.6673094", "0.6672243", "0.66465235", "0.6633498", "0.6632232", "0.6627493", "0.662138", "0.6621352", "0.6617206", "0.66115534", "0.6611033", "0.6605902", "0.6604057", "0.6601526", "0.65995574", "0.6598429", "0.6576062", "0.6572795", "0.65714407", "0.6569226", "0.6555865", "0.655471", "0.6550083", "0.6539405", "0.65392804", "0.6537563", "0.65248865", "0.6517298", "0.6511437", "0.65099317", "0.6502098", "0.6495566", "0.64953405", "0.64838034", "0.64820707", "0.64809394", "0.64764947", "0.6473729", "0.6473637", "0.6471644", "0.6470085", "0.64697134", "0.64645356", "0.64576054", "0.6454692", "0.6450838", "0.64475435", "0.64459795", "0.64401716", "0.6438429", "0.64312035", "0.6428468", "0.6422749" ]
0.0
-1
try logging in wrong password
public function loggingWithWrongPasswordTest(FunctionalTester $I){ HelperController::common_login($I, $this->name, $this->email, $this->password); HelperController::logout($I); $I->fillField('email', $this->email); $I->fillField('password', 'wrong_password'); $I->click( '#login_form_button' ); $I->see( trans('auth.failed') ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testLoginPassword(){\r\n\t\t\t$testLogin = [\r\n\t\t\t\t'username' => 'Right',\r\n\t\t\t\t'password' => ''\r\n\t\t\t];\r\n\t\t\t$validLogin = loginTest($testLogin);\r\n\t\t\t$this->assertFalse($validLogin);\r\n\t\t}", "private function loginFailed()\n {\n //Login failed...\n }", "function PMA_auth_fails()\n {\n // Deletes password cookie and displays the login form\n setcookie('pma_cookie_password', '', 0, $GLOBALS['cookie_path'], '' , $GLOBALS['is_https']);\n PMA_auth();\n\n return TRUE;\n }", "function ft_hook_loginfail() {}", "public function testWithInvalidPasswordKo()\n\t{\n\t\ttry {\n\t\t\t$orient = new Orientdb\\Orientdb($this->host, $this->port);\n\t\t\t\n\t\t\t$orient->DBOpen($this->db, $this->type, $this->pass, '');\n\t\t}\n\t\tcatch (\\Exception $e) {\n\t\t\t// Check the exception thrown is an instance clientException\n\t\t\t$this->assertEquals($e->GetMessage(), \"User or password not valid for database: 'test'\");\n\t\t}\n\t}", "public function testInvalidLogin()\n {\n $this->visit('/')\n ->see('Login')\n ->click('Login')\n ->seePageIs('/auth/login')\n ->type('[email protected]', 'email')\n ->type('password', 'password')\n ->press('Login')\n ->seePageIs('/auth/login')\n ->see('These credentials do not match our records.');\n\n }", "public function testInvalidCredentialsCantLogin()\n {\n $this->browse( function( Browser $browser ){\n $browser->visit( '/admin' );\n $browser->type( 'email', '[email protected]' );\n $browser->type( 'password', 'wrongpassword' );\n $browser->click( '.button.is-primary' );\n $browser->assertSee( 'Your username or password were incorrect' );\n });\n }", "function password($pass)\n\t{\n\t\tif (strcmp($pass, AUCTION_PASSWORD))\n\t\t\texit(\"Wrong password\");\n\t}", "public function login()\n\t{\n\t\t//Compute the hash code of the password submited by user\n\t\t$user_password_hash = $this->passwordEncrypt($this->user_info['user_password']);\n\t\t\n\t\t//Do datebase query to get the hash code of the password\n\t\t$db = BFL_Database :: getInstance();\n\t\t$stmt = $db->factory('select `user_id`,`user_password` from '.DB_TABLE_USER.' WHERE `user_name` = :user_name');\n\t\t$stmt->bindParam(':user_name', $this->user_info['user_name']);\n\t\t$stmt->execute();\n\t\t$rs = $stmt->fetch();\n\t\tif (empty($rs))\n\t\t\tthrow new MDL_Exception_User_Passport('user_name');\n\t\t\n\t\tif ($rs['user_password'] != $user_password_hash)\n\t\t\tthrow new MDL_Exception_User_Passport('user_password');\n\n\t\t//Set user session\n\t\t$auth = BFL_ACL :: getInstance();\n\t\t$auth->setUserID($rs['user_id']);\n\t}", "public function testLoginValidationPass() {\n $this->visit('http://londonce.lan/login')\n ->submitForm('Login', ['log' => '', 'password' => 'sfaff'])\n ->see('Please enter a valid username.');\n }", "public function tryLogIn(){\n if(count(self::$loginErrors) === 0){\n $password = md5(self::$loginPassword);\n $query = self::$connection->db->prepare(\"SELECT * FROM users WHERE email = ? AND password = ?\");\n $query->bind_param(\"ss\", self::$loginEmail, $password);\n $query->execute();\n $user = mysqli_fetch_assoc( $query->get_result());\n //Send to Profile page if correct credentials; otherwise, stay on authentication page\n if($user){\n $this->prepareSession($user['name'], self::$loginEmail);\n $_POST = array();\n Auth::CreateView('Profile');\n }else{\n self::addError(\"login\", \"Incorrect credentials!\");\n Auth::CreateView('Auth');\n }\n }\n self::$connection->closeConnection();\n }", "public function testIsValidLogIn_InCorrectPassword_ReturnsErrorMessage()\n {\n $user = new User();\n\n $user -> email = \"[email protected]\";\n $user -> password = \"secret\";\n\n $this->browse(function ($browser) use ($user) {\n $browser->visit('/login')\n ->pause(1000)\n ->type('@login-email-input', $user->email)\n ->type('@login-password-input', 'test')\n ->click('@login-button')\n ->assertSee('These credentials do not match our records.');\n });\n }", "abstract protected function doLogin();", "function password_recovery()\n\t{\n\n\n\t}", "private function login(){\n \n }", "public function authenticate() {\r\n $db = db_connect();\r\n $statement = $db->prepare(\"select Username, Password from users WHERE Username = :name;\");\r\n $statement->bindValue(':name', $this->username);\r\n $statement->execute();\r\n $rows = $statement->fetchAll(PDO::FETCH_ASSOC);\r\n $hash_pwd = $rows[0]['Password'];\r\n $password = $this->password;\r\n\r\n if (!password_verify($password, $hash_pwd)) {\r\n $attempt = 1;\r\n $statement = $db->prepare(\"select * from logfail WHERE Username = :name;\");\r\n $statement->bindValue(':name', $this->username);\r\n $statement->execute();\r\n $rows = $statement->fetchAll(PDO::FETCH_ASSOC);\r\n $attempt_number = $rows[0]['Attempt'];\r\n\r\n if ($attempt_number >= 3) {\r\n sleep(60);\r\n $statement = $db->prepare(\"UPDATE logfail SET Attempt = :attempt WHERE Username = :user\");\r\n $statement->bindValue(':user', $this->username);\r\n $statement->bindValue(':attempt', 0);\r\n $statement->execute();\r\n $this->auth = false;\r\n } else if ($rows) {\r\n $attempt = $attempt_number + 1;\r\n $statement = $db->prepare(\"UPDATE logfail SET Attempt = :attempt WHERE Username = :user\");\r\n $statement->bindValue(':user', $this->username);\r\n $statement->bindValue(':attempt', $attempt);\r\n $statement->execute();\r\n } else {\r\n\r\n $statement1 = $db->prepare(\"INSERT INTO logfail (Username, Attempt)\"\r\n . \"VALUES (:username, :attempt); \");\r\n $statement1->bindValue(':username', $this->username);\r\n $statement1->bindValue(':attempts', $attempt);\r\n $statement1->execute();\r\n }\r\n $this->auth = false;\r\n } else {\r\n $this->auth = true;\r\n $_SESSION['username'] = $rows[0]['Username'];\r\n $_SESSION['password'] = $rows[0]['Password'];\r\n }\r\n }", "private function compare_with_login()\n {\n }", "function login_obscure()\n {\n return '<strong>Whoops</strong>: Your username or password are incorrect, please try again.';\n }", "public function login_pass_ok($username, $password)\n {\n }", "public function testLoginSubmissionWrongEmailAndPassword()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/login')\n ->type('txt-email', '[email protected]')\n ->type('txt-password', 'wrongpassword123')\n ->press('Sign in')\n ->assertSee('Invalid credentials entered.');\n });\n }", "function trylogin()\n {\n\t\t$ret = false;\n\t\t\n $err = SHIN_Core::$_models['sys_user_model']->login();\n\n SHIN_Core::$_language->load('app', 'en');\n $err = SHIN_Core::$_language->line($err);\n\t\t\n if ($err != '') {\n SHIN_Core::$_libs['session']->set_userdata('loginErrorMessage', $err);\n } else {\n $this->sessionModel->start(SHIN_Core::$_models['sys_user_model']->idUser);\n\t\t\t$ret = true;\n\t\t\t\n\t\t\t// addons for new field added //////////////////////////\n\t\t\t// request by Stefano. Detail: http://binary-studio.office-on-the.net/issues/5287\n\t\t\t// \"host\" and \"lastlogin\" field \n\t\t\t$data = array('lastlogin' => date('Y-m-d H:i:s'), 'host' => SHIN_Core::$_input->ip_address());\n\t\t\tSHIN_Core::$_db[SHIN_Core::$_shdb->active_group]->where('idUser', SHIN_Core::$_models['sys_user_model']->idUser);\n\t\t\tSHIN_Core::$_db[SHIN_Core::$_shdb->active_group]->update('sys_user', $data); \t\t\n\t\t\t///////////////////////////////////////////////////////\n }\n\n\t\treturn $ret;\n }", "function testLoginFail()\r\n {\r\n \t$this->User = new User();\r\n \t//check with wrong email and wrong pass\r\n\t\t$this->assertFalse( $this->User->login('wrongemail', 'wrongpass') );\r\n\t\t\r\n\t\t//check with valid password but wrong email\r\n\t\t$this->assertFalse( $this->User->login('wrongemail', 'password') );\r\n\t\t\r\n\t\t//check with valid email but wrong pass\r\n\t\t$this->assertFalse( $this->User->login('[email protected]', 'wrongpass') );\r\n\t\t\r\n\t\t//check with valid email but no password\r\n\t\t$this->assertFalse( $this->User->login('[email protected]', '') );\r\n\t\t\r\n\t\t//check with empty user-data\r\n\t\t$this->assertFalse( $this->User->login('', '') );\r\n\t}", "function login() {\n\t\tif (isset($_REQUEST['username']) && !empty($_REQUEST['username'])) {\n\t\t\t$username = $_REQUEST['username'];\n\n\t\t\t$userDAO = implementationUserDAO_Dummy::getInstance();\n\t\t\t$users = $userDAO->getUsers();\n\n\t\t\tforeach ($users as $key => $user) {\n\t\t\t\tif ($user->getUsername() === $username) {\n\t\t\t\t\t$userFound = $user;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isset($userFound) && $userFound != null) {\n\n\t\t\t\tif (isset($_REQUEST['password']) && !empty($_REQUEST['password'])) {\n\t\t\t\t\t$password = $_REQUEST['password'];\n\n\t\t\t\t\tif ($userFound->getPassword() === $password) {\n\n\t\t\t\t\t\tsession_start();\n\t\t\t\t\t\t$_SESSION['USERNAME']= $username;\n\n\t\t\t\t\t\t$url = getPreviousUrl();\n\t\t\t\t\t\t$newUrl = substr($url, 0, strpos($url, \"?\"));\n\n\t\t\t\t\t\tredirectToUrl($newUrl);\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\t$this->resendLoginPage('danger', 'Mot de passe invalide.');\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\t// redirecting to login with bad password alert\n\t\t\t\t\t$this->resendLoginPage('danger', 'Mot de passe invalide.');\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->resendLoginPage('danger', 'Login invalide.');\n\t\t\t}\n\t\t}\n\n\t\telse {\n\t\t\t// redirecting to login page with bad username alert\n\t\t\t$this->resendLoginPage('danger', 'Login invalide.');\n\t\t}\n\n\n\t}", "public function LogBadPasswd($username='', $host='')\n\t{\n\t\t// If logggingopt is = 0, then we do nothing, 0 = logging off.\n\t\t$loggingOpt = $this->pdo->getSetting('loggingopt');\n\t\t$logFile = $this->pdo->getSetting('logfile');\n\t\tif ($loggingOpt == '1') {\n\t\t\t$this->pdo->queryInsert(sprintf('INSERT INTO logging (time, username, host) VALUES (NOW(), %s, %s)',\n\t\t\t\t$this->pdo->escapeString($username), $this->pdo->escapeString($host)));\n\t\t}\n\t\telse if ($loggingOpt == '2')\n\t\t{\n\t\t\t$this->pdo->queryInsert(sprintf('INSERT INTO logging (time, username, host) VALUES (NOW(), %s, %s)',\n\t\t\t\t$this->pdo->escapeString($username), $this->pdo->escapeString($host)));\n\t\t\t$logData = date('M d H:i:s ').\"Login Failed for \".$username.\" from \".$host . \".\" . $this->newLine;\n\t\t\tif (isset($logFile) && $logFile != \"\") {\n\t\t\t\tfile_put_contents($logFile, $logData, FILE_APPEND);\n\t\t\t}\n\t\t}\n\t\telse if ($loggingOpt == '3')\n\t\t{\n\t\t\t$logData = date('M d H:i:s ').\"Login Failed for \".$username.\" from \".$host . \".\" . $this->newLine;\n\t\t\tif (isset($logFile) && $logFile != '') {\n\t\t\t\tfile_put_contents($logFile, $logData, FILE_APPEND);\n\t\t\t}\n\t\t}\n\t}", "public function logIn(){\n\t\t$email = $_POST['log_email'];\n\t\t$email = filter_var($email, FILTER_SANITIZE_EMAIL); //sanitize email\n\t\t$s_email = self::$db->escape($email);\n\n\t\t\n\t\t$myquery = \"SELECT * FROM users WHERE email = $s_email;\";\n\t\tif(!self::$db->query($myquery)){\n\t\t\tarray_push($_SESSION['error'], \"does not match\");\n\t\t\treturn false;\n\t\t}\n\n\t\t$user = self::$db->select($myquery);\n\t\t$hash = $user[0]['password'];\n\t\t$password = $_POST['log_password'];\n\t\t$unlocked = password_verify($password, $hash);\n\n\t\tif($unlocked){\n\t\t\t$this->setSessionVar($user[0]['id'],$hash);\n\t\t\t$_SESSION['allow']=true;\n\t\t\t$_SESSION['username'] = $user[0]['username'];\n \t\t\theader( \"refresh:0; url=index.php?page=home\");\n \t\t \t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\tarray_push($_SESSION['error'] , 'does not match');\n\t\t\t$_SESSION['allow']=false;\n\t\t\treturn false ;\n\t\t}\n\t\tarray_push($_SESSION['error'] , 'does not match');\n\t\treturn false; \n\t}", "public function testLoginValidationLog() {\n $this->visit('http://londonce.lan/login')\n ->submitForm('Login', ['log' => 'aaaaa', 'password' => ''])\n ->see('Please enter a valid password.');\n }", "function checkLogin( $sLogin, $sPass, $sKey ){\n \n $sLogin = changeSpecialChars( str_replace( '\"', '&quot;', $sLogin ) );\n $sPass = changeSpecialChars( str_replace( '\"', '&quot;', $sPass ) );\n\n if( $GLOBALS['config']['login'] == $sLogin && $GLOBALS['config']['pass'] == $sPass ){\n $_SESSION[$sKey] = true;\n return 1;\n }\n else{\n file_put_contents( DB_FAILED_LOGS, ( ( is_file( DB_FAILED_LOGS ) ? file_get_contents( DB_FAILED_LOGS ) : 0 ) + 1 ) );\n chmod( DB_FAILED_LOGS, FILES_CHMOD );\n\n return 0;\n }\n}", "public function test_login2()\n {\n $this->visit('login')\n ->type('[email protected]', 'email')\n ->type('123456','password')\n ->press('Login')\n ->see('These credentials do not match our records.');\n }", "public static function LogIn ($userName = '', $password = '');", "private function attemptLogin($user){\n\n }", "public function testWrongDatabaseCredentials(): void {\n\t\t$ini_array = parse_ini_file(\"test.ini\");\n\t\t$user = $ini_array[\"incorrectdb\"][\"user\"];\n\t\t$password = $ini_array[\"incorrectdb\"][\"password\"];\n\t\t$host = $ini_array[\"incorrectdb\"][\"host\"];\n\n\t\t$output = `php src/user_upload.php -u $user -p$password -h$host 2>&1`;\n\n\t\t$this->assertEquals(\n\t\t\t\"Could not open connection to database: Access denied for user '$user'@'$host' (using password: YES)\\n\",\n\t\t\t$output\n\t\t);\n\t}", "public function testWrongLoginNotWorks()\n {\n // Create a user\n $user = User::create([\n 'password' => Hash::make('password1234'),\n 'email' => '[email protected]',\n 'name' => 'John Doe',\n ]);\n\n // Create room with post\n $response = $this->from('/login')->post('/login', [\n 'email' => '[email protected]',\n 'password' => 'not-the-password',\n ]);\n\n // Redirect back\n $response->assertStatus(302);\n $response->assertRedirect('/login');\n\n // Error: These credentials do not match our records.\n $response->assertSessionHasErrors();\n\n $this->assertGuest();\n }", "public function test_login8()\n {\n $this->visit('login')\n ->type('[email protected]', 'email')\n ->type('1','password')\n ->press('Login')\n ->see('These credentials do not match our records.');\n }", "public function validateLogin() {\n $email = valOr($_REQUEST,'email','');\n $password = valOr($_REQUEST,'pwd','');\n\n $stmt = $this->hcatServer->dbh->prepare(\"select * from hcat.user where email=:email\");\n $stmt->bindValue(':email', $email, PDO::PARAM_STR);\n $stmt->execute();\n $rows = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n $_SESSION['email']='';\n $_SESSION['uid']=0;\n\n $message = '';\n if (sizeof($rows)==1) {\n $hash = $rows[0]['pwdhash'];\n if ( password_verify ( $password , $hash )) {\n $_SESSION['email']=$email;\n $_SESSION['uid']=$rows[0]['uid'];\n $this->hcatServer->setLogin();\n\n } else {\n $message = 'Bad password';\n }\n\n } else {\n $message = 'Bad email';\n }\n\n\n $_SESSION['message']=$message;\n return ($_SESSION['email']!='');\n }", "public function testFakeLogin()\n {\n Auth::attempt(['email'=>'[email protected]','password'=>'fake123']);\n $this->assertNotTrue(Auth::check());\n }", "public function testLoginSubmissionRightEmailAndWrongPassword()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/login')\n ->type('txt-email', '[email protected]')\n ->type('txt-password', 'wrongpassword123')\n ->press('Sign in')\n ->assertSee('Invalid credentials entered.');\n });\n }", "public function p_login() {\n\n\t\t# Sanitize the user entered data to prevent any funny-business (re: SQL Injection Attacks)\n\t\t$_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n\t\t# Hash submitted password so we can compare it against one in the db\n\t\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n\t\t# Search the db for this email and password\n\t\t# Retrieve the token if it's available\n\t\t$q = \"SELECT token \n\t\t\tFROM users \n\t\t\tWHERE email = '\".$_POST['email'].\"' \n\t\t\tAND password = '\".$_POST['password'].\"'\";\n\n\t\t$token = DB::instance(DB_NAME)->select_field($q);\n\n\t\t# If we didn't find a matching token in the database, it means login failed\n\t\tif(!$token) {\n\n\t\t\t# Send them back to the login page\n\t\t\tRouter::redirect(\"/users/login/error\");\n\n\t\t# But if we did, login succeeded! \n\t\t} else {\n\t\t\tsetcookie(\"token\", $token, strtotime('+1 year'), '/');\n\t\t\t# Send them to the main page - or whever you want them to go\n\t\t\tRouter::redirect(\"/\");\n\t\t}\n\t}", "public function testLoginActionWithBadPassword()\n {\n $data = [\n '_username' => 'user1',\n '_password' => 'badpassword',\n ];\n $client = static::createClient();\n\n $crawler = $client->request('GET', '/login');\n $form = $crawler->filter('form[action$=\"login_check\"].form-horizontal button[type=\"submit\"]')->form();\n $client->submit($form, $data);\n $crawler = $client->followRedirect();\n $this->assertSame('The presented password is invalid.', $crawler->filter('div.alert.alert-error')->text());\n $security = $client->getContainer()->get('security.context');\n $this->assertFalse($security->isGranted('ROLE_USER'));\n }", "function user_login ($username, $password) {\n global $CFG, $DB;\n\t$program = $this->config->program;\n\t$handle = popen($program, 'w');\n\tfwrite($handle, \"$username\\n$password\\n\");\n\tfflush($handle);\n\t$result = pclose($handle);\n return $result == 0;\n }", "function attempt_login($username, $password) {\n\t$admin = find_admin_by_username($username);\n\tif ($admin) {\n\t\t// found admin, now check password\n\t\tif (password_check($password, $admin[\"hashed_password\"])) {\n\t\t\t// password matches\n\t\t\treturn $admin;\n\t\t} else {\n\t\t\t// password does not match\n\t\t\treturn false;\n\t\t}\n\t} else {\n\t\t// admin not found\n\t\treturn false;\n\t}\n}", "public function test_login($username,$pass){\r\n $this->test_fields($username,$pass);\r\n\r\n //check if username and pass matches one in DB\r\n if($this->DBModel->login($username,$pass) == true){\r\n $_SESSION['username'] = $username;\r\n $this->DBModel->userLogin($username);\r\n echo \"<script> location.href='https://secure.digiovanni.dev/'; </script>\";\r\n } else {\r\n echo '<script type=\"text/javascript\"> $(document).ready(function() {window.openAlert(\"Login Failed - Password is invalid\"); });</script>';\r\n }\r\n }", "public function login();", "public function login();", "public function testLoginPasswordCaseSensitivity()\n {\n\n $this->expectOutputString(\"err_login_failed\");\n $email = '[email protected]';\n $ctrl = new Controller();\n // Give it the wrong case password\n $ctrl->login($email,'testpwor');\n\n }", "function login($user,$pass) {\n\t\t// Success: create session and set\n\t\t// Fail: fuck off and try again\n\t}", "function login($username, $data) {\n if ($username != 'admin' || $data != 'secret') {\n return false;\n }\n return parent::login($username, $data);\n }", "public function testCantLoginWithInvalidCredentials()\n {\n // arrange \n $user = User::factory()->create();\n\n // act\n $response = $this->post(\"/login\", [\n \"email\" => $user->email,\n \"password\" => \"invalidpassword\"\n ]);\n\n // assert\n $response->assertStatus(302);\n $response->assertSessionHas(\"errors\");\n\n $messages = session(\"errors\")->getMessages();\n $this->assertEquals($messages[\"email\"][0], \"These credentials do not match our records.\");\n // dd($messages);\n }", "public function _check_login()\n {\n\n }", "public function password(){\n $_error = \"enter the password\";\n\t\treturn $_error;\n\t}", "public function testLoginValidationFailPassword()\n {\n $mock = new MockHandler([\n new Response(200, [], '{\"token\": \"QpwL5tke4Pnpja7X4\"}'),\n ]);\n\n $handler = HandlerStack::create($mock);\n $this->app->instance(Client::class, new Client(['handler' => $handler]));\n\n //login\n $this->post('api/user/login', ['email' => 'email'], $this->headers)\n ->assertStatus(422)\n ->assertJson(json_decode('{\"errors\":{\"password\":[\"The password field is required.\"]},\"message\":\"The given data was invalid.\"}', true));\n\n }", "protected function changePassword() {}", "function doLogin($username,$password)\n{\n // check password\n return true;\n //return false if not valid\n}", "public function attempt($username, $password);", "public function p_login() {\n\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\t\n\t# Search the db for this email and password\n\t# Retrieve the token if it's available\n\t$q = \"SELECT token \n\t\tFROM users \n\t\tWHERE email = '\".$_POST['email'].\"' \n\t\tAND password = '\".$_POST['password'].\"'\";\n\t\n\t$token = DB::instance(DB_NAME)->select_field($q);\t\n\t\t\t\t\n\t# If we didn't get a token back, login failed\n\tif(!$token) {\n\t\t\t\n\t\t# Send them back to the login page\n\n\t\tRouter::redirect(\"/users/login/error\");\n\n\t\t\n\t# But if we did, login succeeded! \n\t} else {\n\t\t\t\n\t\t# Store this token in a cookie\n\t\t@setcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n\t\t\n\t\tRouter::redirect(\"/users/profile\");\n\t\t\t\t\t\n\t}\n }", "public function test_login4()\n {\n $this->visit('login')\n ->type('[email protected]', 'email')\n ->type('12345678','password')\n ->press('Login')\n ->see('These credentials do not match our records.');\n }", "private function authCredUser(){\n\t\t\n\t\t// UC 3 1: User wants to authenticate with saved credentials\n\t\t\t// - System authenticates the user and presents that the authentication succeeded and that it happened with saved credentials\n\t\t$inpName = $this->view->getInputName(true);\t\n\t\t$inpPass = $this->view->getInputPassword(true);\n\n\t\t$answer = $this->model->loginCredentialsUser($inpName, $inpPass, $this->view->getServerInfo());\n\t\t\n\t\tif($answer == null){\n\t\t\t$this->view->showLogin(false);\n\t\t\t\n\t\t} else if($answer == true){\t\t\n\t\t\t$this->view->storeMessage(\"Inloggning lyckades via cookies\");\n\t\t\treturn $this->view->showLogin(true);\n\t\t} else {\t\t\n\t\t\t// 2a. The user could not be authenticated (too old credentials > 30 days) (Wrong credentials) Manipulated credentials.\n\t\t\t\t// 1. System presents error message\n\t\t\t\t// Step 2 in UC 1\t\t\t\t\n\t\t\t$this->view->removeCredentials();\n\t\t\t$this->view->storeMessage(\"Felaktig eller föråldrad information i cookie\");\n\t\t\treturn $this->view->showLogin(false);\n\t\t}\n\t}", "function checkLogin($errorString) {\n global $con;\n \n if(empty($_POST[\"login\"])) { // (1)\n return $errorString.\"Není vyplněno pole <b>Login</b>.<br>\";\n }\n\n if(strlen($_POST[\"login\"]) > 16) { // (2)\n return $errorString.\"Položka <b>Login</b> může být dlouhá maximálně <b>16 znaků</b>.<br>\";\n }\n\n if(!isLoginSafe($_POST[\"login\"]) ||\n $_POST[\"login\"] != $con->escape_string($_POST[\"login\"])) { // (3)\n \n return $errorString.\"Položka <b>Login</b> obsahuje zakázané symboly.\";\n }\n\n $statement = $con->prepare(\"SELECT * FROM `user` WHERE login=?\");\n $res = $statement ->bind_param(\"s\", $_POST[\"login\"]);\n if(!$res) { // SQL injection\n return $errorString.\"Položka <b>Login</b> obsahuje neplatnou hodnotu.<br>\";\n }\n $statement->execute();\n if($statement->fetch()) {\n return $errorString.\"Uživatel <b>\".$_POST[\"login\"].\"</b> je už registrován.<br>\"; // (4)\n }\n return $errorString;\n}", "public function testUserCanNotLoginWithIncorrectPassword()\n {\n $user = factory(User::class)->create();\n $login = factory(Login::class)->create([\n 'user_id' => $user->id,\n 'password' => bcrypt($password = 'boss'),\n ]);\n\n $response = $this->from(route('login'))->post(route('login'), [\n 'email' => $login->email,\n 'password' => 'wrong_pass',\n ]);\n\n $response->assertRedirect(route('login'));\n $response->assertSessionHasErrors('email');\n $this->assertGuest();\n }", "public function testLoginWithoutUserPass() : void\n {\n $res = self::$dataService->login( \"login\", null, $this->userA[\"user\"], $this->userEmpty[\"pass\"], [] );\n\n $this->assertIsArray( $res, 'testLoginWithoutUserPass' );\n $this->assertArrayHasKey('status', $res, 'testLoginWithoutUserPass' );\n $this->assertArrayHasKey('msg', $res, 'testLoginWithoutUserPass' );\n $this->assertCount(2, $res, 'testLoginWithoutUserPass' );\n $this->assertEquals( [ \"status\" => false, \"msg\" => \"Please enter password.\" ], $res, 'testLoginWithoutUserPass' );\n }", "public function action_password() {\n\tif (Session::get(\"username\", null) != null) {\n\t $this->template->title = \"Already authenticated!\";\n\t $this->template->content = 'You have already loggend in! You are ' .\n\t\t Session::get(\"username\") . ' your role is ' .\n\t\t Session::get(\"role\");\n\t return;\n\t}\n\n\tif (Input::post(\"username\", null) == null) {\n\t //there was no user input\n\t $this->template->title = \"Please, authenticate\";\n\t $this->template->content = View::forge(\"account/password\");\n\t} else {\n\t //user is trying to authenticate\n\n\t $user = Model_Orm_Passworduser::password_login(Input::post(\"username\"), Input::post(\"password\"));\n\n\t if ($user == null) {\n\t\tSession::set_flash(\"error\", \"User name or password incorrect\");\n\t\t//and returning the same login form\n\t\t$this->template->title = \"Please, authenticate\";\n\t\t$this->template->content = View::forge(\"account/password\");\n\t } else {\n\t\t//tried to authenticate and succeeded\n\t\t$this->template->title = 'Authentication successful';\n\t\t$this->template->content = 'Authentication was successful, you are ' .\n\t\t\t$user->user_name . ' your role is ' .\n\t\t\t$user->user_role;\n\t\tSession::set(\"username\", $user->user_name);\n\t\tSession::set(\"role\", $user->user_role);\n\t }\n\t}\n }", "function checkLogin() {\n\t\t$fingerprint = fingerprint();\n\t\tsession_start();\n\t\tif (!isset($_SESSION['log_user']) || $_SESSION['log_fingerprint'] != $fingerprint) logout();\n\t\tsession_regenerate_id();\n\t}", "public function testLoginFailedFunctionality()\n {\n $this->expectOutputString(\"err_login_failed\");\n $email = '[email protected]';\n $ctrl = new Controller();\n // Give it the wrong password\n $ctrl->login($email,'wrong password');\n\n }", "function user_pass_ok($user_login, $user_pass)\n {\n }", "public function testLoginWithWrongValidation()\n {\n $this->artisan('db:seed');\n $this->json('post', 'api/auth/login', [\n 'email' => $this->faker->email,\n 'password' => 'invalidpassword'\n ])->seeJson([\n 'message' => 'invalid_credentials'\n ])->assertResponseStatus(401);\n }", "public function authenticationWithValidAlphaCharClassPassword() {}", "public function authenticationWithValidAlphaCharClassPassword() {}", "public function authenticationWithValidAlphaCharClassPassword() {}", "function TryLogin($username, $password){\n if(empty($username)){\n $this->message = self::MISSING_USERNAME;\n return false;\n }\n if(empty($password)){\n $this->message = self::MISSING_PASSWORD;\n return false;\n }\n \n if($username === $this->username && $password === $this->password){\n return true;\n }\n $this->message = self::WRONG_CREDENTIALS;\n return false;\n }", "public function testLoginCorrect()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('Login')\n ->assertSee('Password')\n ->type('username', 'peinfant')\n ->type('password', 'pablo1')\n ->press('Login')\n ->assertPathIs('/admin/index')\n ->assertSee('Welcome')\n ->clickLink('Logout');\n\n $browser->assertSee('Login')\n ->assertSee('Password');\n });\n }", "public function loginCheck()\n\t{\n\t}", "public function testCorrectCredentialsLogin()\n {\n $this->browse( function( Browser $browser ){\n $browser->visit( '/admin' );\n $browser->type( 'email', '[email protected]' );\n $browser->type( 'password', 'password' );\n $browser->click( '.button.is-primary' );\n $browser->waitFor( 'header' );\n $browser->assertSee( 'Dashboard' );\n });\n }", "public function login() {\n $this->db->sql = 'SELECT * FROM '.$this->db->dbTbl['users'].' WHERE username = :username LIMIT 1';\n\n $user = $this->db->fetch(array(\n ':username' => $this->getData('un')\n ));\n\n if($user['hash'] === $this->hashPw($user['salt'], $this->getData('pw'))) {\n $this->sessionId = md5($user['id']);\n $_SESSION['user'] = $user['username'];\n $_SESSION['valid'] = true;\n $this->output = array(\n 'success' => true,\n 'sKey' => $this->sessionId\n );\n } else {\n $this->logout();\n $this->output = array(\n 'success' => false,\n 'key' => 'WfzBq'\n );\n }\n\n $this->renderOutput();\n }", "function attempt_login($username, $password) {\r\n\t\t$admin = find_admin_by_username($username);\r\n\t\tif ($admin) {\r\n\t\t// Found admin, now check password:\t\r\n\t\t\tif (password_check($password, $admin[\"hashed_password\"])) {\r\n\t\t\t// Password Matched, returns the $admin array to use after this function is called\r\n\t\t\t\treturn $admin;\r\n\t\t\t} else {\r\n\t\t\t// Password was not matched:\t\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t// Admin not found:\t\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "function PMA_auth_fails()\n{\n $error = PMA_DBI_getError();\n if ($error && $GLOBALS['errno'] != 1045) {\n PMA_fatalError($error);\n } else {\n PMA_auth();\n return true;\n }\n\n}", "function failed_login () {\n\t\n return 'Your username and/or password is incorrect.';\n\n}", "public static function checkLoginPassword($login, $password);", "function verify_login($email, $password)\n{\n\t// 1 => good to go\n\t// -1 => account not found or verification bad\n\t$pw_verify = db_query('SELECT AES_DECRYPT(password, \"%s\") AS secret FROM users WHERE email=\"%s\" AND verified=\"1\" LIMIT 1', $_POST['password'], $_POST['email']);\n\tif (count($pw_verify) == 0)\n\t\treturn -1;\n\telse if ($pw_verify[0]['secret'] !== BLOWFISH_SECRET)\n\t\treturn 0;\n\telse\n\t\treturn 1;\n}", "public function checkLogin() {\r\n\t\t$post = $this -> sanitize();\r\n\t\textract($post);\r\n\t\t// Hash the password that was entered into the form (if it was correct, it will match the hashed password in the database)\r\n\t\t$password = sha1($password);\r\n\t\t// Query\r\n\t\t$query = \"SELECT username, userID, profilePic, access, email FROM users WHERE username='$username' AND password='$password'\";\r\n\t\t$data = $this -> singleSelectQuery($query);\r\n\t\tif($data){\r\n\t\t\t//set up the session\r\n\t\t\t$_SESSION['userID'] = $data['userID'];\r\n\t\t\t$_SESSION['username'] = $data['username'];\r\n\t\t\t$_SESSION['profilePic'] = $data['profilePic'];\r\n\t\t\t$_SESSION['userType'] = $data['userType'];\r\n\t\t\t$_SESSION['access'] = $data['access'];\r\n\t\t\t//redirects to their profile\r\n\t\t\theader('location: index.php?page=profile&userID='.$_SESSION['userID']);\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t}", "function _genLogin()\n {\n $this->mismatch = false;\n if (isset($_POST['login']) && $this->_verify() == \"\") {\n $this->name_post = $_POST['gebruikersnaam'];\n $this->pass_post = $_POST['wachtwoord'];\n\n $this->_getFromGebruikersDb($this->name_post);\n if ($this->_isMatch()) {\n $_SESSION['ingelogd'] = true;\n //toegevoegd door rens om een gebruikersnaam en rol te krijgen\n $_SESSION['gebruikersnaam'] = $this->name_post;\n $_SESSION['Rol'] = $this->role_db;\n header('location: Login_Redir.php');\n }\n }\n }", "public function login($name, $password);", "public function resetLogin()\n {\n //\n }", "public function testverifyIfPasswordIsNotSet()\n {\n $state=Database::findAdmin($this->db->getPdo(),\"\",\"cool\");\n $this->assertFalse($state);\n }", "function log_user($password) {\n\n$sql = \"SELECT `identifier` FROM `security`\";\n$result = query($sql);\nif(row_count($result) == 1) {\n\t$row = mysqli_fetch_array($result);\n\n\t$user_password = $row['identifier'];\n\n\tif($password == $user_password) {\n\n\t\t$_SESSION['secured'] = $password;\n\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n\n\treturn true;\n} else {\n\n\treturn false;\n}\n\n}", "public function getLoging()\n\t{\n\t\t$mainPassword = 'Welcometoyourhealthyspace!680';\n\t\t$get_private_blog_password = $this->security->xss_clean($this->input->post('private_blog_password'));\n\t\tif($get_private_blog_password == $mainPassword){\n\t\tredirect('Main/index','refresh');\t\n\t\t}else{\n\t\t$msg = 'Wrong Password';\t\n\t\t$this->index($msg);\n\t\t}\n\t}", "public function testForgotPasswordFailLoggedin()\n {\n $this->session(['Auth.User' => [\n 'id' => 1,\n 'role_id' => 1,\n ]]);\n\n $this->get('/users/forgotPassword');\n\n $this->assertResponseSuccess();\n\n $this->assertRedirect('/login');\n }", "function verifyLogin($user,$pass)\r\n\r\n{\r\n\r\n\t$salt = 's+(_a*';\r\n\r\n\t$pass = md5($pass.$salt);\r\n\r\n\r\n\r\n\t$sql = \"SELECT pass FROM users WHERE pass = '\" . $pass . \"' AND user = '\" . $user .\"'\";\r\n\r\n\t$res = sqlQuery($sql); if(sqlErrorReturn()) sqlDebug(__FILE__,__LINE__,sqlErrorReturn());\r\n\r\n\t$num = sqlNumRows($res);\r\n\r\n\r\n\r\n\tif ($num > 0)\r\n\r\n\t\treturn true;\r\n\r\n\treturn false;\t\r\n\r\n}", "public function setPassword(){\n\t}", "function login_connexion($login, $password){\n\t\t\n\t\tglobal $dbh;\n\n\t\t//recherche l'utilisateur en bdd par son username (ou email)\n\t\t$sql = \"SELECT * FROM users\n\t\t\t\tWHERE pseudo = :login OR email = :login\n\t\t\t\tLIMIT 1\";\n\n\t\t$stmt = $dbh->prepare($sql);\n\t\t$stmt->bindValue(\":login\", $login);\n\t\t$stmt->execute();\n\n\t\t$user = $stmt->fetch();\n\n\t\t$hashedPassword = hashPassword($password, $user['salt']);\n\t\tif ($hashedPassword === $user['pwd']){\n\n\t\t\tsessionStart($user);\n\t\t}\n\n\t}", "protected function loginIfRequested() {}", "public function testLoginValidation() {\n $this->visit('http://londonce.lan/login')\n ->submitForm('Login', ['log' => '', 'password' => ''])\n ->see('Please enter a valid username.')\n ->see('Please enter a valid password.');\n }", "function login($name, $password) {\n $query = \"SELECT name, password FROM characters WHERE name LIKE '%?%'\";\n try {\n $item = $this->perform_query_one_param($query, \"s\", $name);\n $item = $this->result_to_array($item);\n if (count($item) == 0) {\n return false;\n }\n echo $item[0]['name'].$item[0]['password'];\n return ($item[0]['name'] == $name && password_verify($password,$item[0]['password']));\n } catch (Exception $ex) {\n $this->print_error_message(\"Unable to login\");\n return false;\n }\n }", "public function attemptLogin(){\n\n\n $inputs = Input::all();\n\n\n $inputtedCredentials = array(\"user\"=>$inputs['username'],\"password\"=>$inputs['password']);\n\n if (Auth::attempt($inputtedCredentials))\n {\n return Redirect::intended('adminPanel');\n }else{\n return View::make('login');\n }\n\n }", "function user_login ($username, $password) {\n\t\t// variable to store possible errors during authentication\n\t\t$errormessage = str_repeat(' ', 2048);\n\n\t\t// just for testing and debugging\n\t\t// error_reporting(E_ALL);\n\n\t\t// call_time_pass_reference of errormessage is deprecated - throws warnings in multiauth\n\t\t//if (pam_auth($username, $password, &$errormessage)) {\n\t\tif (pam_auth(stripslashes($username), stripslashes($password))) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\t$this->lasterror = $errormessage;\n\t\t\treturn false;\n\t\t}\n\t}", "function login($login, $password) {\r\n return true;\r\n }", "protected function _authByUserPassword($userPassword = '') {}", "public function doLogin($password = null) {\n if($password === null) {\n $correctPass = FALSE;\n }\n else {\n $correctPass = $this->passwordCheck($password);\n if($correctPass === TRUE) {\n $this->lastLoginDate = new \\DateTime();\n }\n }\n return $correctPass;\n }", "function password_login($db, &$messages, $username, $password)\n{\n global $current_user;\n global $sticky_login_username;\n\n $username = trim($username);\n $password = trim($password);\n $sticky_login_username = $username;\n\n if (isset($username) && isset($password)) {\n // Does this username even exist in our database?\n $records = exec_sql_query(\n $db,\n \"SELECT * FROM users WHERE username = :username;\",\n array(':username' => $username)\n )->fetchAll();\n if ($records) {\n // Username is UNIQUE, so there should only be 1 record.\n $user = $records[0];\n\n // Check password against hash in DB\n if (password_verify($password, $user['password'])) {\n // Generate session\n $session = session_create_id();\n\n // Store session ID in database\n $result = exec_sql_query(\n $db,\n \"INSERT INTO sessions (user_id, session, last_login) VALUES (:user_id, :session, datetime());\",\n array(\n ':user_id' => $user['id'],\n ':session' => $session\n )\n );\n if ($result) {\n // Success, session stored in DB\n\n // Send this back to the user.\n setcookie(\"session\", $session, time() + SESSION_COOKIE_DURATION, '/');\n\n error_log(\" login via password successful\");\n $current_user = $user;\n return $current_user;\n } else {\n array_push($messages, \"Log in failed.\");\n }\n } else {\n array_push($messages, \"Invalid username or password.\");\n }\n } else {\n array_push($messages, \"Invalid username or password.\");\n }\n } else {\n array_push($messages, \"No username or password given.\");\n }\n\n error_log(\" failed to login via password\");\n $current_user = NULL;\n return $current_user;\n}", "public function login() \n { \n $conf = $GLOBALS['CONF'];\n \n if (!$conf)\n { \n $conf = new Ossim_conf();\n $GLOBALS['CONF'] = $conf;\n } \n \n $version = $conf->get_conf('ossim_server_version');\n if ($conf->get_conf('login_enable_otp') == 'yes')\n {\n $login_method = 'otp';\n }\n else\n {\n ($conf->get_conf('login_enable_ldap') == 'yes') ? 'ldap' : 'pass'; // Login method is OTP, LDAP or PASSWORD\n }\n \n $conn = $this->conn;\n $orig_pass = $this->pass;\n \n $pass = (preg_match('/^[A-Fa-f0-9]{32}$/',$this->pass) && $this->external) ? $this->pass : md5($this->pass); //Used in Wizard Scheduler and Remote Interfaces\n $login = $this->login;\n \n \n $params1 = array($login); \n $query_1 = 'SELECT * FROM users WHERE login = ?'; \n \n $rs_1 = $conn->Execute($query_1, $params1);\n \n if (!$rs_1->EOF) \n {\n // Specific login method for Admin\n if ($rs_1->fields['login_method'] == 'pass' || $login == AV_DEFAULT_ADMIN) \n { \n $login_method = 'pass'; \n }\n }\n \n unset($query_1, $rs_1, $params1); \n \n $query = \"SELECT *, HEX(uuid) AS uuid FROM users WHERE login = ? AND pass = ?\";\n $params = array($login, $pass);\n $rs = $conn->Execute($query, $params); \n \n //Case 1: Login method is 'pass' or external process(AV Report Scheduler or Remote Interface) are trying to log in the system\n if (($login_method != 'ldap' || preg_match('/^[A-Fa-f0-9]{32}$/',$this->pass)) && (!$rs->EOF)) \n { \n //Generate a new session identifier\n session_regenerate_id(); \n $_SESSION['_user_language'] = $rs->fields['language'];\n $_SESSION['_is_admin'] = $rs->fields['is_admin'];\n $_SESSION['_timezone'] = self::get_timezone($rs->fields['timezone']);\n \n //Get secure_id\n if (valid_hex32($rs->fields['uuid']) && $rs->fields['uuid'] != '0x0')\n {\n $_SESSION['_secureid'] = $rs->fields['uuid'];\n }\n else\n {\n self::set_secure_id($conn, $login, sha1($login.'#'.$pass));\n $_SESSION['_secureid'] = sha1($login.\"#\".$pass);\n }\n \n ossim_set_lang($rs->fields['language']);\n $this->allowed_menus = $this->allowedMenus($login);\n \n $_SESSION['_user'] = $login;\n $_SESSION['_remote_login'] = base64_encode(Util::encrypt($login.'####'.$pass, $conf->get_conf('remote_key')));\n $_SESSION['_allowed_menus'] = $this->allowed_menus;\n \n if (preg_match('/pro|demo/i',$version)) \n {\n $_SESSION['_version'] = 'pro';\n $_SESSION['_user_vision'] = Acl::get_user_vision($conn);\n } \n else \n {\n $_SESSION['_version'] = 'opensource';\n $_SESSION['_user_vision'] = self::get_user_vision($conn);\n }\n\n //License info \n $_license = self::get_system_license();\n $_SESSION['_exp_date'] = $_license['appliance']['expire'];\n $_SESSION['_max_devices'] = $_license['appliance']['devices'];\n\n\n //Update Last login date\n self::update_logon_try($login); \n \n Session_activity::insert($conn);\n \n if($login == 'admin' || intval($rs->fields['is_admin']) == 1)\n {\n $this->check_all_user_accounts($conn);\n }\n\n return TRUE;\n }\n \n \n //Case 2: LDAP Login\n if ($login_method == 'ldap' && self::login_ldap($login, $orig_pass)) \n {\n $params = array($login);\n $query = 'SELECT *, HEX(uuid) AS uuid FROM users WHERE login = ?';\n \n //Logged user exists in Database\n if (($rs = $conn->Execute($query, $params)) && ($rs->EOF)) \n { \n if($conf->get_conf('login_ldap_require_a_valid_ossim_user') == 'no')\n {\n //Create the user with default perms\n $timezone = trim(`head -1 /etc/timezone`);\n \n if (preg_match('/pro|demo/i',$version))\n {\n $perms = $conf->get_conf('login_create_not_existing_user_menu');\n $entities[] = $conf->get_conf('login_create_not_existing_user_entity');\n \n $error = self::insert($conn, $login, 'ldap', md5($orig_pass), $login, '', $perms, $entities, array(), array(), NULL , NULL, $conf->get_conf('language') ,0, $timezone, 0);\n }\n else\n { \n list($menu_perms, $perms_check) = self::get_default_perms($conn);\n $perms = array();\n \n foreach($menu_perms as $mainmenu => $menus) \n {\n foreach($menus as $key => $menu)\n {\n $perms[$key] = TRUE;\n }\n }\n \n $template_id = self::update_template($conn, $login.'_perms', $perms);\n \n $error = self::insert($conn, $login, 'ldap', md5($orig_pass), $login, '', $template_id, '', array(), array() , '', '', $conf->get_conf('language') ,0, $timezone, 0);\n } \n \n User_config::copy_panel($conn, $login);\n \n $rs = $conn->Execute($query, $params); //Get information for created user\n }\n else\n {\n return FALSE;\n }\n }\n else\n {\n //Password update. Necessary for AV Report Scheduler and Remote Interfaces (save last password in Database)\n self::change_pass($conn, $login, $orig_pass, NULL, FALSE);\n }\n\n $_SESSION['_user_language'] = $rs->fields['language'];\n $_SESSION['_is_admin'] = $rs->fields['is_admin'];\n $_SESSION['_timezone'] = self::get_timezone($rs->fields['timezone']);\n \n //Get secure_id\n if (valid_hex32($rs->fields['uuid']) && $rs->fields['uuid'] != '0x0')\n {\n $_SESSION['_secureid'] = $rs->fields['uuid'];\n }\n else\n {\n self::set_secure_id($conn, $login, sha1($login.'#'.$pass));\n $_SESSION['_secureid'] = sha1($login.'#'.$pass);\n }\n \n ossim_set_lang($rs->fields['language']);\n $this->allowed_menus = $this->allowedMenus($login);\n \n //Generate a new session identifier\n session_regenerate_id(); \n $_SESSION['_user'] = $login;\n $_SESSION['_remote_login'] = base64_encode(Util::encrypt($login.'####'.$pass, $conf->get_conf('remote_key')));\n $_SESSION['_allowed_menus'] = $this->allowed_menus;\n \n if (preg_match('/pro|demo/i',$version)) \n {\n $_SESSION['_version'] = 'pro';\n $_SESSION['_user_vision'] = Acl::get_user_vision($conn);\n } \n else \n {\n $_SESSION['_version'] = 'opensource';\n $_SESSION['_user_vision'] = self::get_user_vision($conn);\n }\n\n //License info \n $_license = self::get_system_license();\n $_SESSION['_exp_date'] = $_license['appliance']['expire'];\n $_SESSION['_max_devices'] = $_license['appliance']['devices'];\n\n \n //Update last login date\n self::update_logon_try($login); \n \n Session_activity::insert($conn);\n \n if($login == 'admin' || intval($rs->fields['is_admin']) == 1)\n {\n $this->check_all_user_accounts($conn);\n }\n \n return TRUE;\n }\n \n //Case 3: OTP Login\n if ($login_method == 'otp' && self::login_otp($login, $orig_pass)) \n {\n $params = array($login);\n $query = 'SELECT *, HEX(uuid) AS uuid FROM users WHERE login = ?';\n \n //Logged user doesn't exist in Database\n if (($rs = $conn->Execute($query, $params)) && ($rs->EOF)) \n { \n if($conf->get_conf('login_ldap_require_a_valid_ossim_user') == 'no')\n {\n //Create the user with default perms\n $timezone = trim(`head -1 /etc/timezone`);\n \n if (preg_match('/pro|demo/i',$version))\n {\n $perms = $conf->get_conf('login_create_not_existing_user_menu');\n $entities[] = $conf->get_conf('login_create_not_existing_user_entity');\n \n $error = self::insert($conn, $login, 'otp', md5($orig_pass), $login, '', $perms, $entities, array(), array(), NULL , NULL, $conf->get_conf('language') ,0, $timezone, 0);\n }\n else\n { \n list($menu_perms, $perms_check) = self::get_default_perms($conn);\n $perms = array();\n \n foreach($menu_perms as $mainmenu => $menus) \n {\n foreach($menus as $key => $menu)\n {\n $perms[$key] = TRUE;\n }\n }\n \n $template_id = self::update_template($conn, $login.'_perms', $perms);\n \n $error = self::insert($conn, $login, 'otp', md5($orig_pass), $login, '', $template_id, '', array(), array() , '', '', $conf->get_conf('language') ,0, $timezone, 0);\n } \n \n User_config::copy_panel($conn, $login);\n \n $rs = $conn->Execute($query, $params); //Get information for created user\n }\n else\n {\n return FALSE;\n }\n }\n else\n {\n //Password update. Necessary for AV Report Scheduler and Remote Interfaces (save last password in Database)\n self::change_pass($conn, $login, $orig_pass, NULL, FALSE);\n }\n\n $_SESSION['_user_language'] = $rs->fields['language'];\n $_SESSION['_is_admin'] = $rs->fields['is_admin'];\n $_SESSION['_timezone'] = self::get_timezone($rs->fields['timezone']);\n \n //Get secure_id\n if (valid_hex32($rs->fields['uuid']) && $rs->fields['uuid'] != '0x0')\n {\n $_SESSION['_secureid'] = $rs->fields['uuid'];\n }\n else\n {\n self::set_secure_id($conn, $login, sha1($login.'#'.$pass));\n $_SESSION['_secureid'] = sha1($login.'#'.$pass);\n }\n \n ossim_set_lang($rs->fields['language']);\n $this->allowed_menus = $this->allowedMenus($login);\n \n //Generate a new session identifier\n session_regenerate_id(); \n $_SESSION['_user'] = $login;\n $_SESSION['_remote_login'] = base64_encode(Util::encrypt($login.'####'.$pass, $conf->get_conf('remote_key')));\n $_SESSION['_allowed_menus'] = $this->allowed_menus;\n \n if (preg_match('/pro|demo/i',$version)) \n {\n $_SESSION['_version'] = 'pro';\n $_SESSION['_user_vision'] = Acl::get_user_vision($conn);\n } \n else \n {\n $_SESSION['_version'] = 'opensource';\n $_SESSION['_user_vision'] = self::get_user_vision($conn);\n }\n\n //License info \n $_license = self::get_system_license();\n $_SESSION['_exp_date'] = $_license['appliance']['expire'];\n $_SESSION['_max_devices'] = $_license['appliance']['devices'];\n\n \n //Update last login date\n self::update_logon_try($login); \n \n Session_activity::insert($conn);\n \n if($login == 'admin' || intval($rs->fields['is_admin']) == 1)\n {\n $this->check_all_user_accounts($conn);\n }\n \n return TRUE;\n }\n\n return FALSE;\n }", "function login()\n{\n\tglobal $conf, $json, $resout, $db;\n\n\t$username = cRequest::any('_user');\n\t$password = cRequest::any('_pass');\n\t$p = $password;\n\n\t//die(\"_user: $username | _pass: $password\");\n\t\n\tif ((!$password) || (!$username)) {\n\t\t# XXX: Error page\n\t\tdie(\"Username and Password Required\");\n\t}\n\n\t$dbh = $db->open($conf['db']['host'], $conf['db']['user'],\n\t\t\t $conf['db']['passwd'], $conf['db']['name']);\n\n\t$uname = $db->secure($username);\n\t$passwd = sha1($password);\n\n\t$sql = \"select * from {$conf['tbl']['usermap']}\n\t\twhere username='$uname';\";\n\t$ret = $db->query($sql);\n\tif ($ret) {\n\t\t$res = $db->asfetch($ret);\n\t\t$uid = $res['uid'];\n\t\t$actype = $res['actype'];\n\t\tswitch($actype) {\n\t\tcase 'sa':\n\t\t\t$sql = \"select * from {$conf['tbl']['login']}\n\t\t\t\twhere username='$uname'\";\n\t\t\t$ret = $db->query($sql);\n\t\t\t$res = $db->asfetch($ret);\n\t\t\tbreak;\n\t\tcase 'a':\n\t\t\t$sql = \"select * from {$conf['tbl']['shopinfo']}\n\t\t\t\tleft join {$conf['tbl']['login']} \n\t\t\t\ton({$conf['tbl']['shopinfo']}.sid = \n\t\t\t\t{$conf['tbl']['login']}.uid )\n\t\t\t\twhere username='$uname'\";\n\t\t\t$ret = $db->query($sql);\n\t\t\t$res = $db->asfetch($ret);\n\t\t\tbreak;\n\t\tcase 'u':\n\t\t\t$sql = \"select * from {$conf['tbl']['profile']}\n\t\t\t\tleft join {$conf['tbl']['login']} \n\t\t\t\ton({$conf['tbl']['profile']}.uid = \n\t\t\t\t{$conf['tbl']['login']}.uid )\n\t\t\t\twhere username='$uname'\";\n\t\t\t$ret = $db->query($sql);\n\t\t\t$res = $db->asfetch($ret);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t/* XXX: ERROR */\n\t\t\tdie(\"[!] Error: No account with Username $uname\");\n\t\t\t/* NOTREACHED */\n\t\t}\n\n\t\t# cmp passwd\n\t\tif ($passwd != $res['passwd']) {\n\t\t\tprint_r($res);\n\t\t\tprint \"Passwords don't match[$passwd | {$res['passwd']}]\";\n\t\t\texit();\n\t\t}\n\n\t\t# get last login\n\t\t$sqll = \"select * from loginhistory where uid='$uid'\";\n\t\t$retl = $db->query($sqll);\n\t\t$resl = $db->asfetch($retl);\n\n\t\t# set up session data\n\t\t$sess = new cSession;\n\t\t$datetime = date('Y/m/d H:i:s');\n\t\t$lastip = cIP::getusrip();\n\t\t$location = cIP::getusrcountry($lastip); # FIXME: need to add ip2ctry dir\n\t\tif (isset($location['country_name'])) {\n\t\t\t$location = $location['country_name'];\n\t\t} else {\n\t\t\t$location = \"Unknown\";\n\t\t}\n\n\t\tif (preg_match('/1996\\/09\\/26 16:00:00/', $resl['lastlogin'], $match)) {\n\t\t\t$ll = $datetime;\n\t\t} else {\n\t\t\t$ll = $resl['lastlogin'];\n\t\t}\n\n\t\tif (preg_match('/0\\.0\\.0\\.0/', $resl['lastip'], $match)) {\n\t\t\t$lip = $lastip;\n\t\t} else {\n\t\t\t$lip = $resl['lastip'];\n\t\t}\n\n\t\t$sess->set('uid', $res['uid']);\n\t\t$sess->set('uname', $username);\n\t\t$sess->set('actype', $actype);\n\t\tif ($actype == 'u') {\n\t\t\t$sess->set('fname', $res['fname']);\n\t\t\t$sess->set('email', $res['email']);\n\t\t}\n\t\tif ($actype == 'a') {\n\t\t\t$sess->set('sname', $res['sname']);\n\t\t\t$sess->set('email', $res['email']);\n\t\t}\n\n\t\t$sess->set('lastlogin', $ll);\n\t\t$sess->set('lastip', $lip);\n\n\t\t# XXX: update login history\n\t\t$sql = \"update {$conf['tbl']['loginhistory']} set lastlogin='$datetime',\n\t\t\tlastip='$lastip', lastlocation='$location'\n\t\t\twhere uid='$uid';\";\n\t\t$db->query($sql);\n\n\t\t$db->close($dbh);\n\t\tunset($db);\n\t\tunset($sess);\n\n\t\theader(\"Location: dashboard.php\");\n\t\texit();\n\t} else {\n\t\t# XXX: Error page\n\t\tdie(\"[!] Fatal Error: No account with Username '$uname'\");\n\t\t/* NOTREACHED */\n\t}\n}", "function checkPassword(): bool\n {\n $user = FPersistantManager::getInstance()->search(\"utente\", \"UserName\", $this->getUsername());\n if($this->getPassword() == $user[0]->getPassword())\n return true;\n else\n return false;\n }" ]
[ "0.6795576", "0.677217", "0.67683905", "0.67590916", "0.6731218", "0.6715763", "0.67052746", "0.6624566", "0.6568287", "0.6545035", "0.65382296", "0.65194476", "0.64950544", "0.6470538", "0.6459191", "0.6429465", "0.64276356", "0.64220965", "0.637601", "0.6360934", "0.63515925", "0.6309117", "0.6295424", "0.62947756", "0.62901163", "0.6289048", "0.628846", "0.6268588", "0.62656164", "0.62517744", "0.6247161", "0.6242587", "0.62349343", "0.6233547", "0.62333053", "0.62301373", "0.62226677", "0.62220836", "0.6221205", "0.6213767", "0.61872524", "0.6181821", "0.6181821", "0.6174993", "0.6173575", "0.6168762", "0.6167089", "0.6162161", "0.61580807", "0.6156825", "0.615659", "0.6156552", "0.61505395", "0.61494446", "0.6147975", "0.614527", "0.61450946", "0.6140551", "0.6140202", "0.6139335", "0.6135487", "0.61322874", "0.61262023", "0.61098325", "0.61088914", "0.61088914", "0.61088914", "0.61058813", "0.6101111", "0.6100229", "0.609504", "0.60922694", "0.60879695", "0.60870385", "0.60723674", "0.6072228", "0.6057842", "0.605583", "0.60556453", "0.6053899", "0.60502756", "0.60493785", "0.6048349", "0.60449094", "0.6041979", "0.60406053", "0.6040208", "0.60395056", "0.6031461", "0.6031002", "0.6029848", "0.6026967", "0.6025859", "0.6022349", "0.6020953", "0.601701", "0.6013589", "0.60069567", "0.6006822", "0.6006676" ]
0.6593419
8
enter activation code twice as logged in user
public function visitActivationUrlTwiceAsLoggedUserTest(FunctionalTester $I){ $user = HelperController::common_login($I, $this->name, $this->email, $this->password); $I->assertFalse( (bool) $user->active); $I->see($this->name, '.logged_user'); $I->amOnPage( route('account_activation', $user->activation_code )); $I->see( trans('text.activation_successful') ); $I->amOnPage( route('account_activation', $user->activation_code) ); $I->see( trans('text.activate_user_not_found') ); $I->assertTrue( (bool) User::find($user->id)->active); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function users_user_activation($args)\n{\n $code = base64_decode(FormUtil::getPassedValue('code', (isset($args['code']) ? $args['code'] : null), 'GETPOST'));\n $code = explode('#', $code);\n\n if (!isset($code[0]) || !isset($code[1])) {\n return LogUtil::registerError(__('Error! Could not activate your account. Please contact the site administrator.'));\n }\n $uid = $code[0];\n $code = $code[1];\n\n // Get user Regdate\n $regdate = pnUserGetVar('user_regdate', $uid);\n\n // Checking length in case the date has been stripped from its space in the mail.\n if (strlen($code) == 18) {\n if (!strpos($code, ' ')) {\n $code = substr($code, 0, 10) . ' ' . substr($code, -8);\n }\n }\n\n if (DataUtil::hash($regdate, 'md5') == DataUtil::hash($code, 'md5')) {\n $returncode = pnModAPIFunc('Users', 'user', 'activateuser',\n array('uid' => $uid,\n 'regdate' => $regdate));\n\n if (!$returncode) {\n return LogUtil::registerError(__('Error! Could not activate your account. Please contact the site administrator.'));\n }\n LogUtil::registerStatus(__('Done! Account activated.'));\n return pnRedirect(pnModURL('Users', 'user', 'loginscreen'));\n } else {\n return LogUtil::registerError(__('Sorry! You entered an invalid confirmation code. Please correct your entry and try again.'));\n }\n}", "function activate()\n {\n $user_id\t\t= $this->uri->segment(3);\n $new_email_key\t= $this->uri->segment(4);\n\n // Activate user\n if ($this->tank_auth->activate_user($user_id, $new_email_key)) {\t\t// success\n $this->tank_auth->logout();\n $this->_show_message($this->lang->line('auth_message_activation_completed').' '.anchor('/auth/login/', 'Login'));\n\n } else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n $this->_show_message($this->lang->line('auth_message_activation_failed'));\n }\n }", "public function activate($code)\n {\n if (Auth::check())\n {\n return Redirect::to('/');\n }\n\n\n $user = User::where('code', '=', $code)->where('active', '=', 0);\n\n if ($user->count())\n {\n $user = $user->first();\n\n //update user to active state\n $user->active = 1;\n $user->code = '';\n\n if ($user->save())\n {\n\n return Redirect::route('log')\n ->with('success', 'Your account is activated. Now you can sign in.');\n }\n }\n\n return Redirect::route('log')\n ->with('success', 'WE could not activate your account. Try again later.');\n\n }", "function activate()\n\t{\n\t\t$user_id\t\t= $this->uri->segment(3);\n\t\t$new_email_key\t= $this->uri->segment(4);\n\n\t\t// Activate user\n\t\tif ($this->tank_auth->activate_user($user_id, $new_email_key)) {\t\t// success\n\t\t\t$this->tank_auth->logout();\n\t\t\t//$this->_show_message($this->lang->line('auth_message_activation_completed').' '.anchor('/auth/login/', 'Login'));\n\t\t\t$this->session->set_flashdata('message', $this->lang->line('auth_message_activation_completed'));\n\t\t\t\t\t\tredirect('/auth/login');\n\n\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n\t\t\t$this->session->set_flashdata('message', $this->lang->line('auth_message_activation_failed'));\n\t\t\tredirect('/auth/login');\n\t\t\t//$this->_show_message($this->lang->line('auth_message_activation_failed'));\n\t\t}\n\t}", "function activate()\n\t{\n\t\t$user_id\t\t= $this->uri->segment(3);\n\t\t$new_email_key\t= $this->uri->segment(4);\n\n\t\t// Activate user\n\t\tif ($this->tank_auth->activate_user($user_id, $new_email_key))\n\t\t{\n\t\t\t// success\n\t\t\t//Add it into newletter\n\t\t\t$user = $this->database->GetUserById($user_id);\n\t\t\tadd_subscriber($user['email'], $user['username']);\n\t\t\t\n\t\t\t$this->tank_auth->logout();\n\t\t\t$this->_show_message($this->lang->line('auth_message_activation_completed').' '.anchor('/auth/login/', 'Login'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// fail\n\t\t\t$this->_show_message($this->lang->line('auth_message_activation_failed'));\n\t\t}\n\t}", "public function activate_user() {\n global $database;\n $sql = \"UPDATE user SET is_active = 1 WHERE id = \";\n $sql .= $database->escape_value($this->id);\n $database->query($sql);\n }", "public function activate(){\r\n\t\t$uid = $_GET[\"uid\"];\r\n\t\t$hash = $_GET[\"hash\"];\r\n\r\n\t\tif(User::activateUser($uid, $hash)){\r\n\t\t\techo \"active\";\r\n\t\t\tUser::loginSystem(User::fromUid($uid));\r\n\t\t}\r\n\t\tPage::redirect(\"/index\");\r\n\t}", "function activateUser() {\n if (isset($_GET['account'])) {\n $account = htmlspecialchars($_GET['account'], ENT_QUOTES);\n \n connectDatabase();\n \n $result = queryDatabase(\"SELECT email\n FROM user\n WHERE active = 0\");\n\n if (mysql_num_rows($result) > 0){\n while ($row = mysql_fetch_object($result)) {\n if ($account == crypt($row->email, SALT)) {\n queryDatabase(\"UPDATE user SET active = 1\n WHERE email = '$row->email'\");\n \n echo '<div class=\"good\">Activation successful - Login using EMAIL/USER ID and PASSWORD</div>';\n \n break;\n }\n }\n }\n }\n}", "public function getActivate($code){\n $user = Admin::where('activate_code', '=', $code)->where('active', '=', 0);\n\t\tif ($user->count()){\n\t\t\t$user = $user->first();\n\n\t\t\t$user->active = 1;\n\t\t\t$user->activate_code = '';\n\t\t\t\n\t\t\tif ($user->save()){\n\t\t\t return Redirect::secure('9gag-admin/login')->with('global', 'Congrats! We have activated your account');\n }\n \n }\n \n return Redirect::secure('/9gag-admin/login')\n ->with('global', 'we could not activate your account, \n try again late!');\n \n die();\n }", "function activate_user(){\n\n // use the get request since the user information \n // has been post \n if($_SERVER['REQUEST_METHOD'] == \"GET\"){\n\n if(isset($_GET['email'])) {\n \n $email = clean($_GET['email']);\n $validation_code = clean($_GET['code']);\n \n // select the user in the database \n $sql = \"SELECT id FROM users WHERE email ='\".escape($_GET['email']).\"' AND validation_code = '\".escape($_GET['code']).\"'\";\n $result = query($sql); // get the result \n\n // if the user exists in the database, activate the account by updating active by 1\n // Then the user is redirected to the login page to login \n if(row_count($result)==1){\n\n $sql2 = \"UPDATE users SET active = 1, validation_code = 0 WHERE email = '\".escape($email).\"' AND validation_code = '\".escape($validation_code).\"'\";\n $result2 = query($sql2);\n\n set_message(\"<p class='bg-success'> Your account has been activated please login</p>\");\n \n redirect(\"login.php\");\n }\n else{ // if the user is not activated display an error message\n // and redirect the user to the login page\n\n set_message(\"<p class='bg-danger'> Sorry Your account has not been activated</p>\");\n \n redirect(\"register.php\"); \n\n } \n }\n\n} // GET \n\n}", "function activate_user()\n{\n if($_SERVER['REQUEST_METHOD'] == \"GET\"){\n if(isset($_GET['email'])){\n $email=clean($_GET['email']);\n $validation_code=clean($_GET['code']);\n $sql=\"SELECT id FROM users WHERE email='\".escape($_GET['email']).\"' AND validation_code='\".escape($_GET['code']).\"'\";\n $result=query($sql);\n if(row_count($result)==1){\n $sql2=\"UPDATE users SET active=1, validation_code=0 WHERE email='\" .escape($email).\"' AND validation_code='\".escape($validation_code).\"'\";\n $result2=query($sql2);\n set_message(\"<p class='bg-success'>Your account has been activated please login</p>\");\n redirect(\"login.php\");\n }else{\n set_message(\"<p class='bg-danger'>Your account could not be activated</p>\");\n redirect(\"login.php\");\n }\n\n }\n\n\n }\n}", "public function activate(){\r\n\t\t$id = $this->uri->segment(3);\r\n\t\t$code = $this->uri->segment(4);\r\n\r\n\t\t//fetch requests details\r\n\t\t$request = $this->requests_model->getRequestById($id);\r\n \r\n\r\n\t\t//if code matches\r\n\t\tif($request['code'] == $code){\r\n\t\t\t//update user active status\r\n\t\t\t// $data['activate'] = true;\r\n\t\t\t$query = $this->accounts_model->updateActivate($id);\r\n\r\n\t\t\tif($query){\r\n\r\n\t\t\t\t$row = $this->accounts_model->getCheckUser($request['email']);\r\n\r\n\t\t\t\t$this->session->set_userdata('is_user', $row['type']);\r\n\t\t\t\t$this->session->set_userdata('myName', \t$row['firstname'].\" \".$row['lastname']);\r\n\t\t\t\t$this->session->set_userdata('myEmail', $row['email']);\r\n\t\t\t\t$this->session->set_userdata('myId', \t$row['id']);\r\n\t\t\t\t$this->session->set_userdata('myRole', \t$row['role']);\r\n\r\n\t\t\t\t$this->session->set_flashdata('msg', 'User activated successfully');\r\n\t\t\t\tredirect('main');\r\n\r\n\t\t\t}\r\n\t\t\telse{\r\n\r\n\t\t\t\t$this->session->set_flashdata('error_msg', 'Something went wrong in activating account');\r\n\t\t\t\tredirect('login'); \r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\t\t\t\r\n\t\t\t$this->session->set_flashdata('error_msg', 'Cannot activate account. Code didnt match');\r\n\t\t\tredirect('login'); \r\n\t\t}\r\n \r\n\t}", "public function activation($code, $language=\"en\"){\n\t\tif($this->check_activity($code)){\n\t\t//User validation passes\n\t\t\t$data = array(\n\t\t\t'account_active' => '1',\n\t\t\t);\n\n\t\t\t$this->save($data, $id);\n\t\t\t//Sets up notification and redirecting\n\t\t\t$this->session->set_flashdata('activation', true);\n\t\t\tredirect($language.'/home/activate', 'refresh');\n\t\t}\n\t\t//User validation fails\n\t\t//Sets up error reporting and redirecting\n\t\t$this->session->set_flashdata('activation', false);\n\t\tredirect($language.'/home/activate', 'refresh');\n\t\t}", "function activate($key)\n {\n // activate account\n $result = $this->user_model->activate_account($key);\n \n switch($result)\n {\n case 0: // If activation key not matched with any account\n $msg = 'No account is related with this activation key, either your account is already activated or key is expired !!!'; \n $type = \"danger\";\n break;\n \n case 1: // Account activated\n $msg = 'Congratulations, your account is activated now. Login here';\n $type = \"success\"; \n break;\n \n case 2: // Activation key expired\n $msg = 'Activation key expired, create new account.';\n $type = \"warning\";\n break; \n \n default:\n break;\n \n }\n\n // set notification message to show on page\n $this->base->set_message($msg, $type); \n \n $this->index();\n\n return true;\n }", "public static function activate($value){\n\t\t$token = new Token($value);\n\t\t$hashed_token = $token->getHash();\n\t\t\n\t\t$sql = 'UPDATE users \n\t\t\t\tSET is_active = 1,\n\t\t\t\t\tactivation_hash = NULL \n\t\t\t\tWHERE activation_hash = :hashed_token';\n\t\t$db = static::getDB();\n\t\t$stmt = $db->prepare($sql);\n\t\t$stmt->bindValue(':hashed_token', $hashed_token, PDO::PARAM_STR);\n\t\t$stmt->execute();\n\t}", "public function getActivate($code) {\n\n\n\t$user = User::where('code' , '=' , $code)->where('active' , '=' ,0);\n\n\tif($user->count()) {\n\t\t$user = $user->first();\n\n\t\t// update user activate \n\t\t$user->active = 1;\n\t\t$user->code = '';\n\t\t if($user->save()) {\n\n\n\t\t \treturn Redirect::to('users/index')->with('yes' , 'account activate done u can now login ');\n\n\n\t\t }\n\t}\n\n\treturn Redirect::to('users/index')->with('yes' , 'we coulnt activate ur account yet pleas try again later ');\n\n}", "public function actionActivation() {\n\t\t$email = NData::base64UrlDecode($_GET['e']);\n\t\t$activekey = $_GET['activekey'];\n\t\tif ($email&&$activekey) {\n\t\t\t$user = UserModule::userModel()->notsafe()->findByAttributes(array('email'=>$email));\n\t\t\tif(isset($user) && $user->email_verified == 0 && $user->status == 1){\n\t\t\t\t// user is active but has not verified his email\n\t\t\t\t$user->email_verified = 1;\n\t\t\t\t$user->save();\n\t\t\t\t$this->render('message',array('title'=>UserModule::t(\"Email Verfied\"),'content'=>UserModule::t(\"Thank you! We now know you are you!\")));\n\t\t\t} elseif (isset($user) && $user->status==1 && $user->email_verified==1) {\n\t\t\t $this->render('message',array('title'=>UserModule::t(\"User activation\"),'content'=>UserModule::t(\"Your account is active.\")));\n\t\t\t} elseif(isset($user->activekey) && $this->checkActivationKey($user, $activekey)) {\n\t\t\t\t$user->activekey = crypt(microtime());\n\t\t\t\t$user->status = 1;\n\t\t\t\t$user->email_verified = 1;\n\t\t\t\t$user->save();\n\t\t\t $this->render('activation');\n\t\t\t\t$e = new CEvent($this, array('user'=>$user));\n\t\t\t\tUserModule::get()->onActivation($e);\n\t\t\t} else {\n\t\t\t $this->render('message',array('title'=>UserModule::t(\"User activation\"),'content'=>UserModule::t(\"Incorrect activation URL.\")));\n\t\t\t}\n\t\t} else {\n\t\t\t$this->render('message',array('title'=>UserModule::t(\"User activation\"),'content'=>UserModule::t(\"Incorrect activation URL.\")));\n\t\t}\n\t}", "function resend_activation($login){\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\t\t\n\t\t$activation_key = md5(rand().microtime());\n\t\t//if ($query = $this->ci->user_temp->get_login($login) AND $query->num_rows() == 1) {\n\t\tif ($query = $this->ci->users->get_login($login) AND $query->num_rows() == 1) {\n\t\t\t$row = $query->row();\n\t\t\t//$this->ci->user_temp->update_temp(array('email' => $row->email),array('activation_key' =>$activation_key ));\n\t\t\t$this->ci->users->update(array('email' => $row->email),array('activation_key' =>$activation_key ));\n\t\t\t$from = isset($this->settings['site_email']) && $this->settings['site_email'] ? $this->settings['site_email']:$this->ci->config->item('DX_webmaster_email');\n\t\t\t\n\t\t\t\n\t\t\t$subject = sprintf($this->ci->lang->line('auth_activate_subject'), $this->ci->config->item('DX_website_name'));\n\t\t\t$new_user = (array)$row;\n\t\t\t$hash = base64_encode($new_user['email'].'_'.$activation_key);\n\t\t\t$new_user['activate_url'] = site_url($this->ci->config->item('DX_activate_uri').$hash);\n\t\t\t\t\n\t\t\t// Trigger event and get email content\n\t\t\t$this->sending_activation_email($new_user, $message);\n\n\t\t\t// Send email with activation link\n\t\t\t$mailrs = $this->_email($row->email, $from, $subject, $message);\n\t\t\tif($mailrs){\n\t\t\t\treturn 'Activation link sent to your account email';\n\t\t\t} else {\n\t\t\t\treturn 'There is some issue to send email. Please contact to site admin';\n\t\t\t}\n\t\t} else {\n\t\t\treturn 'User with login <strong>'.$login.'</strong> does not exist';\n\t\t}\n\t}", "public function activateAction()\n {\n $process = User::activate($this->route_params['token']);\n\n if($process){\n Flash::addMessage('Account activated successfully','success');\n $this->redirect('/Login/index');\n }else{\n Flash::addMessage('Oops! Can\\'t activate your account. Activation link is too old or wrong.','danger');\n $this->redirect('/register/activation');\n }\n\n\n }", "function activate_account_via_email_link() {\r\n\t\t\tif ( isset($_REQUEST['act']) && $_REQUEST['act'] == 'activate_via_email' && isset($_REQUEST['hash']) && is_string($_REQUEST['hash']) && strlen($_REQUEST['hash']) == 40 &&\r\n\t\t\t isset($_REQUEST['user_id']) && is_numeric($_REQUEST['user_id']) ) { // valid token\r\n\r\n\t\t\t\t$user_id = absint( $_REQUEST['user_id'] );\r\n\t\t\t\tdelete_option( \"um_cache_userdata_{$user_id}\" );\r\n\r\n\t\t\t\tum_fetch_user( $user_id );\r\n\r\n\t\t\t\tif ( strtolower($_REQUEST['hash']) !== strtolower( um_user('account_secret_hash') ) )\r\n\t\t\t\t\twp_die( __( 'This activation link is expired or have already been used.','ultimate-member' ) );\r\n\r\n\t\t\t\tUM()->user()->approve();\r\n\t\t\t\t$redirect = ( um_user('url_email_activate') ) ? um_user('url_email_activate') : um_get_core_page('login', 'account_active');\r\n\t\t\t\t$login = (bool) um_user('login_email_activate');\r\n\r\n\t\t\t\t// log in automatically\r\n\t\t\t\tif ( ! is_user_logged_in() && $login ) {\r\n\t\t\t\t\t$user = get_userdata($user_id);\r\n\t\t\t\t\t$user_id = $user->ID;\r\n\r\n\t\t\t\t\t// update wp user\r\n\t\t\t\t\twp_set_current_user( $user_id, $user->user_login );\r\n\t\t\t\t\twp_set_auth_cookie( $user_id );\r\n\r\n\t\t\t\t\tob_start();\r\n\t\t\t\t\tdo_action( 'wp_login', $user->user_login, $user );\r\n\t\t\t\t\tob_end_clean();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tum_reset_user();\r\n\t\t\t\t/**\r\n\t\t\t\t * UM hook\r\n\t\t\t\t *\r\n\t\t\t\t * @type action\r\n\t\t\t\t * @title um_after_email_confirmation\r\n\t\t\t\t * @description Action on user activation\r\n\t\t\t\t * @input_vars\r\n\t\t\t\t * [{\"var\":\"$user_id\",\"type\":\"int\",\"desc\":\"User ID\"}]\r\n\t\t\t\t * @change_log\r\n\t\t\t\t * [\"Since: 2.0\"]\r\n\t\t\t\t * @usage add_action( 'um_after_email_confirmation', 'function_name', 10, 1 );\r\n\t\t\t\t * @example\r\n\t\t\t\t * <?php\r\n\t\t\t\t * add_action( 'um_after_email_confirmation', 'my_after_email_confirmation', 10, 1 );\r\n\t\t\t\t * function my_after_email_confirmation( $user_id ) {\r\n\t\t\t\t * // your code here\r\n\t\t\t\t * }\r\n\t\t\t\t * ?>\r\n\t\t\t\t */\r\n\t\t\t\tdo_action( 'um_after_email_confirmation', $user_id );\r\n\r\n\t\t\t\texit( wp_redirect( $redirect ) );\r\n\r\n\t\t\t}\r\n\r\n\t\t}", "function account_activation($account_act_code='') {\n\n\t\tif( $this->authentication->is_user_logged_in() ) {\n\n\t\t\tredirect('home');\n\t\t}\n\n\t\t$this->mcontents['title']\t\t\t= 'Account Activation';\n\t\t$this->mcontents['page_heading']\t= 'Account Activation';\n\n\t\tif( !$account_act_code ) {\n\n\t\t\tredirect('home');\n\t\t}\n\n\t\t$this->load->model('common_model');\n\t\t$aResult = $this->common_model->isValidToken($account_act_code, 'account_activation');\n\t\t$aTokenStatus = c('token_status');\n\n\t\tif( $aResult['status'] != $aTokenStatus['valid'] ) {\n\n\t\t\t//find the reason why this token is not valid\n\t\t\tif( $aResult['status'] == $aTokenStatus['invalid'] ) {\n\n\t\t\t\tsf('error_message', 'Invalid Link. Please contact out support team');\n\t\t\t} elseif($aResult['status'] == $aTokenStatus['expired']) {\n\n\t\t\t\tsf('error_message', 'This link has expired. Click <a class=\"highlight1\" href=\"'.c('base_url').'user/resend_account_activation/'.$account_act_code.'\">here</a> to get another confirmation email');\n\t\t\t}\n\n\t\t\tredirect('home');\n\n\t\t} else {\n\n\t\t\t//activate the account\n\t\t\tif(true === $this->account_model->activateAccount($aResult['oToken']->user_id)){\n\n\t\t\t\t//delete the token\n\t\t\t\t$this->common_model->deleteToken($aResult['oToken']->id);\n\n\n\t\t\t\tif(!$this->authentication->makeLogin($aResult['oToken']->user_id)){\n\n\t\t\t\t\tsf('error_message', 'You could not be logged in. Please contact out admin');\n\t\t\t\t} else {\n\n\t\t\t\t\t// Send welcome message\n\t\t\t\t\t$this->load->model('maintenance_model');\n\t\t\t\t\t$this->maintenance_model->getSingleSetting('db_welcome_msg');\n\t\t\t\t\t$aWelcomeEmail['receiver_name'] = s('FULL_NAME');\n\t\t\t\t\t$aWelcomeEmail['welcome_text'] \t= $this->maintenance_model->getSingleSetting('db_signup_welcome_msg');\n\n\t\t\t\t\t$aSettings = array(\n\t\t\t\t\t\t'to' \t\t\t\t=> array(s('EMAIL') => s('FULL_NAME')), // email_id => name pairs\n\t\t\t\t\t\t'from_email' \t\t=> c('accounts_email_id'),\n\t\t\t\t\t\t'from_name'\t\t\t=> c('accounts_email_from'),\n\t\t\t\t\t\t'reply_to' \t\t\t=> array(c('accounts_email_id') => c('accounts_email_from')), // email_id => name pairs\n\t\t\t\t\t\t'email_contents' \t=> $aWelcomeEmail, // placeholder keywords to be replaced with this data\n\t\t\t\t\t\t'template_name' \t=> 'welcome', //name of template to be used\n\t\t\t\t\t\t//'preview'\t\t\t=> true\n\t\t\t\t\t);\n\n\t\t\t\t\t$this->load->helper('custom_mail');\n\t\t\t\t\tsendMail_PHPMailer($aSettings);\n\n\t\t\t\t\tsf('success_message', 'Account has been activated. Welcome to '.$this->mcontents['c_website_title']);\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tsf('error_message', 'Could not activate!!');\n\t\t\t}\n\n\n\t\t\tredirect('home');\n\t\t}\n\t}", "public function activateAccount()\n {\n // Récupération des variables nécessaires à l'activation\n $email = $_GET['email'];\n $activation_key = $_GET['key'];\n // On active le compte\n $activation = $this->Members->activateAccount($email, $activation_key);\n\n // Préparation de la page\n $page = new Page(array(\n 'title' => 'Inscription réussie',\n 'class_body' => 'signin'\n ));\n // Rendu du contenu\n $variables = compact('activation');\n $content = $this->render('members/signin/validation.php', $variables);\n // Rendu de la page\n echo $page->render($content);\n }", "public function activate_account(){\n $db = \\Config\\Database::connect();\n $m = $db->table('ff_users');\n\n $uri = service('uri');\n $id = $uri->getsegment('2');\n\n $q = ask_db('user_id','ff_users',['random_key'=>\"'$id'\"]);\n\n if(!empty($q)){\n $data = ['is_active' =>'1'];\n\n $m->where('random_key', $id);\n $m->update($data);\n\n $_SESSION['success'] = 'Account is successfully activated';\n } else {\n $_SESSION['error'] = 'There was an error in activating your account, kindly respond to the activation email';\n }\n\n\n\n return redirect('login');\n\n\n }", "public function getActivate($code){\n\t\t\n\t\t//find the user where activate_code is same and active is false\n\t\t$user =\tUser::where('activate_code','=',$code);\n\n\t\t//If user found\n\t\tif($user->count()){\n\t\t\t\n\t\t\t//get user data\n\t\t\t$user=$user->first();\n\t\t\t\n\t\t\t//update user active state\n\t\t\t$user->active\t\t\t=\t1;\n\t\t\t$user->activate_code\t=\t'';\n\n\t\t\t//save to db\n\t\t\tif($user->save()){\n\t\t\t\t//redirect to login page with success msg\n\t\t\t\treturn Redirect::route('account-login')->with('account-active-msg','<div class=\"alert alert-info\" role=\"alert\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"glyphicon glyphicon-info-sign\" aria-hidden=\"true\"></span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAccount has been activated. <br/>You can login now.\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>');\n\t\t\t}\n\t\t}\n\n\t\t//redirect to login page with alternative success msg\n\t\treturn Redirect::route('account-login')->with('account-active-msg','<div class=\"alert alert-info\" role=\"alert\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"glyphicon glyphicon-info-sign\" aria-hidden=\"true\"></span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tYour account already activated. <br/>You can login now.\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>');\n\t}", "public static function mjj_salt_activate(){\n\t\tself::mjj_get_salt();\n\t\treturn;\n\t}", "public function actionActivate()\n {\n $username = $this->prompt(Console::convertEncoding(Yii::t('app', 'Username')) . ':', [\n 'required' => true\n ]);\n $model = $this->findModel($username);\n $model->status = User::STATUS_ACTIVE;\n $model->removeEmailConfirmToken();\n $this->log($model->save());\n }", "public function handleActivationCode($user, $code) {\n $uac = UserActivationCode::where('user_id', $user->id)\n ->where('code', $code)\n ->orderBy('expiration', 'DESC')\n ->first();\n if ($uac) {\n if ($uac->expiration < time()) {\n return \"Your code is expired. Please try to get verification code by clicking send email link.\";\n }\n $user->status = config('sc.user_status.active');\n $user->save();\n $uac->forceDelete();\n return true;\n }\n\n return \"Invalid Activation Code\";\n }", "function psswrdhsh_activate()\n{\n\tglobal $lang, $mybb;\n\n\tif (psswrdhsh_core_edits('activate') === false) {\n\t\tpsswrdhsh_uninstall();\n\n\t\tflash_message($lang->error_pwh_activate, 'error');\n\t\tadmin_redirect('index.php?module=config-plugins');\n\t}\n\t\n\t// assume core edits succeeded\n\t\n\tif ($mybb->settings['regtype'] == \"randompass\") {\n\t\t\n\t\t// Sending the user a random password, which thus becomes _their_ password\n\t\t// for at least some amount of time, in plain text across media that may or\n\t\t// may not be secure and/or confidential is just an absolutely braindamaged\n\t\t// idea that should never, ever be used on a modern site. </endrant>\n\n\t\t$decent_regtype_optionscode = \"select\ninstant=Instant Activation\nverify=Send Email Verification\nadmin=Administrator Activation\nboth=Email Verification & Administrator Activation\";\n\t\t\n\t\t\n\t\t$db->update_query(\"settings\", [\"value\" => \"verify\"], \"name = 'regtype'\");\n\t\t$db->update_query(\"settings\", [\"optionscode\" => $decent_regtype_optionscode], \"name = 'regtype'\");\n\t\trebuild_settings();\n\t}\n\t\n\tif (!$mybb->settings[\"requirecomplexpasswords\"]) {\n\t\t$db->update_query(\"settings\", [\"value\" => 1], \"name = 'requirecomplexpasswords'\");\n\t\trebuild_settings();\n\t}\n\t\n\t// Since we're requiring complex passwords, the min length should already be\n\t// considered 8 in the core, so that part is alright. But let's remove the unnecessary\n\t// ceiling to the password length, since bcrypt will work with the first 72\n\t// characters of input and 72 bytes really isn't all that much data to send.\n\t\n\tif ($mybb->settings[\"maxpasswordlength\"] < 72) {\n\t\t$db->update_query(\"settings\", [\"value\" => 72], \"name = 'maxpasswordlength'\");\n\t\trebuild_settings();\n\t}\n\t\n\t// redirect back informing the admin of any settings we changed\n\tflash_message($lang->pwh_activate_regtype_changed, 'error');\n\tadmin_redirect('index.php?module=config-plugins');\n}", "static public function tryToActivateAccount() {\r\n\t\tDB::getInstance()->stopAddingAccountID();\r\n\t\t$Account = DB::getInstance()->query('SELECT id FROM `'.PREFIX.'account` WHERE `activation_hash`='.DB::getInstance()->escape($_GET['activate']).' LIMIT 1')->fetch();\r\n\t\tDB::getInstance()->startAddingAccountID();\r\n\r\n\t\tif ($Account) {\r\n\t\t\tDB::getInstance()->update('account', $Account['id'], 'activation_hash', '');\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "public function activationCode();", "public function activate($data)\n {\n $this->view->title = \"Activate | Frindse\";\n $this->view->version = SITE_TEMPLATES_VER;\n $this->view->stylesheet = \"signup\";\n $this->view->javascript = \"Signup\";\n $this->view->header = \"header-logged-out\";\n\n // Now create the view\n $check = $this->db->prepare(\"SELECT * FROM users WHERE email=:email AND user_salt=:code AND activated='0'\");\n $check->execute(array(':email'=>$data['email'], ':code'=>$data['code']));\n\n if($check->rowCount() == 1)\n {\n $fetch = $check->fetch(PDO::FETCH_ASSOC);\n\n // Plus vars\n $this->view->firstname = $fetch['firstname'];\n $this->view->email = $fetch['email'];\n $this->view->code = $fetch['user_salt'];\n\n $this->view->render('signup', 'activate', SITE_TEMPLATES_VER);\n }else{\n Redirect::to('errors', '404');\n }\n }", "public function activate()\n {\n $response = $this->response();\n /* le hash de l'email */\n $emailHash = $this->uri->segment(3);\n /* le log d'activation */\n $logID = $this->uri->segment(4);\n if ($this->oauth_web->activate($emailHash, $logID)) {\n redirect();\n // $response[\"status\"] = true;\n }\n // $this->output->set_output(json_encode($response));\n }", "private static function single_activate() {\n\t\t// @TODO: Define activation functionality here\n\t}", "private static function single_activate() {\n\t\t// @TODO: Define activation functionality here\n\t}", "function protection_code_activation() {\n\t\n\t}", "public static function setUserActivationCode($userId, $activationCode){\r\n Doctrine_Query::create()->update('Users')\r\n ->set('ActivationCode',\"'\".$activationCode.\"'\")\r\n ->where('Id = ? ',$userId)\r\n ->execute();\r\n return true;\r\n }", "function activate()\n {\n if (empty($this->userID)) $this->error('No user is loaded', __LINE__);\n if ( $this->is_active()) $this->error('Allready active account', __LINE__);\n $res = $this->db->query(\"UPDATE \".$this->usertable.\" SET \".$this->user_active.\" = 1 \n\tWHERE \".$this->user_id.\" = '\".$this->escape($this->userID).\"' LIMIT 1\");\n if (@count($res) == 1)\n\t{\n\t\t$this->userData[$this->user_active] = true;\n\t\treturn true;\n\t}\n\treturn false;\n }", "public function active_user($db,$data) {\n\n $sql=\"UPDATE user SET activate=true where token='$data'\";\n return $db->ejecutar($sql);\n }", "public function activateUser($request)\r\n {\r\n /*\r\n * When registration has done you must activate your account to log in.\r\n * (Application will show you message \"You must confirm account\")\r\n */\r\n\r\n\r\n /*\r\n * In database we want to set field IsActivated to '1'\r\n */\r\n $params = [\r\n 'IsActivated' => '1'\r\n ];\r\n\r\n /*\r\n * Update row in user table where Activativon ==$request['activation']<---\r\n */\r\n $this->primary = 'Activation';\r\n $this->update($request['activation'], $params);\r\n\r\n }", "function support_dynamo_first_activation() {\n wp_redirect(get_bloginfo('wpurl').'/wp-admin/admin.php?page=dynamo_support_&view=account');\n }", "public function signup()\n {\n $id = (int) Input::get(\"id\");\n $md5 = Input::get(\"secret\");\n if (!$id || !$md5) {\n Redirect::autolink(URLROOT, Lang::T(\"INVALID_ID\"));\n }\n $row = Users::getPasswordSecretStatus($id);\n if (!$row) {\n $mgs = sprintf(Lang::T(\"CONFIRM_EXPIRE\"), Config::TT()['SIGNUPTIMEOUT'] / 86400);\n Redirect::autolink(URLROOT, $mgs);\n }\n if ($row['status'] != \"pending\") {\n Redirect::autolink(URLROOT, Lang::T(\"ACCOUNT_ACTIVATED\"));\n die;\n }\n if ($md5 != $row['secret']) {\n Redirect::autolink(URLROOT, Lang::T(\"SIGNUP_ACTIVATE_LINK\"));\n }\n $secret = Helper::mksecret();\n $upd = Users::updatesecret($secret, $id, $row['secret']);\n if ($upd == 0) {\n Redirect::autolink(URLROOT, Lang::T(\"SIGNUP_UNABLE\"));\n }\n Redirect::autolink(URLROOT . '/login', Lang::T(\"ACCOUNT_ACTIVATED\"));\n }", "function activateMember($username, $password, $code, $adv=0)\r\n\t{\r\n\t\t$username = funcs::check_input($username);\r\n\t\t$password = funcs::check_input($password);\r\n\t\t$code = funcs::check_input($code);\r\n\t\t$adv = funcs::check_input($adv);\r\n\r\n\t\t$sql = \"SELECT COUNT(*) FROM \".TABLE_MEMBER.\"\r\n\t\t\t\t\tWHERE \".TABLE_MEMBER_USERNAME.\"='\".$username.\"'\r\n\t\t\t\t\t\tAND \".TABLE_MEMBER_PASSWORD.\"='\".$password.\"'\r\n\t\t\t\t\t\tAND \".TABLE_MEMBER_VALIDATION.\"='\".$code.\"'\r\n\t\t\t\t\t\tAND \".TABLE_MEMBER_ISACTIVE.\"=0\r\n\t\t\t\t\t\tAND signin_datetime = '0000-00-00 00:00:00'\";\r\n\t\t$row = DBconnect::get_nbr($sql);\r\n\r\n\t\tif($row > 0)\r\n\t\t{\r\n\t\t\t$vcode = funcs::randomPassword(6);\r\n\t\t\t$sql = \"UPDATE \".TABLE_MEMBER.\" SET \".TABLE_MEMBER_ISACTIVE.\"=1, coin='\".FREECOINS.\"', validation_code = '$vcode', isactive_datetime=NOW()\r\n\t\t\t\t\t\tWHERE \".TABLE_MEMBER_USERNAME.\"='\".$username.\"' LIMIT 1\";\r\n\t\t\tDBconnect::execute($sql);\r\n\r\n\t\t\t$userid = funcs::getUserid($username);\r\n\t\t\t//INSERT COIN LOG\r\n\t\t\t$coinVal = funcs::checkCoin($username);\r\n\t\t\t$sqlAddCoinLog = \"INSERT INTO coin_log (member_id, send_to, coin_field, coin, coin_remain, log_date) VALUES ('1','$userid','Activate Member',\".FREECOINS.\",\".$coinVal.\", NOW())\";\r\n\t\t\tDBconnect::execute($sqlAddCoinLog);\r\n\r\n\t\t\t$subject = funcs::getText($_SESSION['lang'], '$first_time_inbox_subject');\r\n\t\t\t$message = funcs::getText($_SESSION['lang'], '$first_time_inbox_message');\r\n\t\t\t$sql = \"INSERT INTO \".TABLE_MESSAGE_INBOX.\"\r\n\t\t\t\t\tSET \".TABLE_MESSAGE_INBOX_TO.\"=\".$userid.\",\r\n\t\t\t\t\t\".TABLE_MESSAGE_INBOX_FROM.\"=2,\r\n\t\t\t\t\t\".TABLE_MESSAGE_INBOX_SUBJECT.\"='\".mysql_real_escape_string($subject).\"',\r\n\t\t\t\t\t\".TABLE_MESSAGE_INBOX_MESSAGE.\"='\".mysql_real_escape_string($message).\"',\r\n\t\t\t\t\t\".TABLE_MESSAGE_INBOX_DATETIME.\"='\".funcs::getDateTime().\"'\";\r\n\t\t\tDBconnect::execute($sql);\r\n\r\n\t\t\tfuncs::preventMultipleRegister($username);\r\n\r\n\t\t\t#Pakin Change this function\r\n\t\t\tself::NewSorting($username);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "public function activateAction()\r\n {\r\n\t\tUser::activate($this->route_params['token']);\r\n\t\t\r\n\t\t$this->user = Auth::getUser();\r\n\r\n $this->redirect('/signup/activated');\r\n }", "public function reActivate()\n {\n $response = $this->response();\n $config = [\n ['field' => 'userid', 'label' => '', 'rules' => 'trim|required|integer'],\n ['field' => 'activationemail', 'label' => '', 'rules' => 'trim|required|min_length[4]|max_length[100]|valid_email']\n ];\n $this->form_validation->set_rules($config);\n if ($this->form_validation->run() === false) {\n $response[\"errors\"] = $this->form_validation->error_array();\n $this->output->set_output(json_encode($response));\n return false;\n }\n $userID = $this->input->post('userid');\n $email = $this->input->post('activationemail');\n if ($this->oauth_web->reActivate($userID, $email) === true) {\n $response[\"status\"] = true;\n $response[\"msg\"] = $this->lang->line(\"reActivate_ok\");\n }\n $this->output->set_output(json_encode($response));\n }", "public function loginActivation($key){\n\t\t\t$key = $key->key;\n\t\t\t$user_dao = new LoginDAO();\n\t\t\t$resUser = $user_dao->loginActivate($key);\n\t\t\t$response = new ResponseHandler();\n\t\t\tif($resUser['result'] =='success'){\n\t\t\t\treturn $response->encode_response(['result' => 'success', 'message' => \"Account activated successfully\"]);\n\t\t\t}else{\n\t\t\t\treturn $response->encode_response(['result' => 'fail', 'message' =>\"Your account alreday activated\"]);\n\t\t\t}\n\t\t\t\n\t\t}", "function activateUser()\n {\n // Sets the value of activated to yes\n $int = 1;\n\n $mysqli = $this->conn;\n\n /* Prepared statement, stage 1: prepare */\n if (!($stmt = $mysqli->prepare(\"UPDATE User SET \n \t\tactiveUser = ?\n \t\t\tWHERE ID = ?\"))\n ) {\n echo \"Prepare failed: (\" . $mysqli->errno . \") \" . $mysqli->error;\n }\n\n /* Prepared statement, stage 2: bind and execute */\n\n if (!($stmt->bind_param(\"ii\",\n $int,\n $this->id))\n ) {\n echo \"Binding parameters failed: (\" . $stmt->errno . \") \" . $stmt->error;\n }\n\n if (!$stmt->execute()) {\n echo \"Execute failed: (\" . $stmt->errno . \") \" . $stmt->error;\n }\n\n }", "function setUserActive($token) // activate-account.php, admin_user.php\r\n \r\n{\r\n global $mysqli,$db_table_prefix;\r\n\r\n\t$stmt = $mysqli->prepare(\"UPDATE \".$db_table_prefix.\"users\r\n\r\n\t\tSET active = 1\r\n\r\n\t\tWHERE\r\n\r\n\t\tactivation_token = ?\r\n\r\n\t\tLIMIT 1\");\r\n\r\n\t$stmt->bind_param(\"s\", $token);\r\n\r\n\t$result = $stmt->execute();\r\n\r\n\t$stmt->close();\t\r\n\r\n\treturn $result;\r\n\t\r\n}", "function activateMember2($username)\r\n\t{\r\n\t\t$username = funcs::check_input($username);\r\n\r\n\t\t$sql = \"SELECT isactive FROM \".TABLE_MEMBER.\"\r\n\t\t\t\t WHERE \".TABLE_MEMBER_USERNAME.\"='\".$username.\"'\";\r\n\t\t$row = DBconnect::get_nbr($sql);\r\n\t\tif($row == 0)\r\n\t\t{\r\n\t\t\t$sql = \"UPDATE \".TABLE_MEMBER.\" SET \".TABLE_MEMBER_ISACTIVE.\"=1\r\n\t\t\t\t\t\tWHERE \".TABLE_MEMBER_USERNAME.\"='\".$username.\"' LIMIT 1\";\r\n\t\t\tDBconnect::execute($sql);\r\n\r\n\t\t\t$userid = funcs::getUserid($username);\r\n\r\n\t\t\t//Hauke\r\n\t\t\t$membership = 3;\r\n\t\t\t$rate = 1;\r\n\t\t\t$paid_via = 3;\r\n\t\t\t$payment_complete = 1;\r\n\t\t\t$today = date(\"Y-m-d\");\r\n\r\n\t\t\tfuncs::insertpayment($userid,$membership,$rate,$paid_via, $payment_complete);\r\n\r\n\t\t\t$sql = \"UPDATE \".TABLE_PAY_LOG.\" SET \".\"real_name\".\"='$real_name',\r\n\t\t\t\t\t\t\t\t\t\t\t \t \".\"real_street\".\"='$street',\r\n\t\t\t\t\t\t\t\t\t\t\t\t \".\"real_city\".\"='$city',\r\n\t\t\t\t\t\t\t\t\t\t\t\t \".\"sum_paid\".\"='0',\r\n\t\t\t\t\t\t\t\t\t\t\t\t \".\"cancelled\".\"='1',\r\n\t\t\t\t\t\t\t\t\t\t\t\t \".\"cancelled_date\".\"='$today'\r\n\t\t\t\t\t\t\t\t\t \t WHERE \".\"username\".\"='$username'\";\r\n\t\t\tDBconnect::execute($sql);\r\n\r\n\t\t\t$sql = \"UPDATE \".TABLE_MEMBER.\" SET \".\"type\".\"='$membership',\r\n\t\t\t\t\t\t\t\t\t\t\".\"signup_datetime=now(),\r\n\t\t\t\t\t\t\t\t\t\t\".\"advertise_regist='2'\r\n\t\t\t\t\t\t\t\t\t \t WHERE username ='$username'\";\r\n\t\t\tDBconnect::execute($sql);\r\n\r\n\t\t\t//Hauke end\r\n\r\n\t\t\t$subject = funcs::getText($_SESSION['lang'], '$first_time_inbox_subject');\r\n\t\t\t$message = funcs::getText($_SESSION['lang'], '$first_time_inbox_message');\r\n\t\t\t$sql = \"INSERT INTO \".TABLE_MESSAGE_INBOX.\"\r\n\t\t\t\t\tSET \".TABLE_MESSAGE_INBOX_TO.\"=\".$userid.\",\r\n\t\t\t\t\t\".TABLE_MESSAGE_INBOX_FROM.\"=1,\r\n\t\t\t\t\t\".TABLE_MESSAGE_INBOX_SUBJECT.\"='\".$subject.\"',\r\n\t\t\t\t\t\".TABLE_MESSAGE_INBOX_MESSAGE.\"='\".$message.\"',\r\n\t\t\t\t\t\".TABLE_MESSAGE_INBOX_DATETIME.\"='\".funcs::getDateTime().\"'\";\r\n\t\t\tDBconnect::execute($sql);\r\n\t\t\tself::NewSorting($username);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "function oaupostgrad_admin_activator($email, $email_code)\n\t{\n\n\t\tglobal $Oau_auth;\n\t\t$email \t\t\t= \tsanitize($email);\n\t\t$email_code\t\t=\tsanitize($email_code);\n\t\t$deactivator\t=\t0;\n\t\t$activator \t\t=\t1;\n\n\t\t$query1 = \"SELECT `admin_Idn` FROM `administrator` WHERE `email` = '$email' AND `email_code` = '$email_code' AND `active` = $deactivator\";\n\t\t$run_query1 = mysqli_query($Oau_auth, $query1);\n\n\t\tif(mysqli_num_rows($run_query1) > 0)\n\t\t{\n\n\t\t\t$query2 = \"UPDATE `administrator` SET `active` = $activator WHERE `email` = '$email' AND `email_code` = '$email_code'\";\n\t\t\t$run_query2 = mysqli_query($Oau_auth, $query2);\n\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t}", "public function activatenewpasswordAction()\n {\n $newKey = $this->getRequest()->getParam(self::ACTIVATION_KEY_PARAMNAME, null);\n $userId = $this->getRequest()->getParam(User::COLUMN_USERID, null);\n\n $user = $this->_getUserFromIdAndKey($userId, $newKey);\n if(!$user){\n Globals::getLogger()->info(\"New password activation: user retrieval failed - userId=$userId, key=$newKey\", Zend_Log::INFO );\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::NO_SUCH_USER));\n }\n\n $user->{User::COLUMN_PASSWORD} = $user->newPassword;\n $user->newPassword = '';\n $user->activationKey = '';\n\n $id = $user->save();\n if($id != $user->{User::COLUMN_USERID}){\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::NEWPASSWORD_ACTIVATION_FAILED));\n }\n\n Utils::deleteCookie(User::COOKIE_MD5);\n Utils::deleteCookie(User::COOKIE_USERNAME);\n Utils::deleteCookie(User::COOKIE_REMEMBER);\n\n $this->_savePendingUserIdentity($userId);\n\n $this->_helper->redirectToRoute('userupdate',array('newPassword'=>true));\n }", "public function action_activateaccount()\n\t{\n\t\tglobal $context, $modSettings;\n\n\t\tisAllowedTo('moderate_forum');\n\n\t\tif (isset($this->_req->query->save, $this->_profile['is_activated'])\n\t\t\t&& $this->_profile['is_activated'] != 1)\n\t\t{\n\t\t\trequire_once(SUBSDIR . '/Members.subs.php');\n\n\t\t\t// If we are approving the deletion of an account, we do something special ;)\n\t\t\tif ($this->_profile['is_activated'] == 4)\n\t\t\t{\n\t\t\t\tdeleteMembers($context['id_member']);\n\t\t\t\tredirectexit();\n\t\t\t}\n\n\t\t\t// Actually update this member now, as it guarantees the unapproved count can't get corrupted.\n\t\t\tapproveMembers(array('members' => array($context['id_member']), 'activated_status' => $this->_profile['is_activated']));\n\n\t\t\t// Log what we did?\n\t\t\tlogAction('approve_member', array('member' => $this->_memID), 'admin');\n\n\t\t\t// If we are doing approval, update the stats for the member just in case.\n\t\t\tif (in_array($this->_profile['is_activated'], array(3, 4, 13, 14)))\n\t\t\t{\n\t\t\t\tupdateSettings(array('unapprovedMembers' => ($modSettings['unapprovedMembers'] > 1 ? $modSettings['unapprovedMembers'] - 1 : 0)));\n\t\t\t}\n\n\t\t\t// Make sure we update the stats too.\n\t\t\trequire_once(SUBSDIR . '/Members.subs.php');\n\t\t\tupdateMemberStats();\n\t\t}\n\n\t\t// Leave it be...\n\t\tredirectexit('action=profile;u=' . $this->_memID . ';area=summary');\n\t}", "function oaupostgrad_users_activator($email, $email_code)\n\t{\n\n\t\tglobal $Oau_auth;\n\t\t$email \t\t\t= \tsanitize($email);\n\t\t$email_code\t\t=\tsanitize($email_code);\n\t\t$deactivator\t=\t0;\n\t\t$activator \t\t=\t1;\n\n\t\t$query1 = \"SELECT `student_Idn` FROM `student` WHERE `email` = '$email' AND `email_code` = '$email_code' AND `active` = $deactivator\";\n\t\t$run_query1 = mysqli_query($Oau_auth, $query1);\n\n\t\tif(mysqli_num_rows($run_query1) > 0)\n\t\t{\n\n\t\t\t$query2 = \"UPDATE `student` SET `active` = $activator WHERE `email` = '$email' AND `email_code` = '$email_code'\";\n\t\t\t$run_query2 = mysqli_query($Oau_auth, $query2);\n\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t}", "public function activation_link()\n\t {\n\t \t\t$data=$_GET['data'];\n\t \t\t$data=explode('?',$data);\n\t \t\t\n \t\tif( count($data) ==2)\n \t\t{\n \t\t\t$email=base64_decode($data[0]);\n \t\t\t$pass=base64_decode($data[1]);\n \t\t\t$query=$this->ApiModel->userActive($email,$pass);\n \t\t\tif($query== 1)\n \t\t\t{\n \t\t\t\t$data['msg']=\"Your account has been activated\";\n \t\t\t}else{\n \t\t\t\t$data['msg']=\"Your account has been Not activated\";\n \t\t\t}\n \t\t}else{\n \t\t\t$data['msg']=\"Your Link is incorrect\";\n \t\t}\n\n \t\t\t$this->load->view('activation',$data);\n \t\t\t\n\n\t \t\t\n\t }", "function activateUser($userId);", "function activate ()\n\t{\n\t\tswitch ($this->getAction ())\n\t\t{\n\t\t\tcase 'modifyUser':\n\t\t\t\tif ($this->getUserName () == 'test')\n\t\t\t\t{\n\t\t\t\t\tdie ('not allowed for test user');\n\t\t\t\t}\n\t\t\t\t$checkPasswd = true;\n\t\t\t\t$user = $this->itemFactory->requestToUser ($checkPasswd);\n\t\t\t\t$this->operations->modifyUser ($this->getUserName(), $user);\n\t\t\t\tHeader (\"Location: index.php\");\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tHeader (\"Location: index.php\");\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function activate($name,$token)\n {\n $user = public_users::where(['token'=> $token,'name'=>$name,'status'=>0])->first();\n $this->notification_lock($user->num_of_sends);\n if (empty($user)) {\n session()->flash('err_msg','Your activation code is either expired or invalid, login here to re-validate.');\n return redirect()->to('/public/login');\n }\n else{\n $user->status=1;\n $user->token=null;\n $user->update();\n session()->flash('success_msg','Congratulations! your account is now activated.');\n return redirect()->to('/public/login');\n }\n }", "public function activateAccount($code, $email)\n {\n\n // define all the global variables\n global $database, $message, $functions;\n\n // escape the given strings\n $code = $this->secureInput($code);\n $email = $this->secureInput($email);\n\n // start the checks\n if (empty($code) || empty($email)) {\n $message->setError(\"Code/Email fields most not be empty\", Message::Error);\n return false;\n }\n\n // check if email exists\n if (!$functions->emailExist($email)) {\n $message->setError(\"The provided email is not in our database.\", Message::Error);\n return false;\n }\n\n // check if the given code matches the required characters\n if (strlen($code) < 20 || strlen($code) > 20) {\n $message->setError(\"The given code has to be exactly 20 characters long\", Message::Error);\n return false;\n }\n\n // check if account already has been activated\n if ($functions->isUserActivated($email, true)) {\n $message->setError(\"The account is already activated\", Message::Error);\n return false;\n }\n\n $sql = \"SELECT * FROM \" . TBL_USERS . \" WHERE \" . TBL_USERS_EMAIL . \" = '\" . $email . \"' AND \" . TBL_USERS_ACTIVATION_CODE . \" = '\" . $code . \"'\";\n\n // get the sql results\n $result = $database->getQueryResults($sql);\n if ($database->anyError()) {\n return false;\n }\n\n // check if wrong code has been used\n if ($database->getQueryNumRows($result, true) < 1) {\n $message->setError(\"Wrong activation code has been used.\", Message::Error);\n return false;\n }\n\n //update the user account with the needed information\n $sql = \"UPDATE \" . TBL_USERS . \" SET \" . TBL_USERS_ACTIVATED . \" ='1',\" . TBL_USERS_ACTIVATION_CODE . \"='' WHERE \" . TBL_USERS_EMAIL . \" = '\" . $email . \"' AND \" . TBL_USERS_ACTIVATION_CODE . \" = '\" . $code . \"'\";\n\n // get the sql results\n $database->getQueryResults($sql);\n if ($database->anyError()) {\n return false;\n }\n\n $message->setSuccess(\"Your account has been activated successfully !\");\n return true;\n }", "function activateNewsletter() {\n\t\t$hash = t3lib_div::_GP('nlAuth');\n\t\t$userID = t3lib_div::_GP('u');\n\n\t\t// get the whole row\n\t\t$row = current($GLOBALS['TYPO3_DB']->exec_SELECTgetRows( '*', 'fe_users', 'uid=' . $userID ));\n\t\t$realHash = substr(sha1(serialize($row)), 1, 6); // first 6 letters from hash\n\t\tif ( $row['disable'] && ($realHash == $hash) ) { // hash matches\n\t\t\t// enable the user\n\t\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery( 'fe_users', 'uid=' . $userID, array(\n\t\t\t\t'uid' => $userID,\n\t\t\t\t'disable' => '0' ) );\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function userActivation($email, $code)\n {\n if ($this->checkActivationUser($email, $code)) {\n $sql = \"UPDATE user SET status=1, activeDate = NOW() WHERE email='$email'\";\n $query = $this->db->prepare($sql);\n $query->execute();\n return 1;\n } else {\n return 0;\n }\n }", "function hc_gf_maybe_activate_user() {\n\n $template_path = STYLESHEETPATH . '/gf-activate-template/activate.php';\n $is_activate_page = isset( $_GET['page'] ) && $_GET['page'] == 'gf_activation';\n \n if( ! file_exists( $template_path ) || ! $is_activate_page )\n return;\n \n require_once( $template_path );\n \n exit();\n}", "function activate($username = false, $verification = false)\n\t{\n\t\tif($username && $verification)\n\t\tif($this->auth->activate(urldecode($username), $verification))\n\t\t{\n\t\t\t$this->_render_page('user/activation', array('success' => true));\n\t\t\treturn;\n\t\t}\n\t\t$this->_render_page('user/activation', array('success' => false));\n\t}", "function activated_notice() {\n\t\tif ( 'network' == $this->get_option( 'activated' ) ) {\n\t\t\t$message = sprintf(\n\t\t\t\t__( 'Each site will need to be registered with VaultPress separately. You can purchase new keys from your <a href=\"%1$s\">VaultPress&nbsp;Dashboard</a>.', 'vaultpress' ),\n\t\t\t\t'https://dashboard.vaultpress.com/'\n\t\t\t);\n\t\t\t$this->ui_message( $message, 'activated', __( 'VaultPress has been activated across your network!', 'vaultpress' ) );\n\n\t\t// key and secret already exist in db\n\t\t} elseif ( $this->is_registered() ) {\n\t\t\tif ( $this->check_connection() ) {\n\t\t\t}\n\t\t}\n\n\t\t$this->delete_option( 'activated' );\n\t}", "private function valUserExisting(){\n if($this->_personDB->getActive()){\n if($this->logIn()){\n $this->addUserHttpSession();\n $this->_response = 'ok';\n }\n }else{\n $this->_response = '104';\n }\n }", "public function getUserActivation($email,$code){\n\t\t$emptyModelInstance = Sentry::getUserProvider()->getEmptyUser();\n\n\t\t// Now, you have any methods available that you'd like. Retrieve a new instance, query\n\t\t// against anything. Because our User model implements the right interfaces, it plays nicely\n\t\t// with Sentry.\n\t\t$user = $emptyModelInstance->where('email', '=', $email)->first();\n\n\t\t// Continue on as you were...\n\t\ttry\n\t\t{\n\t\t // Find the user using the user id\n\t\t //$user = Sentry::findUserById(1);\n\n\t\t // Attempt to activate the user\n\t\t if ($user->attemptActivation($code))\n\t\t {\n\t\t return Redirect::to('/')\n\t\t\t\t\t->with('success','You\\' ve logged in successfully!');\n\t\t }\n\t\t else\n\t\t {\n\t\t // User activation failed\n\t\t }\n\t\t}\n\t\tcatch (Cartalyst\\Sentry\\Users\\UserNotFoundException $e)\n\t\t{\n\t\t echo 'User was not found.';\n\t\t}\n\t\tcatch (Cartalyst\\Sentry\\Users\\UserAlreadyActivatedException $e)\n\t\t{\n\t\t echo 'User is already activated.';\n\t\t}\n\t}", "public function activate($username);", "public function userActivation($activation_code) {\n $this->load->model('register_model');\n $table_to_pass = 'mst_users';\n $fields_to_pass = array('user_id', 'first_name', 'last_name', 'user_name', 'user_email', 'user_type', 'email_verified', 'user_status');\n $condition_to_pass = array(\"activation_code\" => $activation_code);\n /* get user details to verify the email address */\n $arr_login_data = $this->register_model->getUserInformation($table_to_pass, $fields_to_pass, $condition_to_pass, $order_by_to_pass = '', $limit_to_pass = '', $debug_to_pass = 0);\n if (count($arr_login_data)) {\n if ($arr_login_data[0]['email_verified'] == 1) {\n $this->session->set_userdata('activation_error', \"You have already activated your account. Please login.\");\n } else {\n\n $user_detail = $this->common_model->getRecords(\"mst_users\", \"user_id\", array(\"activation_code\" => $activation_code));\n $this->load->model('admin_model');\n /* Removing the user if he is exists in inactiveated list */\n $this->register_model->updateInactiveUserFile($this->common_model->absolutePath(), 1, intval($user_detail[0]['user_id']));\n $table_name = 'mst_users';\n $update_data = array(\"user_status\" => '1', 'email_verified' => '1');\n $condition_to_pass = array(\"activation_code\" => $activation_code);\n $this->common_model->updateRow($table_name, $update_data, $condition_to_pass);\n $this->session->set_userdata('msg_success', \"Your email address has been verified successfully.\");\n }\n } else {\n $this->session->set_userdata('msg_failed', \"Invalid activation link.\");\n }\n redirect(base_url() . \"sign-in\");\n }", "public function activate_account($token) {\n $con['returnType'] = 'single';\n $con['conditions'] = array(\n 'token' => $token\n );\n $result = $this->Common_Model->getRows($con, 'wh_user_activations');\n if ($result) {\n\n $this->Common_Model->delete($con['conditions'], 'wh_user_activations');\n $this->session->set_flashdata('success', array('message' => 'Activated successfully. Please login.'));\n redirect('Site_Login/login_form');\n } else {\n $redirect = 'Site_Login/login_form';\n $this->error($redirect);\n }\n }", "public function activateUser(string $activationCode)\n {\n try {\n $user = app(User::class)->where('activation_code', $activationCode)->first();\n if (! $user) {\n return 'The code does not exist for any user in our system.';\n }\n $user->status = 1;\n $user->activation_code = null;\n $user->save();\n //auth()->login($user);\n\n // Get welcome message text\n //$locale = App::getLocale();\n $locale = 'en';\n $message = PostTranslation::where('title', 'Welcome email')\n ->where('locale', $locale)\n ->first();\n\n // Send to the user the confirmation about the activation of the account\n $mailDatas = [];\n $mailDatas['senderEmail'] = '[email protected]';\n $mailDatas['senderName'] = 'Global CI - Administrator';\n $mailDatas['subject'] = 'Activation of your Global CI account';\n $mailDatas['emailTo'] = $user->email;\n $mailDatas['name'] = $user->name;\n $mailDatas['body'] = $message->body ?? null;\n\n Mail::to($user->email)->send(new UserActivationConfirmation($mailDatas));\n } catch (\\Exception $exception) {\n logger()->error($exception);\n\n return 'Whoops! something went wrong.';\n }\n\n return redirect()->to('/')->with('message', 'User succesfuly activated');\n }", "public function reActivationAction() {\n //get the container object\n $container = $this->container;\n //get the translator object\n $translator = $this->get('translator');\n //get the session object\n $session = $this->getRequest()->getSession();\n //check if we have a logged in user or company\n if (FALSE === $this->get('security.context')->isGranted('ROLE_NOTACTIVE')) {\n $session->getFlashBag()->set('note', $translator->trans('You need to Login first.'));\n return $this->redirect($this->generateUrl('login'));\n }\n\n //check if the user is already active\n if (TRUE === $this->get('security.context')->isGranted('ROLE_USER')) {\n //set a notice flag\n $session->getFlashBag()->set('notice', $translator->trans('Your acount is active.'));\n return $this->redirect($this->generateUrl('user_edit'));\n }\n\n //get the logedin user\n $user = $this->getUser();\n\n //prepare the body of the email\n $body = $this->renderView('ObjectsUserBundle:User:Emails\\activate_email.txt.twig', array('user' => $user));\n //prepare the message object\n $message = \\Swift_Message::newInstance()\n ->setSubject($translator->trans('activate your account'))\n ->setFrom($container->getParameter('mailer_user'))\n ->setTo($user->getEmail())\n ->setBody($body)\n ;\n //send the activation mail to the user\n $this->get('mailer')->send($message);\n //set the success flag in the session\n $session->getFlashBag()->set('success', $this->get('translator')->trans('check your email for your activation link'));\n //redirect the user to portal\n return $this->redirect($this->generateUrl('user_edit'));\n }", "public function getUserActivationCode() {\n\t\treturn $this->userActivationCode;\n\t}", "function ADMIN_Identifie()\n{\n\tif ($_POST[\"ed_PW\"] ==\"jbmd\")\n\t\t{\n\t\t\t$_SESSION[\"ADMIN_OK\"] = \"00\";\t\t\n\t\t\tTOOL_Chainage(\"SCI_EF_index.php\");\n\t\t\treturn;\n\t\t}\n\n}", "public function executeActivateAccount(sfWebRequest $request)\n {\n $tkn = trim($request->getParameter('tk', ''));\n $usr = AppUserTable::getInstance()->findOneByRecoverToken($tkn);\n\n if ($usr) {\n \tif (!$usr->getEnabled()) {\n\t \t$usr->setRecoverToken(NULL);\n\t \t$usr->setEnabled(1);\n\t \t$usr->save();\n\n\t \tServiceAuthentication::startSessionProcess($usr);\n\t\n\t \t$this->getUser()->setFlash('activate', true);\t\n \t}\n }\n $this->redirect('home/index');\n }", "public function verify_actcode($member_email, $code){\n\t\t//$newCode = $this->make_activation_code();\n\t\t$mysql = New Mysql();\n\t\treturn($mysql->update_activation_code($member_email, $code));\n\t}", "public function update_new_user(){\n\t\t$this->data[\"activationCode\"] = $this->make_activation_code();\n\t\tif( $this->send_email($this->get_activation_msg($this->data[\"activationCode\"])) ){\n\t\t\t$mysql = New Mysql();\n\t\t\treturn( $mysql->update_user($this->data[\"name\"], $this->data[\"lastname\"], $this->data[\"email\"], $this->data[\"password\"], $this->data[\"joinDate\"], $this->data[\"lastAccess\"], $this->data[\"activationCode\"]) );\n\t\t}\t\n\t}", "public function user_activation($data) {\n $usersDetails = ClassRegistry::init('User')->find('first', array('conditions' => array('User.id' => $data['user_id'])));\n\n if(isset($data['password']) && !empty($data['password'])) {\n $userPass = $data['password'];\n }\n else{\n $userPass = $usersDetails['UserDetail']['org_password'];\n\t\t\t$sqlN = \"select AES_DECRYPT(org_password, 'secret') as org_password from user_details WHERE user_details.user_id =\".$data['user_id'];\n\n\t\t $dd = ClassRegistry::init('User')->query($sqlN);\n\n\t\t\t$userPass = $dd[0][0]['org_password'];\n\n }\n\n $domain_url = SITEURL;\n\n $endc = safeEncrypt($usersDetails['User']['email']);\n $activation_url = 'users/activate_account/'.$endc;\n\n $emailAddress = $usersDetails['User']['email'];\n $email = new CakeEmail();\n $email->config('Smtp');\n $email->from(array(ADMIN_FROM_EMAIL => MAIL_SITENAME));\n $email->to($emailAddress);\n $email->subject(\"OpusView: Account activation\");\n $email->template('user_activation');\n $email->emailFormat('html');\n $email->viewVars(array('receiver' => $usersDetails['UserDetail']['first_name'] . ' ' . $usersDetails['UserDetail']['last_name'], 'username' => $usersDetails['User']['email'], 'password' => $userPass, 'domain_url' => $domain_url, 'activation_url' => $activation_url));\n $email->send();\n return true;\n }", "function verify()\n {\n $activation = null;\n $param = getParameter();\n if (!empty($param[0])) {\n $activation = $param[0];\n }\n $resultActive = $this->model->khachhang->activeAccount($activation);\n switch ($resultActive) {\n case 1 :\n redirect('user/active_expire');\n break;\n case 2:\n redirect('user/active_success');\n break;\n case 3:\n redirect('user/active_fail');\n break;\n }\n }", "function activation()\n {\t\n\t\t$data['fal'] = $this->fal_front->activation();\n\t\t$this->load->view($this->_container, $data); \n }", "function setUserActive($token)\r\n{\r\n\tglobal $mysqli,$db_table_prefix;\r\n\t$stmt = $mysqli->prepare(\"UPDATE \".$db_table_prefix.\"users\r\n\t\tSET active = 1\r\n\t\tWHERE\r\n\t\tactivation_token = ?\r\n\t\tLIMIT 1\");\r\n\t$stmt->bind_param(\"s\", $token);\r\n\t$result = $stmt->execute();\r\n\t$stmt->close();\t\r\n\treturn $result;\r\n}", "function logger_device_activate($code) {\n\n logger_device_assign($code);\n\n drupal_set_message(t(\"The device is now associated with your account.\"));\n\n drupal_goto('device/mylist');\n}", "static function handle_activate()\n\t{\n\t\tself::handle_multi_site( 'activate' );\n\t}", "function ConfirmUser(){\r\n if(empty($_GET['code'])||strlen($_GET['code'])<=10){\r\n $this->HandleError(\"Please provide the confirm code\");\r\n return false;\r\n }\r\n $user_rec = array();\r\n if(!$this->UpdateDBRecForConfirmation($user_rec)){\r\n return false;\r\n }\r\n \r\n $this->SendUserWelcomeEmail($user_rec);\r\n \r\n $this->SendAdminIntimationOnRegComplete($user_rec);\r\n \r\n return true;\r\n }", "function send_again()\n\t{\n\t\tif (!$this->tank_auth->is_logged_in(FALSE)) {\t\t\t\t\t\t\t// not logged in or activated\n\t\t\tredirect('/auth/login/');\n\n\t\t} else {\n\t\t\t$this->form_validation->set_rules('email', 'Email', 'trim|required|xss_clean|valid_email');\n\n\t\t\t$data['errors'] = array();\n\n\t\t\tif ($this->form_validation->run()) {\t\t\t\t\t\t\t\t// validation ok\n\t\t\t\tif (!is_null($data = $this->tank_auth->change_email(\n\t\t\t\t\t\t$this->form_validation->set_value('email')))) {\t\t\t// success\n\n\t\t\t\t\t$data['site_name']\t= $this->config->item('website_name', 'tank_auth');\n\t\t\t\t\t$data['activation_period'] = $this->config->item('email_activation_expire', 'tank_auth') / 3600;\n\n\t\t\t\t\t$this->_send_email('activate', $data['email'], $data);\n\n\t\t\t\t\t$this->_show_message(sprintf($this->lang->line('auth_message_activation_email_sent'), $data['email']));\n\n\t\t\t\t} else {\n\t\t\t\t\t$errors = $this->tank_auth->get_error_message();\n\t\t\t\t\tforeach ($errors as $k => $v)\t$data['errors'][$k] = $this->lang->line($v);\n\t\t\t\t}\n\t\t\t}\n\t\t\tdisplay('send_again', $data);\t\t\t\n\t\t}\n\t}", "function activateUser($email) {\n $stmt = $this->connection->prepare(\"UPDATE \".DB_USER_TABLE.\"\n SET\n \".COL_USER_RANK.\" = 1\n WHERE \".COL_USER_EMAIL.\" = ?\");\n $stmt->bind_param(\"s\", $email);\n return $stmt->execute();\n }", "function register_user($first_name,$last_name,$username,$email,$password)\n{\n $first_name = escape($first_name);\n $last_name = escape($last_name);\n $username = escape($username);\n $email = escape($email);\n $password = escape($password);\n if (email_exists($email)) {\n return false;\n } elseif (username_exists($username)) {\n return false;\n } else {\n $password = md5($password);\n $validation_code = md5($username . microtime());\n $sql = \"INSERT INTO users(first_name, last_name, username, email, password, validation_code, active)\";\n $sql .= \" VALUES('$first_name','$last_name','$username','$email','$password','$validation_code',0)\";\n $result = query($sql);\n\n ///// sending email////////\n $subject = \"Activate Account\";\n $msg = \" Please click the link below to activate your account\n http://localhost/login/activate.php?email=$email&code=$validation_code \n \";\n $headers = \"From: [email protected]\";\n send_email($email, $subject, $msg, $headers);\n\n return true;\n }\n\n}", "public function page_activate_users()\n\t{\n\t\t$id = intval(Http::request('id'));\n\t\tif ($id)\n\t\t{\n\t\t\t User::confirm_account($id);\n\t\t}\n\n\t\tHttp::redirect('index.' . PHPEXT);\n\t}", "public function activate(){\n # Enable Single Sign-On\n if(in_array(\"login\", $this->features, TRUE)){\n $this->enable_sso();\n }\n }", "public function activate($locator){\n\t\t$activationkey = $this->request->get('id');\n\t\t\n\t\t$model = $this->_load('app')->model('users');\n\t\t$model->activate($activationkey);\n\t\t\n\t\t$this->response->setPartial('maincontent', 'user/activate', array('errmsg' => $model->getErrorMsg(' ')));\n\t\t\n\t}", "public function confirm($key)\n {\n try {\n $user = Sentry::findUserByActivationCode($key);\n\n if ($user->attemptActivation($key)) {\n return Redirect::to('login')->withMessage(['success' => Lang::get('flash.account_activated')]);\n }\n } catch (Exception $e) {\n // Nothing here, so just fall through.\n }\n\n return Redirect::to('/')->withMessage(['danger' => Lang::get('flash.invalid_code')]);\n }", "public function activateregistration(Request $req){\n $regtoken = $req->input('token');\n //$user = DB::table('users')->where('verificationtoken', $regtoken)->first(); \n DB::update('update users set verified=1 where verificationtoken=?',[$regtoken]);\n Session::flash('activation', 'Your acccount has been activated. Please login below.');\n return view('login');\n }", "function register_user($first_name, $last_name, $username, $email, $password){\r\n\r\n $first_name = escape($first_name);\r\n $last_name = escape($last_name);\r\n $username = escape($username);\r\n $email = escape($email);\r\n $password = escape($password);\r\n\r\n if(email_exists($email)){\r\n return false;\r\n } elseif (username_exists($username)) {\r\n return false;\r\n } else {\r\n $password = password_hash($password, PASSWORD_BCRYPT, array('cost'=>12)); //md5($password);\r\n $validation_code = md5($username . microtime());\r\n\r\n $sql = \"INSERT INTO users(first_name, last_name, username, email, password, validation_code, active)\";\r\n $sql.= \" VALUES('$first_name', '$last_name', '$username', '$email', '$password', '$validation_code', 0)\";\r\n $result = query($sql);\r\n confirm($result);\r\n \r\n $subject = \"Activate account\";\r\n $msg = \" Please click the link below to activate your Account\r\n\r\n <a href=\\\"\".Config::DEV_URL.\"/activate.php?email={$email}&code={$validation_code}\\\">Reset Password</a>\r\n \";\r\n\r\n $headers = \"From: [email protected]\";\r\n\r\n send_email($email, $subject, $msg, $headers);\r\n\r\n return true;\r\n }\r\n return false;\r\n}", "function setUserActive($token) {\n global $mysqli, $db_table_prefix;\n $stmt = $mysqli->prepare(\"UPDATE \" . $db_table_prefix . \"users\n\t\tSET active = 1\n\t\tWHERE\n\t\tactivation_token = ?\n\t\tLIMIT 1\");\n $stmt->bind_param(\"s\", $token);\n $result = $stmt->execute();\n $stmt->close();\n return $result;\n}", "function admin_user_activated($email)\n\t{\n\n\t\tglobal $Oau_auth;\n\t\t$email = sanitize($email);\n\t\t$activated = 1;\n\t\t$query = \"SELECT `admin_Idn` FROM `administrator` WHERE `email` = '$email' AND `active` = '$activated'\";\n\t\t$run_query = mysqli_query($Oau_auth, $query);\n\n\t\tif(mysqli_num_rows($run_query) > 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\n\t}", "function register_user($first_name, $last_name, $username, $password, $email){\n\n // call the escape function to escape the variable \n // to prevent sql injecction \n\n $first_name = escape($first_name); \n $last_name = escape($last_name);\n $username = escape($username);\n $password = escape($password);\n $email = escape($email);\n \n\n // if the user enters an email that is already taken \n // deny the registration\n\n if(email_exists($email)){\n \n return false; \n }\n\n // if the user enters a username that is already taken\n // deny the registration \n else if(username_exists($username)){\n\n return false; \n\n } \n else \n { // if the user information is verified proceed to insertion in the user table \n\n\n // encrypt the message using password to encrypt the message \n $password = password_hash($password, PASSWORD_BCRYPT, array('cost'=>12));\n\n $validation_code = md5($username . microtime()); // create random validation codes\n\n // insert the user information to the user table with the validation code\n // Also make sure that the user activation state is set to 0 for this moment \n $sql = \"INSERT INTO users(first_name, last_name, username, password ,validation_code, active, email)\";\n $sql.= \"VALUES('$first_name','$last_name','$username','$password','$validation_code',0, '$email')\";\n\n $result = query($sql); // send the information\n\n // send a link to the user email with the validation code\n $subject = \"Activate Account\";\n $msg = \"Please click the link below to activate your account \n \n <a href =\\\"\".Config::DEVELOPMENT_URL.\"/activate.php?email=$email&code=$validation_code\\\">\n \n LINK HERE</a>\"; \n \n \n // setup a email header \n $headers = \"From: noreply@localhost\";\n\n // send the link\n send_email($email, $subject, $msg, $headers);\n\n return true;\n \n }\n}", "public function SetBpActivateKey()\n\t{\n\t\tif ($_POST['gr_bp_checkbox'] == 1 && ! empty($_POST['signup_email']))\n\t\t{\n\t\t\t$email = $_POST['signup_email'];\n\t\t\t$emails = get_option($this->GrOptionDbPrefix . 'bp_registered_emails');\n\t\t\t$emails_array = unserialize($emails);\n\t\t\tif ( ! empty($emails_array))\n\t\t\t{\n\t\t\t\tif (is_array($emails_array))\n\t\t\t\t{\n\t\t\t\t\t$emails = array_merge($emails_array, array($email));\n\t\t\t\t\tupdate_option($this->GrOptionDbPrefix . 'bp_registered_emails', serialize($emails));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tupdate_option($this->GrOptionDbPrefix . 'bp_registered_emails', serialize(array($email)));\n\t\t\t}\n\t\t}\n\t}", "public function activateUser(string $activationCode)\n {\n try {\n $user = app(User::class)->where('activation_code', $activationCode)->first();\n if (!$user || $user->status == 1) {\n return redirect()->back()->with('error', 'The code does not exist for any user in our system.');\n }\n $user->status = 1;\n $user->activation_code = null;\n $user->save();\n auth()->login($user);\n } catch (\\Exception $exception) {\n logger()->error($exception);\n return \"Whoops! something went wrong.\";\n }\n return redirect()->route('user.dashboard');\n }", "public function user_unactive() {\n if ($this->input->post('submitRegistration')) {\n $userData = array(\n 'email' => $this->input->post('email'),\n 'token' => md5($this->input->post('email'))\n );\n\n $this->Common_Model->insert($userData, 'wh_user_activations');\n\n $userData['message'] = 'Click the below link to activate your account. <br /><a href=\"' . base_url() . 'Site_Login/activate_account/' . $userData['token'] . '\">Activate</a>';\n $userData['subject'] = 'Account activation';\n\n $result = $this->sendMail($userData);\n if ($result) {\n return true;\n } else {\n return false;\n }\n }\n }", "public function requestact_user($email)\n \t{\n\t//Get user info from email given/check they actually exist\n\t$users = $this->db->query_read_slave(\"\n\t\tSELECT user.userid, user.usergroupid, username, email, activationid, languageid\n\t\tFROM \".TABLE_PREFIX.\"user AS user\n\t\tLEFT JOIN useractivation AS useractivation ON(user.userid = useractivation.userid AND type = 0)\n\t\tWHERE email = '\" . $this->db->escape_string($email) . \"'\"\n\t);\n\t//If they exist then carry on\n\tif ($this->db->num_rows($users))\n\t{\n\t\t//Loop through everyone with the same email address\n\t\twhile ($user = $this->db->fetch_array($users))\n\t\t{\n\t\t\t//Only work on those who are still not activated\n\t\t\tif ($user['usergroupid'] == NOACTIVATION_USERGROUP)\n\t\t\t{ \n\t\t\t\t//If they for some crazy reason do not have an activation ID then...\n\t\t\t\tif (empty($user['activationid']))\n\t\t\t\t{ \n\t\t\t\t\t//Create a new activation ID for the user\n\t\t\t\t\t$user['activationid'] = build_user_activation_id($user['userid'], 2, 0);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//If they already have an activation ID we'll update the current entry with a new ID\n\t\t\t\t\t$user['activationid'] = fetch_random_string(40);\n\t\t\t\t\t$this->db->query_write(\"\n\t\t\t\t\t\tUPDATE \".TABLE_PREFIX.\"useractivation SET\n\t\t\t\t\t\t\tdateline = \" . TIMENOW . \",\n\t\t\t\t\t\t\tactivationid = '$user[activationid]'\n\t\t\t\t\t\tWHERE userid = $user[userid]\n\t\t\t\t\t\t\tAND type = 0\n\t\t\t\t\t\");\n\t\t\t\t}\n\t\t\t\t//Set some required VB variables (for the email)\n\t\t\t\t$userid = $user['userid'];\n\t\t\t\t$username = $user['username'];\n\t\t\t\t$activateid = $user['activationid'];\n\t\t\t\t//Send out activation email, note the custom vbulletin phrase for the \"main\" site!\n\t\t\t\teval(fetch_email_phrases('activateaccount', $user['languageid']));\n\t\t\t\t//Actually send the email\n\t\t\t\tvbmail($user['email'], $subject, $message, true);\n\t\t\t}\n\t\t}\n\t\t//Return as a success\n\t\treturn false;\n\t}\n\telse\n\t{\n\t\treturn \"No account with that email address exists, please try again.\";\n\t}\n\t}", "public function ActivateUser()\n {\n if (false === $this->isActivateUserAllowed()) {\n return;\n }\n\n $oMailProfile = TDataMailProfile::GetProfile('new-registration');\n\n if (null === $oMailProfile) {\n $oMessageManager = TCMSMessageManager::GetInstance();\n $sConsumerName = TCMSTableEditorManager::MESSAGE_MANAGER_CONSUMER;\n $sMessageCode = 'ERROR_ACTIVATE_USER';\n $oMessageManager->AddMessage($sConsumerName, $sMessageCode);\n\n return;\n }\n\n $password = TTools::GenerateNicePassword();\n\n $oMailProfile->AddData('login', $this->oTable->sqlData['login']);\n $oMailProfile->AddData('name', $this->oTable->sqlData['firstname']);\n $oMailProfile->AddData('email', $this->oTable->sqlData['email']);\n $oMailProfile->AddData('password', $password);\n $oMailProfile->ChangeToAddress($this->oTable->sqlData['email'], $this->oTable->sqlData['name']);\n\n $bValidEmail = TTools::IsValidEMail($this->oTable->sqlData['email']);\n $sMessageCode = 'ERROR_ACTIVATE_USER';\n if ($bValidEmail) {\n $oMailProfile->SendUsingObjectView('TDataMailProfile', 'Core');\n\n $filterUtil = $this->getInputFilterUtil();\n $postData = $this->oTable->sqlData;\n foreach ($postData as $key => $value) {\n $valueOfKey = $filterUtil->getFilteredInput($key);\n if (null !== $valueOfKey) {\n $postData[$key] = $valueOfKey;\n }\n }\n\n $postData['crypted_pw'] = $password;\n $postData['crypted_pw_check'] = $password;\n $postData['allow_cms_login'] = '1';\n $this->Save($postData);\n $sMessageCode = 'SUCCESS_ACTIVATE_USER';\n }\n\n $oMessageManager = TCMSMessageManager::GetInstance();\n $sConsumerName = TCMSTableEditorManager::MESSAGE_MANAGER_CONSUMER;\n $oMessageManager->AddMessage($sConsumerName, $sMessageCode);\n }", "function seed_csp4_welcome_screen_do_activation_redirect() {\r\n if ( ! get_transient( '_seed_csp4_welcome_screen_activation_redirect' ) ) {\r\n return;\r\n }\r\n\r\n // Delete the redirect transient\r\n delete_transient( '_seed_csp4_welcome_screen_activation_redirect' );\r\n\r\n // Bail if activating from network, or bulk\r\n if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) {\r\n return;\r\n }\r\n\r\n // Redirect to bbPress about page\r\n wp_safe_redirect( add_query_arg( array( 'page' => 'seed_csp4' ), admin_url( 'admin.php' ) ) );\r\n}", "public function activate()\n {\n $activate = new updates;\n $activate->userid =Auth::User()->id;\n $activate->save();\n\n DB::update('update users set userlevel = ? where id = ?',[2,1]);\n \n return redirect('editor')->with('status',' First id changed');\n }", "public function activateUser($activateCode, UserRepositoryInterface $userRepository)\n {\n try{\n if($userRepository->UserCountWithActivateCode($activateCode) > 0){\n $user = $userRepository->getUserFromActivateCode($activateCode);\n $userRepository->activateUser($user);\n }\n }\n catch(Exception $e){\n throw $e;\n }\n }" ]
[ "0.7236365", "0.7130935", "0.70675623", "0.70266217", "0.69982743", "0.69931304", "0.6957549", "0.69444436", "0.6941962", "0.68534756", "0.6784595", "0.6778454", "0.67268944", "0.6683357", "0.6678812", "0.6661314", "0.6653845", "0.66179186", "0.6600756", "0.65985847", "0.65943235", "0.6572303", "0.65682364", "0.6567788", "0.65584916", "0.65425533", "0.65123785", "0.65000755", "0.64886534", "0.6479106", "0.646443", "0.6447341", "0.64466554", "0.64466554", "0.6441313", "0.64146805", "0.64133304", "0.64016986", "0.6390866", "0.6390698", "0.635976", "0.6309875", "0.63084537", "0.6286062", "0.62766343", "0.6259941", "0.62432605", "0.62376857", "0.62348586", "0.62241584", "0.61962914", "0.61739266", "0.6162318", "0.61531746", "0.6152097", "0.61401206", "0.6129759", "0.6125766", "0.6120114", "0.6115576", "0.6110008", "0.60901994", "0.6089099", "0.6087649", "0.6082029", "0.60771567", "0.60744923", "0.6071535", "0.6069541", "0.60662127", "0.6061413", "0.60579723", "0.6050384", "0.6040471", "0.60403955", "0.60234696", "0.6013818", "0.60106784", "0.60001785", "0.5999682", "0.59946847", "0.599334", "0.5991082", "0.598964", "0.5980707", "0.59691894", "0.59621984", "0.59567255", "0.59364426", "0.59333557", "0.5932491", "0.5928221", "0.59233844", "0.5919564", "0.5916953", "0.59151924", "0.59132886", "0.5897108", "0.58954525", "0.5882206", "0.5878042" ]
0.0
-1
enter activation code twice as logged in user
public function visitActivationUrlTwiceAsGuestTest(FunctionalTester $I){ $user = HelperController::common_login($I, $this->name, $this->email, $this->password); $I->assertFalse( (bool) $user->active); HelperController::logout($I); $I->see( trans( 'text.log_in' ) , '.login_button'); $I->amOnPage( route('account_activation', $user->activation_code )); $I->see( trans('text.activation_successful') ); $I->amOnPage( route('account_activation', $user->activation_code) ); $I->see( trans('text.activate_user_not_found') ); $I->assertTrue( (bool) User::find($user->id)->active); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function users_user_activation($args)\n{\n $code = base64_decode(FormUtil::getPassedValue('code', (isset($args['code']) ? $args['code'] : null), 'GETPOST'));\n $code = explode('#', $code);\n\n if (!isset($code[0]) || !isset($code[1])) {\n return LogUtil::registerError(__('Error! Could not activate your account. Please contact the site administrator.'));\n }\n $uid = $code[0];\n $code = $code[1];\n\n // Get user Regdate\n $regdate = pnUserGetVar('user_regdate', $uid);\n\n // Checking length in case the date has been stripped from its space in the mail.\n if (strlen($code) == 18) {\n if (!strpos($code, ' ')) {\n $code = substr($code, 0, 10) . ' ' . substr($code, -8);\n }\n }\n\n if (DataUtil::hash($regdate, 'md5') == DataUtil::hash($code, 'md5')) {\n $returncode = pnModAPIFunc('Users', 'user', 'activateuser',\n array('uid' => $uid,\n 'regdate' => $regdate));\n\n if (!$returncode) {\n return LogUtil::registerError(__('Error! Could not activate your account. Please contact the site administrator.'));\n }\n LogUtil::registerStatus(__('Done! Account activated.'));\n return pnRedirect(pnModURL('Users', 'user', 'loginscreen'));\n } else {\n return LogUtil::registerError(__('Sorry! You entered an invalid confirmation code. Please correct your entry and try again.'));\n }\n}", "function activate()\n {\n $user_id\t\t= $this->uri->segment(3);\n $new_email_key\t= $this->uri->segment(4);\n\n // Activate user\n if ($this->tank_auth->activate_user($user_id, $new_email_key)) {\t\t// success\n $this->tank_auth->logout();\n $this->_show_message($this->lang->line('auth_message_activation_completed').' '.anchor('/auth/login/', 'Login'));\n\n } else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n $this->_show_message($this->lang->line('auth_message_activation_failed'));\n }\n }", "public function activate($code)\n {\n if (Auth::check())\n {\n return Redirect::to('/');\n }\n\n\n $user = User::where('code', '=', $code)->where('active', '=', 0);\n\n if ($user->count())\n {\n $user = $user->first();\n\n //update user to active state\n $user->active = 1;\n $user->code = '';\n\n if ($user->save())\n {\n\n return Redirect::route('log')\n ->with('success', 'Your account is activated. Now you can sign in.');\n }\n }\n\n return Redirect::route('log')\n ->with('success', 'WE could not activate your account. Try again later.');\n\n }", "function activate()\n\t{\n\t\t$user_id\t\t= $this->uri->segment(3);\n\t\t$new_email_key\t= $this->uri->segment(4);\n\n\t\t// Activate user\n\t\tif ($this->tank_auth->activate_user($user_id, $new_email_key)) {\t\t// success\n\t\t\t$this->tank_auth->logout();\n\t\t\t//$this->_show_message($this->lang->line('auth_message_activation_completed').' '.anchor('/auth/login/', 'Login'));\n\t\t\t$this->session->set_flashdata('message', $this->lang->line('auth_message_activation_completed'));\n\t\t\t\t\t\tredirect('/auth/login');\n\n\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n\t\t\t$this->session->set_flashdata('message', $this->lang->line('auth_message_activation_failed'));\n\t\t\tredirect('/auth/login');\n\t\t\t//$this->_show_message($this->lang->line('auth_message_activation_failed'));\n\t\t}\n\t}", "function activate()\n\t{\n\t\t$user_id\t\t= $this->uri->segment(3);\n\t\t$new_email_key\t= $this->uri->segment(4);\n\n\t\t// Activate user\n\t\tif ($this->tank_auth->activate_user($user_id, $new_email_key))\n\t\t{\n\t\t\t// success\n\t\t\t//Add it into newletter\n\t\t\t$user = $this->database->GetUserById($user_id);\n\t\t\tadd_subscriber($user['email'], $user['username']);\n\t\t\t\n\t\t\t$this->tank_auth->logout();\n\t\t\t$this->_show_message($this->lang->line('auth_message_activation_completed').' '.anchor('/auth/login/', 'Login'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// fail\n\t\t\t$this->_show_message($this->lang->line('auth_message_activation_failed'));\n\t\t}\n\t}", "public function activate_user() {\n global $database;\n $sql = \"UPDATE user SET is_active = 1 WHERE id = \";\n $sql .= $database->escape_value($this->id);\n $database->query($sql);\n }", "public function activate(){\r\n\t\t$uid = $_GET[\"uid\"];\r\n\t\t$hash = $_GET[\"hash\"];\r\n\r\n\t\tif(User::activateUser($uid, $hash)){\r\n\t\t\techo \"active\";\r\n\t\t\tUser::loginSystem(User::fromUid($uid));\r\n\t\t}\r\n\t\tPage::redirect(\"/index\");\r\n\t}", "function activateUser() {\n if (isset($_GET['account'])) {\n $account = htmlspecialchars($_GET['account'], ENT_QUOTES);\n \n connectDatabase();\n \n $result = queryDatabase(\"SELECT email\n FROM user\n WHERE active = 0\");\n\n if (mysql_num_rows($result) > 0){\n while ($row = mysql_fetch_object($result)) {\n if ($account == crypt($row->email, SALT)) {\n queryDatabase(\"UPDATE user SET active = 1\n WHERE email = '$row->email'\");\n \n echo '<div class=\"good\">Activation successful - Login using EMAIL/USER ID and PASSWORD</div>';\n \n break;\n }\n }\n }\n }\n}", "public function getActivate($code){\n $user = Admin::where('activate_code', '=', $code)->where('active', '=', 0);\n\t\tif ($user->count()){\n\t\t\t$user = $user->first();\n\n\t\t\t$user->active = 1;\n\t\t\t$user->activate_code = '';\n\t\t\t\n\t\t\tif ($user->save()){\n\t\t\t return Redirect::secure('9gag-admin/login')->with('global', 'Congrats! We have activated your account');\n }\n \n }\n \n return Redirect::secure('/9gag-admin/login')\n ->with('global', 'we could not activate your account, \n try again late!');\n \n die();\n }", "function activate_user(){\n\n // use the get request since the user information \n // has been post \n if($_SERVER['REQUEST_METHOD'] == \"GET\"){\n\n if(isset($_GET['email'])) {\n \n $email = clean($_GET['email']);\n $validation_code = clean($_GET['code']);\n \n // select the user in the database \n $sql = \"SELECT id FROM users WHERE email ='\".escape($_GET['email']).\"' AND validation_code = '\".escape($_GET['code']).\"'\";\n $result = query($sql); // get the result \n\n // if the user exists in the database, activate the account by updating active by 1\n // Then the user is redirected to the login page to login \n if(row_count($result)==1){\n\n $sql2 = \"UPDATE users SET active = 1, validation_code = 0 WHERE email = '\".escape($email).\"' AND validation_code = '\".escape($validation_code).\"'\";\n $result2 = query($sql2);\n\n set_message(\"<p class='bg-success'> Your account has been activated please login</p>\");\n \n redirect(\"login.php\");\n }\n else{ // if the user is not activated display an error message\n // and redirect the user to the login page\n\n set_message(\"<p class='bg-danger'> Sorry Your account has not been activated</p>\");\n \n redirect(\"register.php\"); \n\n } \n }\n\n} // GET \n\n}", "function activate_user()\n{\n if($_SERVER['REQUEST_METHOD'] == \"GET\"){\n if(isset($_GET['email'])){\n $email=clean($_GET['email']);\n $validation_code=clean($_GET['code']);\n $sql=\"SELECT id FROM users WHERE email='\".escape($_GET['email']).\"' AND validation_code='\".escape($_GET['code']).\"'\";\n $result=query($sql);\n if(row_count($result)==1){\n $sql2=\"UPDATE users SET active=1, validation_code=0 WHERE email='\" .escape($email).\"' AND validation_code='\".escape($validation_code).\"'\";\n $result2=query($sql2);\n set_message(\"<p class='bg-success'>Your account has been activated please login</p>\");\n redirect(\"login.php\");\n }else{\n set_message(\"<p class='bg-danger'>Your account could not be activated</p>\");\n redirect(\"login.php\");\n }\n\n }\n\n\n }\n}", "public function activate(){\r\n\t\t$id = $this->uri->segment(3);\r\n\t\t$code = $this->uri->segment(4);\r\n\r\n\t\t//fetch requests details\r\n\t\t$request = $this->requests_model->getRequestById($id);\r\n \r\n\r\n\t\t//if code matches\r\n\t\tif($request['code'] == $code){\r\n\t\t\t//update user active status\r\n\t\t\t// $data['activate'] = true;\r\n\t\t\t$query = $this->accounts_model->updateActivate($id);\r\n\r\n\t\t\tif($query){\r\n\r\n\t\t\t\t$row = $this->accounts_model->getCheckUser($request['email']);\r\n\r\n\t\t\t\t$this->session->set_userdata('is_user', $row['type']);\r\n\t\t\t\t$this->session->set_userdata('myName', \t$row['firstname'].\" \".$row['lastname']);\r\n\t\t\t\t$this->session->set_userdata('myEmail', $row['email']);\r\n\t\t\t\t$this->session->set_userdata('myId', \t$row['id']);\r\n\t\t\t\t$this->session->set_userdata('myRole', \t$row['role']);\r\n\r\n\t\t\t\t$this->session->set_flashdata('msg', 'User activated successfully');\r\n\t\t\t\tredirect('main');\r\n\r\n\t\t\t}\r\n\t\t\telse{\r\n\r\n\t\t\t\t$this->session->set_flashdata('error_msg', 'Something went wrong in activating account');\r\n\t\t\t\tredirect('login'); \r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\t\t\t\r\n\t\t\t$this->session->set_flashdata('error_msg', 'Cannot activate account. Code didnt match');\r\n\t\t\tredirect('login'); \r\n\t\t}\r\n \r\n\t}", "public function activation($code, $language=\"en\"){\n\t\tif($this->check_activity($code)){\n\t\t//User validation passes\n\t\t\t$data = array(\n\t\t\t'account_active' => '1',\n\t\t\t);\n\n\t\t\t$this->save($data, $id);\n\t\t\t//Sets up notification and redirecting\n\t\t\t$this->session->set_flashdata('activation', true);\n\t\t\tredirect($language.'/home/activate', 'refresh');\n\t\t}\n\t\t//User validation fails\n\t\t//Sets up error reporting and redirecting\n\t\t$this->session->set_flashdata('activation', false);\n\t\tredirect($language.'/home/activate', 'refresh');\n\t\t}", "function activate($key)\n {\n // activate account\n $result = $this->user_model->activate_account($key);\n \n switch($result)\n {\n case 0: // If activation key not matched with any account\n $msg = 'No account is related with this activation key, either your account is already activated or key is expired !!!'; \n $type = \"danger\";\n break;\n \n case 1: // Account activated\n $msg = 'Congratulations, your account is activated now. Login here';\n $type = \"success\"; \n break;\n \n case 2: // Activation key expired\n $msg = 'Activation key expired, create new account.';\n $type = \"warning\";\n break; \n \n default:\n break;\n \n }\n\n // set notification message to show on page\n $this->base->set_message($msg, $type); \n \n $this->index();\n\n return true;\n }", "public static function activate($value){\n\t\t$token = new Token($value);\n\t\t$hashed_token = $token->getHash();\n\t\t\n\t\t$sql = 'UPDATE users \n\t\t\t\tSET is_active = 1,\n\t\t\t\t\tactivation_hash = NULL \n\t\t\t\tWHERE activation_hash = :hashed_token';\n\t\t$db = static::getDB();\n\t\t$stmt = $db->prepare($sql);\n\t\t$stmt->bindValue(':hashed_token', $hashed_token, PDO::PARAM_STR);\n\t\t$stmt->execute();\n\t}", "public function getActivate($code) {\n\n\n\t$user = User::where('code' , '=' , $code)->where('active' , '=' ,0);\n\n\tif($user->count()) {\n\t\t$user = $user->first();\n\n\t\t// update user activate \n\t\t$user->active = 1;\n\t\t$user->code = '';\n\t\t if($user->save()) {\n\n\n\t\t \treturn Redirect::to('users/index')->with('yes' , 'account activate done u can now login ');\n\n\n\t\t }\n\t}\n\n\treturn Redirect::to('users/index')->with('yes' , 'we coulnt activate ur account yet pleas try again later ');\n\n}", "public function actionActivation() {\n\t\t$email = NData::base64UrlDecode($_GET['e']);\n\t\t$activekey = $_GET['activekey'];\n\t\tif ($email&&$activekey) {\n\t\t\t$user = UserModule::userModel()->notsafe()->findByAttributes(array('email'=>$email));\n\t\t\tif(isset($user) && $user->email_verified == 0 && $user->status == 1){\n\t\t\t\t// user is active but has not verified his email\n\t\t\t\t$user->email_verified = 1;\n\t\t\t\t$user->save();\n\t\t\t\t$this->render('message',array('title'=>UserModule::t(\"Email Verfied\"),'content'=>UserModule::t(\"Thank you! We now know you are you!\")));\n\t\t\t} elseif (isset($user) && $user->status==1 && $user->email_verified==1) {\n\t\t\t $this->render('message',array('title'=>UserModule::t(\"User activation\"),'content'=>UserModule::t(\"Your account is active.\")));\n\t\t\t} elseif(isset($user->activekey) && $this->checkActivationKey($user, $activekey)) {\n\t\t\t\t$user->activekey = crypt(microtime());\n\t\t\t\t$user->status = 1;\n\t\t\t\t$user->email_verified = 1;\n\t\t\t\t$user->save();\n\t\t\t $this->render('activation');\n\t\t\t\t$e = new CEvent($this, array('user'=>$user));\n\t\t\t\tUserModule::get()->onActivation($e);\n\t\t\t} else {\n\t\t\t $this->render('message',array('title'=>UserModule::t(\"User activation\"),'content'=>UserModule::t(\"Incorrect activation URL.\")));\n\t\t\t}\n\t\t} else {\n\t\t\t$this->render('message',array('title'=>UserModule::t(\"User activation\"),'content'=>UserModule::t(\"Incorrect activation URL.\")));\n\t\t}\n\t}", "function resend_activation($login){\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\t\t\n\t\t$activation_key = md5(rand().microtime());\n\t\t//if ($query = $this->ci->user_temp->get_login($login) AND $query->num_rows() == 1) {\n\t\tif ($query = $this->ci->users->get_login($login) AND $query->num_rows() == 1) {\n\t\t\t$row = $query->row();\n\t\t\t//$this->ci->user_temp->update_temp(array('email' => $row->email),array('activation_key' =>$activation_key ));\n\t\t\t$this->ci->users->update(array('email' => $row->email),array('activation_key' =>$activation_key ));\n\t\t\t$from = isset($this->settings['site_email']) && $this->settings['site_email'] ? $this->settings['site_email']:$this->ci->config->item('DX_webmaster_email');\n\t\t\t\n\t\t\t\n\t\t\t$subject = sprintf($this->ci->lang->line('auth_activate_subject'), $this->ci->config->item('DX_website_name'));\n\t\t\t$new_user = (array)$row;\n\t\t\t$hash = base64_encode($new_user['email'].'_'.$activation_key);\n\t\t\t$new_user['activate_url'] = site_url($this->ci->config->item('DX_activate_uri').$hash);\n\t\t\t\t\n\t\t\t// Trigger event and get email content\n\t\t\t$this->sending_activation_email($new_user, $message);\n\n\t\t\t// Send email with activation link\n\t\t\t$mailrs = $this->_email($row->email, $from, $subject, $message);\n\t\t\tif($mailrs){\n\t\t\t\treturn 'Activation link sent to your account email';\n\t\t\t} else {\n\t\t\t\treturn 'There is some issue to send email. Please contact to site admin';\n\t\t\t}\n\t\t} else {\n\t\t\treturn 'User with login <strong>'.$login.'</strong> does not exist';\n\t\t}\n\t}", "public function activateAction()\n {\n $process = User::activate($this->route_params['token']);\n\n if($process){\n Flash::addMessage('Account activated successfully','success');\n $this->redirect('/Login/index');\n }else{\n Flash::addMessage('Oops! Can\\'t activate your account. Activation link is too old or wrong.','danger');\n $this->redirect('/register/activation');\n }\n\n\n }", "function activate_account_via_email_link() {\r\n\t\t\tif ( isset($_REQUEST['act']) && $_REQUEST['act'] == 'activate_via_email' && isset($_REQUEST['hash']) && is_string($_REQUEST['hash']) && strlen($_REQUEST['hash']) == 40 &&\r\n\t\t\t isset($_REQUEST['user_id']) && is_numeric($_REQUEST['user_id']) ) { // valid token\r\n\r\n\t\t\t\t$user_id = absint( $_REQUEST['user_id'] );\r\n\t\t\t\tdelete_option( \"um_cache_userdata_{$user_id}\" );\r\n\r\n\t\t\t\tum_fetch_user( $user_id );\r\n\r\n\t\t\t\tif ( strtolower($_REQUEST['hash']) !== strtolower( um_user('account_secret_hash') ) )\r\n\t\t\t\t\twp_die( __( 'This activation link is expired or have already been used.','ultimate-member' ) );\r\n\r\n\t\t\t\tUM()->user()->approve();\r\n\t\t\t\t$redirect = ( um_user('url_email_activate') ) ? um_user('url_email_activate') : um_get_core_page('login', 'account_active');\r\n\t\t\t\t$login = (bool) um_user('login_email_activate');\r\n\r\n\t\t\t\t// log in automatically\r\n\t\t\t\tif ( ! is_user_logged_in() && $login ) {\r\n\t\t\t\t\t$user = get_userdata($user_id);\r\n\t\t\t\t\t$user_id = $user->ID;\r\n\r\n\t\t\t\t\t// update wp user\r\n\t\t\t\t\twp_set_current_user( $user_id, $user->user_login );\r\n\t\t\t\t\twp_set_auth_cookie( $user_id );\r\n\r\n\t\t\t\t\tob_start();\r\n\t\t\t\t\tdo_action( 'wp_login', $user->user_login, $user );\r\n\t\t\t\t\tob_end_clean();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tum_reset_user();\r\n\t\t\t\t/**\r\n\t\t\t\t * UM hook\r\n\t\t\t\t *\r\n\t\t\t\t * @type action\r\n\t\t\t\t * @title um_after_email_confirmation\r\n\t\t\t\t * @description Action on user activation\r\n\t\t\t\t * @input_vars\r\n\t\t\t\t * [{\"var\":\"$user_id\",\"type\":\"int\",\"desc\":\"User ID\"}]\r\n\t\t\t\t * @change_log\r\n\t\t\t\t * [\"Since: 2.0\"]\r\n\t\t\t\t * @usage add_action( 'um_after_email_confirmation', 'function_name', 10, 1 );\r\n\t\t\t\t * @example\r\n\t\t\t\t * <?php\r\n\t\t\t\t * add_action( 'um_after_email_confirmation', 'my_after_email_confirmation', 10, 1 );\r\n\t\t\t\t * function my_after_email_confirmation( $user_id ) {\r\n\t\t\t\t * // your code here\r\n\t\t\t\t * }\r\n\t\t\t\t * ?>\r\n\t\t\t\t */\r\n\t\t\t\tdo_action( 'um_after_email_confirmation', $user_id );\r\n\r\n\t\t\t\texit( wp_redirect( $redirect ) );\r\n\r\n\t\t\t}\r\n\r\n\t\t}", "function account_activation($account_act_code='') {\n\n\t\tif( $this->authentication->is_user_logged_in() ) {\n\n\t\t\tredirect('home');\n\t\t}\n\n\t\t$this->mcontents['title']\t\t\t= 'Account Activation';\n\t\t$this->mcontents['page_heading']\t= 'Account Activation';\n\n\t\tif( !$account_act_code ) {\n\n\t\t\tredirect('home');\n\t\t}\n\n\t\t$this->load->model('common_model');\n\t\t$aResult = $this->common_model->isValidToken($account_act_code, 'account_activation');\n\t\t$aTokenStatus = c('token_status');\n\n\t\tif( $aResult['status'] != $aTokenStatus['valid'] ) {\n\n\t\t\t//find the reason why this token is not valid\n\t\t\tif( $aResult['status'] == $aTokenStatus['invalid'] ) {\n\n\t\t\t\tsf('error_message', 'Invalid Link. Please contact out support team');\n\t\t\t} elseif($aResult['status'] == $aTokenStatus['expired']) {\n\n\t\t\t\tsf('error_message', 'This link has expired. Click <a class=\"highlight1\" href=\"'.c('base_url').'user/resend_account_activation/'.$account_act_code.'\">here</a> to get another confirmation email');\n\t\t\t}\n\n\t\t\tredirect('home');\n\n\t\t} else {\n\n\t\t\t//activate the account\n\t\t\tif(true === $this->account_model->activateAccount($aResult['oToken']->user_id)){\n\n\t\t\t\t//delete the token\n\t\t\t\t$this->common_model->deleteToken($aResult['oToken']->id);\n\n\n\t\t\t\tif(!$this->authentication->makeLogin($aResult['oToken']->user_id)){\n\n\t\t\t\t\tsf('error_message', 'You could not be logged in. Please contact out admin');\n\t\t\t\t} else {\n\n\t\t\t\t\t// Send welcome message\n\t\t\t\t\t$this->load->model('maintenance_model');\n\t\t\t\t\t$this->maintenance_model->getSingleSetting('db_welcome_msg');\n\t\t\t\t\t$aWelcomeEmail['receiver_name'] = s('FULL_NAME');\n\t\t\t\t\t$aWelcomeEmail['welcome_text'] \t= $this->maintenance_model->getSingleSetting('db_signup_welcome_msg');\n\n\t\t\t\t\t$aSettings = array(\n\t\t\t\t\t\t'to' \t\t\t\t=> array(s('EMAIL') => s('FULL_NAME')), // email_id => name pairs\n\t\t\t\t\t\t'from_email' \t\t=> c('accounts_email_id'),\n\t\t\t\t\t\t'from_name'\t\t\t=> c('accounts_email_from'),\n\t\t\t\t\t\t'reply_to' \t\t\t=> array(c('accounts_email_id') => c('accounts_email_from')), // email_id => name pairs\n\t\t\t\t\t\t'email_contents' \t=> $aWelcomeEmail, // placeholder keywords to be replaced with this data\n\t\t\t\t\t\t'template_name' \t=> 'welcome', //name of template to be used\n\t\t\t\t\t\t//'preview'\t\t\t=> true\n\t\t\t\t\t);\n\n\t\t\t\t\t$this->load->helper('custom_mail');\n\t\t\t\t\tsendMail_PHPMailer($aSettings);\n\n\t\t\t\t\tsf('success_message', 'Account has been activated. Welcome to '.$this->mcontents['c_website_title']);\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tsf('error_message', 'Could not activate!!');\n\t\t\t}\n\n\n\t\t\tredirect('home');\n\t\t}\n\t}", "public function activateAccount()\n {\n // Récupération des variables nécessaires à l'activation\n $email = $_GET['email'];\n $activation_key = $_GET['key'];\n // On active le compte\n $activation = $this->Members->activateAccount($email, $activation_key);\n\n // Préparation de la page\n $page = new Page(array(\n 'title' => 'Inscription réussie',\n 'class_body' => 'signin'\n ));\n // Rendu du contenu\n $variables = compact('activation');\n $content = $this->render('members/signin/validation.php', $variables);\n // Rendu de la page\n echo $page->render($content);\n }", "public function activate_account(){\n $db = \\Config\\Database::connect();\n $m = $db->table('ff_users');\n\n $uri = service('uri');\n $id = $uri->getsegment('2');\n\n $q = ask_db('user_id','ff_users',['random_key'=>\"'$id'\"]);\n\n if(!empty($q)){\n $data = ['is_active' =>'1'];\n\n $m->where('random_key', $id);\n $m->update($data);\n\n $_SESSION['success'] = 'Account is successfully activated';\n } else {\n $_SESSION['error'] = 'There was an error in activating your account, kindly respond to the activation email';\n }\n\n\n\n return redirect('login');\n\n\n }", "public function getActivate($code){\n\t\t\n\t\t//find the user where activate_code is same and active is false\n\t\t$user =\tUser::where('activate_code','=',$code);\n\n\t\t//If user found\n\t\tif($user->count()){\n\t\t\t\n\t\t\t//get user data\n\t\t\t$user=$user->first();\n\t\t\t\n\t\t\t//update user active state\n\t\t\t$user->active\t\t\t=\t1;\n\t\t\t$user->activate_code\t=\t'';\n\n\t\t\t//save to db\n\t\t\tif($user->save()){\n\t\t\t\t//redirect to login page with success msg\n\t\t\t\treturn Redirect::route('account-login')->with('account-active-msg','<div class=\"alert alert-info\" role=\"alert\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"glyphicon glyphicon-info-sign\" aria-hidden=\"true\"></span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAccount has been activated. <br/>You can login now.\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>');\n\t\t\t}\n\t\t}\n\n\t\t//redirect to login page with alternative success msg\n\t\treturn Redirect::route('account-login')->with('account-active-msg','<div class=\"alert alert-info\" role=\"alert\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"glyphicon glyphicon-info-sign\" aria-hidden=\"true\"></span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tYour account already activated. <br/>You can login now.\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>');\n\t}", "public static function mjj_salt_activate(){\n\t\tself::mjj_get_salt();\n\t\treturn;\n\t}", "public function actionActivate()\n {\n $username = $this->prompt(Console::convertEncoding(Yii::t('app', 'Username')) . ':', [\n 'required' => true\n ]);\n $model = $this->findModel($username);\n $model->status = User::STATUS_ACTIVE;\n $model->removeEmailConfirmToken();\n $this->log($model->save());\n }", "public function handleActivationCode($user, $code) {\n $uac = UserActivationCode::where('user_id', $user->id)\n ->where('code', $code)\n ->orderBy('expiration', 'DESC')\n ->first();\n if ($uac) {\n if ($uac->expiration < time()) {\n return \"Your code is expired. Please try to get verification code by clicking send email link.\";\n }\n $user->status = config('sc.user_status.active');\n $user->save();\n $uac->forceDelete();\n return true;\n }\n\n return \"Invalid Activation Code\";\n }", "function psswrdhsh_activate()\n{\n\tglobal $lang, $mybb;\n\n\tif (psswrdhsh_core_edits('activate') === false) {\n\t\tpsswrdhsh_uninstall();\n\n\t\tflash_message($lang->error_pwh_activate, 'error');\n\t\tadmin_redirect('index.php?module=config-plugins');\n\t}\n\t\n\t// assume core edits succeeded\n\t\n\tif ($mybb->settings['regtype'] == \"randompass\") {\n\t\t\n\t\t// Sending the user a random password, which thus becomes _their_ password\n\t\t// for at least some amount of time, in plain text across media that may or\n\t\t// may not be secure and/or confidential is just an absolutely braindamaged\n\t\t// idea that should never, ever be used on a modern site. </endrant>\n\n\t\t$decent_regtype_optionscode = \"select\ninstant=Instant Activation\nverify=Send Email Verification\nadmin=Administrator Activation\nboth=Email Verification & Administrator Activation\";\n\t\t\n\t\t\n\t\t$db->update_query(\"settings\", [\"value\" => \"verify\"], \"name = 'regtype'\");\n\t\t$db->update_query(\"settings\", [\"optionscode\" => $decent_regtype_optionscode], \"name = 'regtype'\");\n\t\trebuild_settings();\n\t}\n\t\n\tif (!$mybb->settings[\"requirecomplexpasswords\"]) {\n\t\t$db->update_query(\"settings\", [\"value\" => 1], \"name = 'requirecomplexpasswords'\");\n\t\trebuild_settings();\n\t}\n\t\n\t// Since we're requiring complex passwords, the min length should already be\n\t// considered 8 in the core, so that part is alright. But let's remove the unnecessary\n\t// ceiling to the password length, since bcrypt will work with the first 72\n\t// characters of input and 72 bytes really isn't all that much data to send.\n\t\n\tif ($mybb->settings[\"maxpasswordlength\"] < 72) {\n\t\t$db->update_query(\"settings\", [\"value\" => 72], \"name = 'maxpasswordlength'\");\n\t\trebuild_settings();\n\t}\n\t\n\t// redirect back informing the admin of any settings we changed\n\tflash_message($lang->pwh_activate_regtype_changed, 'error');\n\tadmin_redirect('index.php?module=config-plugins');\n}", "static public function tryToActivateAccount() {\r\n\t\tDB::getInstance()->stopAddingAccountID();\r\n\t\t$Account = DB::getInstance()->query('SELECT id FROM `'.PREFIX.'account` WHERE `activation_hash`='.DB::getInstance()->escape($_GET['activate']).' LIMIT 1')->fetch();\r\n\t\tDB::getInstance()->startAddingAccountID();\r\n\r\n\t\tif ($Account) {\r\n\t\t\tDB::getInstance()->update('account', $Account['id'], 'activation_hash', '');\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "public function activationCode();", "public function activate($data)\n {\n $this->view->title = \"Activate | Frindse\";\n $this->view->version = SITE_TEMPLATES_VER;\n $this->view->stylesheet = \"signup\";\n $this->view->javascript = \"Signup\";\n $this->view->header = \"header-logged-out\";\n\n // Now create the view\n $check = $this->db->prepare(\"SELECT * FROM users WHERE email=:email AND user_salt=:code AND activated='0'\");\n $check->execute(array(':email'=>$data['email'], ':code'=>$data['code']));\n\n if($check->rowCount() == 1)\n {\n $fetch = $check->fetch(PDO::FETCH_ASSOC);\n\n // Plus vars\n $this->view->firstname = $fetch['firstname'];\n $this->view->email = $fetch['email'];\n $this->view->code = $fetch['user_salt'];\n\n $this->view->render('signup', 'activate', SITE_TEMPLATES_VER);\n }else{\n Redirect::to('errors', '404');\n }\n }", "public function activate()\n {\n $response = $this->response();\n /* le hash de l'email */\n $emailHash = $this->uri->segment(3);\n /* le log d'activation */\n $logID = $this->uri->segment(4);\n if ($this->oauth_web->activate($emailHash, $logID)) {\n redirect();\n // $response[\"status\"] = true;\n }\n // $this->output->set_output(json_encode($response));\n }", "private static function single_activate() {\n\t\t// @TODO: Define activation functionality here\n\t}", "private static function single_activate() {\n\t\t// @TODO: Define activation functionality here\n\t}", "function protection_code_activation() {\n\t\n\t}", "public static function setUserActivationCode($userId, $activationCode){\r\n Doctrine_Query::create()->update('Users')\r\n ->set('ActivationCode',\"'\".$activationCode.\"'\")\r\n ->where('Id = ? ',$userId)\r\n ->execute();\r\n return true;\r\n }", "function activate()\n {\n if (empty($this->userID)) $this->error('No user is loaded', __LINE__);\n if ( $this->is_active()) $this->error('Allready active account', __LINE__);\n $res = $this->db->query(\"UPDATE \".$this->usertable.\" SET \".$this->user_active.\" = 1 \n\tWHERE \".$this->user_id.\" = '\".$this->escape($this->userID).\"' LIMIT 1\");\n if (@count($res) == 1)\n\t{\n\t\t$this->userData[$this->user_active] = true;\n\t\treturn true;\n\t}\n\treturn false;\n }", "public function active_user($db,$data) {\n\n $sql=\"UPDATE user SET activate=true where token='$data'\";\n return $db->ejecutar($sql);\n }", "public function activateUser($request)\r\n {\r\n /*\r\n * When registration has done you must activate your account to log in.\r\n * (Application will show you message \"You must confirm account\")\r\n */\r\n\r\n\r\n /*\r\n * In database we want to set field IsActivated to '1'\r\n */\r\n $params = [\r\n 'IsActivated' => '1'\r\n ];\r\n\r\n /*\r\n * Update row in user table where Activativon ==$request['activation']<---\r\n */\r\n $this->primary = 'Activation';\r\n $this->update($request['activation'], $params);\r\n\r\n }", "function support_dynamo_first_activation() {\n wp_redirect(get_bloginfo('wpurl').'/wp-admin/admin.php?page=dynamo_support_&view=account');\n }", "public function signup()\n {\n $id = (int) Input::get(\"id\");\n $md5 = Input::get(\"secret\");\n if (!$id || !$md5) {\n Redirect::autolink(URLROOT, Lang::T(\"INVALID_ID\"));\n }\n $row = Users::getPasswordSecretStatus($id);\n if (!$row) {\n $mgs = sprintf(Lang::T(\"CONFIRM_EXPIRE\"), Config::TT()['SIGNUPTIMEOUT'] / 86400);\n Redirect::autolink(URLROOT, $mgs);\n }\n if ($row['status'] != \"pending\") {\n Redirect::autolink(URLROOT, Lang::T(\"ACCOUNT_ACTIVATED\"));\n die;\n }\n if ($md5 != $row['secret']) {\n Redirect::autolink(URLROOT, Lang::T(\"SIGNUP_ACTIVATE_LINK\"));\n }\n $secret = Helper::mksecret();\n $upd = Users::updatesecret($secret, $id, $row['secret']);\n if ($upd == 0) {\n Redirect::autolink(URLROOT, Lang::T(\"SIGNUP_UNABLE\"));\n }\n Redirect::autolink(URLROOT . '/login', Lang::T(\"ACCOUNT_ACTIVATED\"));\n }", "function activateMember($username, $password, $code, $adv=0)\r\n\t{\r\n\t\t$username = funcs::check_input($username);\r\n\t\t$password = funcs::check_input($password);\r\n\t\t$code = funcs::check_input($code);\r\n\t\t$adv = funcs::check_input($adv);\r\n\r\n\t\t$sql = \"SELECT COUNT(*) FROM \".TABLE_MEMBER.\"\r\n\t\t\t\t\tWHERE \".TABLE_MEMBER_USERNAME.\"='\".$username.\"'\r\n\t\t\t\t\t\tAND \".TABLE_MEMBER_PASSWORD.\"='\".$password.\"'\r\n\t\t\t\t\t\tAND \".TABLE_MEMBER_VALIDATION.\"='\".$code.\"'\r\n\t\t\t\t\t\tAND \".TABLE_MEMBER_ISACTIVE.\"=0\r\n\t\t\t\t\t\tAND signin_datetime = '0000-00-00 00:00:00'\";\r\n\t\t$row = DBconnect::get_nbr($sql);\r\n\r\n\t\tif($row > 0)\r\n\t\t{\r\n\t\t\t$vcode = funcs::randomPassword(6);\r\n\t\t\t$sql = \"UPDATE \".TABLE_MEMBER.\" SET \".TABLE_MEMBER_ISACTIVE.\"=1, coin='\".FREECOINS.\"', validation_code = '$vcode', isactive_datetime=NOW()\r\n\t\t\t\t\t\tWHERE \".TABLE_MEMBER_USERNAME.\"='\".$username.\"' LIMIT 1\";\r\n\t\t\tDBconnect::execute($sql);\r\n\r\n\t\t\t$userid = funcs::getUserid($username);\r\n\t\t\t//INSERT COIN LOG\r\n\t\t\t$coinVal = funcs::checkCoin($username);\r\n\t\t\t$sqlAddCoinLog = \"INSERT INTO coin_log (member_id, send_to, coin_field, coin, coin_remain, log_date) VALUES ('1','$userid','Activate Member',\".FREECOINS.\",\".$coinVal.\", NOW())\";\r\n\t\t\tDBconnect::execute($sqlAddCoinLog);\r\n\r\n\t\t\t$subject = funcs::getText($_SESSION['lang'], '$first_time_inbox_subject');\r\n\t\t\t$message = funcs::getText($_SESSION['lang'], '$first_time_inbox_message');\r\n\t\t\t$sql = \"INSERT INTO \".TABLE_MESSAGE_INBOX.\"\r\n\t\t\t\t\tSET \".TABLE_MESSAGE_INBOX_TO.\"=\".$userid.\",\r\n\t\t\t\t\t\".TABLE_MESSAGE_INBOX_FROM.\"=2,\r\n\t\t\t\t\t\".TABLE_MESSAGE_INBOX_SUBJECT.\"='\".mysql_real_escape_string($subject).\"',\r\n\t\t\t\t\t\".TABLE_MESSAGE_INBOX_MESSAGE.\"='\".mysql_real_escape_string($message).\"',\r\n\t\t\t\t\t\".TABLE_MESSAGE_INBOX_DATETIME.\"='\".funcs::getDateTime().\"'\";\r\n\t\t\tDBconnect::execute($sql);\r\n\r\n\t\t\tfuncs::preventMultipleRegister($username);\r\n\r\n\t\t\t#Pakin Change this function\r\n\t\t\tself::NewSorting($username);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "public function activateAction()\r\n {\r\n\t\tUser::activate($this->route_params['token']);\r\n\t\t\r\n\t\t$this->user = Auth::getUser();\r\n\r\n $this->redirect('/signup/activated');\r\n }", "public function reActivate()\n {\n $response = $this->response();\n $config = [\n ['field' => 'userid', 'label' => '', 'rules' => 'trim|required|integer'],\n ['field' => 'activationemail', 'label' => '', 'rules' => 'trim|required|min_length[4]|max_length[100]|valid_email']\n ];\n $this->form_validation->set_rules($config);\n if ($this->form_validation->run() === false) {\n $response[\"errors\"] = $this->form_validation->error_array();\n $this->output->set_output(json_encode($response));\n return false;\n }\n $userID = $this->input->post('userid');\n $email = $this->input->post('activationemail');\n if ($this->oauth_web->reActivate($userID, $email) === true) {\n $response[\"status\"] = true;\n $response[\"msg\"] = $this->lang->line(\"reActivate_ok\");\n }\n $this->output->set_output(json_encode($response));\n }", "public function loginActivation($key){\n\t\t\t$key = $key->key;\n\t\t\t$user_dao = new LoginDAO();\n\t\t\t$resUser = $user_dao->loginActivate($key);\n\t\t\t$response = new ResponseHandler();\n\t\t\tif($resUser['result'] =='success'){\n\t\t\t\treturn $response->encode_response(['result' => 'success', 'message' => \"Account activated successfully\"]);\n\t\t\t}else{\n\t\t\t\treturn $response->encode_response(['result' => 'fail', 'message' =>\"Your account alreday activated\"]);\n\t\t\t}\n\t\t\t\n\t\t}", "function activateUser()\n {\n // Sets the value of activated to yes\n $int = 1;\n\n $mysqli = $this->conn;\n\n /* Prepared statement, stage 1: prepare */\n if (!($stmt = $mysqli->prepare(\"UPDATE User SET \n \t\tactiveUser = ?\n \t\t\tWHERE ID = ?\"))\n ) {\n echo \"Prepare failed: (\" . $mysqli->errno . \") \" . $mysqli->error;\n }\n\n /* Prepared statement, stage 2: bind and execute */\n\n if (!($stmt->bind_param(\"ii\",\n $int,\n $this->id))\n ) {\n echo \"Binding parameters failed: (\" . $stmt->errno . \") \" . $stmt->error;\n }\n\n if (!$stmt->execute()) {\n echo \"Execute failed: (\" . $stmt->errno . \") \" . $stmt->error;\n }\n\n }", "function setUserActive($token) // activate-account.php, admin_user.php\r\n \r\n{\r\n global $mysqli,$db_table_prefix;\r\n\r\n\t$stmt = $mysqli->prepare(\"UPDATE \".$db_table_prefix.\"users\r\n\r\n\t\tSET active = 1\r\n\r\n\t\tWHERE\r\n\r\n\t\tactivation_token = ?\r\n\r\n\t\tLIMIT 1\");\r\n\r\n\t$stmt->bind_param(\"s\", $token);\r\n\r\n\t$result = $stmt->execute();\r\n\r\n\t$stmt->close();\t\r\n\r\n\treturn $result;\r\n\t\r\n}", "function activateMember2($username)\r\n\t{\r\n\t\t$username = funcs::check_input($username);\r\n\r\n\t\t$sql = \"SELECT isactive FROM \".TABLE_MEMBER.\"\r\n\t\t\t\t WHERE \".TABLE_MEMBER_USERNAME.\"='\".$username.\"'\";\r\n\t\t$row = DBconnect::get_nbr($sql);\r\n\t\tif($row == 0)\r\n\t\t{\r\n\t\t\t$sql = \"UPDATE \".TABLE_MEMBER.\" SET \".TABLE_MEMBER_ISACTIVE.\"=1\r\n\t\t\t\t\t\tWHERE \".TABLE_MEMBER_USERNAME.\"='\".$username.\"' LIMIT 1\";\r\n\t\t\tDBconnect::execute($sql);\r\n\r\n\t\t\t$userid = funcs::getUserid($username);\r\n\r\n\t\t\t//Hauke\r\n\t\t\t$membership = 3;\r\n\t\t\t$rate = 1;\r\n\t\t\t$paid_via = 3;\r\n\t\t\t$payment_complete = 1;\r\n\t\t\t$today = date(\"Y-m-d\");\r\n\r\n\t\t\tfuncs::insertpayment($userid,$membership,$rate,$paid_via, $payment_complete);\r\n\r\n\t\t\t$sql = \"UPDATE \".TABLE_PAY_LOG.\" SET \".\"real_name\".\"='$real_name',\r\n\t\t\t\t\t\t\t\t\t\t\t \t \".\"real_street\".\"='$street',\r\n\t\t\t\t\t\t\t\t\t\t\t\t \".\"real_city\".\"='$city',\r\n\t\t\t\t\t\t\t\t\t\t\t\t \".\"sum_paid\".\"='0',\r\n\t\t\t\t\t\t\t\t\t\t\t\t \".\"cancelled\".\"='1',\r\n\t\t\t\t\t\t\t\t\t\t\t\t \".\"cancelled_date\".\"='$today'\r\n\t\t\t\t\t\t\t\t\t \t WHERE \".\"username\".\"='$username'\";\r\n\t\t\tDBconnect::execute($sql);\r\n\r\n\t\t\t$sql = \"UPDATE \".TABLE_MEMBER.\" SET \".\"type\".\"='$membership',\r\n\t\t\t\t\t\t\t\t\t\t\".\"signup_datetime=now(),\r\n\t\t\t\t\t\t\t\t\t\t\".\"advertise_regist='2'\r\n\t\t\t\t\t\t\t\t\t \t WHERE username ='$username'\";\r\n\t\t\tDBconnect::execute($sql);\r\n\r\n\t\t\t//Hauke end\r\n\r\n\t\t\t$subject = funcs::getText($_SESSION['lang'], '$first_time_inbox_subject');\r\n\t\t\t$message = funcs::getText($_SESSION['lang'], '$first_time_inbox_message');\r\n\t\t\t$sql = \"INSERT INTO \".TABLE_MESSAGE_INBOX.\"\r\n\t\t\t\t\tSET \".TABLE_MESSAGE_INBOX_TO.\"=\".$userid.\",\r\n\t\t\t\t\t\".TABLE_MESSAGE_INBOX_FROM.\"=1,\r\n\t\t\t\t\t\".TABLE_MESSAGE_INBOX_SUBJECT.\"='\".$subject.\"',\r\n\t\t\t\t\t\".TABLE_MESSAGE_INBOX_MESSAGE.\"='\".$message.\"',\r\n\t\t\t\t\t\".TABLE_MESSAGE_INBOX_DATETIME.\"='\".funcs::getDateTime().\"'\";\r\n\t\t\tDBconnect::execute($sql);\r\n\t\t\tself::NewSorting($username);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "function oaupostgrad_admin_activator($email, $email_code)\n\t{\n\n\t\tglobal $Oau_auth;\n\t\t$email \t\t\t= \tsanitize($email);\n\t\t$email_code\t\t=\tsanitize($email_code);\n\t\t$deactivator\t=\t0;\n\t\t$activator \t\t=\t1;\n\n\t\t$query1 = \"SELECT `admin_Idn` FROM `administrator` WHERE `email` = '$email' AND `email_code` = '$email_code' AND `active` = $deactivator\";\n\t\t$run_query1 = mysqli_query($Oau_auth, $query1);\n\n\t\tif(mysqli_num_rows($run_query1) > 0)\n\t\t{\n\n\t\t\t$query2 = \"UPDATE `administrator` SET `active` = $activator WHERE `email` = '$email' AND `email_code` = '$email_code'\";\n\t\t\t$run_query2 = mysqli_query($Oau_auth, $query2);\n\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t}", "public function activatenewpasswordAction()\n {\n $newKey = $this->getRequest()->getParam(self::ACTIVATION_KEY_PARAMNAME, null);\n $userId = $this->getRequest()->getParam(User::COLUMN_USERID, null);\n\n $user = $this->_getUserFromIdAndKey($userId, $newKey);\n if(!$user){\n Globals::getLogger()->info(\"New password activation: user retrieval failed - userId=$userId, key=$newKey\", Zend_Log::INFO );\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::NO_SUCH_USER));\n }\n\n $user->{User::COLUMN_PASSWORD} = $user->newPassword;\n $user->newPassword = '';\n $user->activationKey = '';\n\n $id = $user->save();\n if($id != $user->{User::COLUMN_USERID}){\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::NEWPASSWORD_ACTIVATION_FAILED));\n }\n\n Utils::deleteCookie(User::COOKIE_MD5);\n Utils::deleteCookie(User::COOKIE_USERNAME);\n Utils::deleteCookie(User::COOKIE_REMEMBER);\n\n $this->_savePendingUserIdentity($userId);\n\n $this->_helper->redirectToRoute('userupdate',array('newPassword'=>true));\n }", "public function action_activateaccount()\n\t{\n\t\tglobal $context, $modSettings;\n\n\t\tisAllowedTo('moderate_forum');\n\n\t\tif (isset($this->_req->query->save, $this->_profile['is_activated'])\n\t\t\t&& $this->_profile['is_activated'] != 1)\n\t\t{\n\t\t\trequire_once(SUBSDIR . '/Members.subs.php');\n\n\t\t\t// If we are approving the deletion of an account, we do something special ;)\n\t\t\tif ($this->_profile['is_activated'] == 4)\n\t\t\t{\n\t\t\t\tdeleteMembers($context['id_member']);\n\t\t\t\tredirectexit();\n\t\t\t}\n\n\t\t\t// Actually update this member now, as it guarantees the unapproved count can't get corrupted.\n\t\t\tapproveMembers(array('members' => array($context['id_member']), 'activated_status' => $this->_profile['is_activated']));\n\n\t\t\t// Log what we did?\n\t\t\tlogAction('approve_member', array('member' => $this->_memID), 'admin');\n\n\t\t\t// If we are doing approval, update the stats for the member just in case.\n\t\t\tif (in_array($this->_profile['is_activated'], array(3, 4, 13, 14)))\n\t\t\t{\n\t\t\t\tupdateSettings(array('unapprovedMembers' => ($modSettings['unapprovedMembers'] > 1 ? $modSettings['unapprovedMembers'] - 1 : 0)));\n\t\t\t}\n\n\t\t\t// Make sure we update the stats too.\n\t\t\trequire_once(SUBSDIR . '/Members.subs.php');\n\t\t\tupdateMemberStats();\n\t\t}\n\n\t\t// Leave it be...\n\t\tredirectexit('action=profile;u=' . $this->_memID . ';area=summary');\n\t}", "function oaupostgrad_users_activator($email, $email_code)\n\t{\n\n\t\tglobal $Oau_auth;\n\t\t$email \t\t\t= \tsanitize($email);\n\t\t$email_code\t\t=\tsanitize($email_code);\n\t\t$deactivator\t=\t0;\n\t\t$activator \t\t=\t1;\n\n\t\t$query1 = \"SELECT `student_Idn` FROM `student` WHERE `email` = '$email' AND `email_code` = '$email_code' AND `active` = $deactivator\";\n\t\t$run_query1 = mysqli_query($Oau_auth, $query1);\n\n\t\tif(mysqli_num_rows($run_query1) > 0)\n\t\t{\n\n\t\t\t$query2 = \"UPDATE `student` SET `active` = $activator WHERE `email` = '$email' AND `email_code` = '$email_code'\";\n\t\t\t$run_query2 = mysqli_query($Oau_auth, $query2);\n\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t}", "public function activation_link()\n\t {\n\t \t\t$data=$_GET['data'];\n\t \t\t$data=explode('?',$data);\n\t \t\t\n \t\tif( count($data) ==2)\n \t\t{\n \t\t\t$email=base64_decode($data[0]);\n \t\t\t$pass=base64_decode($data[1]);\n \t\t\t$query=$this->ApiModel->userActive($email,$pass);\n \t\t\tif($query== 1)\n \t\t\t{\n \t\t\t\t$data['msg']=\"Your account has been activated\";\n \t\t\t}else{\n \t\t\t\t$data['msg']=\"Your account has been Not activated\";\n \t\t\t}\n \t\t}else{\n \t\t\t$data['msg']=\"Your Link is incorrect\";\n \t\t}\n\n \t\t\t$this->load->view('activation',$data);\n \t\t\t\n\n\t \t\t\n\t }", "function activateUser($userId);", "function activate ()\n\t{\n\t\tswitch ($this->getAction ())\n\t\t{\n\t\t\tcase 'modifyUser':\n\t\t\t\tif ($this->getUserName () == 'test')\n\t\t\t\t{\n\t\t\t\t\tdie ('not allowed for test user');\n\t\t\t\t}\n\t\t\t\t$checkPasswd = true;\n\t\t\t\t$user = $this->itemFactory->requestToUser ($checkPasswd);\n\t\t\t\t$this->operations->modifyUser ($this->getUserName(), $user);\n\t\t\t\tHeader (\"Location: index.php\");\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tHeader (\"Location: index.php\");\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function activate($name,$token)\n {\n $user = public_users::where(['token'=> $token,'name'=>$name,'status'=>0])->first();\n $this->notification_lock($user->num_of_sends);\n if (empty($user)) {\n session()->flash('err_msg','Your activation code is either expired or invalid, login here to re-validate.');\n return redirect()->to('/public/login');\n }\n else{\n $user->status=1;\n $user->token=null;\n $user->update();\n session()->flash('success_msg','Congratulations! your account is now activated.');\n return redirect()->to('/public/login');\n }\n }", "public function activateAccount($code, $email)\n {\n\n // define all the global variables\n global $database, $message, $functions;\n\n // escape the given strings\n $code = $this->secureInput($code);\n $email = $this->secureInput($email);\n\n // start the checks\n if (empty($code) || empty($email)) {\n $message->setError(\"Code/Email fields most not be empty\", Message::Error);\n return false;\n }\n\n // check if email exists\n if (!$functions->emailExist($email)) {\n $message->setError(\"The provided email is not in our database.\", Message::Error);\n return false;\n }\n\n // check if the given code matches the required characters\n if (strlen($code) < 20 || strlen($code) > 20) {\n $message->setError(\"The given code has to be exactly 20 characters long\", Message::Error);\n return false;\n }\n\n // check if account already has been activated\n if ($functions->isUserActivated($email, true)) {\n $message->setError(\"The account is already activated\", Message::Error);\n return false;\n }\n\n $sql = \"SELECT * FROM \" . TBL_USERS . \" WHERE \" . TBL_USERS_EMAIL . \" = '\" . $email . \"' AND \" . TBL_USERS_ACTIVATION_CODE . \" = '\" . $code . \"'\";\n\n // get the sql results\n $result = $database->getQueryResults($sql);\n if ($database->anyError()) {\n return false;\n }\n\n // check if wrong code has been used\n if ($database->getQueryNumRows($result, true) < 1) {\n $message->setError(\"Wrong activation code has been used.\", Message::Error);\n return false;\n }\n\n //update the user account with the needed information\n $sql = \"UPDATE \" . TBL_USERS . \" SET \" . TBL_USERS_ACTIVATED . \" ='1',\" . TBL_USERS_ACTIVATION_CODE . \"='' WHERE \" . TBL_USERS_EMAIL . \" = '\" . $email . \"' AND \" . TBL_USERS_ACTIVATION_CODE . \" = '\" . $code . \"'\";\n\n // get the sql results\n $database->getQueryResults($sql);\n if ($database->anyError()) {\n return false;\n }\n\n $message->setSuccess(\"Your account has been activated successfully !\");\n return true;\n }", "function activateNewsletter() {\n\t\t$hash = t3lib_div::_GP('nlAuth');\n\t\t$userID = t3lib_div::_GP('u');\n\n\t\t// get the whole row\n\t\t$row = current($GLOBALS['TYPO3_DB']->exec_SELECTgetRows( '*', 'fe_users', 'uid=' . $userID ));\n\t\t$realHash = substr(sha1(serialize($row)), 1, 6); // first 6 letters from hash\n\t\tif ( $row['disable'] && ($realHash == $hash) ) { // hash matches\n\t\t\t// enable the user\n\t\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery( 'fe_users', 'uid=' . $userID, array(\n\t\t\t\t'uid' => $userID,\n\t\t\t\t'disable' => '0' ) );\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function userActivation($email, $code)\n {\n if ($this->checkActivationUser($email, $code)) {\n $sql = \"UPDATE user SET status=1, activeDate = NOW() WHERE email='$email'\";\n $query = $this->db->prepare($sql);\n $query->execute();\n return 1;\n } else {\n return 0;\n }\n }", "function hc_gf_maybe_activate_user() {\n\n $template_path = STYLESHEETPATH . '/gf-activate-template/activate.php';\n $is_activate_page = isset( $_GET['page'] ) && $_GET['page'] == 'gf_activation';\n \n if( ! file_exists( $template_path ) || ! $is_activate_page )\n return;\n \n require_once( $template_path );\n \n exit();\n}", "function activate($username = false, $verification = false)\n\t{\n\t\tif($username && $verification)\n\t\tif($this->auth->activate(urldecode($username), $verification))\n\t\t{\n\t\t\t$this->_render_page('user/activation', array('success' => true));\n\t\t\treturn;\n\t\t}\n\t\t$this->_render_page('user/activation', array('success' => false));\n\t}", "function activated_notice() {\n\t\tif ( 'network' == $this->get_option( 'activated' ) ) {\n\t\t\t$message = sprintf(\n\t\t\t\t__( 'Each site will need to be registered with VaultPress separately. You can purchase new keys from your <a href=\"%1$s\">VaultPress&nbsp;Dashboard</a>.', 'vaultpress' ),\n\t\t\t\t'https://dashboard.vaultpress.com/'\n\t\t\t);\n\t\t\t$this->ui_message( $message, 'activated', __( 'VaultPress has been activated across your network!', 'vaultpress' ) );\n\n\t\t// key and secret already exist in db\n\t\t} elseif ( $this->is_registered() ) {\n\t\t\tif ( $this->check_connection() ) {\n\t\t\t}\n\t\t}\n\n\t\t$this->delete_option( 'activated' );\n\t}", "private function valUserExisting(){\n if($this->_personDB->getActive()){\n if($this->logIn()){\n $this->addUserHttpSession();\n $this->_response = 'ok';\n }\n }else{\n $this->_response = '104';\n }\n }", "public function getUserActivation($email,$code){\n\t\t$emptyModelInstance = Sentry::getUserProvider()->getEmptyUser();\n\n\t\t// Now, you have any methods available that you'd like. Retrieve a new instance, query\n\t\t// against anything. Because our User model implements the right interfaces, it plays nicely\n\t\t// with Sentry.\n\t\t$user = $emptyModelInstance->where('email', '=', $email)->first();\n\n\t\t// Continue on as you were...\n\t\ttry\n\t\t{\n\t\t // Find the user using the user id\n\t\t //$user = Sentry::findUserById(1);\n\n\t\t // Attempt to activate the user\n\t\t if ($user->attemptActivation($code))\n\t\t {\n\t\t return Redirect::to('/')\n\t\t\t\t\t->with('success','You\\' ve logged in successfully!');\n\t\t }\n\t\t else\n\t\t {\n\t\t // User activation failed\n\t\t }\n\t\t}\n\t\tcatch (Cartalyst\\Sentry\\Users\\UserNotFoundException $e)\n\t\t{\n\t\t echo 'User was not found.';\n\t\t}\n\t\tcatch (Cartalyst\\Sentry\\Users\\UserAlreadyActivatedException $e)\n\t\t{\n\t\t echo 'User is already activated.';\n\t\t}\n\t}", "public function activate($username);", "public function userActivation($activation_code) {\n $this->load->model('register_model');\n $table_to_pass = 'mst_users';\n $fields_to_pass = array('user_id', 'first_name', 'last_name', 'user_name', 'user_email', 'user_type', 'email_verified', 'user_status');\n $condition_to_pass = array(\"activation_code\" => $activation_code);\n /* get user details to verify the email address */\n $arr_login_data = $this->register_model->getUserInformation($table_to_pass, $fields_to_pass, $condition_to_pass, $order_by_to_pass = '', $limit_to_pass = '', $debug_to_pass = 0);\n if (count($arr_login_data)) {\n if ($arr_login_data[0]['email_verified'] == 1) {\n $this->session->set_userdata('activation_error', \"You have already activated your account. Please login.\");\n } else {\n\n $user_detail = $this->common_model->getRecords(\"mst_users\", \"user_id\", array(\"activation_code\" => $activation_code));\n $this->load->model('admin_model');\n /* Removing the user if he is exists in inactiveated list */\n $this->register_model->updateInactiveUserFile($this->common_model->absolutePath(), 1, intval($user_detail[0]['user_id']));\n $table_name = 'mst_users';\n $update_data = array(\"user_status\" => '1', 'email_verified' => '1');\n $condition_to_pass = array(\"activation_code\" => $activation_code);\n $this->common_model->updateRow($table_name, $update_data, $condition_to_pass);\n $this->session->set_userdata('msg_success', \"Your email address has been verified successfully.\");\n }\n } else {\n $this->session->set_userdata('msg_failed', \"Invalid activation link.\");\n }\n redirect(base_url() . \"sign-in\");\n }", "public function activate_account($token) {\n $con['returnType'] = 'single';\n $con['conditions'] = array(\n 'token' => $token\n );\n $result = $this->Common_Model->getRows($con, 'wh_user_activations');\n if ($result) {\n\n $this->Common_Model->delete($con['conditions'], 'wh_user_activations');\n $this->session->set_flashdata('success', array('message' => 'Activated successfully. Please login.'));\n redirect('Site_Login/login_form');\n } else {\n $redirect = 'Site_Login/login_form';\n $this->error($redirect);\n }\n }", "public function activateUser(string $activationCode)\n {\n try {\n $user = app(User::class)->where('activation_code', $activationCode)->first();\n if (! $user) {\n return 'The code does not exist for any user in our system.';\n }\n $user->status = 1;\n $user->activation_code = null;\n $user->save();\n //auth()->login($user);\n\n // Get welcome message text\n //$locale = App::getLocale();\n $locale = 'en';\n $message = PostTranslation::where('title', 'Welcome email')\n ->where('locale', $locale)\n ->first();\n\n // Send to the user the confirmation about the activation of the account\n $mailDatas = [];\n $mailDatas['senderEmail'] = '[email protected]';\n $mailDatas['senderName'] = 'Global CI - Administrator';\n $mailDatas['subject'] = 'Activation of your Global CI account';\n $mailDatas['emailTo'] = $user->email;\n $mailDatas['name'] = $user->name;\n $mailDatas['body'] = $message->body ?? null;\n\n Mail::to($user->email)->send(new UserActivationConfirmation($mailDatas));\n } catch (\\Exception $exception) {\n logger()->error($exception);\n\n return 'Whoops! something went wrong.';\n }\n\n return redirect()->to('/')->with('message', 'User succesfuly activated');\n }", "public function reActivationAction() {\n //get the container object\n $container = $this->container;\n //get the translator object\n $translator = $this->get('translator');\n //get the session object\n $session = $this->getRequest()->getSession();\n //check if we have a logged in user or company\n if (FALSE === $this->get('security.context')->isGranted('ROLE_NOTACTIVE')) {\n $session->getFlashBag()->set('note', $translator->trans('You need to Login first.'));\n return $this->redirect($this->generateUrl('login'));\n }\n\n //check if the user is already active\n if (TRUE === $this->get('security.context')->isGranted('ROLE_USER')) {\n //set a notice flag\n $session->getFlashBag()->set('notice', $translator->trans('Your acount is active.'));\n return $this->redirect($this->generateUrl('user_edit'));\n }\n\n //get the logedin user\n $user = $this->getUser();\n\n //prepare the body of the email\n $body = $this->renderView('ObjectsUserBundle:User:Emails\\activate_email.txt.twig', array('user' => $user));\n //prepare the message object\n $message = \\Swift_Message::newInstance()\n ->setSubject($translator->trans('activate your account'))\n ->setFrom($container->getParameter('mailer_user'))\n ->setTo($user->getEmail())\n ->setBody($body)\n ;\n //send the activation mail to the user\n $this->get('mailer')->send($message);\n //set the success flag in the session\n $session->getFlashBag()->set('success', $this->get('translator')->trans('check your email for your activation link'));\n //redirect the user to portal\n return $this->redirect($this->generateUrl('user_edit'));\n }", "public function getUserActivationCode() {\n\t\treturn $this->userActivationCode;\n\t}", "function ADMIN_Identifie()\n{\n\tif ($_POST[\"ed_PW\"] ==\"jbmd\")\n\t\t{\n\t\t\t$_SESSION[\"ADMIN_OK\"] = \"00\";\t\t\n\t\t\tTOOL_Chainage(\"SCI_EF_index.php\");\n\t\t\treturn;\n\t\t}\n\n}", "public function executeActivateAccount(sfWebRequest $request)\n {\n $tkn = trim($request->getParameter('tk', ''));\n $usr = AppUserTable::getInstance()->findOneByRecoverToken($tkn);\n\n if ($usr) {\n \tif (!$usr->getEnabled()) {\n\t \t$usr->setRecoverToken(NULL);\n\t \t$usr->setEnabled(1);\n\t \t$usr->save();\n\n\t \tServiceAuthentication::startSessionProcess($usr);\n\t\n\t \t$this->getUser()->setFlash('activate', true);\t\n \t}\n }\n $this->redirect('home/index');\n }", "public function verify_actcode($member_email, $code){\n\t\t//$newCode = $this->make_activation_code();\n\t\t$mysql = New Mysql();\n\t\treturn($mysql->update_activation_code($member_email, $code));\n\t}", "public function update_new_user(){\n\t\t$this->data[\"activationCode\"] = $this->make_activation_code();\n\t\tif( $this->send_email($this->get_activation_msg($this->data[\"activationCode\"])) ){\n\t\t\t$mysql = New Mysql();\n\t\t\treturn( $mysql->update_user($this->data[\"name\"], $this->data[\"lastname\"], $this->data[\"email\"], $this->data[\"password\"], $this->data[\"joinDate\"], $this->data[\"lastAccess\"], $this->data[\"activationCode\"]) );\n\t\t}\t\n\t}", "public function user_activation($data) {\n $usersDetails = ClassRegistry::init('User')->find('first', array('conditions' => array('User.id' => $data['user_id'])));\n\n if(isset($data['password']) && !empty($data['password'])) {\n $userPass = $data['password'];\n }\n else{\n $userPass = $usersDetails['UserDetail']['org_password'];\n\t\t\t$sqlN = \"select AES_DECRYPT(org_password, 'secret') as org_password from user_details WHERE user_details.user_id =\".$data['user_id'];\n\n\t\t $dd = ClassRegistry::init('User')->query($sqlN);\n\n\t\t\t$userPass = $dd[0][0]['org_password'];\n\n }\n\n $domain_url = SITEURL;\n\n $endc = safeEncrypt($usersDetails['User']['email']);\n $activation_url = 'users/activate_account/'.$endc;\n\n $emailAddress = $usersDetails['User']['email'];\n $email = new CakeEmail();\n $email->config('Smtp');\n $email->from(array(ADMIN_FROM_EMAIL => MAIL_SITENAME));\n $email->to($emailAddress);\n $email->subject(\"OpusView: Account activation\");\n $email->template('user_activation');\n $email->emailFormat('html');\n $email->viewVars(array('receiver' => $usersDetails['UserDetail']['first_name'] . ' ' . $usersDetails['UserDetail']['last_name'], 'username' => $usersDetails['User']['email'], 'password' => $userPass, 'domain_url' => $domain_url, 'activation_url' => $activation_url));\n $email->send();\n return true;\n }", "function verify()\n {\n $activation = null;\n $param = getParameter();\n if (!empty($param[0])) {\n $activation = $param[0];\n }\n $resultActive = $this->model->khachhang->activeAccount($activation);\n switch ($resultActive) {\n case 1 :\n redirect('user/active_expire');\n break;\n case 2:\n redirect('user/active_success');\n break;\n case 3:\n redirect('user/active_fail');\n break;\n }\n }", "function activation()\n {\t\n\t\t$data['fal'] = $this->fal_front->activation();\n\t\t$this->load->view($this->_container, $data); \n }", "function setUserActive($token)\r\n{\r\n\tglobal $mysqli,$db_table_prefix;\r\n\t$stmt = $mysqli->prepare(\"UPDATE \".$db_table_prefix.\"users\r\n\t\tSET active = 1\r\n\t\tWHERE\r\n\t\tactivation_token = ?\r\n\t\tLIMIT 1\");\r\n\t$stmt->bind_param(\"s\", $token);\r\n\t$result = $stmt->execute();\r\n\t$stmt->close();\t\r\n\treturn $result;\r\n}", "function logger_device_activate($code) {\n\n logger_device_assign($code);\n\n drupal_set_message(t(\"The device is now associated with your account.\"));\n\n drupal_goto('device/mylist');\n}", "static function handle_activate()\n\t{\n\t\tself::handle_multi_site( 'activate' );\n\t}", "function ConfirmUser(){\r\n if(empty($_GET['code'])||strlen($_GET['code'])<=10){\r\n $this->HandleError(\"Please provide the confirm code\");\r\n return false;\r\n }\r\n $user_rec = array();\r\n if(!$this->UpdateDBRecForConfirmation($user_rec)){\r\n return false;\r\n }\r\n \r\n $this->SendUserWelcomeEmail($user_rec);\r\n \r\n $this->SendAdminIntimationOnRegComplete($user_rec);\r\n \r\n return true;\r\n }", "function send_again()\n\t{\n\t\tif (!$this->tank_auth->is_logged_in(FALSE)) {\t\t\t\t\t\t\t// not logged in or activated\n\t\t\tredirect('/auth/login/');\n\n\t\t} else {\n\t\t\t$this->form_validation->set_rules('email', 'Email', 'trim|required|xss_clean|valid_email');\n\n\t\t\t$data['errors'] = array();\n\n\t\t\tif ($this->form_validation->run()) {\t\t\t\t\t\t\t\t// validation ok\n\t\t\t\tif (!is_null($data = $this->tank_auth->change_email(\n\t\t\t\t\t\t$this->form_validation->set_value('email')))) {\t\t\t// success\n\n\t\t\t\t\t$data['site_name']\t= $this->config->item('website_name', 'tank_auth');\n\t\t\t\t\t$data['activation_period'] = $this->config->item('email_activation_expire', 'tank_auth') / 3600;\n\n\t\t\t\t\t$this->_send_email('activate', $data['email'], $data);\n\n\t\t\t\t\t$this->_show_message(sprintf($this->lang->line('auth_message_activation_email_sent'), $data['email']));\n\n\t\t\t\t} else {\n\t\t\t\t\t$errors = $this->tank_auth->get_error_message();\n\t\t\t\t\tforeach ($errors as $k => $v)\t$data['errors'][$k] = $this->lang->line($v);\n\t\t\t\t}\n\t\t\t}\n\t\t\tdisplay('send_again', $data);\t\t\t\n\t\t}\n\t}", "function activateUser($email) {\n $stmt = $this->connection->prepare(\"UPDATE \".DB_USER_TABLE.\"\n SET\n \".COL_USER_RANK.\" = 1\n WHERE \".COL_USER_EMAIL.\" = ?\");\n $stmt->bind_param(\"s\", $email);\n return $stmt->execute();\n }", "function register_user($first_name,$last_name,$username,$email,$password)\n{\n $first_name = escape($first_name);\n $last_name = escape($last_name);\n $username = escape($username);\n $email = escape($email);\n $password = escape($password);\n if (email_exists($email)) {\n return false;\n } elseif (username_exists($username)) {\n return false;\n } else {\n $password = md5($password);\n $validation_code = md5($username . microtime());\n $sql = \"INSERT INTO users(first_name, last_name, username, email, password, validation_code, active)\";\n $sql .= \" VALUES('$first_name','$last_name','$username','$email','$password','$validation_code',0)\";\n $result = query($sql);\n\n ///// sending email////////\n $subject = \"Activate Account\";\n $msg = \" Please click the link below to activate your account\n http://localhost/login/activate.php?email=$email&code=$validation_code \n \";\n $headers = \"From: [email protected]\";\n send_email($email, $subject, $msg, $headers);\n\n return true;\n }\n\n}", "public function page_activate_users()\n\t{\n\t\t$id = intval(Http::request('id'));\n\t\tif ($id)\n\t\t{\n\t\t\t User::confirm_account($id);\n\t\t}\n\n\t\tHttp::redirect('index.' . PHPEXT);\n\t}", "public function activate(){\n # Enable Single Sign-On\n if(in_array(\"login\", $this->features, TRUE)){\n $this->enable_sso();\n }\n }", "public function activate($locator){\n\t\t$activationkey = $this->request->get('id');\n\t\t\n\t\t$model = $this->_load('app')->model('users');\n\t\t$model->activate($activationkey);\n\t\t\n\t\t$this->response->setPartial('maincontent', 'user/activate', array('errmsg' => $model->getErrorMsg(' ')));\n\t\t\n\t}", "public function confirm($key)\n {\n try {\n $user = Sentry::findUserByActivationCode($key);\n\n if ($user->attemptActivation($key)) {\n return Redirect::to('login')->withMessage(['success' => Lang::get('flash.account_activated')]);\n }\n } catch (Exception $e) {\n // Nothing here, so just fall through.\n }\n\n return Redirect::to('/')->withMessage(['danger' => Lang::get('flash.invalid_code')]);\n }", "public function activateregistration(Request $req){\n $regtoken = $req->input('token');\n //$user = DB::table('users')->where('verificationtoken', $regtoken)->first(); \n DB::update('update users set verified=1 where verificationtoken=?',[$regtoken]);\n Session::flash('activation', 'Your acccount has been activated. Please login below.');\n return view('login');\n }", "function register_user($first_name, $last_name, $username, $email, $password){\r\n\r\n $first_name = escape($first_name);\r\n $last_name = escape($last_name);\r\n $username = escape($username);\r\n $email = escape($email);\r\n $password = escape($password);\r\n\r\n if(email_exists($email)){\r\n return false;\r\n } elseif (username_exists($username)) {\r\n return false;\r\n } else {\r\n $password = password_hash($password, PASSWORD_BCRYPT, array('cost'=>12)); //md5($password);\r\n $validation_code = md5($username . microtime());\r\n\r\n $sql = \"INSERT INTO users(first_name, last_name, username, email, password, validation_code, active)\";\r\n $sql.= \" VALUES('$first_name', '$last_name', '$username', '$email', '$password', '$validation_code', 0)\";\r\n $result = query($sql);\r\n confirm($result);\r\n \r\n $subject = \"Activate account\";\r\n $msg = \" Please click the link below to activate your Account\r\n\r\n <a href=\\\"\".Config::DEV_URL.\"/activate.php?email={$email}&code={$validation_code}\\\">Reset Password</a>\r\n \";\r\n\r\n $headers = \"From: [email protected]\";\r\n\r\n send_email($email, $subject, $msg, $headers);\r\n\r\n return true;\r\n }\r\n return false;\r\n}", "function setUserActive($token) {\n global $mysqli, $db_table_prefix;\n $stmt = $mysqli->prepare(\"UPDATE \" . $db_table_prefix . \"users\n\t\tSET active = 1\n\t\tWHERE\n\t\tactivation_token = ?\n\t\tLIMIT 1\");\n $stmt->bind_param(\"s\", $token);\n $result = $stmt->execute();\n $stmt->close();\n return $result;\n}", "function admin_user_activated($email)\n\t{\n\n\t\tglobal $Oau_auth;\n\t\t$email = sanitize($email);\n\t\t$activated = 1;\n\t\t$query = \"SELECT `admin_Idn` FROM `administrator` WHERE `email` = '$email' AND `active` = '$activated'\";\n\t\t$run_query = mysqli_query($Oau_auth, $query);\n\n\t\tif(mysqli_num_rows($run_query) > 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\n\t}", "function register_user($first_name, $last_name, $username, $password, $email){\n\n // call the escape function to escape the variable \n // to prevent sql injecction \n\n $first_name = escape($first_name); \n $last_name = escape($last_name);\n $username = escape($username);\n $password = escape($password);\n $email = escape($email);\n \n\n // if the user enters an email that is already taken \n // deny the registration\n\n if(email_exists($email)){\n \n return false; \n }\n\n // if the user enters a username that is already taken\n // deny the registration \n else if(username_exists($username)){\n\n return false; \n\n } \n else \n { // if the user information is verified proceed to insertion in the user table \n\n\n // encrypt the message using password to encrypt the message \n $password = password_hash($password, PASSWORD_BCRYPT, array('cost'=>12));\n\n $validation_code = md5($username . microtime()); // create random validation codes\n\n // insert the user information to the user table with the validation code\n // Also make sure that the user activation state is set to 0 for this moment \n $sql = \"INSERT INTO users(first_name, last_name, username, password ,validation_code, active, email)\";\n $sql.= \"VALUES('$first_name','$last_name','$username','$password','$validation_code',0, '$email')\";\n\n $result = query($sql); // send the information\n\n // send a link to the user email with the validation code\n $subject = \"Activate Account\";\n $msg = \"Please click the link below to activate your account \n \n <a href =\\\"\".Config::DEVELOPMENT_URL.\"/activate.php?email=$email&code=$validation_code\\\">\n \n LINK HERE</a>\"; \n \n \n // setup a email header \n $headers = \"From: noreply@localhost\";\n\n // send the link\n send_email($email, $subject, $msg, $headers);\n\n return true;\n \n }\n}", "public function SetBpActivateKey()\n\t{\n\t\tif ($_POST['gr_bp_checkbox'] == 1 && ! empty($_POST['signup_email']))\n\t\t{\n\t\t\t$email = $_POST['signup_email'];\n\t\t\t$emails = get_option($this->GrOptionDbPrefix . 'bp_registered_emails');\n\t\t\t$emails_array = unserialize($emails);\n\t\t\tif ( ! empty($emails_array))\n\t\t\t{\n\t\t\t\tif (is_array($emails_array))\n\t\t\t\t{\n\t\t\t\t\t$emails = array_merge($emails_array, array($email));\n\t\t\t\t\tupdate_option($this->GrOptionDbPrefix . 'bp_registered_emails', serialize($emails));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tupdate_option($this->GrOptionDbPrefix . 'bp_registered_emails', serialize(array($email)));\n\t\t\t}\n\t\t}\n\t}", "public function activateUser(string $activationCode)\n {\n try {\n $user = app(User::class)->where('activation_code', $activationCode)->first();\n if (!$user || $user->status == 1) {\n return redirect()->back()->with('error', 'The code does not exist for any user in our system.');\n }\n $user->status = 1;\n $user->activation_code = null;\n $user->save();\n auth()->login($user);\n } catch (\\Exception $exception) {\n logger()->error($exception);\n return \"Whoops! something went wrong.\";\n }\n return redirect()->route('user.dashboard');\n }", "public function user_unactive() {\n if ($this->input->post('submitRegistration')) {\n $userData = array(\n 'email' => $this->input->post('email'),\n 'token' => md5($this->input->post('email'))\n );\n\n $this->Common_Model->insert($userData, 'wh_user_activations');\n\n $userData['message'] = 'Click the below link to activate your account. <br /><a href=\"' . base_url() . 'Site_Login/activate_account/' . $userData['token'] . '\">Activate</a>';\n $userData['subject'] = 'Account activation';\n\n $result = $this->sendMail($userData);\n if ($result) {\n return true;\n } else {\n return false;\n }\n }\n }", "public function requestact_user($email)\n \t{\n\t//Get user info from email given/check they actually exist\n\t$users = $this->db->query_read_slave(\"\n\t\tSELECT user.userid, user.usergroupid, username, email, activationid, languageid\n\t\tFROM \".TABLE_PREFIX.\"user AS user\n\t\tLEFT JOIN useractivation AS useractivation ON(user.userid = useractivation.userid AND type = 0)\n\t\tWHERE email = '\" . $this->db->escape_string($email) . \"'\"\n\t);\n\t//If they exist then carry on\n\tif ($this->db->num_rows($users))\n\t{\n\t\t//Loop through everyone with the same email address\n\t\twhile ($user = $this->db->fetch_array($users))\n\t\t{\n\t\t\t//Only work on those who are still not activated\n\t\t\tif ($user['usergroupid'] == NOACTIVATION_USERGROUP)\n\t\t\t{ \n\t\t\t\t//If they for some crazy reason do not have an activation ID then...\n\t\t\t\tif (empty($user['activationid']))\n\t\t\t\t{ \n\t\t\t\t\t//Create a new activation ID for the user\n\t\t\t\t\t$user['activationid'] = build_user_activation_id($user['userid'], 2, 0);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//If they already have an activation ID we'll update the current entry with a new ID\n\t\t\t\t\t$user['activationid'] = fetch_random_string(40);\n\t\t\t\t\t$this->db->query_write(\"\n\t\t\t\t\t\tUPDATE \".TABLE_PREFIX.\"useractivation SET\n\t\t\t\t\t\t\tdateline = \" . TIMENOW . \",\n\t\t\t\t\t\t\tactivationid = '$user[activationid]'\n\t\t\t\t\t\tWHERE userid = $user[userid]\n\t\t\t\t\t\t\tAND type = 0\n\t\t\t\t\t\");\n\t\t\t\t}\n\t\t\t\t//Set some required VB variables (for the email)\n\t\t\t\t$userid = $user['userid'];\n\t\t\t\t$username = $user['username'];\n\t\t\t\t$activateid = $user['activationid'];\n\t\t\t\t//Send out activation email, note the custom vbulletin phrase for the \"main\" site!\n\t\t\t\teval(fetch_email_phrases('activateaccount', $user['languageid']));\n\t\t\t\t//Actually send the email\n\t\t\t\tvbmail($user['email'], $subject, $message, true);\n\t\t\t}\n\t\t}\n\t\t//Return as a success\n\t\treturn false;\n\t}\n\telse\n\t{\n\t\treturn \"No account with that email address exists, please try again.\";\n\t}\n\t}", "public function ActivateUser()\n {\n if (false === $this->isActivateUserAllowed()) {\n return;\n }\n\n $oMailProfile = TDataMailProfile::GetProfile('new-registration');\n\n if (null === $oMailProfile) {\n $oMessageManager = TCMSMessageManager::GetInstance();\n $sConsumerName = TCMSTableEditorManager::MESSAGE_MANAGER_CONSUMER;\n $sMessageCode = 'ERROR_ACTIVATE_USER';\n $oMessageManager->AddMessage($sConsumerName, $sMessageCode);\n\n return;\n }\n\n $password = TTools::GenerateNicePassword();\n\n $oMailProfile->AddData('login', $this->oTable->sqlData['login']);\n $oMailProfile->AddData('name', $this->oTable->sqlData['firstname']);\n $oMailProfile->AddData('email', $this->oTable->sqlData['email']);\n $oMailProfile->AddData('password', $password);\n $oMailProfile->ChangeToAddress($this->oTable->sqlData['email'], $this->oTable->sqlData['name']);\n\n $bValidEmail = TTools::IsValidEMail($this->oTable->sqlData['email']);\n $sMessageCode = 'ERROR_ACTIVATE_USER';\n if ($bValidEmail) {\n $oMailProfile->SendUsingObjectView('TDataMailProfile', 'Core');\n\n $filterUtil = $this->getInputFilterUtil();\n $postData = $this->oTable->sqlData;\n foreach ($postData as $key => $value) {\n $valueOfKey = $filterUtil->getFilteredInput($key);\n if (null !== $valueOfKey) {\n $postData[$key] = $valueOfKey;\n }\n }\n\n $postData['crypted_pw'] = $password;\n $postData['crypted_pw_check'] = $password;\n $postData['allow_cms_login'] = '1';\n $this->Save($postData);\n $sMessageCode = 'SUCCESS_ACTIVATE_USER';\n }\n\n $oMessageManager = TCMSMessageManager::GetInstance();\n $sConsumerName = TCMSTableEditorManager::MESSAGE_MANAGER_CONSUMER;\n $oMessageManager->AddMessage($sConsumerName, $sMessageCode);\n }", "function seed_csp4_welcome_screen_do_activation_redirect() {\r\n if ( ! get_transient( '_seed_csp4_welcome_screen_activation_redirect' ) ) {\r\n return;\r\n }\r\n\r\n // Delete the redirect transient\r\n delete_transient( '_seed_csp4_welcome_screen_activation_redirect' );\r\n\r\n // Bail if activating from network, or bulk\r\n if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) {\r\n return;\r\n }\r\n\r\n // Redirect to bbPress about page\r\n wp_safe_redirect( add_query_arg( array( 'page' => 'seed_csp4' ), admin_url( 'admin.php' ) ) );\r\n}", "public function activate()\n {\n $activate = new updates;\n $activate->userid =Auth::User()->id;\n $activate->save();\n\n DB::update('update users set userlevel = ? where id = ?',[2,1]);\n \n return redirect('editor')->with('status',' First id changed');\n }", "public function activateUser($activateCode, UserRepositoryInterface $userRepository)\n {\n try{\n if($userRepository->UserCountWithActivateCode($activateCode) > 0){\n $user = $userRepository->getUserFromActivateCode($activateCode);\n $userRepository->activateUser($user);\n }\n }\n catch(Exception $e){\n throw $e;\n }\n }" ]
[ "0.7236365", "0.7130935", "0.70675623", "0.70266217", "0.69982743", "0.69931304", "0.6957549", "0.69444436", "0.6941962", "0.68534756", "0.6784595", "0.6778454", "0.67268944", "0.6683357", "0.6678812", "0.6661314", "0.6653845", "0.66179186", "0.6600756", "0.65985847", "0.65943235", "0.6572303", "0.65682364", "0.6567788", "0.65584916", "0.65425533", "0.65123785", "0.65000755", "0.64886534", "0.6479106", "0.646443", "0.6447341", "0.64466554", "0.64466554", "0.6441313", "0.64146805", "0.64133304", "0.64016986", "0.6390866", "0.6390698", "0.635976", "0.6309875", "0.63084537", "0.6286062", "0.62766343", "0.6259941", "0.62432605", "0.62376857", "0.62348586", "0.62241584", "0.61962914", "0.61739266", "0.6162318", "0.61531746", "0.6152097", "0.61401206", "0.6129759", "0.6125766", "0.6120114", "0.6115576", "0.6110008", "0.60901994", "0.6089099", "0.6087649", "0.6082029", "0.60771567", "0.60744923", "0.6071535", "0.6069541", "0.60662127", "0.6061413", "0.60579723", "0.6050384", "0.6040471", "0.60403955", "0.60234696", "0.6013818", "0.60106784", "0.60001785", "0.5999682", "0.59946847", "0.599334", "0.5991082", "0.598964", "0.5980707", "0.59691894", "0.59621984", "0.59567255", "0.59364426", "0.59333557", "0.5932491", "0.5928221", "0.59233844", "0.5919564", "0.5916953", "0.59151924", "0.59132886", "0.5897108", "0.58954525", "0.5882206", "0.5878042" ]
0.0
-1
tests that a user can change password
public function changePasswordTest(FunctionalTester $I){ $I->amOnPage( route('change_password') ); $I->seeResponseCodeIs(403); $user = HelperController::common_login($I, $this->name, $this->email, $this->password); $current_password = $user->password; $I->amOnPage( route('change_password') ); # blank field test $I->click('#change_password_button'); $I->assertEquals( User::find($user->id)->password, $current_password ); # check that no change accoured $I->see( trans('validation.required', ['attribute' => 'current password']) ); $I->see( trans('validation.required', ['attribute' => 'password']) ); # fill wrong password, see min password requirements and wrong password $I->fillField('current_password', '12345'); $I->click('#change_password_button'); $I->see( trans('validation.min.string', ['attribute' => 'current password', 'min' => '6']) ); $I->see( trans('validation.current_password') ); # now test password confirmation attribute $I->fillField('current_password', $this->password); $I->fillField('password', $this->new_password); $I->click('#change_password_button'); $I->assertEquals( User::find($user->id)->password, $current_password ); # check that no change accoured $I->see( trans('validation.confirmed', ['attribute' => 'password']) ); $I->dontSee( trans('validation.current_password') ); # test new password strength requirements $I->fillField('current_password', $this->password); $I->fillField('password', 'weakp'); $I->fillField('password_confirmation', 'weakp'); $I->click('#change_password_button'); $I->assertEquals( User::find($user->id)->password, $current_password ); # check that no change accoured $I->see( trans('validation.min.string', ['attribute' => 'password', 'min' => '6']) ); $I->see('The password must be at least 6 characters.'); # Test proper password change $I->fillField('current_password', $this->password); $I->fillField('password', $this->new_password); $I->fillField('password_confirmation', $this->new_password); $I->click('#change_password_button'); # check that no change accoured $I->see( trans('text.password_change_email_body', ['name' => Auth::user()->name]) ); $I->assertTrue( Hash::check( $this->new_password , User::find($user->id)->password )); # Test email confirmation $log_path = storage_path('logs/laravel.log'); $date = date('Y-m-d G:i:s') . '.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n\n.*'; $match = preg_grep( "/$date/" , file($log_path)); # assert single entry was found $cmd = "tail " . storage_path('logs/laravel.log') ." | grep 'Hello, " . $this->name . ", your password has been'"; $output = system($cmd); $I->assertEquals( trans('text.password_change_email_body', ['name' => $this->name]), $output ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testPasswordChange(): void\n {\n // Test strong password - should pass.\n $this->setUpUserPostData(Constants::SAFE_PASSWORD);\n $this->assertIsInt(\\edit_user($this->dummy_user_id));\n\n // Test weak password - should pass as well.\n $this->setUpUserPostData(Constants::PWNED_PASSWORD);\n $this->assertIsInt(\\edit_user($this->dummy_user_id));\n\n // Clean up.\n $this->tearDownUserPostData();\n }", "public function testUserPassword() {\n\t\t// make new User and save it to the database\n\t\t$newPassword = Generate::hash();\n\n\t\t// change the User password\n\t\t$this->visit('/home')\n\t\t\t->click('#user-update-button')\n\t\t\t->seePageIs('/user/update')\n\t\t\t->click('Change Password')\n\t\t\t->seePageIs('/user/password')\n\t\t\t->type($this->password, 'old_password')\n\t\t\t->type($newPassword, 'password')\n\t\t\t->type($newPassword, 'password_confirmation')\n\t\t\t->press('Change Password')\n\t\t\t->seePageIs('/home')\n\t\t\t->see('Your password was changed successfully!')\n\t\t\t->click('Logout')\n\t\t\t->seePageIs('/');\n\n\t\t// test a regular User's login with the new password\n\t\t// TODO: check the database instead of testing the login process\n\t\t$this->visit('/')\n\t\t\t->click('#login-button')\n\t\t\t->seePageIs('/login')\n\t\t\t->type($this->User->email, 'email')\n\t\t\t->type($newPassword, 'password')\n\t\t\t->press('Login')\n\t\t\t->seePageIs('/home')\n\t\t\t->within('#nav', function() {\n\t\t\t\t$this->see('Logout')\n\t\t\t\t\t->dontSee('Login')\n\t\t\t\t\t->dontSee('Admin');\n\t\t\t});\n\t}", "public function testChangesAUsersPassword()\n {\n $user = factory(User::class)->create();\n $token = Password::createToken($user);\n $response = $this->post('/password/reset', [\n 'token' => $token,\n 'email' => $user->email,\n 'password' => 'password',\n 'password_confirmation' => 'password'\n ]);\n $this->assertTrue(Hash::check('password', $user->fresh()->password));\n }", "protected function changePassword() {}", "public function testChangeMemberPassword()\n {\n }", "public function can_change_password() {\n return false;\n }", "function can_change_password() {\n\t\treturn false;\n\t}", "public function setPassword($newPassword);", "function can_change_password() {\n return false;\n }", "public function changeUserPassword($uid,$newPassword);", "public function changePassword(User $user, string $newPassword): void;", "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 test_admin_set_password()\n {\n $this->assertTrue($this->btwServer->adminSetServerPassword('secret'));\n }", "public function test_admin_set_password()\n {\n $this->assertTrue($this->btwServer->adminSetServerPassword('secret'));\n }", "public function testAdminChangePassword()\n {\n $this->authorizationChecker->shouldReceive('isGranted')->withAnyArgs()->andReturn(true);\n\n $form = $this->factory->create(ChangePasswordType::class);\n\n $form->submit(['newPassword' => 'moomoo']);\n\n Assert::assertTrue($form->isSynchronized());\n\n $changePasswordModel = new ChangePasswordModel();\n $changePasswordModel->setNewPassword('moomoo');\n Assert::assertEquals($changePasswordModel, $form->getData());\n\n $view = $form->createView();\n\n Assert::assertArrayHasKey('newPassword',$view->children);\n\n Assert::assertArrayNotHasKey('current_password',$view->children);\n }", "function testActivatePasswordFail() {\r\n $this->User = new User();\r\n \r\n //get the current password-hash\r\n \t$expected = $this->User->field('password', array('id'=>'1'));\r\n \t\r\n \t//activate with wrong key - should fail\r\n $result = $this->User->activatePassword('wrongkey');\r\n $this->assertFalse($result);\r\n \r\n //check if the password in the database has changed\r\n \t$result = $this->User->field('password', array('id'=>'1'));\r\n \t$this->assertEqual($result, $expected);\r\n }", "public function changePassword($username, $password);", "public function test_admin_set_password()\n {\n $this->assertTrue($this->postScriptumServer->adminSetServerPassword('secret'));\n }", "public function testRegularUserChangePassword()\n {\n $this->authorizationChecker->shouldReceive('isGranted')->withAnyArgs()->andReturn(false);\n\n $form = $this->factory->create(ChangePasswordType::class);\n\n $form->submit(['newPassword' => 'moomoo', 'currentPassword' => 'blue']);\n\n Assert::assertTrue($form->isSynchronized());\n\n $changePasswordModel = new ChangePasswordModel();\n $changePasswordModel->setNewPassword('moomoo');\n $changePasswordModel->setCurrentPassword('blue');\n Assert::assertEquals($changePasswordModel, $form->getData());\n\n $view = $form->createView();\n\n Assert::assertArrayHasKey('newPassword',$view->children);\n\n Assert::assertArrayHasKey('currentPassword',$view->children);\n }", "public function modifpassword($user,$passwd){\n \n }", "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 }", "function testActivatePasswordSuccess() {\r\n $this->User = new User();\r\n \t\r\n\t\t$expected = $this->User->field('password', array('id'=>'1'));\t\r\n \t\r\n \t// should return the new password\r\n $password = $this->User->activatePassword('1bc29b36f623ba82aaf6724fd3b16718');\r\n $this->assertTrue($password);\r\n \r\n //checkk if the password has changed\r\n\t\t$result = $this->User->field('password', array('id'=>'1'));\t\r\n \t$this->assertNotEqual($result, $expected);\r\n \t\r\n \t//check if the returned password is the same as in the database\r\n \t$this->assertEqual(md5($password), $result);\r\n \t\r\n \t\r\n \t\r\n \t//test done set data to the original values\r\n \t$this->User->id=1;\r\n \t$this->User->saveField('password', $expected);\r\n \t$this->User->saveField('password_key', '1bc29b36f623ba82aaf6724fd3b16718');\r\n }", "public function setPassword($value);", "public function change(string $password): void;", "public function testUpdatePasswordNotGiven(): void { }", "public function should_return_ok_after_user_changed_password()\n {\n factory(User::class)->create();\n $this->expectsEvents(PasswordChanged::class);\n\n $this->put('/v1/users/1/password', [\n 'old_password' => 'secrete123',\n 'new_password' => 'new123password',\n 'new_password_confirmation' => 'new123password'\n ]);\n\n $this->seeStatusCode(HttpStatus::OK);\n $this->seeJsonContains(['message' => 'The password has been changed successfully.']);\n\n // Just verifying if old password has been invalidated\n $user = User::find(1);\n $this->assertFalse(Hash::check('secrete123', $user->password));\n $this->assertTrue(Hash::check('new123password', $user->password));\n }", "public function setPassword($newPassword){\n\t}", "public function set_password()\n {\n factory(User::class)->create(['username' => 'testuser']);\n\n $cmd = $this->artisan('user:password testuser --password=testing');\n $cmd->assertExitCode(0);\n\n $cmd->execute();\n\n $user = User::query()->where('username', 'testuser')->first();\n $this->assertTrue(Hash::check('testing', $user->password));\n }", "public function testShouldNotChangePassword()\n {\n $credentials = array(\n 'email'=>'[email protected]',\n 'password'=>'',\n 'password_confirmation'=>''\n );\n\n // Should not call changePassword of the repository\n ConfideUser::$app['confide.repository'] = m::mock( 'ConfideRepository' );\n ConfideUser::$app['confide.repository']->shouldReceive( 'changePassword' )\n ->never();\n\n // Should call validate method\n ConfideUser::$app['confide.repository']->shouldReceive('validate')\n ->andReturn( false )\n ->times(4);\n\n ConfideUser::$app['confide.repository']->shouldReceive('model')\n ->andReturn( new ConfideUser )\n ->times(4);\n\n $this->populateUser();\n\n $this->assertFalse( $this->confide_user->resetPassword( $credentials ) );\n\n // Additional asserts\n // Password should not be changed because it is too short\n $credentials = array(\n 'email'=>'[email protected]',\n 'password'=>'39a',\n 'password_confirmation'=>'39a'\n );\n $this->assertFalse( $this->confide_user->resetPassword( $credentials ) );\n\n // Password should not be changed because it is too long\n $credentials = array(\n 'email'=>'[email protected]',\n 'password'=>'1a2f34g5uj887n',\n 'password_confirmation'=>'1a2f34g5uj887n'\n );\n $this->assertFalse( $this->confide_user->resetPassword( $credentials ) );\n\n // Password should not be changed because it is not confirmed\n $credentials = array(\n 'email'=>'[email protected]',\n 'password'=>'987987',\n 'password_confirmation'=>'562906'\n );\n $this->assertFalse( $this->confide_user->resetPassword( $credentials ) );\n }", "function ciniki_users_changePassword($ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbQuote');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'oldpassword'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Old Password'), \n 'newpassword'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'New Password'), \n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n \n if( strlen($args['newpassword']) < 8 ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.users.20', 'msg'=>'New password must be longer than 8 characters.'));\n }\n\n //\n // Check access \n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'users', 'private', 'checkAccess');\n $rc = ciniki_users_checkAccess($ciniki, 0, 'ciniki.users.changePassword', 0);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Check old password\n //\n $strsql = \"SELECT id, email FROM ciniki_users \"\n . \"WHERE id = '\" . ciniki_core_dbQuote($ciniki, $ciniki['session']['user']['id']) . \"' \"\n . \"AND password = SHA1('\" . ciniki_core_dbQuote($ciniki, $args['oldpassword']) . \"') \";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQuery');\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.users', 'user');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Perform an extra check to make sure only 1 row was found, other return error\n //\n if( $rc['num_rows'] != 1 ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.users.21', 'msg'=>'Invalid old password'));\n }\n\n //\n // Turn off autocommit\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionStart');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionRollback');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionCommit');\n $rc = ciniki_core_dbTransactionStart($ciniki, 'ciniki.users');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Update the password, but only if the old one matches\n //\n $strsql = \"UPDATE ciniki_users SET password = SHA1('\" . ciniki_core_dbQuote($ciniki, $args['newpassword']) . \"'), \"\n . \"last_updated = UTC_TIMESTAMP(), \"\n . \"last_pwd_change = UTC_TIMESTAMP() \"\n . \"WHERE id = '\" . ciniki_core_dbQuote($ciniki, $ciniki['session']['user']['id']) . \"' \"\n . \"AND password = SHA1('\" . ciniki_core_dbQuote($ciniki, $args['oldpassword']) . \"') \";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbUpdate');\n $rc = ciniki_core_dbUpdate($ciniki, $strsql, 'ciniki.users');\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.users');\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.users.22', 'msg'=>'Unable to update password.'));\n }\n\n if( $rc['num_affected_rows'] < 1 ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.users');\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.users.23', 'msg'=>'Unable to change password.'));\n }\n\n $rc = ciniki_core_dbTransactionCommit($ciniki, 'ciniki.users');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.users.24', 'msg'=>'Unable to update password.'));\n }\n\n return array('stat'=>'ok');\n}", "public function testLoggedUserVisitsChangePasswordPageOk()\n {\n // Prepare\n $user = factory(User::class)->create();\n\n // Request\n $response = $this->actingAs($user)->call('GET', $this->accountChangePasswordPageUrl);\n\n // Asserts\n $response->assertStatus(200);\n $response->assertViewIs('account.profile.changePassword');\n }", "public function setPassword(){\n\t}", "function user_changed_password($user_id, $new_password) {\n \n }", "function testPassword()\n {\n $this->f->_isSubmitted = true;\n $this->assertEquals(\"\", $this->f->password());\n $this->assertEquals(\"V\", $this->f->password(\"L\", \"H\", \"V\"));\n $val = &$this->f->password(\"L\", \"H\", \"V\");\n $this->f->error();\n $this->assertTrue($this->f->_hasErrors);\n $this->assertEquals(\"\", $val);\n }", "public function testUserEditNonMatchingPasswords()\n {\n $this->browse(function (Browser $browser) {\n $update_button = self::$locator . ' td .update_button';\n\n $browser->visit('/')\n ->click($update_button)\n ->type('username', self::$username)\n ->type('first_name', 'aaaa')\n ->type('last_name', 'aaaa')\n ->type('password', 'abcd1234')\n ->type('password_confirmation', 'abcder1234')\n ->click('button[type=\"submit\"]')\n\n ->waitForText('The password confirmation does not match.')\n ->assertSee('The password confirmation does not match.');\n });\n }", "public function testResetPasswordPass()\n {\n $user = $this->Users->get(1);\n\n $user->set('activation_key', $this->Users->generateActivationKey());\n\n $user->set('active', 0);\n\n $this->Users->save($user);\n\n $this->assertEquals(0, $user->active);\n\n $data = [\n 'new_password' => 'test',\n 'confirm_password' => 'test',\n ];\n\n $this->post('/users/resetPassword/' . $user->email . '/' . $user->activation_key . '/', $data);\n\n $this->assertResponseSuccess();\n\n $this->assertRedirect('/login');\n }", "public function testPasswordSetVerify()\n {\n $password = \"testPasswordForTesting\";\n $user = new User();\n\n // Set our password\n $user->setPassword($password);\n\n // Verify that our password works\n $this->assertTrue($user->verifyPassword($password));\n\n // Verify that an invalid password doesn't work\n $password .= \"ThisIsNowInvalid\";\n $this->assertFalse($user->verifyPassword($password));\n }", "public function checkPassword($value);", "public function test_users_update_short_password_error(){\n $this->signInUser();\n $this->user['password'] = str_repeat('A', 2);\n $response = $this->patch(route('users.update', ['user' => 5]), $this->user); \n $response->assertSessionHasErrors(['password']);\n }", "public function testChangeUser_noRedirect_setPasswordWithSpecChars()\n {\n $this->setExpectedException('oxException', 'Change user test');\n\n $sPass = '&quot;&#34;\"o?p[]XfdKvA=#3K8tQ%';\n $this->setRequestParameter('invadr', null);\n\n $oSession = $this->getMock(\\OxidEsales\\Eshop\\Core\\Session::class, array('checkSessionChallenge'));\n $oSession->expects($this->once())->method('checkSessionChallenge')->will($this->returnValue(true));\n\n $oUser = $this->getMock(\\OxidEsales\\Eshop\\Application\\Model\\User::class, array('changeUserData'));\n $oUser->oxuser__oxusername = new oxField('test_username', oxField::T_RAW);\n $oUser->oxuser__oxpassword = new oxField($sPass, oxField::T_RAW);\n $oUser->expects($this->once())\n ->method('changeUserData')\n ->with($this->equalTo('test_username'), $this->equalTo($sPass), $this->equalTo($sPass), $this->equalTo(null), $this->equalTo(null))\n ->will($this->throwException(new oxException('Change user test')));\n\n $oView = $this->getMock($this->getProxyClassName('oxcmp_user'), array('_getDelAddressData', 'getUser', 'getSession'));\n $oView->expects($this->once())->method('getUser')->will($this->returnValue($oUser));\n $oView->expects($this->once())->method('getSession')->will($this->returnValue($oSession));\n $oView->UNITchangeUser_noRedirect();\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 }", "function testPasswordGet()\n {\n $this->assertEqual($this->referenceHash, auth::getPassword(1), \"Testing password retrieval.\");\n }", "public function changePassword(PasswordChangeForm $form, User $user);", "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 isPasswordChangeEnabled();", "function change_password($username, $old_password, $new_password) {\n// return true or false\n\n // if the old password is right\n // change their password to new_password and return true\n // else throw an exception\n login($username, $old_password);\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('Password could not be changed.');\n } else {\n return true; // changed successfully\n }\n}", "public function Change_user_password() {\n\t\t$this->load->helper('pass');\n\t\t$user = $this->administration->getMyUser($this->user_id);\n\t\t//password\n\t\t$old_pass = $this->input->post('oldPassword');\n\t\t$newPass = $this->input->post('newPassword');\n\t\t$confirmNewPass = $this->input->post('confirmNewPassword');\n\t\tif($newPass == $confirmNewPass) {\n\t\t\t//check if old password is corrent\n\t\t\t$verify = $this->members->validateUser($user->Username,$old_pass);\n\t\t\tif($verify) {\n\t\t\t\t//validate if the password is in the correct format\n\t\t\t\t$valid_new_pass = checkPasswordCharacters($newPass);\n\t\t\t\tif($valid_new_pass) {\n\t\t\t\t\t$change_pass = $this->members->simple_pass_change($user->ID,$newPass);\n\t\t\t\t\tif($change_pass) {\n\t\t\t\t\t\techo '1';\n\t\t\t\t\t}else {\n\t\t\t\t\t\techo '6';\t\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\techo '7';\t\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\techo '8';\t\n\t\t\t}\n\t\t}else {\n\t\t\techo '9';\t\n\t\t}\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 testResetPassword()\n {\n }", "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 }", "function mysql_auth_can_change_password($username = \"\")\n{\n /*\n * By default allow the password to be modified, unless the existing\n * user is explicitly prohibited to do so.\n */\n\n if (empty($username) || !mysql_auth_user_exists($username))\n {\n return 1;\n } else {\n return dbFetchCell(\"SELECT `can_modify_passwd` FROM `users` WHERE `username` = ?\", array($username));\n }\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 }", "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 }", "public function testverifyIfPasswordIsNotSet()\n {\n $state=Database::findAdmin($this->db->getPdo(),\"\",\"cool\");\n $this->assertFalse($state);\n }", "public function test_users_update_long_password_error(){\n $this->signInUser();\n $this->user['password'] = str_repeat('A', 256);\n $response = $this->patch(route('users.update', ['user' => 5]), $this->user); \n $response->assertSessionHasErrors(['password']);\n }", "public function testUpdatePasswordOk()\n {\n // Config\n $currentPassword = '123456789';\n $newPassword = 'abcdef123456';\n\n // Prepare\n $user = factory(User::class)->create([\n 'password' => bcrypt($currentPassword),\n ]);\n\n $requestData = [\n 'currentpassword' => $currentPassword,\n 'newpassword' => $newPassword,\n ];\n\n $response = $this->actingAs($user)->call('POST', $this->accountChangePasswordPostUrl, $requestData);\n\n // Asserts\n $response->assertStatus(302);\n $response->assertRedirect($this->accountChangePasswordPageUrl);\n $response->assertSessionHas('success', trans('home.password_changed'));\n }", "function user_changed_password($user_id, $new_password)\n\t{\n\t}", "public function testSetAndGetPassword()\r\n {\r\n $testObj = $this->_createMockModel();\r\n $baseObj = $this->_createMockModel();\r\n\r\n // Set the Password\r\n $testObj->setPassword('myTestPassword');\r\n\r\n // Assert that a change occurred in the test object\r\n $this->assertNotEquals($testObj, $baseObj);\r\n\r\n // Assert that Password field was updated\r\n $this->assertEquals('myTestPassword', $testObj->getPassword());\r\n\r\n // Assert that no other return values were affected\r\n $this->_assertModelsSameExcept($testObj, $baseObj, 'Password');\r\n }", "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 ask_password()\n {\n factory(User::class)->create(['username' => 'testuser']);\n\n $cmd = $this->artisan('user:password testuser');\n $cmd->expectsQuestion('Password', 'testing');\n $cmd->assertExitCode(0);\n\n $cmd->execute();\n\n $user = User::query()->where('username', 'testuser')->first();\n $this->assertTrue(Hash::check('testing', $user->password));\n }", "public function setPassword($userid, $password);", "public function testRegistrationPasswordsDontMatch(): void { }", "function update_password()\n {\n }", "public function testLoginPassword(){\r\n\t\t\t$testLogin = [\r\n\t\t\t\t'username' => 'Right',\r\n\t\t\t\t'password' => ''\r\n\t\t\t];\r\n\t\t\t$validLogin = loginTest($testLogin);\r\n\t\t\t$this->assertFalse($validLogin);\r\n\t\t}", "public function test_users_update_valid_no_password_no_affect(){\n $this->signInUser();\n $user = User::find(5);\n unset($this->user['password']);\n unset($this->user['password_confirmation']);\n $this->patch(route('users.update', ['user' => $user->id]), $this->user); \n $this->assertDatabaseHas('users', [\n 'id' => $user->id,\n 'name' => $this->user['name'],\n 'email' => $this->user['email'],\n 'password' => $user->password\n ]);\n }", "public function testUpdatePasswordsDontMatch(): void { }", "function changePassword($newpass) {\n\t\tif ($this->id == null || $this->id == 0) return false;\n\n\t\t$db = getDb();\n\n\t\t$update_query = \"UPDATE user_table SET\n\t\tuser_password = $newpass\n\t\tWHERE user_id = '$this->id';\";\n\n\t\t$result = mysqli_query($db, $update_query);\n\n\t\tmysqli_close($db);\n\n\t\tif (!$result) return false;\n\n\t\treturn true;\n\n\t}", "public function test_users_update_short_confirmed_password_error(){\n $this->signInUser();\n $this->user['password_confirmation'] = str_repeat('A', 2);\n $response = $this->patch(route('users.update', ['user' => 5]), $this->user); \n $response->assertSessionHasErrors(['password_confirmation']);\n }", "function changePassword( $name, $pw ) {\n $d = loadDB();\n \n $found = false;\n foreach ($d['users'] as &$user) {\n if ($name == $user['name'] || $name == $user['email']) {\n $user[\"password\"] = $pw;\n saveDB( $d );\n $found = true;\n break;\n }\n }\n if (!$found)\n return FALSE;\n audit( \"changePassword done\", $name );\n return TRUE;\n }", "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 testLoginWrongPassword(): void { }", "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}", "function testResendPassword() {\n $this->assertFalse($this->oObject->resendPassword());\n }", "function allowPasswordChange() {\r\n\t\treturn true;\r\n\t}", "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 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 }", "function changePass() {\n\t\t$id = $this->AuthExt->User('id');\n\t\tif (!$id && empty($this->data)) {\n\t\t\t$this->Session->setFlash(__('Invalid user', true));\n\t\t\t$this->redirect(array('action' => 'index'));\n\t\t}\n\t\t\n\t\tif (!empty($this->data)) {\n\t\t\t//don't allow hidden variables tweaking get the group and username \n\t\t\t//form the system in case an override occured from the hidden fields\n\t\t\t$this->data['User']['role_id'] = $this->AuthExt->User('role_id');\n\t\t\t$this->data['User']['username'] = $this->AuthExt->User('username');\n\t\t\tif ($this->User->save($this->data)) {\n\t\t\t\t$this->Session->setFlash('The password change has been saved', 'flash_success');\n\t\t\t\t$this->redirect(array('action' => 'index', 'controller' => ''));\n\t\t\t} else {\n\t\t\t\tprint_r($this->data);\n\t\t\t\t$this->data = $this->User->read(null, $id);\n\t\t\t\t$this->data['User']['password'] = null;\n\t\t\t\t$this->data['User']['confirm_passwd'] = null;\n\t\t\t\t$this->Session->setFlash('The password could not be saved. Please, try again.', 'flash_failure');\n\t\t\t}\n\t\t}\n\t\tif (empty($this->data)) {\n\t\t\t$this->data = $this->User->read(null, $id);\n\t\t\t$this->data['User']['password'] = null;\n\t\t}\n\t\t$roles = $this->User->Role->find('list');\n\t\t$this->set(compact('roles'));\n\t}", "function changePassword($userid, $password, $mode = null)\n\t{\n\t\trequire_once $_SERVER['DOCUMENT_ROOT'] . '/Connections/MyDBConnector.php';\n\t\t$pdo = (new MyDBConnector())->getPDO();\n\t\t$sql = \"UPDATE staff_directory SET `pswd` = '\" . password_hash($password, PASSWORD_BCRYPT) . \"' WHERE staffId = \" . $userid;\n\t\t$stmt = $pdo->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL));\n\t\t$chk = $stmt->execute();\n\t\tif ($chk) {\n\t\t\treturn 'success';\n\t\t} else {\n\t\t\treturn 'error';\n\t\t}\n\t}", "public function testIsValidLogIn_InCorrectPassword_ReturnsErrorMessage()\n {\n $user = new User();\n\n $user -> email = \"[email protected]\";\n $user -> password = \"secret\";\n\n $this->browse(function ($browser) use ($user) {\n $browser->visit('/login')\n ->pause(1000)\n ->type('@login-email-input', $user->email)\n ->type('@login-password-input', 'test')\n ->click('@login-button')\n ->assertSee('These credentials do not match our records.');\n });\n }", "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 test_users_update_long_confirmed_password_error(){\n $this->signInUser();\n $this->user['password_confirmation'] = str_repeat('A', 256);\n $response = $this->patch(route('users.update', ['user' => 5]), $this->user); \n $response->assertSessionHasErrors(['password_confirmation']);\n }", "public function changePassword($user_id, $password){\n\t\t\t$query = $this->connection()->prepare(\"UPDATE teacher SET passwordz='$password' WHERE id='$user_id'\");\n\t\t $query->execute();\n\t\t return true;\n\t\t}", "function change_pwd()\r\n {\r\n include 'database/session.php';\r\n $OldPwd = htmlspecialchars($_POST['OldPwd']);\r\n $NewPwd1 = htmlspecialchars($_POST['NewPwd1']);\r\n $NewPwd2 = htmlspecialchars($_POST['NewPwd2']);\r\n \r\n if ($NewPwd1!=$NewPwd2) return false;\r\n \r\n return(changePassword($OldPwd, $NewPwd1));\r\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 setPassword($password);", "public function setPassword($password);", "public function setPassword($password);", "public function testUpdatePasswordValidationError()\n {\n // Config\n $currentPassword = '123456789';\n $newPassword = '123';\n\n // Prepare\n $user = factory(User::class)->create([\n 'password' => bcrypt($currentPassword),\n ]);\n\n $requestData = [\n 'currentpassword' => '123456789',\n 'newpassword' => $newPassword,\n ];\n\n $response = $this->actingAs($user)->call('POST', $this->accountChangePasswordPostUrl, $requestData);\n\n // Asserts\n $response->assertStatus(302);\n $response->assertRedirect($this->accountChangePasswordPageUrl);\n $response->assertSessionHasErrors('password');\n $response->assertSessionMissing('success');\n }", "function reset_password($user, $new_pass)\n {\n }", "public function change_password($data, $user_id) {\r\n\r\n // Start Backend Validation\r\n if (empty($data['old-pwd'])) {\r\n $this->errors['old-pwd'] = 'رجاء لا تترك هذا الحقل فارغا';\r\n }\r\n\r\n if (empty($data['new-pwd'])) {\r\n $this->errors['new-pwd'] = 'رجاء لا تترك هذا الحقل فارغا';\r\n } elseif (strlen($data['new-pwd']) < 8) {\r\n $this->errors['new-pwd'] = 'يجب على كلمة السر أن تتكون من 8 أحرف فأكثر';\r\n }\r\n\r\n if ($data['confirm-pwd'] != $data['new-pwd']) {\r\n $this->errors['confirm-pwd'] = 'كلمتا السر غير متطابقتان';\r\n }\r\n\r\n if (empty($this->errors)) {\r\n // Sanitize Data\r\n $old_pwd = sha1(filter_var($data['old-pwd'], FILTER_SANITIZE_STRING));\r\n $new_pwd = sha1(filter_var($data['new-pwd'], FILTER_SANITIZE_STRING));\r\n\r\n $user = $this->select('users', 'id', $user_id)->fetch_assoc();\r\n\r\n if ($user['password'] === $old_pwd) { // If Passwords Are Mached\r\n $connection = DB::connect();\r\n\r\n // Update The Password\r\n $stmt = \"UPDATE users SET password = '$new_pwd' WHERE id = '$user_id'\";\r\n $result = $connection->query($stmt);\r\n\r\n // Redirect To Profile Page\r\n $profile_url = DB::MAIN_URL . 'profile.php';\r\n header('location: ' . $profile_url);\r\n\r\n } else {\r\n $this->errors['old-pwd'] = 'كلمة السر غير صحيحة';\r\n }\r\n\r\n }\r\n\r\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 editUserPasswordChk() {\r\n\r\n $table_to_pass = 'mst_users';\r\n $fields_to_pass = array('user_id', 'user_password');\r\n $condition_to_pass = array(\"user_password\" => base64_encode($this->input->post('old_user_password')));\r\n $arr_login_data = $this->user_model->getUserInformation($table_to_pass, $fields_to_pass, $condition_to_pass, $order_by_to_pass = '', $limit_to_pass = '', $debug_to_pass = 0);\r\n if (count($arr_login_data)) {\r\n echo 'true';\r\n } else {\r\n echo 'false';\r\n }\r\n }", "public function updatePassword(UserInterface $user);", "function do_change_password($puuid, &$error, $set_force_reset=false) {\n global $_min_passwd_len;\n global $_passwd_numbers;\n global $_passwd_uperlower;\n global $_passwd_chars;\n\n if($puuid === '') {\n $error = \"No PUUID given\";\n return false;\n }\n\n if($_REQUEST['p1'] === $_REQUEST['p2']) {\n $temparr = array();\n $p = $_REQUEST['p1'];\n\n // do strength test here\n if(strlen($p) < $_min_passwd_len) {\n $error = \"Password too short\";\n return false;\n }\n if($_passwd_numbers && !preg_match('/[0-9]/', $p)) {\n $error = \"Password must contain one or more numbers\";\n return false;\n }\n if($_passwd_uperlower && \n \t(!preg_match('/[A-Z]/', $p) || !preg_match('/[a-z]/', $p))) {\n $error = \"Password must contain both upper case and lower case\";\n return false;\n }\n if($_passwd_chars && \n \t(preg_match_all('/[A-Za-z0-9]/', $p, &$temparr) == strlen($p))) {\n $error = \"Password must contain non-alphanumeric characters\";\n return false;\n }\n\n // we got here, so update password\n $s = \"SELECT distinct passwordtype from password_types\";\n $res = pg_query($s);\n if (!$res) {\n $error = \"DB Error\";\n return false;\n }\n $hashes = pg_fetch_all($res);\n pg_free_result($res);\n\n hpcman_log(\"Updating \".count($hashes).\" password hashes for puuid \".$puuid);\n\n if (!pg_query(\"BEGIN\")) {\n $error = \"Could not begin transaction\";\n return false;\n }\n\n foreach($hashes as $hash) {\n $s = \"UPDATE passwords SET password=$1 \n\tWHERE puuid=$2 AND passwordtype=$3\";\n $passwd = hpcman_hash($hash['passwordtype'], $p);\n $result = pg_query_params($s, array($passwd, $puuid, $hash['passwordtype']));\n if (!$result) {\n $error = \"DB Error\";\n return false;\n }\n\n $acount = pg_affected_rows($result);\n\n if ($acount > 1) {\n $error = \"Error: Too many rows\";\n if(!pg_query(\"ROLLBACK\")) {\n $error .= \", rollback failed\";\n }\n return false;\n } else if ($acount < 1) {\n hpcman_log(\"Adding new password hash {$hash['passwordtype']} for $puuid\");\n $sql = \"INSERT INTO passwords (password, puuid, passwordtype) VALUES ($1,$2,$3)\";\n $result = pg_query_params($sql, array($passwd, $puuid, $hash['passwordtype']));\n if (!$result) {\n $error = \"Error: Not enough rows; insert failed\";\n if(!pg_query(\"ROLLBACK\")) {\n $error .= \", rollback failed\";\n }\n return false;\n }\n }\n }\n\n if (!pg_query(\"COMMIT\")) {\n $error = \"DB Error: Commit failed\";\n return false;\n }\n\n if($set_force_reset) {\n $sql = \"UPDATE authenticators SET mustchange='t' \n\tWHERE puuid=$1 AND authid=0\";\n if(!pg_query_params($sql, array($puuid))) {\n\t$error = \"DB Error\";\n return false;\n }\n } else {\n $sql = \"UPDATE authenticators SET mustchange='f'\n WHERE puuid=$1 AND authid=0\";\n if(!pg_query_params($sql, array($puuid))) {\n $error = \"DB Error\";\n return false;\n }\n }\n } else {\n $error = \"Passwords do not match\";\n return false;\n }\n return true;\n}", "public function testverifyIfPasswordIsFalse()\n {\n $state=Database::findAdmin($this->db->getPdo(),\"bill\",\"cool\");\n $this->assertFalse($state);\n }", "public function setPasswordField($password = true) {}", "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 changePassword($data){\n\t\tif(isset($data['User']['current_password']) && isset($data['User']['id'])){\n\t\t\tif($this->checkPassword($data['User']['id'], $data['User']['current_password'])){\n\t\t\t\tunset($data['User']['current_password']);\n\t\t\t\treturn $this->save($data);\n\t\t\t}\telse {\n\t\t\t\t$this->invalidate('current_password', 'Your current password is not correct.');\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "function userCanSetDbPassword(){\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}", "public function testNonLoggedUserUpdatePasswordRedirectsToLogin()\n {\n $response = $this->call('POST', $this->accountChangePasswordPostUrl);\n\n // Asserts\n $response->assertStatus(302);\n $response->assertRedirect('login');\n }" ]
[ "0.85630643", "0.8211274", "0.81336457", "0.8131726", "0.7933132", "0.7632666", "0.76032466", "0.75921154", "0.75810003", "0.75557506", "0.7528963", "0.748404", "0.7481379", "0.7481379", "0.7467652", "0.74315405", "0.7419309", "0.7411667", "0.7397919", "0.7383715", "0.7377609", "0.7375334", "0.73669696", "0.7342075", "0.7302682", "0.73025817", "0.72981495", "0.72935224", "0.72696316", "0.72686934", "0.72394186", "0.7230007", "0.72217125", "0.7193216", "0.71916467", "0.7182679", "0.71464384", "0.7145759", "0.7129388", "0.7129289", "0.7118834", "0.70993507", "0.70960534", "0.70911497", "0.7090233", "0.7086143", "0.7080704", "0.70805186", "0.70730954", "0.70666033", "0.70610106", "0.70581657", "0.70522904", "0.70477104", "0.704696", "0.7031092", "0.7015107", "0.7011805", "0.70052713", "0.70009714", "0.69999856", "0.6999777", "0.6998812", "0.69920707", "0.69827634", "0.6980312", "0.6977581", "0.697468", "0.69733", "0.6968588", "0.69442236", "0.69429296", "0.69332093", "0.69264644", "0.6925818", "0.6924834", "0.6916368", "0.6914215", "0.6906743", "0.69048864", "0.6887336", "0.68832743", "0.68830603", "0.6874895", "0.6865788", "0.6865788", "0.6865788", "0.6861523", "0.6853006", "0.6847912", "0.6845827", "0.6838181", "0.6829389", "0.6829196", "0.68283284", "0.68251437", "0.68214273", "0.681671", "0.68129194", "0.68103486" ]
0.76581526
5
test forgotten password email
public function forgottenpasswordTest(FunctionalTester $I){ $user = HelperController::common_login($I, $this->name, $this->email, $this->password); HelperController::logout($I); $I->amOnPage( route('auth.password.reset') ); $I->fillField('.email_form', 'nonregistered email'); $I->click( trans('text.send_password_reset_link') ); $I->see( 'The email must be a valid email address.' ); $I->fillField('.email_form', '[email protected]'); $I->click( trans('text.send_password_reset_link') ); $I->see( trans('passwords.user') ); $I->fillField('.email_form', $this->email); $I->click( trans('text.send_password_reset_link') ); $I->see( trans('passwords.sent') ); # check email $token = DB::table('password_resets')->where('email', $this->email)->first()->token; $log_path = storage_path('logs/laravel.log'); $match = preg_grep( "/$token/" , file($log_path)); $match = implode('|', $match); preg_match('#href="(.*)"#', $match, $url); $url = $url[1]; # follow email $I->amOnPage($url); $I->see( trans('text.reset_password') ); $I->click( '.reset_password_button' ); $I->see( trans('validation.filled', ['attribute' => 'password']) ); $I->fillField('password', $this->new_password); $I->click( '.reset_password_button' ); $I->see( trans('validation.confirmed', ['attribute' => 'password']) ); # change password $I->fillField('password', $this->new_password); $I->fillField('password_confirmation', $this->new_password); $I->click( '.reset_password_button' ); # see index page $I->click('.logged_user'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testForgotPassword()\n {\n $result = $this->mailgunModel->forgotPassword($this->dataTest->to,\n $this->dataTest->pass,\n $this->dataTest->html\n );\n $this->assertEquals(\"200\", $result->http_response_code);\n $this->assertEquals(\"Queued. Thank you.\", $result->http_response_body->message);\n $this->assertNotNull($result->http_response_body->id);\n }", "public function testSendsPasswordResetEmail()\n {\n $user = factory(User::class)->create();\n $this->expectsNotification($user, ResetPassword::class);\n $response = $this->post('password/email', ['email' => $user->email]);\n $response->assertStatus(302);\n }", "public function testSendPasswordRecoveryEmail()\n {\n }", "public function forgotPassword()\n { \n $siteUrl = ($this->request->type)?env('WEB_SITE_AUDIO_URL'):env('WEB_SITE_URL');\n $this->setRules([ 'email' => 'required|exists:customers,email' ]);\n $this->setMessages('email.exists', trans('customer::customer.email_not_registered'));\n $this->_validate();\n $newPassword = str_random(8);\n $user = $this->_customer->where('email', $this->request->email)->first();\n $user->forgot_password = $newPassword;\n $user->save();\n if (!empty($user) && count($user->toArray()) > 0) {\n $this->email = $this->email->fetchEmailTemplate('forgot_password');\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, $siteUrl.'reset-password' . '/' . $user->forgot_password ], $this->email->content);\n $this->notification->email($user, $this->email->subject, $this->email->content);\n }\n return true;\n }", "public function test_admin_can_send_request_reset_password()\n {\n $postedEmail = $this->post(route('api.admin.auth.password.postEmail'), ['email' => $this->admin->email]);\n $postedEmail->assertResponseOk()->isJson();\n }", "public function testGetResetPasswordPageEmailWasNotSentError()\n\t{\n\t\t$meta = \\Orchestra\\Memory::make('user');\n\t\t$hash = \\Str::random(32);\n\t\t$meta->put('reset_password_hash.1', $hash);\n\n\t\t$this->getMailerMock();\n\t\t$this->call('orchestra::forgot@reset', array(1, $hash));\n\t\t$this->assertRedirectedTo(handles('orchestra::login'));\n\t\t$this->assertTrue(is_string(\\Session::get('message')));\n\t}", "public function forgotten_password() {\n $email = $this->input->post('email');\n if (!$this->users_model->fields(array('id'))->where('email', $email)->limit(1)->get()) {\n return $this->send_error('NOT_REGISTERED');\n }\n $this->load->helper('string');\n $this->load->library('email');\n $token = random_string('sha1');\n if (!$this->users_model->where('email', $email)->update(array('forgotten_password_code' => $token, 'forgotten_password_time' => time()))) {\n return $this->send_error('ERROR');\n }\n $this->email->from(config_item('email_from'), config_item('email_from_name'))\n ->to($email)\n ->subject('Passwrod reset | Go4Slam app')\n ->message('Hello, <br><br> Press the link below to set a new password. <br><br><a href=\"' . base_url() . 'user/reset_password/' . urlencode($email) . '/' . urlencode($token) . '\">Click here</a>')\n ->set_mailtype('html');\n if (!$this->email->send()) {\n return $this->send_error('UNABLE_TO_SEND_EMAIL');\n }\n return $this->send_success();\n }", "public function forgotpasswordAction()\n {\n $user_service = $this->getServiceLocator()->get('user');\n $email_sent = false;\n\n if ($this->getRequest()->isPost())\n {\n $data = $this->getRequest()->getPost();\n\n $email = trim($data['email']);\n $email = strtolower($email);\n $user_service->emailPassword($email);\n $email_sent = true;\n }\n\n return ['email_sent' => $email_sent];\n }", "public function testGetAccountPasswordForgotOut()\n {\n // Get forgot pass page\n $result = $this->visit('account/password/forgot')\n ->see('RESET YOUR PASSWORD')\n ->seePageIs('/account/password/forgot');\n }", "public function testDoesNotSendPasswordResetEmail()\n {\n $this->doesntExpectJobs(ResetPassword::class);\n $this->post('password/email', ['email' => '[email protected]']);\n }", "public function testRequestPasswordReset()\n {\n }", "function forgot_password()\n\t{\n\t\tif ($this->tank_auth->is_logged_in()) {\t\t\t\t\t\t\t\t\t// logged in\n\t\t\tredirect('');\n\n\t\t} elseif ($this->tank_auth->is_logged_in(FALSE)) {\t\t\t\t\t\t// logged in, not activated\n\t\t\tredirect('/auth/send_again/');\n\n\t\t} else {\n\t\t\t$this->form_validation->set_rules('email', 'Email', 'trim|required|xss_clean|valid_email');\n\n\t\t\t$data['errors'] = array();\n\n\t\t\tif ($this->form_validation->run()) {\t\t\t\t\t\t\t\t// validation ok\n\t\t\t\tif (!is_null($data = $this->tank_auth->forgot_password(\n\t\t\t\t\t\t$this->form_validation->set_value('email')))) {\n\n\t\t\t\t\t$data['site_name'] = $this->config->item('website_name', 'tank_auth');\n\n\t\t\t\t\t// Send email with password activation link\n\t\t\t\t\t$this->_send_email('forgot_password', $data['email'], $data);\n\n\t\t\t\t\t$this->_show_message($this->lang->line('auth_message_new_password_sent'));\n\n\t\t\t\t} else {\n\t\t\t\t\t$errors = $this->tank_auth->get_error_message();\n\t\t\t\t\tforeach ($errors as $k => $v)\t$data['errors'][$k] = $this->lang->line($v);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//$this->load->view('auth/forgot_password_form', $data);\n\t\t\tdisplay('forgot_password', $data);\n\t\t}\n\t}", "public function testResetPassword()\n {\n }", "public function forgot_pwd()\r\n {\r\n //provided the correct combination of user name and email address\r\n\r\n $username = htmlspecialchars($_POST['username']);\r\n $email = htmlspecialchars($_POST['email']);\r\n\r\n require_once 'database/profile.php';\r\n require_once 'database/session.php';\r\n\r\n $usernameId = getUserId($username);\r\n if (!$usernameId) {\r\n return \"Username does not exist.\";\r\n }\r\n\r\n $userInfo = getProfile($usernameId);\r\n if ($userInfo[\"email\"] != $email) {\r\n return \"Email doesn't match the one we have on file.\";\r\n }\r\n\r\n $password = getPassword($userId);\r\n return $this->send_forgotten_pwd($username, $password, $email);\r\n \r\n }", "public function testShouldSendForgotPassword()\n {\n ConfideUser::$app['confide.repository'] = m::mock( 'ConfideRepository' );\n ConfideUser::$app['confide.repository']->shouldReceive('forgotPassword')\n ->with( $this->confide_user )\n ->andReturn( true )\n ->once();\n\n // Should send an email once\n ConfideUser::$app['mailer'] = m::mock( 'Mail' );\n ConfideUser::$app['mailer']->shouldReceive('send')\n ->andReturn( null )\n ->atLeast(1);\n\n $this->populateUser();\n\n $old_password = $this->confide_user->password;\n\n $this->assertTrue( $this->confide_user->forgotPassword() );\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 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 }", "public function forgot_password() {\n $flash = null;\n // if the user has tried logging in\n if(isset($_POST['username'])){\n $email = $_POST['username'];\n $user = $this->User->getByEmail($email);\n $pass = rand(111111, 999999);\n if($this->User->setPassword($user['id'], $pass)) {\n $text = <<<END\nBecause of a request on our site, your password has been reset. To change your password, go to /users/change_password\nYour username is: {$email}\nYour password is: {$pass}\nEND;\n $email = self::getLib('email');\n $html = $email->text2html($text, email);\n $email->setSender('support');\n $email->setReplyTo('support');\n $email->setRecipients( array($recipient) );\n $email->setSubject(\"Your password has been reset\");\n $email->addMessagePart($text);\n $email->addMessagePart($html, \"html\");\n $email->send();\n $flash = \"An email with your new password has been sent to you. You should receive it shortly.\";\n } else {\n $flash = \"An error occured.\";\n }\n } else {\n $flash = \"Please enter a user name.\";\n }\n return array('flash' => $flash);\n }", "public function testPostForgotPage()\n\t{\n\t\t$this->call('orchestra::forgot@index', array(), 'POST', array(\n\t\t\t'email' => '[email protected]',\n\t\t\t\\Session::csrf_token => \\Session::token(),\n\t\t));\n\t\t$this->assertRedirectedTo(handles('orchestra::forgot'));\n\n\t\t// Mimic shutting down Orchestra.\n\t\t\\Orchestra\\Core::shutdown();\n\n\t\t$meta = \\Orchestra\\Model\\User\\Meta::where('user_id', '=', 1)\n\t\t\t\t\t->where('name', '=', 'reset_password_hash')\n\t\t\t\t\t->first();\n\n\t\t$this->assertNotNull($meta);\n\t\t$this->assertNotNull($meta->value);\n\t}", "public function forgotPassword()\n {\n $email = $this->input->post('email');\n $token = bin2hex(random_bytes(25));\n\n $user_id = $this->authentication_helper->checkEmail($email);\n\n if (isset($user_id) && !empty($user_id)) \n {\n $status = $this->authentication_worker->createToken($token, $user_id);\n if ($status) {\n $to_email = $email;\n $subject = \"Redefina sua senha\";\n $url = site_url('authentication/resetNewPassword' . \"?token=\" . $token);\n $message = \"Redefina sua senha da ZZjober clicando no link<br/><a href='\" . $url. \"'>\".$url.\"</a>\";\n $this->sendMail($to_email, $subject, $message);\n $this->session->set_flashdata('success_msg', 'Verifique seu e-mail para redefinir sua nova senha através do link');\n redirect('home/Entrar');\n }\n } else {\n $this->session->set_flashdata('error_msg', 'E-mail não encontrado');\n redirect('home/Entrar');\n }\n\n }", "public function testResetPasswordPass()\n {\n $user = $this->Users->get(1);\n\n $user->set('activation_key', $this->Users->generateActivationKey());\n\n $user->set('active', 0);\n\n $this->Users->save($user);\n\n $this->assertEquals(0, $user->active);\n\n $data = [\n 'new_password' => 'test',\n 'confirm_password' => 'test',\n ];\n\n $this->post('/users/resetPassword/' . $user->email . '/' . $user->activation_key . '/', $data);\n\n $this->assertResponseSuccess();\n\n $this->assertRedirect('/login');\n }", "public function post_forgotpassword() {\n try {\n $i = Input::post();\n\n $auth = new \\Craftpip\\OAuth\\Auth();\n $users = $auth->getByUsernameEmail($i['email']);\n if (!$users) {\n throw new \\Craftpip\\Exception('Email/Username not registered with us.');\n }\n\n $mail = new \\Craftpip\\Mail($users['id']);\n $mail->template_forgotpassword();\n $mail->send();\n\n $response = array(\n 'status' => true,\n 'message' => 'asdsa',\n );\n } catch (Exception $e) {\n $e = new \\Craftpip\\Exception($e->getMessage(), $e->getCode());\n $response = array(\n 'status' => false,\n 'reason' => $e->getMessage(),\n );\n }\n\n echo json_encode($response);\n }", "public function forgotPasswordAction()\n {\n $form = new ForgotPasswordForm();\n\n if ($this->request->isPost())\n {\n if($this->security->checkToken())\n {\n // Send emails only is config value is set to true\n if ($this->getDI()->get('config')->useMail) {\n\n if ($form->isValid($this->request->getPost()) == false) {\n foreach ($form->getMessages() as $message) {\n $this->flash->error($message);\n }\n } else {\n\n $user = Users::findFirstByEmail($this->request->getPost('email'));\n if (!$user) {\n $this->flash->success('There is no account associated to this email');\n } else {\n\n $resetPassword = new ResetPasswords();\n $resetPassword->usersId = $user->id;\n if ($resetPassword->save()) {\n // $this->flash->success('Success! Please check your messages for an email reset password');\n $this->flashSess->success(\"Success! Please check your messages for an email reset password\");\n $this->view->disable();\n return $this->response->redirect('');\n } else {\n foreach ($resetPassword->getMessages() as $message) {\n $this->flash->error($message);\n }\n }\n }\n }\n } else {\n $this->flash->warning('Emails are currently disabled. Change config key \"useMail\" to true to enable emails.');\n }\n }\n else {\n $this->flash->error('CSRF Validation is Failed');\n }\n }\n $this->view->form = $form;\n }", "public function forgot_password()\n\t{\n\t\t$email = Input::get('email');\n\n\t\t//Get reset code and send email\n\t\tif($resetCode = $this->repo->getResetCode($email))\n\t\t{\n\t\t\treturn View::make('authentication.confirm_reset_code_sent')->with('email',$email)->with('resetCode',$resetCode);\n\t\t}\n\t\treturn View::make('authentication.forgot_password')->withInput(Input::all()); \n\t}", "function forgotten_password() {\n $this->load->library('form_validation');\n\n $this->form_validation->set_rules('forgot_password_identity', 'Identity (Email / Login)', 'required');\n\n // Run the validation.\n if ($this->form_validation->run()) {\n // The 'forgotten_password()' function will verify the users identity exists and automatically send a 'Forgotten Password' email.\n $response = $this->ez_auth->forgotten_password($this->input->post('forgot_password_identity'));\n\n // Save any public status or error messages (Whilst suppressing any admin messages) to CI's flash session data.\n $this->session->set_flashdata('message', $this->ez_auth->get_messages());\n\n // Redirect user.\n redirect();\n }\n else {\n // Set validation errors.\n $this->data['message'] = validation_errors('<p class=\"error_msg\">', '</p>');\n\n return FALSE;\n }\n }", "public function forgotpassword() {\n\n\t\t$login_box_visiblity = '';\n\t\t$forgot_box_visiblity = 'visible';\n\n\t\t$this->JQValidator->addValidation('User', $this->User->validate, 'UserLoginForm');\n\t\t$this->JQValidator->addValidation('ForgotPasswordForm', $this->ForgotPasswordForm->validate, 'ForgotPasswordForm');\n\n\t\t$this->set(compact('login_box_visiblity', 'forgot_box_visiblity'));\n\n\t\tif (array_key_exists('ForgotPasswordForm', $this->data)) {\n\t\t\t$flag = $this->ForgotPassword->sendMail($this->data['ForgotPasswordForm'], 'admin');\n\n\t\t\tif ($flag) {\n\t\t\t\t$this->redirect('login');\n\t\t\t}\n\t\t} else {\n\t\t\t$this->login();\n\t\t}\n\t}", "public function testGetResetPasswordPage()\n\t{\n\t\t$meta = \\Orchestra\\Memory::make('user');\n\t\t$hash = \\Str::random(32);\n\t\t$meta->put('reset_password_hash.1', $hash);\n\n\t\t$this->call('orchestra::forgot@reset', array(1, $hash));\n\t\t$this->assertRedirectedTo(handles('orchestra::login'));\n\n\t\t$user = \\Orchestra\\Model\\User::find(1);\n\t\t$this->assertFalse(\\Hash::check('123456', $user->password));\n\t}", "public function testChangesAUsersPassword()\n {\n $user = factory(User::class)->create();\n $token = Password::createToken($user);\n $response = $this->post('/password/reset', [\n 'token' => $token,\n 'email' => $user->email,\n 'password' => 'password',\n 'password_confirmation' => 'password'\n ]);\n $this->assertTrue(Hash::check('password', $user->fresh()->password));\n }", "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 testGetAccountPasswordForgotIn($auth)\n {\n // Get forgot pass page\n $result = $this->actingAs($auth)\n ->visit('account/password/forgot')\n ->see('Search Events Near You')\n ->seePageIs('/');\n }", "public function forgot($data)\n {\n $email = $this->getOne('email', array('email'=>$data['email']));\n \n if(empty($email))\n {\n $this->addError('forgot', 'incorrect', null, 'model');\n return false;\n }\n \n $hash = App::controller()->passwordHash();\n $data['password'] = $hash['hash'];\n $data['salt'] = $hash['salt'];\n \n if(App::controller()->sendMail($email, 'test subj forgot', 'test forgot. New pass: '.$hash['pass']))\n {\n if($this->update($data, array('email'=>$email)))\n {\n return true;\n }\n $this->addError('forgot', 'save_error', null, 'model');\n return false;\n }\n else\n {\n $this->addError('forgot', 'email_send_error', null, 'model');\n }\n \n return false;\n }", "function forgot()\n\t{\n\t\t$email_count = DB::table('users')\n ->where('email',Input::get('email'))\n ->count();\n\t\t\tif ($email_count == 1) {\t\t\n\n\t\t\t\t/* send email for password reset link */\n\t\t\t\t$resetLink = $this->generateResetPasswordLink(Input::get('email'));\t\n\t\t\t\t$resetLink_url = 'http://' . $_SERVER['SERVER_NAME'] . $resetLink;\n\t\t\t\t//return Redirect::to($resetLink);\n\n\t\t\t\t$to_email = Input::get('email');\n\t\t\t\t$subject = \"Nobleman password reset link.\";\n\t\t\t\t$passwordreset_link = 'http://localhost/nobleman';\n\t\t\t\t$message_body = '<html><body>\n\t\t\t\t\t\t\t\t<p>Hi,</p>\n\t\t\t\t\t\t\t\t<P></p>\n\t\t\t\t\t\t\t\t<p>Here is your password reset link:</p>\n\t\t\t\t\t\t\t\t<P>Link : <a href=\"'.$resetLink_url.'\">'.$resetLink_url.'</a></p>\n\t\t\t\t\t\t\t\t<P></p>\n\t\t\t\t\t\t\t\t</body></html>';\n\t\t\t\t$nb_email = \"[email protected]\";\t\n\n\t\t\t $headers = 'From: '.$nb_email.'' . \"\\r\\n\" .\n\t\t\t 'Reply-To: '.$nb_email.'' . \"\\r\\n\" .\n\t\t\t \"Content-Type: text/html; charset=ISO-8859-1\\r\\n\" .\n\t\t\t 'X-Mailer: PHP/' . phpversion();\n\t\t\t \n\t\t\t mail($to_email, $subject, $message_body, $headers);\n\n\t\t\t Session::flash('sendmessage', 'Reset password link has been sent to your email address.Please check your email!');\n\t\t\t\treturn Redirect::to('/login');\n\n\t\t\t}else{\n\t\t\t\tSession::flash('message', 'Invalid User Email!');\n\t\t\t\treturn Redirect::to('/login');\n\t\t\t}\n\t}", "public function do_forgot_password()\n {\n if( Confide::forgotPassword( Input::get( 'email' ) ) )\n {\n $notice_msg = Lang::get('confide::confide.alerts.password_forgot');\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_forgot');\n return Redirect::action('UserController@forgot_password')\n ->withInput()\n ->with( 'error', $error_msg );\n }\n }", "public function forgot()\n\t{\n\t\t/**\n\t\t* Intilize Url class for post and get request\n\t\t**/\n\t\t$email = $this->url->post('mail');\n\t\t/** \n\t\t* Check submit is POST request \n\t\t* Validate input field\n **/\n\t\tif (!isset($_POST['forgot']) || !$this->validateForgot($email)) {\n\t\t\t$this->session->data['error'] = 'Warning: Please enter valid data in input box.';\n\t\t\t$this->url->redirect('forgot');\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('forgot');\n\t\t}\n\n\t\t/** \n\t\t* If the user exists\n\t\t* Check his account and login attempts\n\t\t* Get user data \n **/\n\t\t$this->loginModel = new Login();\n\t\tif ($user = $this->loginModel->checkUserEmail($email)) {\n\t\t\t/** \n\t\t\t* Check Login attempt\n\t\t\t* The account is locked From too many login attempts \n **/\n\t\t\tif (!$this->checkLoginAttempts($email)) {\n\t\t\t\t$this->session->data['error'] = 'Warning: Your account has exceeded allowed number of login attempts. Please try again in 1 hour.';\n\t\t\t\t$this->url->redirect('forgot');\n\t\t\t} elseif ( $user['status'] != \"1\" ) {\n\t\t\t\t$data['hash'] = md5(uniqid(mt_rand(), true));\n\t\t\t\t$data['email'] = $email;\n\t\t\t\t$data['name'] = $user['name'];\n\t\t\t\t$this->loginModel->editHash($data);\n\t\t\t\t$this->forgotMail($data);\n\t\t\t\t$this->session->data['success'] = 'Success: Reset instruction sent to your E-mail address.';\n\t\t\t\t$this->url->redirect('login');\n\t\t\t} else {\n\t \t/** \n\t \t* If account is disabled by admin \n\t\t * Then Show error to user\n\t\t **/\n\t \t$this->session->data['success'] = 'Success: Your account has disabled by admin, For more info contact us.';\n\t \t$this->url->redirect('login');\n\t }\n\n\t\t\t/** \n\t\t\t* User exists now We check if\n\t\t\t* Send Mail to user for reset password\n **/\n\n\t\t} else {\n\t\t\t$this->session->data['error'] = 'Warning: Account does not exists.';\n\t\t\t$this->url->redirect('forgot');\n\t\t}\n\t}", "public function forgot() {\n\n\n $credentials = request()->validate(['email' => 'required|email']);\n\n $sendResetLink = Password::sendResetLink($credentials);\n\n \n\n return $this->respondWithMessage('Reset password link sent on your email id.');\n }", "public function an_otp_mail_is_not_send_if_credentials_are_incorrect()\n {\n Mail::fake();\n //$this->withExceptionHandling();\n $user = factory(User::class)->create();\n $res= $this->post('/login',['email' => $user->email,'password'=>'wshhhdhhdhdhd']);\n Mail::assertNotSent(OTPMail::class);\n\n //$res->assertRedirect('/');\n\n }", "public function forgot_password_post()\n\t{\n\t\t$array['username'] = strtolower($this->post('username'));\n\n\t\t$error = [];\n\n\t\tif (filter_var($array['username'], FILTER_VALIDATE_EMAIL) \n\t\t\tOR preg_match('/^[A-Za-z][A-Za-z0-9]{5,100}$/', $array['username'])) {\n\n\t\t\tif (empty($array['username'])) {\n\t\t\t\t$this->response(['status' => FALSE, 'error' => 'Username is empty'], REST_Controller::HTTP_BAD_REQUEST);\n\t\t\t} else {\n\t\t\t\t$validate_user = $this->api_model->validate_user($array['username'], $array['username']);\n\t\t\t\t\n\t\t\t\tif ($validate_user) {\n\t\t\t\t\t$new_password = $this->get_random_string();\n\t\t\t\t\t$update_user = $this->api_model->update_password($validate_user, $new_password);\n\t\t\t\t\tif ($update_user) {\n\t\t\t\t\t\t$send_email = $this->send_email($validate_user['email'], $new_password);\n\t\t\t\t\t\tif ($send_email) {\n\t\t\t\t\t\t\t$this->response(['status' => TRUE, 'message' => 'New password sent to email'], REST_Controller::HTTP_OK);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->response(['status' => FALSE, 'error' => ['Something went wrong']], REST_Controller::HTTP_BAD_REQUEST);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->response(['status' => FALSE, 'error' => ['Password update failed']], REST_Controller::HTTP_BAD_REQUEST);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->response(['status' => FALSE, 'error' => ['Username or email is incorrect']], REST_Controller::HTTP_BAD_REQUEST);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$error[] = 'Invalid username format.';\n\t\t\t$this->response(['status' => FALSE, 'error' => $error], REST_Controller::HTTP_BAD_REQUEST);\n\t\t}\n\t}", "public function forgot_password() {\n\t\t$this->output->append_title('Forgot Password');\n\t\t$data = array();\n\t\tif($this->input->post())\n\t\t{\n\t\t\t$this->form_validation->set_rules('email', 'Email', 'trim|required');\n\t\t\tif($this->form_validation->run() == TRUE)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$email = $this->input->post('email');\n\t\t\t\t\t$subject = 'Password Reset Confirmation';\n\t\t\t\t\t\n\t\t\t\t\t// Find the user using the user email address\n\t\t\t\t\t$user = Sentry::findUserByLogin($email);\n\t\t\t\t\t\n\t\t\t\t\t// Get the password reset code\n\t\t\t\t\t$resetCode = $user->getResetPasswordCode();\n\t\t\t\t\t$url = website_url('auth/reset/'.$resetCode);\n\t\t\t\t\t$template_data = array(\n\t\t\t\t\t\t'email_title' => 'Forgot Password',\n\t\t\t\t\t\t'email_heading' => 'Hello',\n\t\t\t\t\t\t'email_body' => 'There was recently a request to reset your password.\n\t\t\t\t\t\t<br/>If you requested this password change, please click on the following link to reset your password:<br/> <a href=\"'.$url.'\">'.$url.'</a><br/>\n\t\t\t\t\t\tIf clicking the link does not work, please copy and paste the URL into your browser instead.<br/><br/>\n\t\t\t\t\t\tIf you didn\\'t make this request, you can ignore this message and your password will remail the same.\n\t\t\t\t\t\t'\n\t\t\t\t\t);\n\n\t\t\t\t\t$body = $this->parser->parse('emails/user_registration', $template_data,TRUE);\n\t\t\t\t\tif($this->common->sendEmail($email,$subject,$body))\n\t\t\t\t\t{\n\t\t\t\t\t\t$message = array('type' => 'success','message' => 'An email has been sent to your email address with instructions to reset your password.');\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$message = array('type' => 'warning','message' => 'Unable to send email, please try again later.');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (Cartalyst\\Sentry\\Users\\UserNotFoundException $e)\n\t\t\t\t{\n\t\t\t\t\t$message = array('type' => 'danger','message' => 'Email does not exists.');\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$message = array('type' => 'danger','message' => $this->message->validation_errors());\n\t\t\t}\n\t\t\t\n\t\t\t$this->message->set($message['type'], $message['message']);\n\t\t}\n\t\t\n\t\t$data['email'] = array('name' => 'email',\n\t\t\t'autofocus' => 'autofocus',\n\t\t\t'id' => 'email',\n\t\t\t'placeholder' => 'Email',\n\t\t\t'class' => 'form-control',\n\t\t\t'type' => 'text',\n\t\t\t//'value' => $this->form_validation->set_value('email')\n\t\t);\n\t\t$this->load->view(parent::$module.'/forgot_password',$data);\n\t}", "public function forgot_password() {\n if ($this->Auth->login()) {\n return $this->redirect($this->Auth->redirectUrl());\n }\n $this->layout = 'GtwUsers.users';\n if ($this->request->is('post')) {\n $arrResponse = $this->User->ForgotPasswordEmail($this->request->data['User']['email']);\n if (!empty($arrResponse)) {\n if ($arrResponse['status'] == 'fail') {\n $this->Session->setFlash($arrResponse['message'], 'alert', array(\n 'plugin' => 'BoostCake',\n 'class' => 'alert-danger'\n ));\n } else {\n $this->Session->setFlash($arrResponse['message'], 'alert', array(\n 'plugin' => 'BoostCake',\n 'class' => 'alert-success'\n ));\n return $this->redirect($this->Auth->redirectUrl());\n }\n }\n }\n }", "public function forgot()\n {\n $useremail = $this->input->post(EMAIL);\n $this->load->model('booking/Bookingmodel');\n $constants = $this->Bookingmodel->getConstants();\n $user = $this->user->get_user_by_email_password($useremail);\n if ($user) {\n $slug = md5($user->userID . $user->emailID);\n $message = '<img src=\"' . base_url('assets/images/logo.png') . '\" border=\"0\"><br>It looks like you forgot your password. No problem, we’ll get this cleared up.<br><br>\n <b>To reset your password please click the link below and follow the instructions:</b><br><br>\n **<a href=\"' . base_url('login/reset/' . $user->userID . '/' . $slug) . '\"> ' . base_url('login/reset/' . $user->userID . '/' . $slug) . '</a>\n <br><br>\n If you did not request to reset your password then please ignore this email and no changes will occur.';\n $this->load->library(EMAIL);\n $this->email->from($constants->fromEmail);\n $this->email->to($useremail);\n $this->email->subject('Reset Password');\n $this->email->message($message);\n if (!$this->email->send()) {\n $emailInfo['emailStatus'] = 0;\n $emailInfo['toEmail'] = $useremail;\n $emailInfo['fromEmail'] = $constants->fromEmail;\n $emailInfo['content'] = $message;\n $emailInfo['subject'] = 'Reset Password';\n $this->load->model('profile/Profilemodel');\n $this->Profilemodel->saveEmailStatus($emailInfo);\n }\n echo \"1\";\n } else {\n echo \"0\";\n }\n }", "public function postForgotPw(){\n\t\t//find user where email = input email\n\t\t$user = User::where('email','=',Str::lower(Input::get('email')));\n\n\t\t//if user found\n\t\tif($user->count()){\n\n\t\t\t//if match found\n\t\t\t$user \t\t\t\t\t= $user->first();\n\n\t\t\t//generate new activate code and new password\n\t\t\t$code \t\t\t\t\t= str_random(60);\n\t\t\t$password \t\t\t\t= str_random(10);\n\n\t\t\t//update value in db\n\t\t\t$user->activate_code\t= $code;\n\t\t\t$user->password_temp\t= Hash::make($password);\n\n\t\t\t//save to db\n\t\t\tif($user->save()){\n\n\t\t\t\t//send email to user with new password and activate link\n\t\t\t\tMail::send('emails.auth.forgot_mail',array('link' => URL::route('account-recover', $code), 'name' => $user->last_name, 'password'=>$password), function($message) use ($user){\n\t\t\t\t\t$message->to($user->email, $user->last_name)->subject(\"It's ok, it happens. Here is yours...\");\n\t\t\t\t});\t\t\t\t\n\t\t\t\t\n\t\t\t\t//return to forgot-pw page\n\t\t\t\treturn Redirect::route('account-forgot-pw')\n\t\t\t\t\t\t->with('global','<div class=\"alert alert-success\" role=\"alert\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"glyphicon glyphicon-envelope\" aria-hidden=\"true\"></span>\n\t\t\t\t\t\t\t\t\t\t\tNew password has been sent. Please check your mail.\n\t\t\t\t\t\t\t\t\t\t</div>');\n\t\t\t}\n\n\t\t}else{\n\n\t\t\t//return error msg wrong old password\n\t\t\treturn Redirect::route('account-forgot-pw')\n\t\t\t\t\t->with('global','<div class=\"alert alert-danger\" role=\"alert\">\n\t\t\t\t\t\t\t\t\t\t<span class=\"glyphicon glyphicon-exclamation-sign\" aria-hidden=\"true\"></span>\n\t\t\t\t\t\t\t\t\t\t<span class=\"sr-only\">Error:</span>\n\t\t\t\t\t\t\t\t\t\tIncorrect Email Address. Please try again.\n\t\t\t\t\t\t\t\t\t</div>');\n\t\t}\n\t}", "public function testForgetPassword()\n {\n\n $data = [\n 'email' => '[email protected]'\n ];\n\n return $this->json('POST', 'api/forget-password', $data)\n ->assertStatus(200)\n ->assertJsonStructure([\n 'message',\n 'status_code'\n ]);\n }", "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 passwordEmail()\n {\n $this->shellshock(request(), [\n 'email' => 'required|email',\n 'g-recaptcha-response' => 'sometimes|recaptcha',\n ]);\n\n if (($user = app(config('turtle.models.user'))->where('email', request()->input('email'))->first())) {\n $token = Password::getRepository()->create($user);\n\n Mail::send(['text' => 'turtle::emails.password'], ['token' => $token], function (Message $message) use ($user) {\n $message->subject(config('app.name') . ' Password Reset Link');\n $message->to($user->email);\n });\n\n flash('success', 'Password reset link emailed!');\n\n return response()->json(['reload_page' => true]);\n }\n else {\n return response()->json(['errors' => ['email' => [trans('auth.failed')]]], 422);\n }\n }", "static function password_expired_email() {\n $model = \\Auth::$model;\n $user = $model::requested();\n\n if (!$user->nil()) {\n if ($user->validate()) {\n\n password_expired_email($user) ?\n flash(\"Enviamos um e-mail para <small><b>$user->email</b></small> com as instruções para você criar uma nova senha.\") :\n flash('Não foi possível lhe enviar o e-mail. Por favor, tente novamente mais tarde.', 'error');\n\n go('/');\n } else {\n flash('Verifique os dados do formulário.', 'error');\n }\n }\n\n globals('user', $user);\n }", "public function testLoginSubmissionRightEmailAndWrongPassword()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/login')\n ->type('txt-email', '[email protected]')\n ->type('txt-password', 'wrongpassword123')\n ->press('Sign in')\n ->assertSee('Invalid credentials entered.');\n });\n }", "function forgot_password()\n {\n if ($this->tank_auth->is_logged_in()) {\t\t\t\t\t\t\t\t\t// logged in\n redirect('');\n\n\n\n } elseif ($this->tank_auth->is_logged_in(FALSE)) {\t\t\t\t\t\t// logged in, not activated\n redirect('/auth/send_again/');\n\n } else {\n $this->form_validation->set_rules('login', 'Email or login', 'trim|required|xss_clean');\n\n $data['errors'] = array();\n\n if ($this->form_validation->run()) {\t\t\t\t\t\t\t\t// validation ok\n if (!is_null($data = $this->tank_auth->forgot_password(\n $this->form_validation->set_value('login')))) {\n\n $data['site_name'] = $this->config->item('website_name', 'tank_auth');\n\n // Send email with password activation link\n\n $this->_send_email('forgot_password', $data['email'], $data);\n\n $this->_show_message($this->lang->line('auth_message_new_password_sent'));\n\n\n\n } else {\n $errors = $this->tank_auth->get_error_message();\n foreach ($errors as $k => $v)\t$data['errors'][$k] = $this->lang->line($v);\n }\n }\n $this->load->view('auth/forgot_password_form', $data);\n }\n }", "public function testPostForgotPasswordSetConfirmationCode()\n {\n $this->givenUser('user-without-confirmation-token');\n $this->performPostUserForgotPassword(\n ['contact_info' => $this->user->getEmail()]\n );\n $this->assertOkSuccess();\n $this->assertJsonResponse($this->response);\n $this->assertUserHasConfirmationTokenSet();\n }", "function forgotPassword($emailTO) {\n global $user, $pass;\n\n return $params = array(\n 'api_user' => $user,\n 'api_key' => $pass,\n 'to' => $emailTO,\n 'subject' => 'E-Mart: Reset password',\n 'html' => \"<html>\n <head></head>\n <body>\n <p>You have been outbid by another bidder.\n Please click on the link below to bid agiain:<br>\n <span><a href=\\\"www.e-mart.azurewebsites.net\\\">URL</a></span>\n </p>\n </body>\n </html>\",\n 'text' => 'testing body',\n 'from' => '[email protected]'\n );\n}", "function userForgotPassword($userData)\n\t\t{\n\t\t\tif(isset($userData['email']) && !empty($userData['email']))\n\t\t\t{\n\t\t\t\t//get values from email id\n\t\t\t\t$user = $this->manageContent->getValue_where('user_credentials','*','email_id',$userData['email']);\n\t\t\t\tif(!empty($user[0]))\n\t\t\t\t{\n\t\t\t\t\t//set password\n\t\t\t\t\t$password = uniqid();\n\t\t\t\t\t//update the password\n\t\t\t\t\t$update_pass = $this->manageContent->updateValueWhere('user_credentials','password',md5($password),'email_id',$userData['email']);\n\t\t\t\t\t//mail to user\n\t\t\t\t\t$mailsent = $this->mailSent->forgotPasswordMail($user[0]['email_id'], $user[0]['username'], $password);\n\t\t\t\t\tif($mailsent == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$_SESSION['success'] = 'Password is sent to your mail';\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$_SESSION['warning'] = 'Mail sending unsuccessfull';\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$_SESSION['warning'] = 'Invalid EmailId';\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function testRegistrationPasswordsDontMatch(): void { }", "function __sendForgotPasswordEmail($id = null) {\n $id = $this->request->getData('user_id');\n if (!empty($id)) {\n $user = $this->Users->get($id);\n $email = new Email();\n $email\n ->template('reset_password_request', 'default')\n ->subject('OTP Code Request - DO NOT REPLY')\n ->emailFormat('html')\n ->setViewVars(['user' => $user,\n 'password' => $password])\n ->from('[email protected]')\n ->to($user->email)\n ->send();\n\n return true;\n }\n return false;\n }", "function sendPasswordResetEmail($email)\n{\n $userManager = new UserManager();\n $user_req = $userManager->getUser(\"\", $email);\n \n if ($user = $user_req->fetch())\n {\n $hash = $user['hash'];\n $to = $email;\n $subject = 'Reset your Camagru password';\n $message = '\n \n Hi there! Did you forget how to log in to your Camagru account? :(\n \n Please click this link to reset your password:\n http://localhost:8100/index.php?action=verifyAccountForReset&email='.$email.'&hash='.$hash.'\n \n ';\n \n $headers = 'From:[email protected]' . \"\\r\\n\";\n mail($to, $subject, $message, $headers);\n \n $msg = \"A link to reset your password was sent to your email address!\";\n } else {\n $msg = \"Sorry, there is no registered account for this email address :/\";\n }\n \n require('view/forgotPasswordView.php');\n}", "public function testEmailValidation() {\n $this->visit('http://londonce.lan/login')\n ->submitForm('Login', ['log' => 'dfdfdfd', 'password' => '11'])\n ->see('Your Username or Password has not been recognised. Please try again.');\n }", "public function forgotPassword(Request $request){\n\n $vldate=Validator::make($request->all(),[\n 'email'=>[\"required\",\"email\",\"exists:users,email\"]\n ]);\n if($vldate->fails()){\n return response()->json([\n 'token' => null,\n 'data' => null,\n 'state' => '404',\n 'err' => 'This email does not exist'\n ]);\n };\n\n $user=User::where(\"email\",$request->email)->first();\n $token=Str::random(32);\n\n Mail::to($user->email)->send(new resetPasswordMail($token));\n PasswordReset::create([\n 'email'=>$request->email,\n 'token'=>$token\n ]);\n return response()->json(\"successfly plase check \");\n }", "public static function sendEmailToResetPassword($data)\n {\n $email = $data['email'];\n $user = \\Modules\\Frontend\\Auth\\User::where('email', $email)\n ->first();\n if (empty($user)) {\n return ['rs'=>System::FAIL, 'msg'=>STheme::lang('lang.msg.user_not_exists')];\n } else {\n DB::beginTransaction();\n try {\n $newPass = Functions::generateRandomString(6);\n $user->password = Hash::make($newPass);\n $user->save();\n $params = [\n 'email' => $email,\n 'name' => $user->first_name.' '.$user->last_name,\n 'subject' => STheme::lang('lang.general.reset_password'),\n 'data' => ['newPass'=>$newPass],\n 'template' => 'mails.resetPassword'\n ];\n DB::commit();\n System::sendMail($params);\n if (Mail::failures()) {// check for failures\n return ['rs'=>System::FAIL, 'msg'=>STheme::lang('lang.msg.mail_not_send')];\n }\n Session::flash(System::FLASH_SUCCESS, STheme::lang('lang.msg.send_mail_forgot_password_success'));\n return [\n 'rs'=>System::SUCCESS,\n 'msg'=>'',\n 'redirect_url'=>'/forgot-password'\n ];\n } catch (\\Exception $e) {\n DB::rollBack();\n return ['rs'=>System::FAIL, 'msg'=>$e->getMessage()];\n }\n }\n }", "function forgot_password()\n\t{\n\t\tif ($this->tank_auth->is_logged_in()) {\t\t\t\t\t\t\t\t\t// logged in\n\t\t\tredirect('');\n\n\t\t} elseif ($this->tank_auth->is_logged_in(FALSE)) {\t\t\t\t\t\t// logged in, not activated\n\t\t\tredirect('/auth/send_again/');\n\n\t\t} else {\n\t\t\t$this->form_validation->set_rules('login', 'Email or Username', 'trim|required|xss_clean');\n\n\t\t\t$data['errors'] = array();\n\n\t\t\tif ($this->form_validation->run()) {\t\t\t\t\t\t\t\t// validation ok\n\t\t\t\tif (!is_null($data = $this->tank_auth->forgot_password(\n\t\t\t\t\t\t$this->form_validation->set_value('login')))) {\n\n\t\t\t\t\t$data['site_name'] = config_item('company_name');\n\n\t\t\t\t\t// Send email with password activation link\n\t\t\t\t\t$this->_send_email('forgot_password', $data['email'], $data);\n\t\t\t\t\t$this->session->set_flashdata('message',$this->lang->line('auth_message_new_password_sent'));\n\t\t\t\t\t//$this->_show_message($this->lang->line('auth_message_new_password_sent'));\n\t\t\t\t\tredirect('login');\n\n\t\t\t\t} else {\n\t\t\t\t\t$errors = $this->tank_auth->get_error_message();\n\t\t\t\t\tforeach ($errors as $k => $v)\t$data['errors'][$k] = $this->lang->line($v);\n\t\t\t\t}\n\t\t\t}\n\t$this->load->module('layouts');\n\t$this->load->library('template');\n\t$this->template->title('Forgot Password - '.config_item('company_name'));\n\t$this->template\n\t->set_layout('login')\n\t->build('auth/forgot_password_form',isset($data) ? $data : NULL);\n\t\t\t//$this->load->view('auth/forgot_password_form', $data);\n\t\t}\n\t}", "function emailResetPasswordLink(){\r\n\t\tif(empty($_POST['Uemail'])){\r\n\t\t\t$this->HandleError(\"Email is empty!\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$user_rec = array();\r\n\t\t\r\n\t\tif(false === $this->getUserFromEmail($_POST['Uemail'], $user_rec)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif(false === $this->sendResetPasswordLink($user_rec)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "public function forgotPasswordAction()\n {\n $form = new ForgotPasswordForm();\n\n if ($this->request->isPost()) {\n\n if ($form->isValid($this->request->getPost()) == false) {\n foreach ($form->getMessages() as $message) {\n $this->flash->error($message);\n }\n } else {\n\n $user = Users::findFirstByEmail($this->request->getPost('email'));\n if (!$user) {\n $this->flash->success('There is no account associated to this email');\n } else {\n\n $resetPassword = new ResetPasswords();\n $resetPassword->usersId = $user->id;\n if ($resetPassword->save()) {\n $this->flash->success('Success! Please check your messages for an email reset password');\n } else {\n foreach ($resetPassword->getMessages() as $message) {\n $this->flash->error($message);\n }\n }\n }\n }\n }\n\n $this->view->form = $form;\n }", "public function forgotPasswordAction()\n {\n $form = new ForgotPasswordForm();\n\n if ($this->request->isPost()) {\n\n if ($form->isValid($this->request->getPost()) == false) {\n foreach ($form->getMessages() as $message) {\n $this->flash->error($message);\n }\n } else {\n\n $user = Users::findFirstByEmail($this->request->getPost('email'));\n if (!$user) {\n $this->flash->success('There is no account associated to this email');\n } else {\n\n $resetPassword = new ResetPasswords();\n $resetPassword->usersId = $user->id;\n if ($resetPassword->save()) {\n $this->flash->success('Success! Please check your messages for an email reset password');\n } else {\n foreach ($resetPassword->getMessages() as $message) {\n $this->flash->error($message);\n }\n }\n }\n }\n }\n\n $this->view->form = $form;\n }", "public function generateResetPassword()\n {\n $this->setRules([ StringLiterals::EMAIL => 'required|max:100|email' ]);\n $this->_validate();\n $this->_customer = $this->_customer->where('email', $this->request->email)->first();\n if (isset($this->_customer) && is_object($this->_customer) && ! empty($this->_customer->id)) {\n $this->_customer->access_otp_token = mt_rand();\n $this->_customer->save();\n $this->email = $this->email->fetchEmailTemplate('password_reset_otp');\n $this->email->content = str_replace([ '##USERNAME##','##OTP##' ], [ $this->_customer->name,$this->_customer->access_otp_token ], $this->email->content);\n $this->notification->email($this->_customer, $this->email->subject, $this->email->content);\n return true;\n }\n return false;\n }", "public function postForgotPassword()\n\t{\n\t\t$rules = ['email' => 'required|email'];\n\t\t$validator = Validator::make(Input::only('email'), $rules);\n\t\tif ($validator->fails()) return Redirect::back()->withInput()->withErrors($validator);\n\n\t\tif ( ! PasswordReminder::canSendReminderEmail(Input::get('email')))\n\t\t{\n\t\t\treturn Redirect::back()->withInput()\n\t\t\t\t->withError('A reminder email has already been sent for this email address.');\n\t\t}\n\n\t\tswitch ($response = Password::remind(Input::only('email'), function($message)\n\t\t{\n\t\t\t$message->subject('WebCMS Password Reminder');\n\t\t}))\n\t\t{\n\t\t\tcase Password::REMINDER_SENT:\n\t\t\t\treturn Redirect::back()->withSuccess(Lang::get($response));\n\n\t\t\tdefault:\n\t\t\t\treturn Redirect::back()->withError(Lang::get($response));\n\t\t}\n\t}", "public function forgotten_password($email)\n\t{\n\t\t$query=\"SELECT * FROM \".parent::SUFFIX.\"user_details where email='\".$email.\"'\";\n\t\t$resultpassword= mysql_query($query);\n\t\t$resultfetchquery=mysql_fetch_object($resultpassword); \n\t\t//$link=\"<a href='\".AbstractDB::SITE_PATH.\"sign_in_new.php'>Clcik here</a>\";\n\t\t$cnf=$this->automailCls->send_automail_user('forgot_password',\n\t\tarray(\n\t\t\t\t\t'first_name'=>$resultfetchquery->first_name,\n\t\t\t\t\t'last_name'=>$resultfetchquery->last_name,\n\t\t\t\t\t'email'=>$resultfetchquery->email,\n\t\t\t\t\t'username'=>$resultfetchquery->username,\n\t\t\t\t\t'password'=>base64_decode($resultfetchquery->password),\n\t\t\t\t\t'link'=>$link),\n\t\t\t\t\tarray($resultfetchquery->email));\n\t\t\t\t\t\n\t\treturn $cnf;\t\t\t\n\t}", "public function forgotten(){\n\t\t\t/**\n\t\t\t*\t@var string $data['title'] - prosledjivanje naziva stranice\n\t\t\t*/\n\t\t\t$data['title'] = 'Zaboravljena lozinka';\n\t\t\t\n\t\t\t$this->form_validation->set_rules('email', 'Email', 'required');\n\t\t\t\n\t\t\tif($this->form_validation->run() === FALSE){\n\t\t\t\t$this->load->view('templates/header');\n\t\t\t\t$this->load->view('users/forgotten', $data);\n\t\t\t\t$this->load->view('templates/footer');\n\t\t\t}\n\t\t\telse{\n\t\t\t\t/**\n\t\t\t\t*\t@var string $email - e-mail adresa na koju treba poslati novu lozinku (ukoliko je u sistemu)\n\t\t\t\t*/\n\t\t\t\t$email = $this->input->post('email');\n\t\t\t\tif($this->user_model->checkEmail($email)){\n\t\t\t\t\t$this->session->set_flashdata('forgotten_success', 'Nova lozinka poslata na e-mail!');\n\t\t\t\t\tredirect('users/login');\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$this->session->set_flashdata('forgotten_fail', 'Pogrešno unet e-mail!');\n\t\t\t\t\tredirect('users/forgotten');\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function forgot_password(){\n\n $this->data[\"title_tag\"]=\"Lobster | Accounts | Forgot Password\";\n\n $this->view(\"accounts/forgot_password\",$this->data);\n }", "public function forgotpassword() {\n // Fetch the request data in JSON format and convert it into object\n $request_data = $this->request->input('json_decode');\n switch (true) {\n // When request is not made using POST method\n case!$this->request->isPost() :\n $success = false;\n $status = BAD_REQUEST;\n $message = 'Wrong request method.';\n break;\n // Request is valid and phone no and name are present\n case!empty($request_data) && !empty($request_data->email):\n // && !empty($request_data->comment):\n // Check if phone no exists\n $data = $this->User->findUserByEmail(trim($request_data->email));\n\n // Check if record exists\n if (count($data) != 0) {\n\n $userEmail = $request_data->email;\n $userName = trim($data[0]['User']['name']);\n $recoveryStr = $this->generateRandomString(12);\n\n $dataArray = array();\n $dataArray['User']['_id'] = $data[0]['User']['_id'];\n $dataArray['User']['recoverystr'] = $recoveryStr;\n\n if ($this->User->save($dataArray)) {\n\n $recoveryLink = HOST_ROOT_PATH . 'recover/password/id:' . (string) $data[0]['User']['_id'] . '/rid:' . $recoveryStr;\n // send mail to user..\n $messageEmail = \"Hi $userName,<br><br>\n You can recover your password by using this link : <a href='$recoveryLink'>$recoveryLink</a><br><br>\n Regards,<br>Support Team.\";\n App::uses('CakeEmail', 'Network/Email');\n $Email = new CakeEmail();\n $Email->config('default');\n $Email->from(array(SUPPORT_SENDER_EMAIL => SUPPORT_SENDER_EMAIL_NAME));\n $Email->to($userEmail);\n $Email->addCc(SUPPORT_RECEIVER_EMAIL);\n $Email->subject(SUPPORT_SENDER_EMAIL_NAME . ' | Recover Password');\n $Email->emailFormat('html');\n $Email->send($messageEmail);\n\n $success = true;\n $status = SUCCESS;\n $message = 'Password has been sent to your email.';\n //$message = 'A password recovery link has been sent to your email.';\n } else {\n\n $success = false;\n $status = ERROR;\n $message = 'There was a problem in processing your request';\n }\n }\n // Return false if record not found\n else {\n $success = false;\n $status = UNAUTHORISED;\n $message = 'Email not registered.';\n }\n break;\n // User Email blank in request\n case!empty($request_data) && empty($request_data->email):\n $success = false;\n $status = BAD_REQUEST;\n $message = 'User Email cannot be blank.';\n break;\n // Parameters not found in request\n case empty($request_data):\n $success = false;\n $status = BAD_REQUEST;\n $message = 'Request cannot be empty.';\n break;\n }\n\n $out = array(\n \"success\" => $success,\n \"message\" => $message\n );\n\n return new CakeResponse(array('status' => $status, 'body' => json_encode($out), 'type' => 'json'));\n }", "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 testPostForgotPageEmailWasNotSentError()\n\t{\n\t\t$this->getMailerMock();\n\n\t\t$this->call('orchestra::forgot@index', array(), 'POST', array(\n\t\t\t'email' => \"[email protected]\",\n\t\t\t\\Session::csrf_token => \\Session::token(),\n\t\t));\n\n\t\t$this->assertRedirectedTo(handles('orchestra::forgot'));\n\t\t$this->assertTrue(is_string(\\Session::get('message')));\n\t}", "public function testTryToAccessForgotPasswordPageAsGuest() {\n\t\t$response = $this->get('/password/reset');\n\n\t\t$response->assertStatus(200);\n\t}", "public function forgotPwd() {\n\t\tif (isset($_POST['email'])){\n\t\t\t\t$email = $_POST['email'];\n\t\t\t\t$query=\"select * from users where email='$email'\";\n\t\t\t\t$result = mysqli_query($this->connrps,$query);\n\t\t\t\t$count=mysqli_num_rows($result);\n\t\t\t\t// If the count is equal to one, we will send message other wise display an error message.\n\t\t\t\tif($count==1){\n\t\t\t\t\t$rows=mysqli_fetch_array($result);\n\t\t\t\t\t$pass = base64_decode($rows['password']);\n\t\t\t\t\t$to = $rows['email'];\n\t\t\t\t\t$url = $_SERVER['HTTP_HOST'];\n\t\t\t\t\t$body = \"\n\t\t\t\t\tWebsite Url : $url <br/>\n\t\t\t\t\tYour Email Id : $to <br/>\n\t\t\t\t\tHere is your password : $pass <br/><br/><br/><br/>\n\t\t\t\t\tSincerely,<br/>\n\t\t\t\t\tBARNA\";\n\t\t\t\t\t$from = \"[email protected]\";\n\t\t\t\t\t$subject = \"Your password has been recovered\";\n\t\t\t\t\t$headers1 = 'From: Password Recovered <$from>' . \"\\r\\n\";\n\t\t\t\t\t$headers1 .= \"Content-type: text/html;charset=iso-8859-1\\r\\n\";\n\t\t\t\t\t$headers1 .= \"X-Priority: 1\\r\\n\";\n\t\t\t\t\t$headers1 .= \"X-MSMail-Priority: High\\r\\n\";\n\t\t\t\t\t$headers1 .= \"X-Mailer: Password Recovered\\r\\n\";\n\t\t\t\t\t$sentmail = mail ( $to, $subject, $body, $headers1 );\n\t\t\t\t\t//If the message is sent successfully, display sucess message otherwise display an error message.\n\t\t\t\t\tif($sentmail==1){\n\t\t\t\t\t\t$message= \"Your password has been sent to your email address.\";\n\t\t\t\t\t\t$_SESSION['succ_msg'] = $message;\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($_POST['email']!=\"\"){\n\t\t\t\t\t\t\t$message= \"Cannot send password to your e-mail address.Problem with sending mail...\";\n\t\t\t\t\t\t\t$_SESSION['error_msg'] = $message;\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t }\n\t\t\t\t} else {\n\t\t\t\t\tif ($_POST ['email'] != \"\") {\n\t\t\t\t\t$message= \"Email does not exist.\";\n\t\t\t\t\t$_SESSION['error_msg'] = $message;\n\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t }\n }", "public function forgot($m)\n {\n $c = new Message('{\"action\": \"load\", \"urn\": \"urn:Actor:User:System\"}');\n $c->email = $m->email;\n $user = $c->deliver();\n if (count($user)) {\n // generate password\n if (SIMPLEPASSWORDS === true) {\n $newpassword = Security::generateSimplePassword();\n } else {\n $newpassword = Security::generatePassword();\n }\n // HASH user password with sha1\n $update_user = new Message();\n $update_user->action = \"update\";\n $update_user->urn = $user->urn;\n $dynamicsalt = mt_rand(1, 2147483647);\n $update_user->dynamicsalt = $dynamicsalt;\n $hashedSaltedPassword = sha1($dynamicsalt . $newpassword . SECURITY_SALT_STATIC);\n $update_user->password = $hashedSaltedPassword;\n $update_user->deliver();\n\n $user->newpassword = $newpassword;\n\n // send email, update related passworded (ftp etc)\n Broker::instance()->send($user, \"MANAGERS\", \"user.onforgot\");\n $m = new Message(array(\"notify\" => \"Password sent\"));\n if (ENV == 'DEVELOPMENT') {\n $m->newpassword = $newpassword;\n }\n return $m;\n } else {\n return new Message(array(\"error\" => \"email not registered\"));\n }\n }", "public function test_can_update_password_after_send_request_reset_password()\n {\n $postUpdatePassword = $this->makeResetPasswordData();\n $existsTokenData = array_only($postUpdatePassword, ['email', 'token']);\n\n $this->seeInDatabase($this->passwordsTable(), $existsTokenData);\n $changedPassword = $this->put(\n route('api.admin.auth.password.resetPassword', $this->token),\n $postUpdatePassword\n );\n $changedPassword->assertResponseOk()->isJson();\n $changedPassword->dontSeeInDatabase($this->passwordsTable(), $existsTokenData);\n }", "public function passwordResetLink($email)\n {\n $mysqlQuery = new mysqlQuery();\n $user = $mysqlQuery->sqlQuery(\"SELECT * FROM users WHERE email='\".$email.\"'\");\n if ($user != []) {\n $GUIDService = new GUIDService;\n $resetToken = $GUIDService->getGUID();\n $resetExpiration = date(\"Y-m-d H:i:s\", strtotime('+24 hours'));\n $mysqlQuery->sqlQuery('UPDATE users SET passwordResetToken = \\''.$resetToken.'\\', passwordResetExpiration = \\''.$resetExpiration.'\\' WHERE email=\\''.$email.'\\'');\n $to = $_POST['email'];\n $subject = 'le sujet';\n $message = 'Lien : http://gauthier.tuby.com/P4/public/?p=admin.resetPassword&token=' . $resetToken;\n $headers = 'From: [email protected]' . \"\\r\\n\" .\n 'Reply-To: [email protected]' . \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n mail($to, $subject, $message, $headers);\n return true;\n } else {\n $title = 'Blog de Jean Forteroche - Connection';\n $header = '';\n $content = \"<p>Aucune adresse mail ne correspond.</p>\n <a href=\\\"?p=admin.connection&forgottenPassword=true\\\" class=\\\"btn btn-primary\\\">Retour</a>\";\n die(require('../src/View/EmptyView.php'));\n }\n }", "public function testResetPassword()\n\t{\n\t\t$return = $this->auth->requestReset($this->email);\n\n\t\t$this->assertTrue($return['error']);\n\t\t$this->assertSame($return['message'], lang(\"Auth.email_incorrect\"));\n\n\t\t$return = $this->auth->requestReset($this->newEmail);\n\n\t\t$this->assertFalse($return['error']);\n\t\t$this->assertSame($return['message'], lang(\"Auth.reset_requested\"));\n\n\t\t$uid = $this->auth->getUID($this->newEmail);\n\t\t$token = $this->auth->getUserRequestToken($uid, 'reset');\n\n\t\t// test invalid token length\n\t\t$return = $this->auth->resetPass(substr($token, 0, 5), $this->password, $this->password);\n\n\t\t$this->assertTrue($return['error']);\n\t\t$this->assertSame($return['message'], lang('Auth.resetkey_invalid'));\n\n\t\t// test incorrect token value\n\t\t$return = $this->auth->resetPass('1234567890ABCDEFGHIJ', $this->password, $this->password);\n\n\t\t$this->assertTrue($return['error']);\n\t\t$this->assertSame($return['message'], lang('Auth.resetkey_incorrect'));\n\n\t\t// test reset with weak password\n\t\t$return = $this->auth->resetPass($token, $this->weakPassword, $this->weakPassword);\n\n\t\t$this->assertTrue($return['error']);\n\t\t$this->assertSame($return['message'], lang('Auth.password_weak'));\n\n\t\t// test reset with unmacth password\n\t\t$return = $this->auth->resetPass($token, $this->password, $this->weakPassword);\n\n\t\t$this->assertTrue($return['error']);\n\t\t$this->assertSame($return['message'], lang('Auth.newpassword_nomatch'));\n\n\t\t$currentPassword = 'user@PRO#123';\n\n\t\t// test reset with existing password\n\t\t$return = $this->auth->resetPass($token, $currentPassword, $currentPassword);\n\n\t\t$this->assertTrue($return['error']);\n\t\t$this->assertSame($return['message'], lang('Auth.newpassword_match'));\n\n\t\t// test reset with existing password\n\t\t$return = $this->auth->resetPass($token, $this->password, $this->password);\n\n\t\t$this->assertFalse($return['error']);\n\t\t$this->assertSame($return['message'], lang('Auth.password_reset'));\n\n\t\t$this->auth->login($this->newEmail, $this->password);\n\n\t\t$this->assertTrue($this->auth->isLogged());\n\t}", "public function forgotPassword($email)\n {\n $user = $this->getUser(['email=?' => $email]);\n\n if ($user) {\n try {\n $this->usersMapper->getAdapter()->getDriver()->getConnection()->beginTransaction();\n if (!$user->hash) {\n $user->hash = md5(time() . $user->email);\n }\n $newUser = new User();\n $newUser->exchangeArray((array)$user);\n $this->usersMapper->save($newUser);\n\n $this->sendEmail(\n 'auth/mail-template/forgotpassword',\n [\n 'firstName' => $newUser->first_name,\n 'restoreHash' => $newUser->hash\n ],\n $newUser->email,\n null,\n [\n 'layoutTitle' => 'Forgot password'\n ]\n );\n\n $this->usersMapper->getAdapter()->getDriver()->getConnection()->commit();\n\n return true;\n } catch (\\Exception $e) {\n $this->usersMapper->getAdapter()->getDriver()->getConnection()->rollback();\n }\n }\n\n return false;\n }", "public function testParticipantsUsernamePasswordResetPost()\n {\n }", "public function forgottenPassword()\n {\n\t\t// Load helpers and libraries\n\t\thelper(['form', 'url']);\n\t\t$M_User = new M_User();\n\n\t\t// Default return\n\t\t$ret = redirect()->to(base_url());\n\n $options = [\n\t\t\t'action' => 'Users/forgottenPassword' // Route\n ];\n \n\t\t$request = $this->request;\n \n\t\t// Retrieving the current step of the process\n\t\t$step = $request->getPostGet('step');\n\n switch ($step){\n\t\t\tcase 1:\n\t\t\t\t// Step 1: Display email form\n\t\t\t\t$ret = json_encode(view(FORM_FORGOTTEN_PWD_STEP_1, $options));\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t// Step 2: Send the email\n\t\t\t\t$postData = $request->getPostGet('forgottenPwd');\n\n\t\t\t\t$options['alert'] = 'Un problème est survenu lors de l\\'envoi de l\\'email.';\n\t\t\t\t$options['type'] = 'danger';\n\n\t\t\t\t$ret = json_encode(view(FORM_FORGOTTEN_PWD_STEP_1, $options));\n\n\t\t\t\tif(is_array($postData))\n {\n\t\t\t\t\t$email = $postData['email'];\n\t\t\t\t\t// Everything went well : sending the password reset email\n\t\t\t\t\tif ($M_User->sendPwdResetEmail($email) == SC_SUCCESS) {\n\t\t\t\t\t\t$options['alert'] = 'Un email vient de vous être envoyé. Merci de cliquer sur le lien qu\\'il contient.';\n $options['type'] = 'success';\n\t\t\t\t\t\t$ret = json_encode(view(FORM_FORGOTTEN_PWD_STEP_2, $options));\n }\n\t\t\t\t\t// TODO - User not found\n }\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t// Step 3 : Token verification\n\t\t\t\t$token = $request->getPostGet('token');\n\n\t\t\t\t$options = [\n\t\t\t\t\t'action' => 'Users/forgottenPassword', // Route\n\t\t\t\t\t'token' => $token, // Security token\n\t\t\t\t\t'script' => self::ENCRYPTION_URL // Script URL for SHA256 encryption\n\t\t\t\t];\n\n\t\t\t\tif ($M_User->findOneBy('securityToken', $token) != null) {\n\t\t\t\t\t// A corresponding security token has been found in the DB\n\t\t\t\t\t$ret = render(FORM_FORGOTTEN_PWD_STEP_3, $options);\n }\n\t\t\t\t// TODO - Token expired\n\t\t\t\t// TODO - Invalid Token\n\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t// Step 4 : Updating User password\n\t\t\t\t$postData = $request->getPostGet('pwdReset');\n\t\t\t\tif (is_array($postData)){\n\t\t\t\t\tif ($M_User->resetPassword($postData['token'],$postData['password']) != SC_SUCCESS){\n\t\t\t\t\t\t$options = [\n\t\t\t\t\t\t\t'action' => 'Users/forgottenPassword', // Route\n\t\t\t\t\t\t\t'token' => $postData['token'], // Security token\n\t\t\t\t\t\t\t'alert' => 'Une erreur interne est survenue', // Alert message\n\t\t\t\t\t\t\t'type' => 'danger' // Alert type\n\t\t\t\t\t\t];\n\n\t\t\t\t\t\t$ret = render(FORM_FORGOTTEN_PWD_STEP_3, $options);\n } \n }\n\t\t\t\tbreak;\n }\n \n\n return $ret;\n\t}", "function forgotPassword(){\n\t\t\t$this->__dataDecode();\n\t\t\tif(!empty($this->data)){\n\t\t\t$data = $this->data;\n\t\t\t$username = $data['User']['userName'];\n\t\t\t$userDetail = $this->User->find('first',array('conditions'=>array(\"User.username \"=> $username)));\n\t\t\tif($username==null){\n\t\t\t\techo $username;\n\t\t\t\t$response['error']\t\t\t= 1;\n\t\t\t\t$response['response']['result'] \t= 'failure';\n\t\t\t\t$response['response']['message']\t= 'please Enter userName';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\telse{ \n\t\t\t\t$userID = $userDetail['User']['id'];\n\t\t\t\t$data = $this->data;\n\t\t\t\t$email_to = $userDetail['User']['email'];\n\t\t\t\tif($userDetail['User']['username'] == ($username)){\n\t\t\t\t\t$password= $this->createRandomPassword();\n\t\t\t\t\t$new_password=md5($password);\n\t\t\t\t\t$this->User->id = $userID;\n\t\t\t\t\t$this->data['User']['password'] = trim($new_password);\n\t\t\t\t\tunset($this->User->validate['password']);\n \t\t\t\t\tunset($this->User->validate['confirm_password']);\n\t\t\t\t\tif($this->User->save($this->data)){\n\t\t\t\t\t\t//Default Mail component is called, to send mail. We are setting the variables for sending email\n\t\t\t\t\t\t$this->Email->to = $email_to;\n\t\t\t\t\t\t//$this->Email->bcc = array($adminEmail);\n\t\t\t\t\t\t$this->Email->subject = 'Your password here';\n\t\t\t\t\t\t$this->Email->replyTo = EMAIL_REPLY;\n\t\t\t\t\t\t$this->Email->from = \"iWrestled admin <\".EMAIL_REPLY.\">\";\n\t\t\t\t\t\t//Here, the element in /views/elements/email/html/ is called to create the HTML body\n\t\t\t\t\t\t$this->Email->template = 'simple_message'; // note no '.ctp'\n\t\t\t\t\t\t//Send as 'html', 'text' or 'both' (default is 'text')\n\t\t\t\t\t\t$this->Email->sendAs = 'both'; // because we like to send pretty mail\n\t\t\t\t\t\t//Set view variables as normal\n\t\t\t\t\t\t$this->set('userDetail', $userDetail);\n\t\t\t\t\t\t$this->set(\"password\", $password);\n\t\t\t\t\t\t//Do not pass any args to send()\n\t\t\t\t\t\tif($this->Email->send()){\n\t\t\t\t\t\t\t$response['error']\t\t\t= 0;\n\t\t\t\t\t\t\t$response['response']['result'] \t= 'success';\n\t\t\t\t\t\t\t$response['response']['message']\t= 'Password send to your email id';\n\t\t\t\t\t\t\t$this->set('response', $response);\n\t\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t\t\t\tdie();\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\t$response['error']\t\t\t= 1;\n\t\t\t\t\t\t\t$response['response']['result'] \t= 'failure';\n\t\t\t\t\t\t\t$response['response']['message']\t= 'Password Enter valid email id';\n\t\t\t\t\t\t\t$this->set('response', $response);\n\t\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t\t\t\tdie();\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t}", "public function sendPasswordResetRequest() {\r\n\t\t$user_model = $this->load_model('UserModel');\t\r\n\t\t$user_data = $user_model->getUserByEmail($this->params['forgotten_password_email']);\r\n\t\t\r\n\t\tif($user_data !== null){\r\n\t\t\t$password_reset = $this->generatePasswordResetLink($user_data['ID'], $this->params['forgotten_password_email']);\r\n\t\t\t\r\n\t\t\t$password_reset_model = $this->load_model('PasswordResetModel');\r\n\t\t\t$password_reset_model->insertHash($user_data['ID'], $password_reset['hash']);\r\n\t\t\t\r\n\t\t\tif(Utils::sendPasswordResetEmail($this->params['forgotten_password_email'], $password_reset['link'])){\r\n\t\t\t\t$this->sendResponse(1, true);\r\n\t\t\t} else {\r\n\t\t\t\t$this->sendResponse(0, ErrorCodes::EMAIL_ERROR);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\t$this->sendResponse(0, array('field' => 'forgotten_password_email', 'error_code' => ErrorCodes::EMAIL_NOT_FOUND));\r\n\t\t}\r\n\t}", "public function forgot()\n {\n if(logged_in()) redirect($this->config->item(\"base_url\").'index.php/home');\n\n $this->load->library('form_validation');\n $this->load->helper('form');\n $data['success'] = false;\n\n $this->form_validation->set_rules('user_email', 'Email', 'required|valid_email|callback_email_exists');\n\n if ($this->form_validation->run()) {\n $email = $this->input->post('user_email');\n $this->load->model('Authme_model');\n $user = $this->Authme_model->get_user_by_email($email);\n $slug = md5($user->user_id . $user->user_email . date('Ymd'));\n\n $this->load->library('email');\n $this->email->from('noreply@'.$_SERVER[\"SERVER_NAME\"], 'Server Monitor'); // Change these details\n $this->email->to($email);\n $this->email->subject('Reset your Password');\n $this->email->message('To reset your password please click the link below and follow the instructions:\n\n'. site_url('home/reset/'. $user->user_id .'/'. $slug) .'\n\nIf you did not request to reset your password then please just ignore this email and no changes will occur.\n\nNote: This reset code will expire after '. date('j M Y') .'.');\n $this->email->send();\n\n $data['success'] = true;\n }\n $this->load->view('public_header', $data);\n $this->load->view('forgot_password', $data);\n $this->load->view('footer', $data);\n }", "public function testLoginSubmissionWrongEmailAndPassword()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/login')\n ->type('txt-email', '[email protected]')\n ->type('txt-password', 'wrongpassword123')\n ->press('Sign in')\n ->assertSee('Invalid credentials entered.');\n });\n }", "public function postForgot()\n {\n if( Confide::forgotPassword( Input::get( 'email' ) ) )\n {\n $notice_msg = Lang::get('confide::confide.alerts.password_forgot');\n return Redirect::to('user/login')\n ->with( 'notice', $notice_msg );\n }\n else\n {\n $error_msg = Lang::get('confide::confide.alerts.wrong_password_forgot');\n return Redirect::to('user/forgot')\n ->withInput()\n ->with( 'error', $error_msg );\n }\n }", "public function forgotPassword(){\r\n\r\n fn_logged_in();\r\n\r\n $view = \"forgot_password\";\r\n $data = array(\r\n \"page_title\" => \"Forgot Password\"\r\n );\r\n $this->render_page($view, $data);\r\n }", "public function forgotUser($data) {\n $this->load->database();\n $email = $data->email;\n $sql = \"select * from app_users where email='$email'\";\n\n $query = $this->db->query($sql);\n if ($query->num_rows() > 0) {\n $userData = $query->_fetch_object();\n $seed = str_split('abcdefghijklmnopqrstuvwxyz' . 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' . '0123456789!@#$%^&*()'); // and any other characters\n shuffle($seed);\n $rand = '';\n foreach (array_rand($seed, 5) as $k)\n $rand .= $seed[$k];\n\n $pass = $rand;\n $password = md5($rand);\n $data = array(\n 'password' => $password,\n );\n\n $this->db->where('id', $userData->id);\n $query = $this->db->update('users', $data);\n $to = $userData->email;\n $username = $userData->username;\n $subject = \"password Change request\";\n $message = \"Hello $username. Your new password is $pass\";\n $from = \"[email protected]\";\n $headers = \"From:\" . $from;\n mail($to, $subject, $message, $headers);\n $image = $userData->image;\n\n $this->trueResponse(\"Password has been sent to your email address\");\n } else {\n $this->falseResponse(\"No response\");\n }\n die;\n }", "public function testVisitPasswordForgotAndFillOutFormWithBadInput()\n {\n $this->browse(function (Browser $browser, Browser $browser2) {\n $browser->visit('/password/forgot')\n ->click('#submit-pass-forgot-form')\n ->pause(2000)\n ->assertSee('Please enter a valid email');\n\n $browser2->visit('/password/forgot')\n ->type('email', 'badmail')\n ->click('#submit-pass-forgot-form')\n ->pause(2000)\n ->assertSee('Please enter a valid email');\n });\n }", "function forgot_password()\n\t\t{\n\t\t\t// setting validation rules by checking whether identity is email\n\t\t $this->form_validation->set_rules('identity', 'Email', 'required|valid_email');\n\n\t\t\tif ($this->form_validation->run() == false)\n\t\t\t{\n\t\t\t\t$this->data['type'] = $this->config->item('identity','ion_auth');\n\n\t\t\t\t// Get any status message that may have been set.\n\t\t\t\t$this->data['message'] = $this->session->flashdata('message');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$identity = $this->ion_auth->where('email', $this->input->post('identity'))->users()->row();\n\n\t\t\t\tif(empty($identity)) {\n\n\t \t\tif($this->config->item('identity', 'ion_auth') != 'email')\n\t \t{\n\t\t $this->data['message'] = 'No record of that username';\n\t \t}\n\t \telse\n\t \t{\n\t\t $this->data['message'] = 'No record of that email address';\n\t \t}\n\n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t\t\t\t\t// run the forgotten password method to email an activation code to the user\n\t\t\t\t\t$forgotten = $this->ion_auth->forgotten_password($identity->{$this->config->item('identity', 'ion_auth')});\n\n\t\t\t\t\tif ($forgotten)\n\t\t\t\t\t{\n\t\t\t\t\t\t// if there were no errors\n\t\t\t\t\t\t$this->session->set_flashdata('message', $this->ion_auth->messages());\n\t\t\t\t\t\tredirect(\"login\", 'refresh'); //we should display a confirmation page here instead of the login page\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->session->set_flashdata('message', $this->ion_auth->errors());\n\t\t\t\t\t\tredirect(current_url(), 'refresh');\n\t\t\t\t\t}\n\t \t\t}\n\t\t\t}\n\t\t\t$this->load->view('public/auth/forgot_password', $this->data);\n\t\t}", "function resetPassword($userEmail){\n\n}", "public function testPostForgotPageValidationError()\n\t{\n\t\t$this->call('orchestra::forgot@index', array(), 'POST', array(\n\t\t\t'email' => 'admin+orchestra.com',\n\t\t\t\\Session::csrf_token => \\Session::token(),\n\t\t));\n\n\t\t$this->assertRedirectedTo(handles('orchestra::forgot'));\n\t\t$this->assertInstanceOf('\\Laravel\\Messages', \\Session::get('errors'));\n\t}", "public function testAuthenticationServiceRequestPasswordReset()\n {\n }", "public function forgotPasswordSendEmail(){\r\n\r\n fn_logged_in();\r\n \r\n $email = $this->input->post('email'); \r\n \r\n $res = $this->Advertiesment_model->forgotPasswordGetUser($email);\r\n\r\n //echo fn_print_array($res);\r\n if ( isset($email) && ($email != \"\") )\r\n {\r\n if($res == 'no_email_found')\r\n {\r\n $result = 'Email does not exist';\r\n echo $result;\r\n }\r\n elseif($res)\r\n { \r\n $password = $res[0]['original_password'];\r\n $message = \"\r\n <html>\r\n <head>\r\n <title>Account Details</title>\r\n </head>\r\n <body>\r\n <h2>Your account details are given below.</h2>\r\n <p>Your Account:</p>\r\n <p>Email: \".$email.\"</p>\r\n <p>Password: \".$password.\"</p> \r\n </body>\r\n </html>\r\n \";\r\n $subject = \"Forgot Password Email\";\r\n\r\n $email_data = array(\r\n \"message\" => $message,\r\n \"to_email\" => $email,\r\n \"subject\" => $subject,\r\n );\r\n\r\n $result = fn_send_email($email_data);\r\n echo $result;\r\n } \r\n }\r\n else\r\n {\r\n $result = 'All fields are required';\r\n echo $result; \r\n }\r\n }", "public function sendReset($email) {\n\n if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n return 'Invalid email address';\n }\n\n\n // check to see if the email exists\n $qry = sprintf(\"SELECT uv.userID\n FROM sysUGFValues AS uv\n INNER JOIN sysUsers AS u ON u.itemID=uv.userID\n WHERE uv.sysStatus='active'\n AND uv.sysOpen='1'\n AND u.sysStatus='active'\n AND u.sysOpen='1'\n AND uv.fieldID='3'\n AND uv.value='%s'\",\n $this->db->escape($email));\n $res = $this->db->query($qry);\n if ($this->db->num_rows($res) > 0) {\n\n $mail = new PHPMailer();\n\n while ($u = $this->db->fetch_assoc($res)) {\n\n $hash = $this->generateToken();\n\n // insert a unique hash into the DB to check on later\n $qry = sprintf(\"UPDATE sysUsers SET fpHash='%s' WHERE itemID='%d'\",\n $hash,\n $u['userID']);\n $this->db->query($qry);\n $resetLink = 'http://' . $_SERVER['HTTP_HOST'] . '/reset-password?token=' . $hash;\n\n $mail->Subject = ucwords($_SERVER['HTTP_HOST']) . \" password reset\";\n $mail->AddAddress($email);\n $mail->SetFrom('[email protected]', 'Intervue');\n\n\n $mail->Body = \"<p>Hi there,</p>\n\n <p>There was recently a request to change the password on your account.</p>\n\n <p>If you requested this password change, please set a new password by following the link below:</p>\n\n <p>{$resetLink}</p>\n\n <p>If you don't want to change your password, just ignore this message.</p>\n\n <p>Thanks</p>\";\n\n $mail->AltBody = strip_tags($mail->Body);\n\n if (!$mail->Send()) {\n return false;\n }\n\n $mail->ClearAllRecipients();\n\n }\n\n return true;\n }\n\n return 'No user found';\n }", "public function forgotpasswordAction()\n {\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_IndexForgot();\n\t\t\n\t\t$errorMessage = \"\"; \n\t\t\n\t\t$this->view->form = $form;\n\t\tif($this->getRequest()->isPost()){\n\t\t\tif($form->isValid($_POST)){\n\t\t\t\t$data = $form->getValues();\n\t\t\t\t$phone = $data['phone']; \n\t\t\t\t$result = $users->getAllUserDetailsByPhone($phone);\n\t\t\t\tif($result){\n\t\t\t\t\t$StaffName = $result['StaffName'];\n\t\t\t\t\t$EMail = trim($result['EMail']);\n\t\t\t\t\t$LoginID = $result['LoginID'];\n\t\t\t\t\t$role = $result['role'];\n\t\t\t\t\t$from_email = $StaffName.\"@acme.com\";\n\t\t\t\t\t\n if($role==\"national_head\")\n {\n\t\t\t\t\t $roletype_name = \"National head\";\n }\n else if($role==\"zone_head\")\n {\n\t\t\t\t\t $roletype_name = \"Zone head\";\n }\n else if($role==\"regional_head\")\n {\n\t\t\t\t\t $roletype_name = \"Regional head\";\n }\t\n else if($role==\"circle_head\")\n {\n\t\t\t\t\t $roletype_name = \"Circle head\";\n }\t\n else if($role==\"service_manager\")\n { \n\t\t\t\t\t $roletype_name = \"Service manager\";\n }\t\n else if($role==\"cluster_incharge\")\n {\n\t\t\t\t\t $roletype_name = \"Cluster incharge\";\n }\t\t\t\t\t\t\n \t\t\t\t\t$subject = \"$roletype_name forgot password email\";\n\t\t\t\t\t$message .= \"Here is your $roletype_name login details:<br><br>\";\n\t\t\t\t\t$message .= \"Email: $EMail <br>\";\n\t\t\t\t\t$message .= \"Username: $StaffName <br>\";\n\t\t\t\t\t$message .= \"Login ID: $LoginID <br><br>\";\n\t\t\t\t\t$message .= \"Thanks,<br>\";\n\t\t\t\t\t$message .= \"ACME Team\";\n\t\t\t\n\t\t\t\t\t$confobj = new Application_Model_Fsr();\n\t\t\t\t\t\n\t\t\t\t\t$confArr = $confobj->getSmtpMailServerSettings();\n\t\t\t\t\t\n\t\t\t\t\t$config = $confArr['config'];\n\t\t\t\t\t$server = $confArr['server'];\n\t\t\t\t\t$fromemailconf = $confArr['fromemailconf'];\n\t\t\t\t\t\n\t\n\t\t\t\t\t$transport = new Zend_Mail_Transport_Smtp($server, $config);\n\t\t\t\t\tZend_Mail::setDefaultTransport($transport);\n\t\t\t\t\t//echo $EMail;die;\n\t\t\t\t\ttry{\n\t\t\t\t\t\t$mail = new Zend_Mail();\n\t\t\t\t\t\t$mail->setSubject($subject);\n\t\t\t\t\t\t$mail->setFrom($fromemailconf['fromemail'], $fromemailconf['fromname']);\n\t\t\t\t\t\t$mail->addTo($EMail, $StaffName);\n\t\t\t\t\t\t$mail->setBodyHtml($message);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$mail->send($transport);\n\t\t\t\t\t\t$this->view->errorMessage = \"Email has been sent successfully.\";\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception $e)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->view->errorMessage = \"Error in sending email.\";\n\t\t\t\t\t//\techo '<pre>';\n\t\t\t\t\t//echo $e->getMessage();die;\n\t\t\t\t\t\t//print_r($e);\n\t\t\t\t\t}\t\t\n\t\t\t\t\t//echo 'dsfds';die;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t$this->view->errorMessage = \"Invalid mobile number. Please try again.\";\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t}", "function sending_forgot_password_email($data, &$content) {\n\t\t// Create content\n\t\t$content = sprintf($this->ci->lang->line('auth_forgot_password_content'), \n\t\t\t$this->ci->config->item('DX_website_name'), \n\t\t\t$data['reset_password_uri'],\n\t\t\t$data['password'],\n\t\t\t$data['key'],\n\t\t\t$this->ci->config->item('DX_webmaster_email'),\n\t\t\t$this->ci->config->item('DX_website_name'));\n\t}", "protected function taskForgot()\n {\n /** @var Config $config */\n $config = $this->grav['config'];\n $data = $this->post;\n\n /** @var Language $language */\n $language = $this->grav['language'];\n $messages = $this->grav['messages'];\n\n /** @var UserCollectionInterface $users */\n $users = $this->grav['accounts'];\n $email = $data['email'] ?? '';\n\n // Sanitize $email\n $email = htmlspecialchars(strip_tags($email), ENT_QUOTES, 'UTF-8');\n\n // Find user if they exist\n $user = $users->find($email, ['email']);\n\n if ($user->exists()) {\n if (!isset($this->grav['Email'])) {\n $messages->add($language->translate('PLUGIN_LOGIN.FORGOT_EMAIL_NOT_CONFIGURED'), 'error');\n $this->setRedirect($this->login->getRoute('forgot') ?? '/');\n\n return true;\n }\n\n $from = $config->get('plugins.email.from');\n\n if (empty($from)) {\n $messages->add($language->translate('PLUGIN_LOGIN.FORGOT_EMAIL_NOT_CONFIGURED'), 'error');\n $this->setRedirect($this->login->getRoute('forgot') ?? '/');\n\n return true;\n }\n\n $userKey = $user->username;\n $rateLimiter = $this->login->getRateLimiter('pw_resets');\n $rateLimiter->registerRateLimitedAction($userKey);\n\n if ($rateLimiter->isRateLimited($userKey)) {\n $messages->add($language->translate(['PLUGIN_LOGIN.FORGOT_CANNOT_RESET_IT_IS_BLOCKED', $email, $rateLimiter->getInterval()]), 'error');\n $this->setRedirect($this->login->getRoute('login') ?? '/');\n\n return true;\n }\n\n $token = md5(uniqid((string)mt_rand(), true));\n $expire = time() + 604800; // next week\n\n $user->reset = $token . '::' . $expire;\n $user->save();\n\n try {\n Email::sendResetPasswordEmail($user);\n\n $messages->add($language->translate('PLUGIN_LOGIN.FORGOT_INSTRUCTIONS_SENT_VIA_EMAIL'), 'info');\n } catch (\\Exception $e) {\n $messages->add($language->translate('PLUGIN_LOGIN.FORGOT_FAILED_TO_EMAIL'), 'error');\n }\n } else {\n $messages->add($language->translate('PLUGIN_LOGIN.FORGOT_INSTRUCTIONS_SENT_VIA_EMAIL'), 'info');\n }\n\n\n $this->setRedirect($this->login->getRoute('login') ?? '/');\n\n return true;\n }", "public function forgotten_password($email = false) {\n\t \n\t if ($email === false) {\n\t return false;\n\t }\n\t $query = $this->db->select('passConfirmKey')\n \t ->where('email', $email)\n \t ->limit(1)\n \t ->get($this->tblName);\n \n $result = $query->row();\n\t\t\n\t\t$code = '';\n\t\tif ($result) {\n\t\t\t$code = $result->passConfirmKey;\n\t\t} else {\n\t\t\t$this->errorCode = 1;\n\t\t\t$this->statusMess = \"No record was found for the email \".$email.\".\";\n\t\t\treturn false;\n\t\t}\n\t\t//echo('code = '.$code.\"<br />\");\n\t\tif (empty($code)) {\n\t\t\t$key = substr($this->hashPassword(microtime().$email),0,16);\n\t\t\t\n\t\t\t$this->passConfirmKey = $key;\n\t\t\n\t\t\t$data = array('passConfirmKey' => $key);\n\t\t\t\n\t\t\t$this->db->update($this->tblName, $data, array('email' => $email));\t\t\n\t\t\treturn ($this->db->affected_rows() == 1) ? true : false;\n\t\t} else {\n\t\t\t$this->errorCode = 2;\n\t\t\t$this->statusMess = \"A password reset request has already been sent to \".$email.\".\";\n\t\t\treturn false;\n\t\t}\n\t}", "public function testVisitVerifyAndFillOutForm()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/password/forgot')\n ->type('email', '[email protected]')\n ->click('#submit-pass-forgot-form')\n ->assertPathIs('/password/forgot')\n ->assertSee('If the email is registered in our system, you will receive an email with instructions to reset your password shortly');\n });\n }", "public function forgotPassword( $email )\n {\n $user = $this->repo->getUserByMail( $email );\n if( $user )\n {\n $user->forgotPassword();\n return true;\n }\n else\n {\n return false;\n }\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 }", "public function testForgotPasswordFailNonActive()\n {\n $user = $this->Users->get(1);\n\n $user->set('active', 0);\n\n $this->Users->save($user);\n\n $data = [\n 'email' => $user->get('email'),\n ];\n\n $this->assertEmpty($user->get('activation_key'));\n\n $this->post('/users/forgotPassword', $data);\n\n $this->assertResponseSuccess();\n\n $this->assertRedirect('/login');\n\n $user = $this->Users->get(1);\n\n $this->assertEmpty($user->get('activation_key'));\n }", "function sendUserForgotPassword($argArrPOST) {\n\n @extract($argArrPost);\n $objValid = new Validate_fields;\n $objCore = new Core();\n $objValid->check_4html = true;\n\n $objValid->add_text_field('Email', strip_tags($argArrPOST['frmUserLoginEmail']), 'email', 'y');\n\n if ($objValid->validation()) {\n $errorMsgFirst = 'Please enter valid email address!';\n } else {\n $errorMsg = $objValid->create_msg();\n }\n if ($errorMsg) {\n $objCore->setErrorMsg($errorMsg);\n return false;\n } else {\n $arrUserFlds = array('pkUserID', 'UserFirstName', 'UserEmail', 'UserPassword');\n $varUserWhere = ' 1 AND UserEmail = \\'' . trim($argArrPOST['frmUserLoginEmail']) . '\\'';\n $arrUserList = $this->select(TABLE_USERS, $arrUserFlds, $varUserWhere);\n if ($arrUserList) {\n //update the random key in the database\n\n $varRandomPassword = $this->generate_random_string(5); //die;\n\n\n $varRandomKey = md5(uniqid(microtime()));\n $arrUpdateArray = array('UserAuthorizationToken' => $varRandomKey, 'UserPassword' => md5($varRandomPassword));\n $varaffectedRecord = $this->update(TABLE_USERS, $arrUpdateArray, $varUserWhere);\n\n\n\n $argUserName = $arrUserList[0]['UserEmail'];\n //$argPassword = $arrUserList[0]['UserPassword'];\n $argPassword = $varRandomPassword;\n $argFirstName = $arrUserList[0]['UserFirstName'];\n\n //Send forget Password To User\n $varPath = '<img src=\"' . SITE_ROOT_URL . 'common/images/logo2.png' . '\"/>';\n\n $varToUser = $argArrPOST['frmUserLoginEmail'];\n $varFromUser = SITE_NAME . '<' . SITE_EMAIL_ADDRESS . '>';\n $varSubject = 'Venueset:Login Details';\n $varResetPasswordlink = '<a href=\"' . SITE_ROOT_URL . 'reset_password.php?userId=' . $arrUserList[0]['pkUserID'] . '&authorizationToken=' . base64_encode($varRandomKey) . '\">Reset Password</a>';\n $varOutput = file_get_contents(SITE_ROOT_URL . 'common/email_template/html/user_forget_password.html');\n $varUnsubscribeLink = 'Click <a href=\"' . SITE_ROOT_URL . 'unsubscribe.php?user=' . md5(trim($argArrPOST['frmUserLoginEmail'])) . '\" target=\"_blank\">here</a> to unsubscribe.';\n\n $arrBodyKeywords = array('{USER_FIRST_NAME}', '{USER_NAME}', '{USER_PASSWORD}', '{IMAGE_PATH}', '{SITE_NAME}', '{RESET_PASSWORD_LINK}', '{UNSUBSCRIBE_LINK}');\n\n $arrBodyKeywordsValues = array($argFirstName, $argUserName, $argPassword, $varPath, SITE_NAME, $varResetPasswordlink, $varUnsubscribeLink);\n $varBody = str_replace($arrBodyKeywords, $arrBodyKeywordsValues, $varOutput);\n //echo $varBody;die;\n $objCore->sendMail($varToUser, $varFromUser, $varSubject, $varBody);\n $objCore->setSuccessMsg(FRON_END_USER_FORGET_PASSWORD_SEND);\n return true;\n } else {\n $objCore->setErrorMsg(FRON_END_USER_EMAIL_EXIST_ERROR);\n return false;\n }\n }\n }" ]
[ "0.8302528", "0.8201703", "0.7918458", "0.77633613", "0.774659", "0.75689036", "0.75074136", "0.7476264", "0.7460115", "0.7450665", "0.7439147", "0.74033874", "0.7403045", "0.73666114", "0.73210585", "0.7268299", "0.72494984", "0.72469765", "0.72402436", "0.7231359", "0.7230925", "0.7219835", "0.7214585", "0.72021973", "0.71889377", "0.71806645", "0.7152489", "0.715187", "0.714694", "0.7145886", "0.71412116", "0.7138689", "0.71310765", "0.712302", "0.7122674", "0.71206933", "0.7114797", "0.7106893", "0.7104098", "0.709064", "0.7060596", "0.7048182", "0.70466614", "0.7040117", "0.7020112", "0.701912", "0.70147336", "0.7013588", "0.7012983", "0.6994425", "0.6985783", "0.6985218", "0.6954493", "0.69543755", "0.6943821", "0.6939685", "0.69322675", "0.6927997", "0.6926709", "0.6926709", "0.691069", "0.6910602", "0.69102114", "0.6907726", "0.6906579", "0.6904161", "0.6899296", "0.68962085", "0.6890585", "0.68894666", "0.6875736", "0.6875198", "0.68741095", "0.6873407", "0.6872356", "0.68712896", "0.6865924", "0.68535817", "0.68503803", "0.6848518", "0.6837664", "0.6833509", "0.68287224", "0.6828001", "0.68240273", "0.6820024", "0.68145555", "0.681163", "0.68055344", "0.6805391", "0.67999923", "0.67993784", "0.67986625", "0.6796372", "0.67914045", "0.6789226", "0.6785078", "0.67767996", "0.6759356", "0.67504996" ]
0.7880891
3
get all patient/case list
static function getVarPatientList($user_id) { //$sql = "select distinct p1.patient_id, p1.diagnosis, p2.case_id from patients p1, var_patients p2 where p1.patient_id=p2.patient_id order by patient_id"; //if (User::accessAll()) // $sql = "select distinct p4.id as project_id, p4.name as project_name, p1.patient_id, p1.diagnosis, p2.case_id, p2.case_name from patients p1, var_cases p2, project_patients p3, projects p4 where p1.patient_id=p2.patient_id and (p2.case_name=p3.case_name or p2.case_name='20160415') and p1.patient_id=p3.patient_id and p3.project_id = p4.id order by patient_id"; //else $time_start = microtime(true); $key = "patient_list.$user_id"; //if (Cache::has($key)) // return Cache::get($key); $case_condition = "and p2.status='passed'"; if (User::isSuperAdmin()) $case_condition = "and p2.status<>'failed'"; // $sql = "select distinct u.project_id, u.project_name, p1.patient_id, p1.diagnosis, p2.case_id, p2.case_name, path from patients p1, cases p2, project_patients p3, user_projects u where p1.patient_id=p2.patient_id and p1.patient_id=p3.patient_id and (p2.case_name=p3.case_name) $case_condition and u.project_id=p3.project_id and u.user_id=$user_id";#20190502 //$sql = "select distinct u.project_id, u.project_name, p1.patient_id, p1.diagnosis, p2.case_id, p2.case_name, path from patients p1, cases p2, project_patients p3, user_projects u where p1.patient_id=p2.patient_id and p1.patient_id=p3.patient_id and (p2.case_name=p3.case_name) $case_condition and u.project_id=p3.project_id and u.user_id=$user_id";#original back 20190814 due to RMS2162 $sql = "select distinct u.project_id, u.project_name, p1.patient_id, p1.diagnosis, p2.case_id, p2.case_name, p2.path from patients p1, project_processed_cases p2, user_projects u where p1.patient_id=p2.patient_id and u.project_id=p2.project_id and u.user_id=$user_id"; Log::info("SQL(getVarPatientList) = ".$sql); $rows = DB::select($sql); $time = microtime(true) - $time_start; //Cache::put($key, $rows, 12*60); Log::info("time: $time seconds"); return $rows; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 get_patient_list(){\n \t\t//$where = \"care_doctor_id=\".$this->m->user_value('id').\" or care_doctor_id=0\";\n \t\t$query = $this->m->port->p->get_where('care_chatservice',array('care_doctor_id'=>0,));\n \t$patients = array();\n \t$temp = array();\n \tforeach ($query->result() as $row){\n \t\t$temp['id'] = $row->id;\n \t\t$temp['name'] = $row->patient_name.' '.$row->patient_surname;\n \t\t$temp['regid'] = $row->patient_regid;\n \t\t$temp['address'] = $row->patient_address;\n \t\t$temp['phone'] = $row->patient_phone;\n \t\t$temp['apply_time'] = $row->help_apply_time;\n \t\tarray_push($patients, $temp);\n \t}\n \tusort($patients, function($a, $b) {\n \t\t\t$ad = new DateTime($a['apply_time']);\n \t\t\t$bd = new DateTime($b['apply_time']);\n \t\t\tif ($ad == $bd) {\n \t\t\t return 0;\n \t\t\t}\n \t\t\treturn $ad < $bd ? 1 : -1;\n\t\t});\n \treturn $patients;\n \t}", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM patient_info';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function getPatientList() {\n $result = array();\n //on lance la requete dans la BDD\n $query = 'SELECT `id`,`lastname`,`firstname` FROM `patients` ORDER BY`lastname`';\n //On declare et charge l'attribut $queryResult avec : \"dans la bdd la requete\"\n $queryResult = $this->db->query($query);\n //is_object — Détermine si une variable est de type objet\n //si le resultat de la requete est bien un objet charge \n //$result avec le tableau en type objet.\n if (is_object($queryResult)){\n $result = $queryResult->fetchAll(PDO::FETCH_OBJ);\n }\n //else { $result = array(); MAIS vu qu'on l'a deja intialisé a vide au dessus, si ca rentre dans la condition du else il correspondra automatiquement a tableau vide. C'est pour ca qu'on code pas le else.\n // au final on retourne la var result dans tous les cas, sa depend de ce qu'on a chargé dedans.\n return $result;\n }", "public function selectAllPatient()\n {\n $req = $this->db->query('SELECT * FROM tbl_patient ORDER BY LName');\n return $req;\n }", "public function index()\n {\n return Patients::all();\n }", "function getPatientList()\n {\n $getPatientList = $this->db->query(\n //reformate la date sur le format francais\n 'SELECT \n `us`.`id`\n ,`us`.`lastname`\n ,`us`.`firstname`\n ,DATE_FORMAT(`pat`.`birthDate`, \\'%d/%m/%Y\\') AS `birthDateFr` \n ,`pat`.`birthDate`\n ,`pat`.`phoneNumbers`\n ,`us`.`mail`\n FROM \n `dom20_users` as `us`\n INNER JOIN \n `dom20_patients` AS `pat`\n ON `us`.`id` = `pat`.`id_dom20_users`\n WHERE\n `us`.`id` = :id \n ORDER BY `lastname` ASC\n '\n );\n // fetchAll permet de recuperer un tableau d'objet\n return $getPatientList->fetchAll(PDO::FETCH_OBJ);\n }", "public function index()\n {\n // \n return Vital::with('patient')->get();\n }", "public function showAll()\n {\n return new PatientCollection(Patient::all());\n }", "protected function _getCasesList() {\n if (Pi::service('module')->isActive(CASES)) {\n try {\n $cases = Pi::api('api', CASES)->caseList();\n return $cases;\n } catch (\\Exception $exception) {\n return array();\n }\n }\n }", "function get_patients(){\n\t$conn = connect();\n\t$sql = \"select u.person_id, first_name, last_name from persons p join users u on p.person_id=u.person_id where u.CLASS='p'\";\n\n\tif(($statement = oci_parse($conn, $sql)) == false){\n\t\t$err = oci_error($statement);\n\t\techo htmlentities($err['message']);\n\t\toci_close($conn);\n\t\treturn FALSE;\n\t}\n\n\t$exec = oci_execute($statement);\n\n\tif(!$exec){\n\t\t$err = oci_error($statement);\n\t\toci_free_statement($statement);\n\t\techo htmlentities($err['message']);\n\t\toci_close($conn);\n\t\treturn FALSE;\n\t}\n\n\t$count = 0;\n\n\twhile($row = oci_fetch_assoc($statement)){\n\t\t$ret[$count] = $row;\n\t\t$count = $count + 1; \n\t}\n\toci_free_statement($statement);\n\toci_close($conn);\n\treturn $ret;\n}", "public function getAllergyList($patient_id)\r\n {\r\n try{ \r\n $patient_id = encrypt_decrypt('decrypt',$patient_id);\r\n } catch (\\Exception $e) {\r\n abort(404);\r\n exit;\r\n }\r\n $active = '';\r\n $previous_allergies = $this->allergy->allergyLists($patient_id);\r\n $type = 'case_load';\r\n if(request()->is_careplan)\r\n $is_careplan = 1;\r\n else\r\n $is_careplan = 0;\r\n $html = view('patients.allergies.allergies_listing',compact('active', 'previous_allergies', 'patient_id','type','is_careplan'))->render(); \r\n return response()->json(['message' => trans('message.listing_found'), 'html' => $html], 200);\r\n }", "function getPatients () {\n global $db;\n\n //initialize variable for function results\n $results = [];\n\n //write SQL statement\n $stmt = $db->prepare('SELECT id, patientFirstName, patientLastName, patientMarried, patientBirthDate FROM patients ORDER BY patientLastName');\n\n\n //execute SQL statement\n if($stmt -> execute() && $stmt -> rowCount() > 0){\n\n $results = $stmt ->fetchAll(PDO::FETCH_ASSOC);\n }\n\n //return result of SQL statement\n return ($results);\n }", "public function allRecords()\n\t{\n\t\treturn $this->with(['applicant.department.college.branch', \n\t\t\t'patent', 'project', 'projectType'])\n ->get();\n\t}", "public function index()\n\t{\n\t\t$data['list'] = PatientAdmission::with(['patientInfo','doctorInfo','bedInfo'])->get();\n\n\t\treturn view('hospital.patient_admission.list',$data);\n\t}", "public function get_patients_list_for_doctor(){\n $help_status=array('0','In queue','Broadcasted','Doctor responded',);\n $this->m->port->p->select('c.id, q.id as quickblox_id, c.patient_regid,c.patient_name, c.patient_surname, c.broadcast_init_time,c.doctor_id,c.help_status');\n $this->m->port->p->from('care_chatservice as c');\n $this->m->port->p->join('quickblox as q','q.regid = c.patient_regid');\n $this->m->port->p->where('c.help_status !=',1);\n $this->m->port->p->where_in('c.doctor_id',array($this->m->user_id(),0));\n $this->m->port->p->where_in('c.specialization_id',$this->m->user_value('specialization1'));\n //$this->m->port->p->or_where('c.doctor_id',0);\n $query = $this->m->port->p->get();\n $patients = array();\n $temp = array();\n foreach ($query->result() as $row){\n $temp['id'] = $row->id;\n $temp['quickblox_id'] = $row->quickblox_id;\n $temp['name'] = $row->patient_name.' '.$row->patient_surname;\n $temp['regid'] = $row->patient_regid;\n $temp['broadcast_time'] = $row->broadcast_init_time;\n $temp['doctor_id'] = $row->doctor_id;\n $temp['help_status'] = $help_status[$row->help_status];\n array_push($patients, $temp);\n }\n return $patients;\n }", "public function index()\n\t{\n\t\t//\n\t\t\n\t\t$patients=patient::with('disease.doctors')->get();\n\t\t\n\t\treturn view('listpatient')->with('patients',$patients);\n\t}", "public function getPatient()\n {\n $select = new \\Zend\\Db\\Sql\\Select ;\n $select->from('patient');\n $user_session = new Container('user');\n\n $select->where(\" doctorId = '{$user_session['user']->getId()}'\");\n $dbAdapter = $this->tableGateway->getAdapter();\n $statement = $dbAdapter->createStatement();\n\n $select->prepareStatement($dbAdapter, $statement);\n $driverResult = $statement->execute(); // execute statement to get result\n\n $resultSet = new ResultSet();\n $resultSet->initialize($driverResult);\n $rows = array();\n foreach($resultSet as $row) {\n $rows[] = $row->getArrayCopy();\n }\n return $rows;\n }", "public function index()\n {\n return PatientResource::collection(Patient::all());\n }", "public function getCase() {\n return CHtml::listData(Cases::model()->findAll(array('order' => 'name')), 'case_id', 'name');\n }", "public function getMedicationList($patient_id)\r\n {\r\n try{ \r\n $patient_id = encrypt_decrypt('decrypt',$patient_id);\r\n } catch (\\Exception $e) {\r\n abort(404);\r\n exit;\r\n }\r\n $active = '';\r\n $previous_medications = $this->medication->medicationList($patient_id);\r\n $type = 'case_load';\r\n if(request()->is_careplan)\r\n $is_careplan = 1;\r\n else\r\n $is_careplan = 0;\r\n $html = view('patients.medications.medication_listing',compact('active', 'previous_medications', 'patient_id','type','is_careplan'))->render();\r\n return response()->json(['message' => trans('message.listing_found'), 'html' => $html], 200);\r\n }", "function cpatient_detail_list() {\n\t\tglobal $conn;\n\n\t\t// Initialize table object\n\t\t$GLOBALS[\"patient_detail\"] = new cpatient_detail();\n\n\t\t// Intialize page id (for backward compatibility)\n\t\tif (!defined(\"EW_PAGE_ID\"))\n\t\t\tdefine(\"EW_PAGE_ID\", 'list', TRUE);\n\n\t\t// Initialize table name (for backward compatibility)\n\t\tif (!defined(\"EW_TABLE_NAME\"))\n\t\t\tdefine(\"EW_TABLE_NAME\", 'patient_detail', TRUE);\n\n\t\t// Open connection to the database\n\t\t$conn = ew_Connect();\n\n\t\t// Initialize list options\n\t\t$this->ListOptions = new cListOptions();\n\t}", "public function showPatients()\n {\n $user = Auth::user();\n return response()->json(PatientResource::collection($user->patients), 200);\n }", "public function getAllCases()\n {\n try {\n $prepared_query = $this->conn->prepare(\"SELECT * FROM CASES WHERE deleted = 0\");\n $prepared_query->execute();\n $res = $prepared_query->fetchAll(PDO::FETCH_ASSOC);\n\n return $res;\n\n } catch (PDOException $ex) {\n }\n }", "function getAllPatients()\n{\n //get all Patients\n $db = createDBconnection();\n $sql = \"SELECT patients.patient_id, patients.patient_name , clients.client_firstname, clients.client_lastname, species.species_description, patients.patient_gender, patients.patient_status\n FROM ((patients\n INNER JOIN clients ON patients.client_id = clients.client_id)\n INNER JOIN species ON patients.species_id = species.species_id)\n ORDER BY patients.patient_name ASC\";\n $result = $db->query($sql);\n\n return $result;\n}", "public function index()\n {\n return Diagnosis::all();\n }", "public function all()\n {\n $appointments = Appointment::with('concern')->orderBy('appointment_at', 'asc')->get();\n $patients = Patient::all();\n $list = $patients->pluck('uniquePatient', 'id')->toArray();\n return view('Appointments.All', compact('appointments', 'list'));\n }", "public function getCarePlanList($patient_id)\r\n { \r\n\r\n $patient = $this->patient->patientDetail($patient_id, false);\r\n try{ \r\n $patient_id = encrypt_decrypt('decrypt',$patient_id);\r\n } catch (\\Exception $e) {\r\n abort(404);\r\n exit;\r\n }\r\n\r\n $carePlanList = $this->careplan->getCareplanList($patient_id);\r\n $patient = $patient['patient_info'];\r\n $html = view('patients.caseload.care_plan.care_plan_list',compact('carePlanList', 'patient_id','patient'))->render();\r\n return response()->json(['message' => trans('message.listing_found'), 'html' => $html], 200);\r\n }", "public function getPatientsDbData()\n {\n $sql = \"SELECT t_dtags.id,group_concat(t_dtags.value,';') as value,t_resources.publicId\n FROM MainDicomTags AS t_dtags\n INNER JOIN Resources AS t_resources ON t_resources.internalId = t_dtags.id\n WHERE (t_dtags.tagGroup = 16 AND (t_dtags.tagElement = 16 or t_dtags.tagElement = 32) )\n AND (t_resources.parentId IS NULL)\n GROUP BY t_resources.publicId\n -- SORT BY value\n \";\n $res = $this->db->table($sql);\n\n return $res;\n\n }", "public function getAssessmentList(Request $request)\r\n { \r\n $careplan_id = 0;\r\n try{ \r\n $patient_id = encrypt_decrypt('decrypt', $request->get('patient_id'));\r\n if($request->has('careplan_id')){\r\n $careplan_id = encrypt_decrypt('decrypt', $request->get('careplan_id'));\r\n }\r\n\r\n } catch (\\Exception $e) {\r\n abort(404);\r\n exit;\r\n }\r\n if(request()->is_careplan){\r\n $is_careplan = 1; \r\n $activeCarePlan = 0; \r\n }\r\n \r\n else{\r\n $is_careplan = 0;\r\n $activeCarePlan = $this->careplan->checkActiveCarePlan($patient_id); \r\n }\r\n \r\n\r\n $patient = $this->patient->patientDetail($request->get('patient_id'), false);\r\n $assessmentList = $this->assessment->getLists($patient_id,$careplan_id);\r\n \r\n $patient = $patient['patient_info'];\r\n $html = view('patients.caseload.assessment.list',compact('assessmentList', 'patient_id','patient','is_careplan','activeCarePlan'))->render(); \r\n return response()->json(['message' => trans('message.listing_found'), 'html' => $html], 200);\r\n }", "function patientrecords($pid)\n{\n\t$records=\"SELECT * FROM `patientrecords` WHERE pid='$pid'\";\n\t$results=getdata($records);\n\treturn $results;\n}", "public function alldiseaseinfo()\r\r\n {\r\r\n return response()->json(\r\r\n Disease::wheredmuse(0)->select('id','diseasename')->get()\r\r\n );\r\r\n }", "public function index()\n {\n $patients = Patient::all();\n\n return $this->showAll($patients, 200);\n\n }", "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 getPatientScreening() {\n\n $where = [];\n $encselect = $this->request->input(\"encselect\");\n if ($encselect && ($encselect != \"Choose ENC Type\")) {\n\n $where[\"enc_type\"] = $encselect;\n }\n $phcselect = $this->request->input(\"phcselect\");\n if ($phcselect && ($phcselect != \"Choose PHC\")) {\n $where[\"phc_name\"] = $phcselect;\n }\n\n $villageselect = $this->request->input(\"villageselect\");\n if ($villageselect && ($villageselect != \"Choose Village\")) {\n\n $where[\"vill_name\"] = $villageselect;\n }\n\n $startdate = $this->request->input(\"startdate\");\n if ($startdate) {\n $startdate = date(\"Y-m-d H:i:s\", strtotime($startdate));\n $where[\"created_date\"] = $startdate;\n }\n\n $enddate = $this->request->input(\"enddate\");\n if ($enddate) {\n $enddate = date(\"Y-m-d H:i:s\", strtotime($enddate));\n $where[\"created_date\"] = $enddate;\n }\n\n $patient_id = $this->request->input(\"patient_id\");\n if ($patient_id) {\n\n $where[\"patient_id\"] = $patient_id;\n }\n\n\n// \\DB::enableQueryLog();\n $paitents = $this->usersModel->patientScreening($where);\n $paitents = json_decode(json_encode($paitents), true);\n\n// $query = \\DB::getQueryLog();\n// $query = end($query);\n// var_dump($query);exit;\n// echo \"<pre>\";\n// print_r($households);exit;\n return $paitents;\n }", "public function index()\n {\n $patient_types = PatientType::orderBy('code')->paginate(10);\n return success_data(compact('patient_types'));\n }", "public function all($id){\n return $this->model->query()->where('persona_id',$id)->get();\n }", "public function getAll()\n {\n $response = $this->client->post( 'https://idf.intven.com/public_patent_listing.json', [\n 'verify' => false,\n 'json' => [\n \"report_type\" => \"public_patent_listing\",\n \"queryFields\" => new \\stdClass(),\n \"filters\" => new \\stdClass(),\n \"per_page\" => $this->getTotal(),\n \"from\" => 0,\n \"sort\" => \"issued_on\",\n \"sort_order\" => \"desc\"\n ],\n ]);\n $data = json_decode($response->getBody()->getContents());\n return $data;\n }", "public function get_doctor_patient_list($requested_data) {\n\n $columns = \"user_id, \n user_first_name, \n user_last_name, \n user_photo_filepath,\n appointment_id,\n appointment_doctor_user_id,\n appointment_clinic_id,\n CONCAT(user_first_name,' ',user_last_name) AS user_name \";\n\n $get_patient_list_query = \" SELECT \" . $columns . \" \n FROM \n \" . TBL_APPOINTMENTS . \" \n LEFT JOIN\n \" . TBL_USERS . \" ON appointment_user_id = user_id \n WHERE\n appointment_status != 9 \n AND\n user_status = 1\n AND \n appointment_doctor_user_id = '\" . $requested_data['doctor_id'] . \"' \n AND\n appointment_clinic_id = '\" . $requested_data['clinic_id'] . \"' \";\n\n if ($requested_data['patient_list_type'] == 1) {\n $get_patient_list_query .= \" AND appointment_date = CURDATE() \";\n }\n\n $get_patient_list_query .= \" GROUP BY user_id \";\n\n $get_total_records = $this->get_count_by_query($get_patient_list_query);\n\n $get_patient_list_query .= \" ORDER BY appointment_id Desc \";\n\n if ($requested_data['patient_list_type'] == 2) {\n $get_patient_list_query .= \" LIMIT 0, 10 \";\n }\n if ($requested_data['patient_list_type'] == 3) {\n $get_patient_list_query .= \" LIMIT \" . (($requested_data['page'] - 1) * $requested_data['per_page']) . \",\" . $requested_data['per_page'] . \" \";\n }\n\n $patient_data = $this->get_all_rows_by_query($get_patient_list_query);\n\n $return_array = array(\n 'patient_data' => $patient_data,\n 'no_of_records' => $get_total_records\n );\n\n return $return_array;\n }", "function getPatient($id){\n\n global $db;\n\n $result = [];\n\n $stmt = $db->prepare(\"SELECT id, patientFirstName, patientLastName, patientMarried, patientBirthDate FROM patients WHERE id = :id\");\n\n $stmt->bindValue(\":id\", $id);\n\n if($stmt->execute() && $stmt->rowCount() > 0){\n\n $result = $stmt->fetch(PDO::FETCH_ASSOC);\n\n }\n\n return($result);\n\n }", "public function index()\n\t{\n\n\t\treturn View::make('patient.list');\n\t}", "public function loadPatients()\n\t{\n\t\t$search = Input::get('search');\n\t\t\n\t\t$patients = Patient::search($search)->orderBy('id','DESC')->paginate(Config::get('kblis.page-items'));\n\n\t\tif (count($patients) == 0) {\n\t\t \tSession::flash('message', trans('messages.no-match'));\n\t\t}\n\n\t\t// Load the view and pass the patients\n\t\treturn View::make('reports.patient.index')->with('patients', $patients)->withInput(Input::all());\n\t}", "public function getAllergyDetail($patient_id,Request $request)\r\n {\r\n try{\r\n $patient_id = encrypt_decrypt('decrypt',$patient_id);\r\n $id = encrypt_decrypt('decrypt',$request->id);\r\n\r\n } catch (\\Exception $e) {\r\n abort(404);\r\n exit;\r\n }\r\n $allergy = $this->allergy->allergyDetail($id);\r\n\r\n $type = 'case_load';\r\n $html = view('patients.allergies.allergy_history',compact('active', 'allergy'))->render();\r\n return $this->respond(['message' => '', 'html' => $html]);\r\n }", "public function listsPatientsourcesget()\r\n {\r\n $response = Sources::all(); \r\n return response()->json($response, 200);\r\n }", "public function getPatients()\n {\n\n $result_array = array();\n $total = -1;\n $count = 0;\n \n /* \n * If this is the first page, we want the query to get all of the results so we can tell the client can know how many pages there are, \n * then we return the first page by fetching just the first $this->itemsPerPage number of results\n *\n * If, however, this is not the first page, then the client already knows how many pages there are. \n * So we can query for just the page we are interested in with LIMIT X, Y\n *\n */\n \n $limit_query = \"\";\n if($this->page > 1)\n $limit_query = \"LIMIT ?, ?\";\n \n $query = $this->PDO->prepare(\"Select q.* from ((select USU.* from \".$dbname.\".usuarios USU INNER JOIN ((select A.idDoctor from \".$dbname.\".doctorsgroups A INNER JOIN (select idGroup from \".$dbname.\".doctorsgroups where idDoctor=?) B where B.idGroup=A.idGroup)) DG where DG.idDoctor=USU.IdCreator)UNION(select USU.* from \".$dbname.\".usuarios USU INNER JOIN (select IdPac from \".$dbname.\".doctorslinkdoctors where IdMED2=?) DLD where DLD.IdPac=USU.Identif)UNION(select USU.* from \".$dbname.\".usuarios USU INNER JOIN (select IdUs from \".$dbname.\".doctorslinkusers where IdMED=?) DLU where DLU.IdUs=USU.Identif)UNION(Select * from \".$dbname.\".usuarios where IdCreator=?))q where q.Surname like ? or q.Name like ? or q.IdUsFIXEDNAME like ? \".$limit_query);\n\n $query->bindValue(1, $this->doctor, PDO::PARAM_INT);\n $query->bindValue(2, $this->doctor, PDO::PARAM_INT);\n $query->bindValue(3, $this->doctor, PDO::PARAM_INT);\n $query->bindValue(4, $this->doctor, PDO::PARAM_INT);\n $query->bindValue(5, '%'.$this->searchString.'%', PDO::PARAM_STR);\n $query->bindValue(6, '%'.$this->searchString.'%', PDO::PARAM_STR);\n $query->bindValue(7, '%'.$this->searchString.'%', PDO::PARAM_STR);\n if($this->page > 1)\n {\n $query->bindValue(8, intval($this->page - 1) * intval($this->itemsPerPage), PDO::PARAM_INT);\n $query->bindValue(9, $this->itemsPerPage, PDO::PARAM_INT);\n }\n \n $query->execute();\n\n if($this->page == 1)\n {\n $total = $query->rowCount();\n }\n\n while(($row = $query->fetch(PDO::FETCH_ASSOC)) && $count < $this->itemsPerPage)\n {\n $patient = array();\n $patient['identifier'] = $row['Identif'];\n $patient['first_name'] = $row['Name'];\n $patient['last_name'] = $row['Surname'];\n $patient['user_name'] = $row['email'];\n\n // get number of reports\n $reports = $this->getReportsData($row['Identif']);\n $patient['reports'] = $reports['reports'];\n $patient['total_reports'] = $reports['total'];\n\n //Pushing the patient to the array\n array_push($result_array, $patient);\n\n $count++;\n }\n\n return array(\"page\" => $this->page, \"total_pages\" => ceil($total / $this->itemsPerPage), \"data\" => $result_array);\n\n }", "function get_all_claim()\n {\n $this->db->order_by('id', 'desc');\n return $this->db->get('claim')->result_array();\n }", "public function index()\n {\n //$this->authorize('view',Patient::class);\n return new PatientCollection(Patient::paginate(10));\n }", "public function getRecruiters(){\n\t\t\n\t\t$ar = array();\n\t\t\n\t\t$result = $this->adapter->query(\"select * from vemplist WHERE emp_dept LIKE '%R%' OR emp_dept LIKE '%LR%' OR emp_dept LIKE '%LA%' order by ctct_name\")->execute();\n\t\t\n\t\tforeach ($result as $row) \n\t\t\t{\n\t\t\t\t$ar[$row['emp_id']]=$row['ctct_name'];\n\t\t\t}\n\t\t\n\t\treturn $ar;\n\t}", "public function index()\n {\n $patients = User::role('patient')->orderBy('created_at','DESC')->with('dews')->paginate(5);\n return response(view('admin.patient.patients',compact('patients')));\n }", "public function listAll() {\n\t\treturn $this->academic_session->where('status', 1)->pluck('name', 'id')->prepend(trans('select.academic_session'), '');\n\t}", "public function getAll()\n\t{\n\t\t$args = array('order' => 't.id');\n \t$records = $this->record->findAll($args);\n \treturn $this->model->populateModels($records, 'id');\n\t}", "public function getListCustomerOfDoctor($from, $to, $page) {\n $retVal = array();\n // Check relation rTreatmentSchedule is set\n if (isset($this->rTreatmentSchedule)) {\n // Loop for all treatment schedule\n foreach ($this->rTreatmentSchedule as $treatmentSchedule) {\n// if (isset($treatmentSchedule->rDetail)) {\n// // Loop for all treatment schedule detail\n// foreach ($treatmentSchedule->rDetail as $detail) {\n// if ($detail->status == TreatmentScheduleDetails::STATUS_SCHEDULE) {\n// $date = CommonProcess::convertDateTime($detail,\n// DomainConst::DATE_FORMAT_1,\n// DomainConst::DATE_FORMAT_4);\n// $compareFrom = DateTimeExt::compare($date, $from);\n// $compareTo = DateTimeExt::compare($date, $to);\n// // Check if treatment schedule is between date range\n// if (($compareFrom == 1 || $compareFrom == 0)\n// && ($compareTo == 0 || $compareTo == -1)) {\n// // Check relation rMedicalRecord is set\n// if (isset($treatmentSchedule->rMedicalRecord)) {\n// $medicalRecord = $treatmentSchedule->rMedicalRecord;\n// // Check relation rCustomer is set\n// if (isset($medicalRecord->rCustomer)) {\n// $customer = $medicalRecord->rCustomer;\n// if ($customer->status != DomainConst::DEFAULT_STATUS_INACTIVE) {\n// // $retVal[] = $customer->id;\n// $retVal[] = $customer;\n// }\n// }\n// }\n// }\n// }\n// \n// }\n// }\n $date = CommonProcess::convertDateTime($treatmentSchedule->start_date, DomainConst::DATE_FORMAT_1, DomainConst::DATE_FORMAT_4);\n $compareFrom = DateTimeExt::compare($date, $from);\n $compareTo = DateTimeExt::compare($date, $to);\n // Check if treatment schedule is between date range\n if (($compareFrom == 1 || $compareFrom == 0) && ($compareTo == 0 || $compareTo == -1)) {\n // Check relation rMedicalRecord is set\n if (isset($treatmentSchedule->rMedicalRecord)) {\n $medicalRecord = $treatmentSchedule->rMedicalRecord;\n // Check relation rCustomer is set\n if (isset($medicalRecord->rCustomer)) {\n $customer = $medicalRecord->rCustomer;\n if ($customer->status != DomainConst::DEFAULT_STATUS_INACTIVE) {\n// $retVal[] = $customer->id;\n $retVal[] = $customer;\n }\n }\n }\n }\n }\n }\n $dataPro = new CActiveDataProvider('Customers', array(\n 'data' => $retVal,\n 'pagination' => array(\n 'pageSize' => Settings::getAPIListPageSize(),\n 'currentPage' => $page,\n ),\n ));\n// return $retVal;\n return $dataPro;\n }", "Public function get_all(){\n\n return self::MISSIONS;\n }", "function getPhysicianPatients320Days(){\n// \t\t$returnPatient = $this->__getPHCDoctorPatient320Days($doctorId);\n// \t\t$returnPatient = $this->__getWeblisDoctorPatient320Days();\n\t\t\n\t\tdebug($this->request->data);\n\t\t$puserid = $this->Auth->user('id');\n\t\t$people = $this->Common->searchPhysicianPatient($search,$puserid);\n\t\t//$testOrders = $this->Common->getAllTestOrderPhysician($userid,$puserid);\n\t\t//$persons = $this->Common->searchPhysicianPatient($search=null, $puserid=null);\n\t\tdebug($people);\n\t\t\n\t\t// \t\t$returnPatient = array();\n\t\t/*\n\t\t * Parse return data from Weblis GW\n\t\t*\n\t\t*/\n\t\t$data = array('Patient' => array());\n\t\tif($returnPatient){\n\t\t\t$data['Patient'] = $returnPatient;\n\t\t\t/* $page = 1;\n\t\t\t$total = 2;\n\t\t\t$this->PaginatorArray = $this->Components->load('PaginatorArray');\n\t\t\t$slicedArray = array_slice($returnPatient['PaperAll'],($page - 1) * $this->PaginatorArray->limit ,$this->PaginatorArray->limit);\n// \t\t\t$this->params['paging'] = $this->PaginatorArray->getParamsPaging('Page', $page, $total,count($slicedArray));\n// \t\t\t$this->helpers[] = 'Paginator';\n\t\t\t$data['Paginate']=$slicedArray; */\n\t\t}\n\t\n\t\n\t\n\t\tif($this->RequestHandler->isAjax()){\n\t\t\t$this->set('data',$data);\n\t\t\t$this->header('Content-Type:text/json');\n\t\t\t$this->render('/Common/json');\n\t\t}\n\t\n\t\n\t}", "public function getAllPatientHealthRecord($patient_id) {\n $stmt = $this->dbh->prepare(\"SELECT * FROM `health_records` WHERE `for_patient` = ?\");\n $stmt->execute([$patient_id]);\n $arr = $stmt->fetchAll(PDO::FETCH_ASSOC);\n if(!$arr) exit('No rows');\n\n /*\n What will be returned:\n `patient_id`\n `full_name`\n `email`\n `address`\n `phone`\n `birthday`\n */\n\n //The stmt = null is a good coding practice.\n $stmt = null;\n var_export($arr);\n\n }", "public function get_all ();", "public function getall() {\n\n\t\techo json_encode(array_merge($this->response, Person::getall()));\n\n\t}", "public final function get_all()\n {\n }", "public static function getList(){\n return self::all();\n }", "function readAll() {\r\n $todo = [];\r\n $sql = 'SELECT id, nombre\r\n FROM deportes\r\n ORDER BY nombre';\r\n $stmt = $this->pdo->prepare($sql);\r\n $stmt->execute();\r\n while ($datos = $stmt->fetch()) {\r\n $todo[] = $this->convertRecord($datos);\r\n }\r\n return $todo;\r\n }", "private function _getDiseasesOnPatient($patient_id) {\n $diseases_user = DB::table('diseases_user')\n ->leftJoin('diseases', 'diseases.id', '=', 'diseases_user.disease_id')\n ->select('diseases_user.*', 'diseases.group_name',\n 'diseases.group_no',\n 'diseases.number',\n 'diseases.disease_name',\n )\n ->where('user_id', $patient_id)\n ->where('is_view', 1)\n ->paginate(5);\n\n return $diseases_user;\n }", "public function ciudades_all()\n {\n $ciudad = Ciudad::with('departamento')->get();\n\n return $this->sendResponse($ciudad->toArray(), 'Ciudades devueltas con éxito');\n }", "function getRecords($pupil_id){\r\n\t\t$data = array('massive'=>array('Data','Dump'));\r\n\treturn $data;\r\n\t}", "public function getAllData()\n {\n // dd($this->student);\n return $this->student->getAllData();\n }", "function viewPatients(){\n\n $PatientType = Type::where(\"type_name\",\"Patient\")->get();\n // Complete Data of Hospital Table join with Types Table\n $hospital_data = Hospital_data::join('types', 'types.type_id', '=', 'hospital_datas.type_id')\n ->where(\"hospital_datas.type_id\",$PatientType[0]->type_id)\n ->get(['hospital_datas.*', 'types.type_name']);\n\n $rowsReturn = count($hospital_data);\n\n if($rowsReturn == 0){\n return view('labtechnician.viewPatients', ['dataFetched'=>$hospital_data, 'msg'=>'No Records Found']);\n }else{\n return view('labtechnician.viewPatients', ['dataFetched'=>$hospital_data]);\n }\n }", "public function getAll()\n {\n return\n DB::table('attendances')\n ->select(\n 'id',\n 'code',\n 'name',\n 'description',\n 'permit_code as permitCode'\n )\n ->where([\n ['tenant_id', $this->requester->getTenantId()],\n ['company_id', $this->requester->getCompanyId()]\n ])\n ->get();\n }", "public static function findAll(){\n \t$data = self::all();\n \treturn $data;\n }", "public static function findAll(){\n \t$data = self::all();\n \treturn $data;\n }", "public static function findAll(){\n \t$data = self::all();\n \treturn $data;\n }", "public function getAllRecords();", "public static function getAll() {}", "public function GetDoctorList(){\n if($this->get_request_method()!= \"POST\"){\n $this->response('',406);\n }\n $format = $_POST['format'];\n $db_access = $this->dbConnect();\n $conn = $this->db;\n $res = new getService();\n $res->get_doctor_list($conn);\n }", "public function get_icd_list ()\n {\n $listicdcodes_arr = array();\n\n if (get_data('term') == NULL)\n {\n return;\n }\n /*Fetching Patient details from third party database via curl request*/\n $listicdcodes = post_curl_request(THIRD_PARTY_API_URL, json_encode(array(\n 'action' => 'listicdcodes',\n 'lookfor' => get_data('term'),\n )));\n\n $listicdcodes = !empty($listicdcodes) ? json_decode($listicdcodes) : array();\n\n /*Converting to autocomplete understandable format*/\n if (!empty($listicdcodes))\n {\n foreach ($listicdcodes as $val)\n {\n $listicdcodes_arr[] = array('id' => current($val)->ICDCode, 'value' => current($val)->ICDTitle);\n }\n }\n exit(json_encode($listicdcodes_arr));\n }", "public function selectInfoAll()\n {\n return QcBonusDepartment::orderBy('created_at', 'ASC')->select('*');\n }", "public static function getAll(){\n $rows = DB::table('clients')\n ->join('client_deals', 'clients.id', '=', 'client_deals.client_id')\n ->join('deal_details', 'client_deals.id', '=', 'deal_details.client_deal_id')\n ->orderby('hour')->get(array('clients.id as cid','client_deals.id as cdid','clients.*','deal_details.*','client_deals.*'));\n return $rows;\n }", "public function index()\n {\n $patientDiscounts = PatientDiscount::all();\n return $patientDiscounts;\n }", "public function patients() {\n return $this->hasMany('App\\Patient');\n }", "public function listsIndicationsget()\r\n {\r\n $response = Indication::all();\r\n return response()->json($response,200);\r\n }", "private function getMClist()\n {\n return DB::table('absence')->join('teacher', 'absence.short_name', '=', 'teacher.short_name')\n ->get();\n// return Teacher::whereIn('short_name',Absence::where('date','=',new DateTime('today'))->lists('short_name'))->has('absence')->get();\n }", "function getAll(){\r\n \treturn $this->data;\r\n }", "public function fetchAll()\n {\n // LEFT JOIN patient ON patient.patientId = doc_calendar.patientId\n $select = new \\Zend\\Db\\Sql\\Select ;\n $select->from('doc_calendar');\n $user_session = new Container('user');\n\n $select->where(\" doc_calendar.doctorId = '{$user_session['user']->getId()}'\");\n $select->join(array(\"p\" => \"patient\"), \"doc_calendar.patientId = p.patientId\");\n\n $dbAdapter = $this->tableGateway->getAdapter();\n $statement = $dbAdapter->createStatement();\n\n $select->prepareStatement($dbAdapter, $statement);\n $driverResult = $statement->execute(); // execute statement to get result\n\n $resultSet = new ResultSet();\n $resultSet->initialize($driverResult);\n $rows = array();\n foreach($resultSet as $row) {\n $rows[] = $row->getArrayCopy();\n }\n\n return $rows;\n }", "public function index($patient_id)\n {\n $previousPregnancies = PreviousPregnancy::orderBy('year', 'asc')->paginate();\n\n return PreviousPregnancyResource::collection($previousPregnancies);\n }", "protected function getAll() {}", "public function index()\n { \n $patients = Patient::all(); //Trae todos los datos por medio del método all en laravel\n return view('patients.index')->with('patients',$patients); //Los registros se guardan en $patients y se mandan a la vista\n }", "public function list_get()\n\t{\n\t\ttry{\n\n\t\t\t$this->checkCanCandidateId();\n\t\t\t$filters = array(\n\t\t\t\t\"{$this->_candidateIdFkKey}\" =>$this->getCanCandidateId()\n\t\t\t);\n\t\t\t$list = $this->_model->getBy($filters);\n\t\t\t$this->response($list);\n\t\t}catch( Exception $e ){\n\t\t\t$message = $e->getMessage();\n\t\t\t$code = $e->getCode();\n\t\t\t$this->error_response($message,$code);\n\t\t}\n\n\t}", "public function index()\n {\n $data = $this->patientTestService->lists();\n // dd($data);\n return view('backend.pages.patient-test.index', compact('data'));\n }", "function get_depar_all()\n {\n $results = array();\n\n $list_user_all = array();\n //Define request\n $req = \"SELECT * FROM departement\";\n\n //request\n $query = $this->db->query($req);\n\n //If the query succeed\n if($query !== FALSE)\n {\n foreach ($query->result() as $row)\n {\n $depar = new Depar_model;\n $depar->define_depar($row->dp_name);\n array_push($results, $depar);\n } \n }\n else\n {\n $results = FALSE;\n }\n\n\n /* Libération du jeu de résultats */\n \n\n return $results;\n }", "public function getInterventionList(Request $request)\r\n {\r\n $careplan_id = 0;\r\n try{ \r\n $patient_id = encrypt_decrypt('decrypt', $request->get('patient_id'));\r\n if($request->has('careplan_id')){\r\n $careplan_id = encrypt_decrypt('decrypt', $request->get('careplan_id'));\r\n }\r\n } catch (\\Exception $e) {\r\n abort(404);\r\n exit;\r\n }\r\n if(request()->is_careplan)\r\n $is_careplan = 1;\r\n else\r\n $is_careplan = 0;\r\n\r\n $patient = $this->patient->patientDetail($request->get('patient_id'), false);\r\n $patient = $patient['patient_info'];\r\n $interventionList = $this->intervention->getLists($patient_id,$careplan_id);\r\n $html = view('patients.caseload.checkpoint.intervention.list',compact('interventionList', 'patient_id','patient','is_careplan'))->render(); \r\n return response()->json(['message' => trans('message.listing_found'), 'html' => $html], 200);\r\n }", "public function index()\n {\n $title = 'Patients';\n $patients = DB::table('patients')\n ->join('species', 'patients.species_id', '=', 'species.species_id')\n ->join('clients', 'patients.client_id', '=', 'clients.client_id')\n ->select('patients.patient_id', 'patients.patient_name', 'patients.patient_status', 'species.species_description', 'clients.client_firstname', 'clients.client_lastname', 'gender')\n ->get();\n return view('pages.patients', compact('title'))->with('patients', $patients);\n }", "public static function getAll();", "public static function getAll();", "public function getPostCashMonitoringList()\n {\n //\n $assessments=PostCashAssessment::all();\n $iTotalRecords =count(PostCashAssessment::all());\n $sEcho = intval(10);\n\n $records = array();\n $records[\"data\"] = array();\n\n\n $count=1;\n foreach($assessments as $assessment) {\n\n $hai_reg_number=\"\";\n $full_name=\"\";\n $sex=\"\";\n $age=\"\";\n $camp_name=\"\";\n if(is_object($assessment->client) && $assessment->client != null){\n $hai_reg_number=$assessment->client->hai_reg_number;\n $full_name=$assessment->client->full_name;\n $sex=$assessment->client->sex;\n $age=$assessment->client->age;\n\n }\n if(is_object($assessment->camp) && $assessment->camp != null){\n $camp_name=$assessment->camp->camp_name;\n }\n if ($assessment->auth_status == \"pending\") {\n if (Auth::user()->can('authorize')) {\n $records[\"data\"][] = array(\n $count++,\n $assessment->interview_date,\n $assessment->enumerator_name,\n $assessment->organisation,\n $hai_reg_number,\n $full_name,\n $sex,\n $age,\n $camp_name,\n $assessment->auth_status,\n '<ul class=\"icons-list text-center\">\n <li class=\"dropdown\">\n <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">\n <i class=\"icon-menu9\"></i>\n </a>\n <ul class=\"dropdown-menu dropdown-menu-right\">\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\"showRecord \"><i class=\"fa fa-eye \"></i> View </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\" \" onclick=\"printPage(\\''.url('print/post/cash/monitoring').'/'.$assessment->id.'\\');\" ><i class=\"fa fa-print \"></i> Print </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"'.url('download/pdf/post/cash/monitoring').'/'.$assessment->id.'\" class=\" \"><i class=\"fa fa-download\"></i> Download </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\"authorizeRecord \"><i class=\"fa fa-check \"></i> Authorize </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\"editRecord \"><i class=\"fa fa-pencil \"></i> Edit </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\"deleteRecord \"><i class=\"fa fa-trash \"></i> Delete </a></li>\n </ul>\n </li>\n </ul>'\n );\n }\n elseif (Auth::user()->hasRole('inputer'))\n {\n $records[\"data\"][] = array(\n $count++,\n $assessment->interview_date,\n $assessment->enumerator_name,\n $assessment->organisation,\n $hai_reg_number,\n $full_name,\n $sex,\n $age,\n $camp_name,\n $assessment->auth_status,\n '<ul class=\"icons-list text-center\">\n <li class=\"dropdown\">\n <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">\n <i class=\"icon-menu9\"></i>\n </a>\n <ul class=\"dropdown-menu dropdown-menu-right\">\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\"showRecord \"><i class=\"fa fa-eye \"></i> View </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\" \" onclick=\"printPage(\\''.url('print/post/cash/monitoring').'/'.$assessment->id.'\\');\" ><i class=\"fa fa-print \"></i> Print </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"'.url('download/pdf/post/cash/monitoring').'/'.$assessment->id.'\" class=\" \"><i class=\"fa fa-download\"></i> Download </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\"editRecord \"><i class=\"fa fa-pencil \"></i> Edit </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\"deleteRecord \"><i class=\"fa fa-trash \"></i> Delete </a></li>\n </ul>\n </li>\n </ul>'\n );\n }\n }\n else{\n if (Auth::user()->hasRole('admin'))\n {\n $records[\"data\"][] = array(\n $count++,\n $assessment->interview_date,\n $assessment->enumerator_name,\n $assessment->organisation,\n $hai_reg_number,\n $full_name,\n $sex,\n $age,\n $camp_name,\n $assessment->auth_status,\n '<ul class=\"icons-list text-center\">\n <li class=\"dropdown\">\n <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">\n <i class=\"icon-menu9\"></i>\n </a>\n <ul class=\"dropdown-menu dropdown-menu-right\">\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\"showRecord \"><i class=\"fa fa-eye \"></i> View </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\" \" onclick=\"printPage(\\''.url('print/post/cash/monitoring').'/'.$assessment->id.'\\');\" ><i class=\"fa fa-print \"></i> Print </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"'.url('download/pdf/post/cash/monitoring').'/'.$assessment->id.'\" class=\" \"><i class=\"fa fa-download\"></i> Download </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\"editRecord \"><i class=\"fa fa-pencil \"></i> Edit </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\"deleteRecord \"><i class=\"fa fa-trash \"></i> Delete </a></li>\n </ul>\n </li>\n </ul>'\n );\n }\n else{\n $records[\"data\"][] = array(\n $count++,\n $assessment->interview_date,\n $assessment->enumerator_name,\n $assessment->organisation,\n $hai_reg_number,\n $full_name,\n $sex,\n $age,\n $camp_name,\n $assessment->auth_status,\n '<ul class=\"icons-list text-center\">\n <li class=\"dropdown\">\n <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">\n <i class=\"icon-menu9\"></i>\n </a>\n <ul class=\"dropdown-menu dropdown-menu-right\">\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\"showRecord \"><i class=\"fa fa-eye \"></i> View </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"#\" class=\" \" onclick=\"printPage(\\''.url('print/post/cash/monitoring').'/'.$assessment->id.'\\');\" ><i class=\"fa fa-print \"></i> Print </a></li>\n <li id=\"'.$assessment->id.'\"><a href=\"'.url('download/pdf/post/cash/monitoring').'/'.$assessment->id.'\" class=\" \"><i class=\"fa fa-download\"></i> Download </a></li>\n </ul>\n </li>\n </ul>'\n );\n }\n }\n }\n\n\n $records[\"draw\"] = $sEcho;\n $records[\"recordsTotal\"] = $iTotalRecords;\n $records[\"recordsFiltered\"] = $iTotalRecords;\n\n echo json_encode($records);\n }", "public function index(Request $request)\n {\n if($request->has('txtBuscar')){\n $doctores = Record::where('patient_id', $request->txtBuscar)->get();\n }else{\n $doctores = Record::all();\n }\n return $doctores;\n }", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM consultation_vp';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function getData()\n {\n $data = $this->only(['allocation_id','name','email','mobile','address','education','remark']);\n return $data;\n }", "public function index()\n {\n return Subject::with('course', 'curriculum', 'schedules')->get();\n }", "public function ShowList()\n\t\t{\n \t\t\t$this->db->select('*');\n\t\t\t$this->db->from('af_profession');\n\t\t\t$query = $this->db->get();\n\t\t\treturn $query->result_array();\n\t\t}", "public function index()\n {\n $patients=User::patients();\n return view('administrator.patient.index',compact('patients'));\n }", "function fetch_patients($limit, $id) {\n $this->db->select('\n patients.id,\n patients.fullname,\n patients.middlename,\n patients.lastname,\n patients.sex,\n patients.birthdate,\n CONCAT(patients_address.city, \", \", patients_address.province) AS address,\n COUNT(DISTINCT(cases.id)) as cases\n ');\n $this->db->where('patients.is_deleted', 0);\n $this->db->join('cases', 'cases.patient_id = patients.id', 'left');\n $this->db->join('patients_address', 'patients_address.patient_id = patients.id', 'left');\n $this->db->limit($limit, (($id-1)*$limit)); \n $this->db->group_by('patients.id');\n \n $query = $this->db->get(\"patients\");\n\n if ($query->num_rows() > 0) {\n return $query->result_array();\n }\n\n\n return false;\n\n }", "public function getAll(){\n $query = $this->fpdo->from('view_history_attend')->orderBy('id_demand DESC')->execute();\n $result = null;\n /* 2. encriptar IDs */\n if($query->rowCount()!=0){\n $result = $query->fetchAll(PDO::FETCH_OBJ);\n $status = true;\n $msg = \"Lista atenciones realizadas\";\n }\n else{\n $result = array();\n $status = false;\n $msg = \"No existen registros\";\n }\n /* 3. retornar valores en un array Response */\n return $this->response->send(\n $result,\n $status,\n $msg,\n []\n );\n }" ]
[ "0.693707", "0.6927906", "0.692165", "0.68596965", "0.6799311", "0.6661341", "0.6645735", "0.66317564", "0.6587334", "0.65788937", "0.6512201", "0.65121615", "0.6505002", "0.6388924", "0.6385009", "0.63823056", "0.6364671", "0.63350123", "0.63114154", "0.62936753", "0.6286863", "0.6214696", "0.6207415", "0.61803275", "0.6160737", "0.6136592", "0.61311466", "0.6110208", "0.6056569", "0.605319", "0.6052647", "0.60504466", "0.60394204", "0.60238457", "0.59842753", "0.59749985", "0.59580034", "0.5957167", "0.59454155", "0.59427834", "0.5935645", "0.59335786", "0.59164935", "0.5909065", "0.5906981", "0.5880018", "0.587886", "0.58740634", "0.58687764", "0.583661", "0.5836128", "0.58092314", "0.579361", "0.5789191", "0.57722825", "0.57709074", "0.5770031", "0.5756158", "0.57470375", "0.57423645", "0.5737531", "0.5722539", "0.5711812", "0.57069314", "0.57014394", "0.569857", "0.568733", "0.568733", "0.568733", "0.5686698", "0.5684555", "0.56837523", "0.56806904", "0.5671272", "0.56654304", "0.56637824", "0.56584805", "0.56513995", "0.5634025", "0.5633401", "0.56323004", "0.5621428", "0.5620654", "0.560517", "0.560362", "0.5600964", "0.5594443", "0.5593511", "0.5592513", "0.55900365", "0.55900365", "0.5589463", "0.55851257", "0.5563342", "0.5551599", "0.5549634", "0.5548298", "0.55472344", "0.55456954", "0.5542319" ]
0.59338015
41
TODO: Implement deserialize() method.
public function deserialize($entity, $data) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deserialize($data);", "public function deserialize($data)\n {\n }", "abstract public function unserialize($serialized);", "public function unserialize($serialized);", "public function unserialize($serialized);", "public function toObject(){\r\n return json_decode($this->toJson());\r\n }", "public function unserialize($serialized)\n{\n list($this->username, $this->password,\n $this->id) = json_decode(\n $serialized);\n}", "public function unserialize($serialized)\n {\n }", "public function deserialize($json);", "public function deserialize($strToken);", "public function unserialize($data) {}", "public function unserialize($serialized=null){ }", "abstract public function serialize();", "abstract public function serialize();", "public abstract function serialize();", "public function unserialize($serialized)\n{\n list($this->username, $this->password, $this->salt,\n $this->user_roles, $this->id) = \\json_decode(\n $serialized);\n}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function testSerializationDeserialization()\n {\n $obj = new LookupDataEntry(self::getJson());\n $this->assertNotNull($obj);\n $this->assertNotNull($obj->getKey());\n $this->assertNotNull($obj->getValue());\n $this->assertEquals(self::getJson(), $obj->toJson());\n return $obj;\n }", "public function readObject();", "public function deserializeAll(string $data);", "public function getSerializer();", "public function serialize();", "public function serialize();", "public function serialize();", "abstract protected function serializeData();", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"Name\",$param) and $param[\"Name\"] !== null) {\n $this->Name = $param[\"Name\"];\n }\n\n if (array_key_exists(\"CreationTime\",$param) and $param[\"CreationTime\"] !== null) {\n $this->CreationTime = $param[\"CreationTime\"];\n }\n\n if (array_key_exists(\"Public\",$param) and $param[\"Public\"] !== null) {\n $this->Public = $param[\"Public\"];\n }\n\n if (array_key_exists(\"NamespaceId\",$param) and $param[\"NamespaceId\"] !== null) {\n $this->NamespaceId = $param[\"NamespaceId\"];\n }\n\n if (array_key_exists(\"TagSpecification\",$param) and $param[\"TagSpecification\"] !== null) {\n $this->TagSpecification = new TagSpecification();\n $this->TagSpecification->deserialize($param[\"TagSpecification\"]);\n }\n\n if (array_key_exists(\"Metadata\",$param) and $param[\"Metadata\"] !== null) {\n $this->Metadata = [];\n foreach ($param[\"Metadata\"] as $key => $value){\n $obj = new KeyValueString();\n $obj->deserialize($value);\n array_push($this->Metadata, $obj);\n }\n }\n\n if (array_key_exists(\"CVEWhitelistItems\",$param) and $param[\"CVEWhitelistItems\"] !== null) {\n $this->CVEWhitelistItems = [];\n foreach ($param[\"CVEWhitelistItems\"] as $key => $value){\n $obj = new CVEWhitelistItem();\n $obj->deserialize($value);\n array_push($this->CVEWhitelistItems, $obj);\n }\n }\n\n if (array_key_exists(\"AutoScan\",$param) and $param[\"AutoScan\"] !== null) {\n $this->AutoScan = $param[\"AutoScan\"];\n }\n\n if (array_key_exists(\"PreventVUL\",$param) and $param[\"PreventVUL\"] !== null) {\n $this->PreventVUL = $param[\"PreventVUL\"];\n }\n\n if (array_key_exists(\"Severity\",$param) and $param[\"Severity\"] !== null) {\n $this->Severity = $param[\"Severity\"];\n }\n }", "protected function get_decoded_data() {\n return json_decode($this->get_data());\n }", "function deserialise(string $data): void;", "public function unserialize($serialized)\n {\n list (\n $this->id,\n $this->usuario,\n $this->clave,\n ) = unserialize($serialized);\n }", "public function unserialize($serialized)\n {\n $data = unserialize($serialized);\n\n //TODO load references with id ?\n }", "protected function asObject()\n\t{\n\t\treturn \\json_decode($this->response);\n\t}", "public static function getSerializer();", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"InstanceIds\",$param) and $param[\"InstanceIds\"] !== null) {\n $this->InstanceIds = $param[\"InstanceIds\"];\n }\n\n if (array_key_exists(\"IsolateDataDisk\",$param) and $param[\"IsolateDataDisk\"] !== null) {\n $this->IsolateDataDisk = $param[\"IsolateDataDisk\"];\n }\n }", "public function unserialize($serialized)\n {\n list(\n $this->id,\n $this->active,\n $this->username,\n $this->password,\n $this->places,\n $this->roles,\n $this->sharedPlaces\n ) = \\json_decode($serialized);\n }", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"ClusterId\",$param) and $param[\"ClusterId\"] !== null) {\n $this->ClusterId = $param[\"ClusterId\"];\n }\n\n if (array_key_exists(\"InstanceIds\",$param) and $param[\"InstanceIds\"] !== null) {\n $this->InstanceIds = $param[\"InstanceIds\"];\n }\n\n if (array_key_exists(\"InstanceDeleteMode\",$param) and $param[\"InstanceDeleteMode\"] !== null) {\n $this->InstanceDeleteMode = $param[\"InstanceDeleteMode\"];\n }\n\n if (array_key_exists(\"ForceDelete\",$param) and $param[\"ForceDelete\"] !== null) {\n $this->ForceDelete = $param[\"ForceDelete\"];\n }\n }", "public function serialize(){ }", "public function unserialize($serialized)\n {\n $data=unserialize($serialized);\n $this->id=$data['id'];\n\n }", "public function testSerializationDeserialization()\n {\n $obj = new Payout(self::getJson());\n $this->assertNotNull($obj);\n $this->assertNotNull($obj->getSenderBatchHeader());\n $this->assertNotNull($obj->getItems());\n $this->assertNotNull($obj->getLinks());\n $this->assertEquals(self::getJson(), $obj->toJson());\n return $obj;\n }", "public function unserialize($serialized)\r\n {\r\n $str = unserialize($serialized);\r\n\r\n foreach ($str as $member => $value) {\r\n $this->$member = $value;\r\n }\r\n }", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"Domain\",$param) and $param[\"Domain\"] !== null) {\n $this->Domain = $param[\"Domain\"];\n }\n\n if (array_key_exists(\"ServiceType\",$param) and $param[\"ServiceType\"] !== null) {\n $this->ServiceType = $param[\"ServiceType\"];\n }\n\n if (array_key_exists(\"Origin\",$param) and $param[\"Origin\"] !== null) {\n $this->Origin = new Origin();\n $this->Origin->deserialize($param[\"Origin\"]);\n }\n\n if (array_key_exists(\"ProjectId\",$param) and $param[\"ProjectId\"] !== null) {\n $this->ProjectId = $param[\"ProjectId\"];\n }\n\n if (array_key_exists(\"IpFilter\",$param) and $param[\"IpFilter\"] !== null) {\n $this->IpFilter = new IpFilter();\n $this->IpFilter->deserialize($param[\"IpFilter\"]);\n }\n\n if (array_key_exists(\"IpFreqLimit\",$param) and $param[\"IpFreqLimit\"] !== null) {\n $this->IpFreqLimit = new IpFreqLimit();\n $this->IpFreqLimit->deserialize($param[\"IpFreqLimit\"]);\n }\n\n if (array_key_exists(\"StatusCodeCache\",$param) and $param[\"StatusCodeCache\"] !== null) {\n $this->StatusCodeCache = new StatusCodeCache();\n $this->StatusCodeCache->deserialize($param[\"StatusCodeCache\"]);\n }\n\n if (array_key_exists(\"Compression\",$param) and $param[\"Compression\"] !== null) {\n $this->Compression = new Compression();\n $this->Compression->deserialize($param[\"Compression\"]);\n }\n\n if (array_key_exists(\"BandwidthAlert\",$param) and $param[\"BandwidthAlert\"] !== null) {\n $this->BandwidthAlert = new BandwidthAlert();\n $this->BandwidthAlert->deserialize($param[\"BandwidthAlert\"]);\n }\n\n if (array_key_exists(\"RangeOriginPull\",$param) and $param[\"RangeOriginPull\"] !== null) {\n $this->RangeOriginPull = new RangeOriginPull();\n $this->RangeOriginPull->deserialize($param[\"RangeOriginPull\"]);\n }\n\n if (array_key_exists(\"FollowRedirect\",$param) and $param[\"FollowRedirect\"] !== null) {\n $this->FollowRedirect = new FollowRedirect();\n $this->FollowRedirect->deserialize($param[\"FollowRedirect\"]);\n }\n\n if (array_key_exists(\"ErrorPage\",$param) and $param[\"ErrorPage\"] !== null) {\n $this->ErrorPage = new ErrorPage();\n $this->ErrorPage->deserialize($param[\"ErrorPage\"]);\n }\n\n if (array_key_exists(\"RequestHeader\",$param) and $param[\"RequestHeader\"] !== null) {\n $this->RequestHeader = new RequestHeader();\n $this->RequestHeader->deserialize($param[\"RequestHeader\"]);\n }\n\n if (array_key_exists(\"ResponseHeader\",$param) and $param[\"ResponseHeader\"] !== null) {\n $this->ResponseHeader = new ResponseHeader();\n $this->ResponseHeader->deserialize($param[\"ResponseHeader\"]);\n }\n\n if (array_key_exists(\"DownstreamCapping\",$param) and $param[\"DownstreamCapping\"] !== null) {\n $this->DownstreamCapping = new DownstreamCapping();\n $this->DownstreamCapping->deserialize($param[\"DownstreamCapping\"]);\n }\n\n if (array_key_exists(\"CacheKey\",$param) and $param[\"CacheKey\"] !== null) {\n $this->CacheKey = new CacheKey();\n $this->CacheKey->deserialize($param[\"CacheKey\"]);\n }\n\n if (array_key_exists(\"ResponseHeaderCache\",$param) and $param[\"ResponseHeaderCache\"] !== null) {\n $this->ResponseHeaderCache = new ResponseHeaderCache();\n $this->ResponseHeaderCache->deserialize($param[\"ResponseHeaderCache\"]);\n }\n\n if (array_key_exists(\"VideoSeek\",$param) and $param[\"VideoSeek\"] !== null) {\n $this->VideoSeek = new VideoSeek();\n $this->VideoSeek->deserialize($param[\"VideoSeek\"]);\n }\n\n if (array_key_exists(\"Cache\",$param) and $param[\"Cache\"] !== null) {\n $this->Cache = new Cache();\n $this->Cache->deserialize($param[\"Cache\"]);\n }\n\n if (array_key_exists(\"OriginPullOptimization\",$param) and $param[\"OriginPullOptimization\"] !== null) {\n $this->OriginPullOptimization = new OriginPullOptimization();\n $this->OriginPullOptimization->deserialize($param[\"OriginPullOptimization\"]);\n }\n\n if (array_key_exists(\"Https\",$param) and $param[\"Https\"] !== null) {\n $this->Https = new Https();\n $this->Https->deserialize($param[\"Https\"]);\n }\n\n if (array_key_exists(\"Authentication\",$param) and $param[\"Authentication\"] !== null) {\n $this->Authentication = new Authentication();\n $this->Authentication->deserialize($param[\"Authentication\"]);\n }\n\n if (array_key_exists(\"Seo\",$param) and $param[\"Seo\"] !== null) {\n $this->Seo = new Seo();\n $this->Seo->deserialize($param[\"Seo\"]);\n }\n\n if (array_key_exists(\"ForceRedirect\",$param) and $param[\"ForceRedirect\"] !== null) {\n $this->ForceRedirect = new ForceRedirect();\n $this->ForceRedirect->deserialize($param[\"ForceRedirect\"]);\n }\n\n if (array_key_exists(\"Referer\",$param) and $param[\"Referer\"] !== null) {\n $this->Referer = new Referer();\n $this->Referer->deserialize($param[\"Referer\"]);\n }\n\n if (array_key_exists(\"MaxAge\",$param) and $param[\"MaxAge\"] !== null) {\n $this->MaxAge = new MaxAge();\n $this->MaxAge->deserialize($param[\"MaxAge\"]);\n }\n\n if (array_key_exists(\"Ipv6\",$param) and $param[\"Ipv6\"] !== null) {\n $this->Ipv6 = new Ipv6();\n $this->Ipv6->deserialize($param[\"Ipv6\"]);\n }\n\n if (array_key_exists(\"SpecificConfig\",$param) and $param[\"SpecificConfig\"] !== null) {\n $this->SpecificConfig = new SpecificConfig();\n $this->SpecificConfig->deserialize($param[\"SpecificConfig\"]);\n }\n\n if (array_key_exists(\"Area\",$param) and $param[\"Area\"] !== null) {\n $this->Area = $param[\"Area\"];\n }\n\n if (array_key_exists(\"OriginPullTimeout\",$param) and $param[\"OriginPullTimeout\"] !== null) {\n $this->OriginPullTimeout = new OriginPullTimeout();\n $this->OriginPullTimeout->deserialize($param[\"OriginPullTimeout\"]);\n }\n\n if (array_key_exists(\"Tag\",$param) and $param[\"Tag\"] !== null) {\n $this->Tag = [];\n foreach ($param[\"Tag\"] as $key => $value){\n $obj = new Tag();\n $obj->deserialize($value);\n array_push($this->Tag, $obj);\n }\n }\n\n if (array_key_exists(\"Ipv6Access\",$param) and $param[\"Ipv6Access\"] !== null) {\n $this->Ipv6Access = new Ipv6Access();\n $this->Ipv6Access->deserialize($param[\"Ipv6Access\"]);\n }\n\n if (array_key_exists(\"OfflineCache\",$param) and $param[\"OfflineCache\"] !== null) {\n $this->OfflineCache = new OfflineCache();\n $this->OfflineCache->deserialize($param[\"OfflineCache\"]);\n }\n\n if (array_key_exists(\"Quic\",$param) and $param[\"Quic\"] !== null) {\n $this->Quic = new Quic();\n $this->Quic->deserialize($param[\"Quic\"]);\n }\n\n if (array_key_exists(\"AwsPrivateAccess\",$param) and $param[\"AwsPrivateAccess\"] !== null) {\n $this->AwsPrivateAccess = new AwsPrivateAccess();\n $this->AwsPrivateAccess->deserialize($param[\"AwsPrivateAccess\"]);\n }\n\n if (array_key_exists(\"OssPrivateAccess\",$param) and $param[\"OssPrivateAccess\"] !== null) {\n $this->OssPrivateAccess = new OssPrivateAccess();\n $this->OssPrivateAccess->deserialize($param[\"OssPrivateAccess\"]);\n }\n\n if (array_key_exists(\"HwPrivateAccess\",$param) and $param[\"HwPrivateAccess\"] !== null) {\n $this->HwPrivateAccess = new HwPrivateAccess();\n $this->HwPrivateAccess->deserialize($param[\"HwPrivateAccess\"]);\n }\n\n if (array_key_exists(\"QnPrivateAccess\",$param) and $param[\"QnPrivateAccess\"] !== null) {\n $this->QnPrivateAccess = new QnPrivateAccess();\n $this->QnPrivateAccess->deserialize($param[\"QnPrivateAccess\"]);\n }\n\n if (array_key_exists(\"OthersPrivateAccess\",$param) and $param[\"OthersPrivateAccess\"] !== null) {\n $this->OthersPrivateAccess = new OthersPrivateAccess();\n $this->OthersPrivateAccess->deserialize($param[\"OthersPrivateAccess\"]);\n }\n\n if (array_key_exists(\"HttpsBilling\",$param) and $param[\"HttpsBilling\"] !== null) {\n $this->HttpsBilling = new HttpsBilling();\n $this->HttpsBilling->deserialize($param[\"HttpsBilling\"]);\n }\n }", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"LoadBalancerIds\",$param) and $param[\"LoadBalancerIds\"] !== null) {\n $this->LoadBalancerIds = $param[\"LoadBalancerIds\"];\n }\n\n if (array_key_exists(\"Type\",$param) and $param[\"Type\"] !== null) {\n $this->Type = $param[\"Type\"];\n }\n\n if (array_key_exists(\"ClientIPField\",$param) and $param[\"ClientIPField\"] !== null) {\n $this->ClientIPField = $param[\"ClientIPField\"];\n }\n\n if (array_key_exists(\"BlockIPList\",$param) and $param[\"BlockIPList\"] !== null) {\n $this->BlockIPList = $param[\"BlockIPList\"];\n }\n\n if (array_key_exists(\"ExpireTime\",$param) and $param[\"ExpireTime\"] !== null) {\n $this->ExpireTime = $param[\"ExpireTime\"];\n }\n\n if (array_key_exists(\"AddStrategy\",$param) and $param[\"AddStrategy\"] !== null) {\n $this->AddStrategy = $param[\"AddStrategy\"];\n }\n }", "public function testSerializationDeserialization()\n {\n $obj = new PayerInfo(self::getJson());\n $this->assertNotNull($obj);\n $this->assertNotNull($obj->getEmail());\n $this->assertNotNull($obj->getExternalRememberMeId());\n $this->assertNotNull($obj->getBuyerAccountNumber());\n $this->assertNotNull($obj->getFirstName());\n $this->assertNotNull($obj->getLastName());\n $this->assertNotNull($obj->getPayerId());\n $this->assertNotNull($obj->getPhone());\n $this->assertNotNull($obj->getPhoneType());\n $this->assertNotNull($obj->getBirthDate());\n $this->assertNotNull($obj->getTaxId());\n $this->assertNotNull($obj->getTaxIdType());\n $this->assertNotNull($obj->getBillingAddress());\n $this->assertNotNull($obj->getShippingAddress());\n $this->assertEquals(self::getJson(), $obj->toJson());\n return $obj;\n }", "public function load() {\n if (($content = $this->getContents()) !== false)\n return unserialize($content);\n else\n return null;\n }", "abstract protected function unSerializeData();", "public function serialize()\n {\n }", "public function serialize()\n {\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'content' => fn(ParseNode $n) => $o->setContent($n->getBinaryContent()),\n 'dateTime' => fn(ParseNode $n) => $o->setDateTime($n->getDateTimeValue()),\n 'extension' => fn(ParseNode $n) => $o->setExtension($n->getStringValue()),\n 'extractedTextContent' => fn(ParseNode $n) => $o->setExtractedTextContent($n->getBinaryContent()),\n 'mediaType' => fn(ParseNode $n) => $o->setMediaType($n->getStringValue()),\n 'name' => fn(ParseNode $n) => $o->setName($n->getStringValue()),\n 'otherProperties' => fn(ParseNode $n) => $o->setOtherProperties($n->getObjectValue([StringValueDictionary::class, 'createFromDiscriminatorValue'])),\n 'processingStatus' => fn(ParseNode $n) => $o->setProcessingStatus($n->getEnumValue(FileProcessingStatus::class)),\n 'senderOrAuthors' => function (ParseNode $n) {\n $val = $n->getCollectionOfPrimitiveValues();\n if (is_array($val)) {\n TypeUtils::validateCollectionValues($val, 'string');\n }\n /** @var array<string>|null $val */\n $this->setSenderOrAuthors($val);\n },\n 'size' => fn(ParseNode $n) => $o->setSize($n->getIntegerValue()),\n 'sourceType' => fn(ParseNode $n) => $o->setSourceType($n->getEnumValue(SourceType::class)),\n 'subjectTitle' => fn(ParseNode $n) => $o->setSubjectTitle($n->getStringValue()),\n ]);\n }", "#[\\ReturnTypeWillChange]\n public function unserialize($data)\n {\n }", "public function testSerializationDeserialization()\n {\n $obj = new CreditCardToken(self::getJson());\n $this->assertNotNull($obj);\n $this->assertNotNull($obj->getCreditCardId());\n $this->assertNotNull($obj->getPayerId());\n $this->assertNotNull($obj->getLast4());\n $this->assertNotNull($obj->getType());\n $this->assertNotNull($obj->getExpireMonth());\n $this->assertNotNull($obj->getExpireYear());\n $this->assertEquals(self::getJson(), $obj->toJson());\n return $obj;\n }", "public function load()\n {\n $raw = $this->_getBackend()->load($this->_id);\n return unserialize($raw);\n }", "public function onDeserialization($sender) \r\n {\r\n // TODO: Implement onDeserialization() method.\r\n }", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"BiopsyPart\",$param) and $param[\"BiopsyPart\"] !== null) {\n $this->BiopsyPart = new BiopsyPart();\n $this->BiopsyPart->deserialize($param[\"BiopsyPart\"]);\n }\n\n if (array_key_exists(\"Desc\",$param) and $param[\"Desc\"] !== null) {\n $this->Desc = new EndoscopyDesc();\n $this->Desc->deserialize($param[\"Desc\"]);\n }\n\n if (array_key_exists(\"Summary\",$param) and $param[\"Summary\"] !== null) {\n $this->Summary = new Summary();\n $this->Summary->deserialize($param[\"Summary\"]);\n }\n }", "public function deserialize(array $data): void\n {\n $this->id = $data['id'];\n $this->backendId = $data['backendId'];\n $this->queue = $data['queue'];\n $this->arguments = (array) unserialize($data['arguments']); # unserialize object and convert to []\n $this->attempts = $data['attempts'];\n $this->enqueued = $data['enqueued'];\n $this->serialized = $data['serialized'];\n }", "public function deserializeResponse(string $response): Response;", "function unserialize ( $data ) {\n return unserialize( $data );\n }", "public function valueOf($serializer, $serialized, $context= array());", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"TimeSegment\",$param) and $param[\"TimeSegment\"] !== null) {\n $this->TimeSegment = $param[\"TimeSegment\"];\n }\n\n if (array_key_exists(\"Count\",$param) and $param[\"Count\"] !== null) {\n $this->Count = $param[\"Count\"];\n }\n }", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"Name\",$param) and $param[\"Name\"] !== null) {\n $this->Name = $param[\"Name\"];\n }\n\n if (array_key_exists(\"Quantity\",$param) and $param[\"Quantity\"] !== null) {\n $this->Quantity = $param[\"Quantity\"];\n }\n }", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"Score\",$param) and $param[\"Score\"] !== null) {\n $this->Score = $param[\"Score\"];\n }\n\n if (array_key_exists(\"Tags\",$param) and $param[\"Tags\"] !== null) {\n $this->Tags = $param[\"Tags\"];\n }\n }", "public function unserialize($serialized)\n {\n $this->data = unserialize($serialized);\n }", "protected function load()\n\t{\n\n $data = simplexml_load_string(file_get_contents($this->_origin));\n\n\n\n $data = json_decode(json_encode((array)$data), TRUE);\n\n //$this\n\n $this->_data = [];\n\n\n $firstKey = array_keys($data)[0];\n\n //print_r($data[$firstKey]);\n //echo \"<br><br>\";\n\n foreach($data[$firstKey] AS $element) {\n\n\n //var_dump(self::arrayToObject($element));\n\n $this->_fields = array_keys($element);\n\n\n $this->_data[@$element['id']] = self::arrayToObject($element);\n\n }\n\n\t\t$this->reindex();\n\t}", "public function unserialize($serialized) \n {\n return list(\n $this->boardingCardId,\n $this->arrival, \n $this->departure, \n $this->passenger,\n $this->reference,\n $this->busNo,\n $this->platformNo,\n ) = unserialize($serialized);\n }", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"Time\",$param) and $param[\"Time\"] !== null) {\n $this->Time = $param[\"Time\"];\n }\n\n if (array_key_exists(\"Type\",$param) and $param[\"Type\"] !== null) {\n $this->Type = $param[\"Type\"];\n }\n\n if (array_key_exists(\"Data\",$param) and $param[\"Data\"] !== null) {\n $this->Data = $param[\"Data\"];\n }\n }", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"InstanceId\",$param) and $param[\"InstanceId\"] !== null) {\n $this->InstanceId = $param[\"InstanceId\"];\n }\n\n if (array_key_exists(\"UniqSubnetId\",$param) and $param[\"UniqSubnetId\"] !== null) {\n $this->UniqSubnetId = $param[\"UniqSubnetId\"];\n }\n\n if (array_key_exists(\"UniqVpcId\",$param) and $param[\"UniqVpcId\"] !== null) {\n $this->UniqVpcId = $param[\"UniqVpcId\"];\n }\n }", "public function unserialize($serialized)\n {\n // older data which does not include all properties.\n $data = array_merge(unserialize($serialized), array_fill(0, 2, null));\n\n list($this->email, $this->id) = $data;\n }", "public function serializer() {\n }", "public function decode()\n {\n return json_decode(trim($this->body), true);\n }", "public function serialize()\n {\n // TODO: Implement serialize() method.\n }", "public function _unserialize($data)\n\t{\n\t\treturn json_decode($data, TRUE);\n\t}", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"Id\",$param) and $param[\"Id\"] !== null) {\n $this->Id = $param[\"Id\"];\n }\n\n if (array_key_exists(\"Type\",$param) and $param[\"Type\"] !== null) {\n $this->Type = $param[\"Type\"];\n }\n\n if (array_key_exists(\"Bytes\",$param) and $param[\"Bytes\"] !== null) {\n $this->Bytes = $param[\"Bytes\"];\n }\n\n if (array_key_exists(\"BytesUsed\",$param) and $param[\"BytesUsed\"] !== null) {\n $this->BytesUsed = $param[\"BytesUsed\"];\n }\n\n if (array_key_exists(\"Status\",$param) and $param[\"Status\"] !== null) {\n $this->Status = $param[\"Status\"];\n }\n\n if (array_key_exists(\"CreateTime\",$param) and $param[\"CreateTime\"] !== null) {\n $this->CreateTime = $param[\"CreateTime\"];\n }\n\n if (array_key_exists(\"EnableTime\",$param) and $param[\"EnableTime\"] !== null) {\n $this->EnableTime = $param[\"EnableTime\"];\n }\n\n if (array_key_exists(\"ExpireTime\",$param) and $param[\"ExpireTime\"] !== null) {\n $this->ExpireTime = $param[\"ExpireTime\"];\n }\n\n if (array_key_exists(\"ContractExtension\",$param) and $param[\"ContractExtension\"] !== null) {\n $this->ContractExtension = $param[\"ContractExtension\"];\n }\n\n if (array_key_exists(\"AutoExtension\",$param) and $param[\"AutoExtension\"] !== null) {\n $this->AutoExtension = $param[\"AutoExtension\"];\n }\n\n if (array_key_exists(\"Channel\",$param) and $param[\"Channel\"] !== null) {\n $this->Channel = $param[\"Channel\"];\n }\n\n if (array_key_exists(\"Area\",$param) and $param[\"Area\"] !== null) {\n $this->Area = $param[\"Area\"];\n }\n\n if (array_key_exists(\"LifeTimeMonth\",$param) and $param[\"LifeTimeMonth\"] !== null) {\n $this->LifeTimeMonth = $param[\"LifeTimeMonth\"];\n }\n\n if (array_key_exists(\"ExtensionAvailable\",$param) and $param[\"ExtensionAvailable\"] !== null) {\n $this->ExtensionAvailable = $param[\"ExtensionAvailable\"];\n }\n\n if (array_key_exists(\"RefundAvailable\",$param) and $param[\"RefundAvailable\"] !== null) {\n $this->RefundAvailable = $param[\"RefundAvailable\"];\n }\n\n if (array_key_exists(\"Region\",$param) and $param[\"Region\"] !== null) {\n $this->Region = $param[\"Region\"];\n }\n\n if (array_key_exists(\"ConfigId\",$param) and $param[\"ConfigId\"] !== null) {\n $this->ConfigId = $param[\"ConfigId\"];\n }\n\n if (array_key_exists(\"ExtensionMode\",$param) and $param[\"ExtensionMode\"] !== null) {\n $this->ExtensionMode = $param[\"ExtensionMode\"];\n }\n\n if (array_key_exists(\"TrueEnableTime\",$param) and $param[\"TrueEnableTime\"] !== null) {\n $this->TrueEnableTime = $param[\"TrueEnableTime\"];\n }\n\n if (array_key_exists(\"TrueExpireTime\",$param) and $param[\"TrueExpireTime\"] !== null) {\n $this->TrueExpireTime = $param[\"TrueExpireTime\"];\n }\n }", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"Type\",$param) and $param[\"Type\"] !== null) {\n $this->Type = $param[\"Type\"];\n }\n\n if (array_key_exists(\"TypeName\",$param) and $param[\"TypeName\"] !== null) {\n $this->TypeName = $param[\"TypeName\"];\n }\n\n if (array_key_exists(\"Order\",$param) and $param[\"Order\"] !== null) {\n $this->Order = $param[\"Order\"];\n }\n\n if (array_key_exists(\"InstanceFamilies\",$param) and $param[\"InstanceFamilies\"] !== null) {\n $this->InstanceFamilies = [];\n foreach ($param[\"InstanceFamilies\"] as $key => $value){\n $obj = new ReservedInstanceFamilyItem();\n $obj->deserialize($value);\n array_push($this->InstanceFamilies, $obj);\n }\n }\n }", "public function Data()\n {\n return $this->parseobject($this->content);\n }", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"ServiceVip\",$param) and $param[\"ServiceVip\"] !== null) {\n $this->ServiceVip = $param[\"ServiceVip\"];\n }\n\n if (array_key_exists(\"UniqVpcId\",$param) and $param[\"UniqVpcId\"] !== null) {\n $this->UniqVpcId = $param[\"UniqVpcId\"];\n }\n }", "public function getSerializeResponse() {\n return \\Lib\\Format::forge($this->_response)->to_serialized();\n }", "public function binarySerialize();", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"Type\",$param) and $param[\"Type\"] !== null) {\n $this->Type = $param[\"Type\"];\n }\n\n if (array_key_exists(\"InstanceId\",$param) and $param[\"InstanceId\"] !== null) {\n $this->InstanceId = $param[\"InstanceId\"];\n }\n\n if (array_key_exists(\"Weight\",$param) and $param[\"Weight\"] !== null) {\n $this->Weight = $param[\"Weight\"];\n }\n\n if (array_key_exists(\"PublicIpAddresses\",$param) and $param[\"PublicIpAddresses\"] !== null) {\n $this->PublicIpAddresses = $param[\"PublicIpAddresses\"];\n }\n\n if (array_key_exists(\"PrivateIpAddresses\",$param) and $param[\"PrivateIpAddresses\"] !== null) {\n $this->PrivateIpAddresses = $param[\"PrivateIpAddresses\"];\n }\n\n if (array_key_exists(\"InstanceName\",$param) and $param[\"InstanceName\"] !== null) {\n $this->InstanceName = $param[\"InstanceName\"];\n }\n\n if (array_key_exists(\"RunFlag\",$param) and $param[\"RunFlag\"] !== null) {\n $this->RunFlag = $param[\"RunFlag\"];\n }\n }", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"AveElementSize\",$param) and $param[\"AveElementSize\"] !== null) {\n $this->AveElementSize = $param[\"AveElementSize\"];\n }\n\n if (array_key_exists(\"Length\",$param) and $param[\"Length\"] !== null) {\n $this->Length = $param[\"Length\"];\n }\n\n if (array_key_exists(\"KeyPreIndex\",$param) and $param[\"KeyPreIndex\"] !== null) {\n $this->KeyPreIndex = $param[\"KeyPreIndex\"];\n }\n\n if (array_key_exists(\"ItemCount\",$param) and $param[\"ItemCount\"] !== null) {\n $this->ItemCount = $param[\"ItemCount\"];\n }\n\n if (array_key_exists(\"Count\",$param) and $param[\"Count\"] !== null) {\n $this->Count = $param[\"Count\"];\n }\n\n if (array_key_exists(\"MaxElementSize\",$param) and $param[\"MaxElementSize\"] !== null) {\n $this->MaxElementSize = $param[\"MaxElementSize\"];\n }\n }", "function maybe_unserialize($data)\n {\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'bold' => fn(ParseNode $n) => $o->setBold($n->getBooleanValue()),\n 'color' => fn(ParseNode $n) => $o->setColor($n->getStringValue()),\n 'italic' => fn(ParseNode $n) => $o->setItalic($n->getBooleanValue()),\n 'name' => fn(ParseNode $n) => $o->setName($n->getStringValue()),\n 'size' => fn(ParseNode $n) => $o->setSize($n->getFloatValue()),\n 'underline' => fn(ParseNode $n) => $o->setUnderline($n->getStringValue()),\n ]);\n }", "function getData(){ \n return json_decode($this->data); \n }", "public function unserialize($serialized)\n {\n list($this->username, $this->password, $this->salt,\n $this->roles, $this->id) = \\json_decode(\n $serialized);\n }", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"Pos\",$param) and $param[\"Pos\"] !== null) {\n $this->Pos = $param[\"Pos\"];\n }\n\n if (array_key_exists(\"TimeZone\",$param) and $param[\"TimeZone\"] !== null) {\n $this->TimeZone = $param[\"TimeZone\"];\n }\n }", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"InstanceId\",$param) and $param[\"InstanceId\"] !== null) {\n $this->InstanceId = $param[\"InstanceId\"];\n }\n\n if (array_key_exists(\"MemSize\",$param) and $param[\"MemSize\"] !== null) {\n $this->MemSize = $param[\"MemSize\"];\n }\n\n if (array_key_exists(\"RedisShardNum\",$param) and $param[\"RedisShardNum\"] !== null) {\n $this->RedisShardNum = $param[\"RedisShardNum\"];\n }\n\n if (array_key_exists(\"RedisReplicasNum\",$param) and $param[\"RedisReplicasNum\"] !== null) {\n $this->RedisReplicasNum = $param[\"RedisReplicasNum\"];\n }\n }", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"Id\",$param) and $param[\"Id\"] !== null) {\n $this->Id = $param[\"Id\"];\n }\n\n if (array_key_exists(\"OrderIndex\",$param) and $param[\"OrderIndex\"] !== null) {\n $this->OrderIndex = $param[\"OrderIndex\"];\n }\n\n if (array_key_exists(\"NewOrderIndex\",$param) and $param[\"NewOrderIndex\"] !== null) {\n $this->NewOrderIndex = $param[\"NewOrderIndex\"];\n }\n }", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"RoleArn\",$param) and $param[\"RoleArn\"] !== null) {\n $this->RoleArn = $param[\"RoleArn\"];\n }\n\n if (array_key_exists(\"RoleSessionName\",$param) and $param[\"RoleSessionName\"] !== null) {\n $this->RoleSessionName = $param[\"RoleSessionName\"];\n }\n\n if (array_key_exists(\"DurationSeconds\",$param) and $param[\"DurationSeconds\"] !== null) {\n $this->DurationSeconds = $param[\"DurationSeconds\"];\n }\n\n if (array_key_exists(\"Policy\",$param) and $param[\"Policy\"] !== null) {\n $this->Policy = $param[\"Policy\"];\n }\n\n if (array_key_exists(\"ExternalId\",$param) and $param[\"ExternalId\"] !== null) {\n $this->ExternalId = $param[\"ExternalId\"];\n }\n\n if (array_key_exists(\"Tags\",$param) and $param[\"Tags\"] !== null) {\n $this->Tags = [];\n foreach ($param[\"Tags\"] as $key => $value){\n $obj = new Tag();\n $obj->deserialize($value);\n array_push($this->Tags, $obj);\n }\n }\n\n if (array_key_exists(\"SourceIdentity\",$param) and $param[\"SourceIdentity\"] !== null) {\n $this->SourceIdentity = $param[\"SourceIdentity\"];\n }\n }", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"LoadBalancerIds\",$param) and $param[\"LoadBalancerIds\"] !== null) {\n $this->LoadBalancerIds = $param[\"LoadBalancerIds\"];\n }\n\n if (array_key_exists(\"MixIpTarget\",$param) and $param[\"MixIpTarget\"] !== null) {\n $this->MixIpTarget = $param[\"MixIpTarget\"];\n }\n }", "function unserialize($data){\r\n\t\t$data = unserialize($data);\r\n\t\t$this -> firstName = $data['first'];\r\n\t\t$this -> lastName = $data['last'];\r\n\t}", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"InstanceId\",$param) and $param[\"InstanceId\"] !== null) {\n $this->InstanceId = $param[\"InstanceId\"];\n }\n\n if (array_key_exists(\"InstanceName\",$param) and $param[\"InstanceName\"] !== null) {\n $this->InstanceName = $param[\"InstanceName\"];\n }\n\n if (array_key_exists(\"NodeNum\",$param) and $param[\"NodeNum\"] !== null) {\n $this->NodeNum = $param[\"NodeNum\"];\n }\n\n if (array_key_exists(\"EsConfig\",$param) and $param[\"EsConfig\"] !== null) {\n $this->EsConfig = $param[\"EsConfig\"];\n }\n\n if (array_key_exists(\"Password\",$param) and $param[\"Password\"] !== null) {\n $this->Password = $param[\"Password\"];\n }\n\n if (array_key_exists(\"EsAcl\",$param) and $param[\"EsAcl\"] !== null) {\n $this->EsAcl = new EsAcl();\n $this->EsAcl->deserialize($param[\"EsAcl\"]);\n }\n\n if (array_key_exists(\"DiskSize\",$param) and $param[\"DiskSize\"] !== null) {\n $this->DiskSize = $param[\"DiskSize\"];\n }\n\n if (array_key_exists(\"NodeType\",$param) and $param[\"NodeType\"] !== null) {\n $this->NodeType = $param[\"NodeType\"];\n }\n\n if (array_key_exists(\"MasterNodeNum\",$param) and $param[\"MasterNodeNum\"] !== null) {\n $this->MasterNodeNum = $param[\"MasterNodeNum\"];\n }\n\n if (array_key_exists(\"MasterNodeType\",$param) and $param[\"MasterNodeType\"] !== null) {\n $this->MasterNodeType = $param[\"MasterNodeType\"];\n }\n\n if (array_key_exists(\"MasterNodeDiskSize\",$param) and $param[\"MasterNodeDiskSize\"] !== null) {\n $this->MasterNodeDiskSize = $param[\"MasterNodeDiskSize\"];\n }\n\n if (array_key_exists(\"ForceRestart\",$param) and $param[\"ForceRestart\"] !== null) {\n $this->ForceRestart = $param[\"ForceRestart\"];\n }\n\n if (array_key_exists(\"CosBackup\",$param) and $param[\"CosBackup\"] !== null) {\n $this->CosBackup = new CosBackup();\n $this->CosBackup->deserialize($param[\"CosBackup\"]);\n }\n\n if (array_key_exists(\"NodeInfoList\",$param) and $param[\"NodeInfoList\"] !== null) {\n $this->NodeInfoList = [];\n foreach ($param[\"NodeInfoList\"] as $key => $value){\n $obj = new NodeInfo();\n $obj->deserialize($value);\n array_push($this->NodeInfoList, $obj);\n }\n }\n\n if (array_key_exists(\"PublicAccess\",$param) and $param[\"PublicAccess\"] !== null) {\n $this->PublicAccess = $param[\"PublicAccess\"];\n }\n\n if (array_key_exists(\"EsPublicAcl\",$param) and $param[\"EsPublicAcl\"] !== null) {\n $this->EsPublicAcl = new EsPublicAcl();\n $this->EsPublicAcl->deserialize($param[\"EsPublicAcl\"]);\n }\n\n if (array_key_exists(\"KibanaPublicAccess\",$param) and $param[\"KibanaPublicAccess\"] !== null) {\n $this->KibanaPublicAccess = $param[\"KibanaPublicAccess\"];\n }\n\n if (array_key_exists(\"KibanaPrivateAccess\",$param) and $param[\"KibanaPrivateAccess\"] !== null) {\n $this->KibanaPrivateAccess = $param[\"KibanaPrivateAccess\"];\n }\n\n if (array_key_exists(\"BasicSecurityType\",$param) and $param[\"BasicSecurityType\"] !== null) {\n $this->BasicSecurityType = $param[\"BasicSecurityType\"];\n }\n\n if (array_key_exists(\"KibanaPrivatePort\",$param) and $param[\"KibanaPrivatePort\"] !== null) {\n $this->KibanaPrivatePort = $param[\"KibanaPrivatePort\"];\n }\n\n if (array_key_exists(\"ScaleType\",$param) and $param[\"ScaleType\"] !== null) {\n $this->ScaleType = $param[\"ScaleType\"];\n }\n\n if (array_key_exists(\"MultiZoneInfo\",$param) and $param[\"MultiZoneInfo\"] !== null) {\n $this->MultiZoneInfo = [];\n foreach ($param[\"MultiZoneInfo\"] as $key => $value){\n $obj = new ZoneDetail();\n $obj->deserialize($value);\n array_push($this->MultiZoneInfo, $obj);\n }\n }\n\n if (array_key_exists(\"SceneType\",$param) and $param[\"SceneType\"] !== null) {\n $this->SceneType = $param[\"SceneType\"];\n }\n\n if (array_key_exists(\"KibanaConfig\",$param) and $param[\"KibanaConfig\"] !== null) {\n $this->KibanaConfig = $param[\"KibanaConfig\"];\n }\n\n if (array_key_exists(\"WebNodeTypeInfo\",$param) and $param[\"WebNodeTypeInfo\"] !== null) {\n $this->WebNodeTypeInfo = new WebNodeTypeInfo();\n $this->WebNodeTypeInfo->deserialize($param[\"WebNodeTypeInfo\"]);\n }\n\n if (array_key_exists(\"SwitchPrivateLink\",$param) and $param[\"SwitchPrivateLink\"] !== null) {\n $this->SwitchPrivateLink = $param[\"SwitchPrivateLink\"];\n }\n\n if (array_key_exists(\"EnableCerebro\",$param) and $param[\"EnableCerebro\"] !== null) {\n $this->EnableCerebro = $param[\"EnableCerebro\"];\n }\n\n if (array_key_exists(\"CerebroPublicAccess\",$param) and $param[\"CerebroPublicAccess\"] !== null) {\n $this->CerebroPublicAccess = $param[\"CerebroPublicAccess\"];\n }\n\n if (array_key_exists(\"CerebroPrivateAccess\",$param) and $param[\"CerebroPrivateAccess\"] !== null) {\n $this->CerebroPrivateAccess = $param[\"CerebroPrivateAccess\"];\n }\n\n if (array_key_exists(\"EsConfigSet\",$param) and $param[\"EsConfigSet\"] !== null) {\n $this->EsConfigSet = new EsConfigSetInfo();\n $this->EsConfigSet->deserialize($param[\"EsConfigSet\"]);\n }\n\n if (array_key_exists(\"OperationDuration\",$param) and $param[\"OperationDuration\"] !== null) {\n $this->OperationDuration = new OperationDurationUpdated();\n $this->OperationDuration->deserialize($param[\"OperationDuration\"]);\n }\n\n if (array_key_exists(\"KibanaAlteringPublicAccess\",$param) and $param[\"KibanaAlteringPublicAccess\"] !== null) {\n $this->KibanaAlteringPublicAccess = $param[\"KibanaAlteringPublicAccess\"];\n }\n }", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"FileId\",$param) and $param[\"FileId\"] !== null) {\n $this->FileId = $param[\"FileId\"];\n }\n\n if (array_key_exists(\"SubAppId\",$param) and $param[\"SubAppId\"] !== null) {\n $this->SubAppId = $param[\"SubAppId\"];\n }\n\n if (array_key_exists(\"StartTimeOffset\",$param) and $param[\"StartTimeOffset\"] !== null) {\n $this->StartTimeOffset = $param[\"StartTimeOffset\"];\n }\n\n if (array_key_exists(\"EndTimeOffset\",$param) and $param[\"EndTimeOffset\"] !== null) {\n $this->EndTimeOffset = $param[\"EndTimeOffset\"];\n }\n\n if (array_key_exists(\"RepairInfo\",$param) and $param[\"RepairInfo\"] !== null) {\n $this->RepairInfo = new RepairInfo();\n $this->RepairInfo->deserialize($param[\"RepairInfo\"]);\n }\n\n if (array_key_exists(\"VideoFrameInterpolationInfo\",$param) and $param[\"VideoFrameInterpolationInfo\"] !== null) {\n $this->VideoFrameInterpolationInfo = new VideoFrameInterpolationInfo();\n $this->VideoFrameInterpolationInfo->deserialize($param[\"VideoFrameInterpolationInfo\"]);\n }\n\n if (array_key_exists(\"SuperResolutionInfo\",$param) and $param[\"SuperResolutionInfo\"] !== null) {\n $this->SuperResolutionInfo = new SuperResolutionInfo();\n $this->SuperResolutionInfo->deserialize($param[\"SuperResolutionInfo\"]);\n }\n\n if (array_key_exists(\"HDRInfo\",$param) and $param[\"HDRInfo\"] !== null) {\n $this->HDRInfo = new HDRInfo();\n $this->HDRInfo->deserialize($param[\"HDRInfo\"]);\n }\n\n if (array_key_exists(\"VideoDenoiseInfo\",$param) and $param[\"VideoDenoiseInfo\"] !== null) {\n $this->VideoDenoiseInfo = new VideoDenoiseInfo();\n $this->VideoDenoiseInfo->deserialize($param[\"VideoDenoiseInfo\"]);\n }\n\n if (array_key_exists(\"AudioDenoiseInfo\",$param) and $param[\"AudioDenoiseInfo\"] !== null) {\n $this->AudioDenoiseInfo = new AudioDenoiseInfo();\n $this->AudioDenoiseInfo->deserialize($param[\"AudioDenoiseInfo\"]);\n }\n\n if (array_key_exists(\"ColorInfo\",$param) and $param[\"ColorInfo\"] !== null) {\n $this->ColorInfo = new ColorEnhanceInfo();\n $this->ColorInfo->deserialize($param[\"ColorInfo\"]);\n }\n\n if (array_key_exists(\"SharpInfo\",$param) and $param[\"SharpInfo\"] !== null) {\n $this->SharpInfo = new SharpEnhanceInfo();\n $this->SharpInfo->deserialize($param[\"SharpInfo\"]);\n }\n\n if (array_key_exists(\"FaceInfo\",$param) and $param[\"FaceInfo\"] !== null) {\n $this->FaceInfo = new FaceEnhanceInfo();\n $this->FaceInfo->deserialize($param[\"FaceInfo\"]);\n }\n\n if (array_key_exists(\"LowLightInfo\",$param) and $param[\"LowLightInfo\"] !== null) {\n $this->LowLightInfo = new LowLightEnhanceInfo();\n $this->LowLightInfo->deserialize($param[\"LowLightInfo\"]);\n }\n\n if (array_key_exists(\"ScratchRepairInfo\",$param) and $param[\"ScratchRepairInfo\"] !== null) {\n $this->ScratchRepairInfo = new ScratchRepairInfo();\n $this->ScratchRepairInfo->deserialize($param[\"ScratchRepairInfo\"]);\n }\n\n if (array_key_exists(\"ArtifactRepairInfo\",$param) and $param[\"ArtifactRepairInfo\"] !== null) {\n $this->ArtifactRepairInfo = new ArtifactRepairInfo();\n $this->ArtifactRepairInfo->deserialize($param[\"ArtifactRepairInfo\"]);\n }\n\n if (array_key_exists(\"TargetInfo\",$param) and $param[\"TargetInfo\"] !== null) {\n $this->TargetInfo = new RebuildMediaTargetInfo();\n $this->TargetInfo->deserialize($param[\"TargetInfo\"]);\n }\n\n if (array_key_exists(\"SessionId\",$param) and $param[\"SessionId\"] !== null) {\n $this->SessionId = $param[\"SessionId\"];\n }\n\n if (array_key_exists(\"SessionContext\",$param) and $param[\"SessionContext\"] !== null) {\n $this->SessionContext = $param[\"SessionContext\"];\n }\n\n if (array_key_exists(\"TasksPriority\",$param) and $param[\"TasksPriority\"] !== null) {\n $this->TasksPriority = $param[\"TasksPriority\"];\n }\n\n if (array_key_exists(\"ExtInfo\",$param) and $param[\"ExtInfo\"] !== null) {\n $this->ExtInfo = $param[\"ExtInfo\"];\n }\n }", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"InstanceGroupId\",$param) and $param[\"InstanceGroupId\"] !== null) {\n $this->InstanceGroupId = $param[\"InstanceGroupId\"];\n }\n\n if (array_key_exists(\"InstanceGroupName\",$param) and $param[\"InstanceGroupName\"] !== null) {\n $this->InstanceGroupName = $param[\"InstanceGroupName\"];\n }\n }", "public function toObject()\r\n\t{\r\n\t\treturn (object)$this->m_data;\r\n\t}", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"ResourceId\",$param) and $param[\"ResourceId\"] !== null) {\n $this->ResourceId = $param[\"ResourceId\"];\n }\n\n if (array_key_exists(\"ResourceType\",$param) and $param[\"ResourceType\"] !== null) {\n $this->ResourceType = $param[\"ResourceType\"];\n }\n\n if (array_key_exists(\"Resource\",$param) and $param[\"Resource\"] !== null) {\n $this->Resource = $param[\"Resource\"];\n }\n\n if (array_key_exists(\"InheritedForm\",$param) and $param[\"InheritedForm\"] !== null) {\n $this->InheritedForm = new InheritedForm();\n $this->InheritedForm->deserialize($param[\"InheritedForm\"]);\n }\n\n if (array_key_exists(\"ApplicationAccounts\",$param) and $param[\"ApplicationAccounts\"] !== null) {\n $this->ApplicationAccounts = $param[\"ApplicationAccounts\"];\n }\n\n if (array_key_exists(\"ResourceName\",$param) and $param[\"ResourceName\"] !== null) {\n $this->ResourceName = $param[\"ResourceName\"];\n }\n }", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"Placement\",$param) and $param[\"Placement\"] !== null) {\n $this->Placement = new Placement();\n $this->Placement->deserialize($param[\"Placement\"]);\n }\n\n if (array_key_exists(\"DiskChargeType\",$param) and $param[\"DiskChargeType\"] !== null) {\n $this->DiskChargeType = $param[\"DiskChargeType\"];\n }\n\n if (array_key_exists(\"DiskType\",$param) and $param[\"DiskType\"] !== null) {\n $this->DiskType = $param[\"DiskType\"];\n }\n\n if (array_key_exists(\"DiskName\",$param) and $param[\"DiskName\"] !== null) {\n $this->DiskName = $param[\"DiskName\"];\n }\n\n if (array_key_exists(\"Tags\",$param) and $param[\"Tags\"] !== null) {\n $this->Tags = [];\n foreach ($param[\"Tags\"] as $key => $value){\n $obj = new Tag();\n $obj->deserialize($value);\n array_push($this->Tags, $obj);\n }\n }\n\n if (array_key_exists(\"DiskChargePrepaid\",$param) and $param[\"DiskChargePrepaid\"] !== null) {\n $this->DiskChargePrepaid = new DiskChargePrepaid();\n $this->DiskChargePrepaid->deserialize($param[\"DiskChargePrepaid\"]);\n }\n\n if (array_key_exists(\"DiskCount\",$param) and $param[\"DiskCount\"] !== null) {\n $this->DiskCount = $param[\"DiskCount\"];\n }\n\n if (array_key_exists(\"ThroughputPerformance\",$param) and $param[\"ThroughputPerformance\"] !== null) {\n $this->ThroughputPerformance = $param[\"ThroughputPerformance\"];\n }\n\n if (array_key_exists(\"DiskSize\",$param) and $param[\"DiskSize\"] !== null) {\n $this->DiskSize = $param[\"DiskSize\"];\n }\n\n if (array_key_exists(\"Shareable\",$param) and $param[\"Shareable\"] !== null) {\n $this->Shareable = $param[\"Shareable\"];\n }\n\n if (array_key_exists(\"ClientToken\",$param) and $param[\"ClientToken\"] !== null) {\n $this->ClientToken = $param[\"ClientToken\"];\n }\n\n if (array_key_exists(\"Encrypt\",$param) and $param[\"Encrypt\"] !== null) {\n $this->Encrypt = $param[\"Encrypt\"];\n }\n\n if (array_key_exists(\"SnapshotId\",$param) and $param[\"SnapshotId\"] !== null) {\n $this->SnapshotId = $param[\"SnapshotId\"];\n }\n }" ]
[ "0.75697446", "0.7370792", "0.67385", "0.6601346", "0.6601346", "0.65343684", "0.65259534", "0.6524597", "0.6505942", "0.6475352", "0.6462801", "0.63833904", "0.6347862", "0.6347862", "0.63185483", "0.63142353", "0.62484187", "0.62484187", "0.62466055", "0.62466055", "0.62466055", "0.62466055", "0.62466055", "0.62466055", "0.622137", "0.6203048", "0.6163616", "0.614741", "0.6109443", "0.6109443", "0.6109443", "0.6052765", "0.60420847", "0.60298747", "0.60180396", "0.59654516", "0.5960001", "0.59430283", "0.5939271", "0.59209484", "0.5877805", "0.58528143", "0.58510345", "0.58459425", "0.58449227", "0.58338195", "0.5833193", "0.583015", "0.58034045", "0.578844", "0.5776404", "0.5751155", "0.5751155", "0.57396716", "0.57393235", "0.5738161", "0.57368547", "0.57230866", "0.57172805", "0.5714927", "0.57114637", "0.57087594", "0.5703813", "0.56944066", "0.5693093", "0.56887484", "0.5685076", "0.5670089", "0.566508", "0.5655047", "0.56442815", "0.56434476", "0.5639361", "0.56381726", "0.562558", "0.5625404", "0.56213254", "0.561832", "0.5610649", "0.56080025", "0.56059486", "0.56052166", "0.56044376", "0.5604", "0.5596", "0.5594035", "0.5593993", "0.5593752", "0.5587022", "0.55863065", "0.5583923", "0.5581785", "0.55806357", "0.55805665", "0.55800897", "0.5576662", "0.55745304", "0.5574318", "0.5567762", "0.556654" ]
0.5761206
51
TODO: Implement serialize() method.
public function serialize($entity) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "abstract public function serialize();", "abstract public function serialize();", "public abstract function serialize();", "public function serialize();", "public function serialize();", "public function serialize();", "public function serialize()\n {\n }", "public function serialize()\n {\n }", "public function serialize()\n {\n // TODO: Implement serialize() method.\n }", "public function serialize(){ }", "abstract protected function serializeData();", "public function binarySerialize();", "public function SerializeObject () {\n return serialize ($this);\n }", "public function serialize()\n {\n // Interface for convenience.\n return serialize($this->__serialize());\n }", "public function __toString()\n\t{\n\t\treturn $this->serialize();\n\t}", "abstract public function serialize($data);", "public function serialize(): array;", "function __toString(){\n\treturn serialize($this->__data);\n\t}", "final public function serialize(): string\n {\n return \\serialize($this);\n }", "public function serialize($data)\n {\n }", "public function serialize()\n {\n return serialize($this->data);\n }", "public function serialize()\n {\n return serialize($this->data);\n }", "#[ReturnTypeWillChange]\n public function __serialize()\n {\n return $this->toArray();\n }", "public function serialize()\n {\n return serialize($this->toArray());\n }", "public function serialize(){\n return serialize($this->id);\n }", "public function serialize($data);", "public function serializer() {\n }", "public function serialize()\r\n {\r\n $data = $this->toArray();\r\n\r\n return serialize($data);\r\n }", "function serialise(): string;", "public function serialize()\n {\n return serialize(array(\n \"id\"=>$this->getId()\n ));\n }", "public function getSerializer();", "public function serialize(){\n return serialize($this->id);\n }", "public function serialize($value){\n return parent::serialize($value);\n }", "public function serialize() {\r\n return json_encode($this);\r\n }", "public function serialize(){\n\t\tthrow new Exception(\"Method \".__CLASS__.\"::\".__METHOD__.\" not implemented yet!\");\n\t}", "public function __toString(){\r\n\t\t$data = serialize($this->_data);\r\n\t\t// Obfuscate the data with base64 encoding\r\n\t\t$data = base64_encode($data);\r\n\t\treturn $data;\r\n\t}", "public function serialize()\n {\n $data = array();\n foreach( $this->toSerialize as $var ) { $data[ $var ] = $this->$var; }\n return serialize( $data );\n }", "public function toSerial() {\n\t\treturn serialize($this->toArray());\n\t}", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function serialize()\n {\n return json_encode($this);\n }", "public function __toString(): string\n {\n return serialize($this->toArray());\n }", "public function __toString()\n\t{\n\t\treturn $this->dump();\n\t}", "public function __serialize() { \n $serialized = [\n 'instance_name' => $this->instance_name,\n 'local_columns' => array_map(fn($column) => $this->serializeColumn($column), $this->getLocalColumns()),\n 'referenced_columns' => array_map(fn($column) => $this->serializeColumn($column), $this->getReferencedColumns()),\n 'is_reversed_relation' => $this->is_reverse_relation,\n 'target_relation' => $this->getTargetRelation(),\n 'type' => $this->type,\n ];\n\n return $serialized;\n\n }", "public function serialize() \n {\n return serialize($this->items);\n }", "public function _jsonSerialize();", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}", "public function __toString() {}" ]
[ "0.8509704", "0.8509704", "0.8509408", "0.8509408", "0.8509408", "0.8509408", "0.8509408", "0.8509408", "0.8497572", "0.8497572", "0.8449715", "0.84394056", "0.84394056", "0.84394056", "0.81594163", "0.81594163", "0.8082829", "0.80625236", "0.7618936", "0.7478766", "0.74519277", "0.7251875", "0.72249925", "0.7209009", "0.71884197", "0.7186058", "0.7067172", "0.7064244", "0.7059397", "0.7059397", "0.70483965", "0.7022336", "0.701397", "0.70104915", "0.6994552", "0.6981479", "0.69474024", "0.69420063", "0.69271445", "0.6911134", "0.6908352", "0.68923664", "0.68878806", "0.68613887", "0.6842673", "0.68252116", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6800782", "0.6791926", "0.6791466", "0.6771392", "0.6757266", "0.6742202", "0.6729003", "0.67162514", "0.67162514", "0.67162514", "0.67162514", "0.67162514", "0.67162514", "0.67162514", "0.67162514", "0.67162514", "0.67162514", "0.67162514", "0.67162514" ]
0.0
-1
Register any application services.
public function register() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register()\n {\n $this->registerServices();\n }", "public function register()\n {\n $this->registerAssets();\n $this->registerServices();\n }", "public function register()\n\t{\n\n $this->registerUserService();\n $this->registerCountryService();\n $this->registerMetaService();\n $this->registerLabelService();\n $this->registerTypeService();\n $this->registerGroupeService();\n $this->registerActiviteService();\n $this->registerRiiinglinkService();\n $this->registerInviteService();\n $this->registerTagService();\n $this->registerAuthService();\n $this->registerChangeService();\n $this->registerRevisionService();\n $this->registerUploadService();\n //$this->registerTransformerService();\n }", "public function register()\n { \n // User Repository\n $this->app->bind('App\\Contracts\\Repository\\User', 'App\\Repositories\\User');\n \n // JWT Token Repository\n $this->app->bind('App\\Contracts\\Repository\\JSONWebToken', 'App\\Repositories\\JSONWebToken');\n \n $this->registerClearSettleApiLogin();\n \n $this->registerClearSettleApiClients();\n \n \n }", "public function register()\n {\n $this->registerRequestHandler();\n $this->registerAuthorizationService();\n $this->registerServices();\n }", "public function register()\n {\n $this->app->bind(\n PegawaiServiceContract::class,\n PegawaiService::class \n );\n\n $this->app->bind(\n RiwayatPendidikanServiceContract::class,\n RiwayatPendidikanService::class \n );\n\n $this->app->bind(\n ProductionHouseServiceContract::class,\n ProductionHouseService::class\n );\n\n $this->app->bind(\n MovieServiceContract::class,\n MovieService::class\n );\n\n $this->app->bind(\n PangkatServiceContract::class,\n PangkatService::class \n );\n\n }", "public function register()\n {\n // $this->app->bind('AuthService', AuthService::class);\n }", "public function register()\n {\n $this->registerServiceProviders();\n $this->registerSettingsService();\n $this->registerHelpers();\n }", "public function register()\n {\n $this->registerAccountService();\n\n $this->registerCurrentAccount();\n\n //$this->registerMenuService();\n\n //$this->registerReplyService();\n }", "public function register()\n {\n $this->registerRepositories();\n }", "public function register()\n {\n $this->registerFacades();\n $this->registerRespository();\n }", "public function register()\n {\n $this->app->bind('App\\Services\\UserService');\n $this->app->bind('App\\Services\\PostService');\n $this->app->bind('App\\Services\\MyPickService');\n $this->app->bind('App\\Services\\FacebookService');\n $this->app->bind('App\\Services\\LikeService');\n }", "public function register()\n {\n // service 由各个应用在 AppServiceProvider 单独绑定对应实现\n }", "public function register()\n {\n //\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n\n\n\n\n $this->app->register(ResponseMacroServiceProvider::class);\n $this->app->register(TwitterServiceProvider::class);\n }", "public function register()\n {\n $this->registerGraphQL();\n\n $this->registerConsole();\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n\n $this->registerCommand();\n $this->registerSchedule();\n $this->registerDev();\n\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/telescope-error-service-client.php', 'telescope-error-service-client'\n );\n\n $this->registerStorageDriver();\n\n $this->commands([\n Console\\InstallCommand::class,\n Console\\PublishCommand::class,\n ]);\n }", "public function register()\n\t{\n\t\t$this->registerPasswordBroker();\n\n\t\t$this->registerTokenRepository();\n\t}", "public function register()\n {\n $this->registerConfig();\n\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\UtilitiesServiceProvider');\n $this->registerLogViewer();\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\CommandsServiceProvider');\n }", "public function register() {\n $this->registerProviders();\n $this->registerFacades();\n }", "public function register()\n {\n // $this->app->make('CheckStructureService');\n }", "public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'APIcoLAB\\Services\\Registrar'\n\t\t);\n\n $this->app->bind(\n 'APIcoLAB\\Repositories\\Flight\\FlightRepository',\n 'APIcoLAB\\Repositories\\Flight\\SkyScannerFlightRepository'\n );\n\n $this->app->bind(\n 'APIcoLAB\\Repositories\\Place\\PlaceRepository',\n 'APIcoLAB\\Repositories\\Place\\SkyScannerPlaceRepository'\n );\n\t}", "public function register()\n {\n $this->app->register(\\Maatwebsite\\Excel\\ExcelServiceProvider::class);\n $this->app->register(\\Intervention\\Image\\ImageServiceProvider::class);\n $this->app->register(\\Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider::class);\n $this->app->register(\\Yajra\\Datatables\\DatatablesServiceProvider::class);\n $this->app->register(\\Yajra\\Datatables\\ButtonsServiceProvider::class);\n\n $loader = null;\n if (class_exists('Illuminate\\Foundation\\AliasLoader')) {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n }\n\n // Facades\n if ($loader != null) {\n $loader->alias('Image', \\Intervention\\Image\\Facades\\Image::class);\n $loader->alias('Excel', \\Maatwebsite\\Excel\\Facades\\Excel::class);\n\n }\n\n if (app()->environment() != 'production') {\n // Service Providers\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n $this->app->register(\\Barryvdh\\Debugbar\\ServiceProvider::class);\n\n // Facades\n if ($loader != null) {\n $loader->alias('Debugbar', \\Barryvdh\\Debugbar\\Facade::class);\n }\n }\n\n if ($this->app->environment('local', 'testing')) {\n $this->app->register(\\Laravel\\Dusk\\DuskServiceProvider::class);\n }\n }", "public function register()\n {\n $this->registerInertia();\n $this->registerLengthAwarePaginator();\n }", "public function register()\n {\n $this->registerFlareFacade();\n $this->registerServiceProviders();\n $this->registerBindings();\n }", "public function register()\n {\n $this->app->bind(\n 'Toyopecas\\Repositories\\TopoRepository',\n 'Toyopecas\\Repositories\\TopoRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\ServicesRepository',\n 'Toyopecas\\Repositories\\ServicesRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\SobreRepository',\n 'Toyopecas\\Repositories\\SobreRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\ProdutosRepository',\n 'Toyopecas\\Repositories\\ProdutosRepositoryEloquent'\n );\n }", "public function register()\r\n {\r\n Passport::ignoreMigrations();\r\n\r\n $this->app->singleton(\r\n CityRepositoryInterface::class,\r\n CityRepository::class\r\n );\r\n\r\n $this->app->singleton(\r\n BarangayRepositoryInterface::class,\r\n BarangayRepository::class\r\n );\r\n }", "public function register()\n {\n $this->registerRepositories();\n\n $this->pushMiddleware();\n }", "public function register()\r\n {\r\n $this->mergeConfigFrom(__DIR__ . '/../config/laravel-base.php', 'laravel-base');\r\n\r\n $this->app->bind(UuidGenerator::class, UuidGeneratorService::class);\r\n\r\n }", "public function register()\n {\n\n $this->app->register(RepositoryServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind(\n 'Uhmane\\Repositories\\ContatosRepository', \n 'Uhmane\\Repositories\\ContatosRepositoryEloquent'\n );\n }", "public function register()\r\n {\r\n $this->app->bind(\r\n ViberServiceInterface::class,\r\n ViberService::class\r\n );\r\n\r\n $this->app->bind(\r\n ApplicantServiceInterface::class,\r\n ApplicantService::class\r\n );\r\n }", "public function register()\n {\n $this->app->register('ProAI\\Datamapper\\Providers\\MetadataServiceProvider');\n\n $this->app->register('ProAI\\Datamapper\\Presenter\\Providers\\MetadataServiceProvider');\n\n $this->registerScanner();\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->app->bind(\n 'Larafolio\\Http\\HttpValidator\\HttpValidator',\n 'Larafolio\\Http\\HttpValidator\\CurlValidator'\n );\n\n $this->app->register(ImageServiceProvider::class);\n }", "public function register()\n {\n // Register all repositories\n foreach ($this->repositories as $repository) {\n $this->app->bind(\"App\\Repository\\Contracts\\I{$repository}\",\n \"App\\Repository\\Repositories\\\\{$repository}\");\n }\n\n // Register all services\n foreach ($this->services as $service) {\n $this->app->bind(\"App\\Service\\Contracts\\I{$service}\", \n \"App\\Service\\Modules\\\\{$service}\");\n }\n }", "public function register()\n {\n $this->registerAdapterFactory();\n $this->registerDigitalOceanFactory();\n $this->registerManager();\n $this->registerBindings();\n }", "public function register()\n {\n // Only Environment local\n if ($this->app->environment() !== 'production') {\n foreach ($this->services as $serviceClass) {\n $this->registerClass($serviceClass);\n }\n }\n\n // Register Aliases\n $this->registerAliases();\n }", "public function register()\n {\n $this->app->bind(\n 'App\\Contracts\\UsersInterface',\n 'App\\Services\\UsersService'\n );\n $this->app->bind(\n 'App\\Contracts\\CallsInterface',\n 'App\\Services\\CallsService'\n );\n $this->app->bind(\n 'App\\Contracts\\ContactsInterface',\n 'App\\Services\\ContactsService'\n );\n $this->app->bind(\n 'App\\Contracts\\EmailsInterface',\n 'App\\Services\\EmailsService'\n );\n $this->app->bind(\n 'App\\Contracts\\PhoneNumbersInterface',\n 'App\\Services\\PhoneNumbersService'\n );\n $this->app->bind(\n 'App\\Contracts\\NumbersInterface',\n 'App\\Services\\NumbersService'\n );\n $this->app->bind(\n 'App\\Contracts\\UserNumbersInterface',\n 'App\\Services\\UserNumbersService'\n );\n }", "public function register()\n {\n //\n if (env('APP_DEBUG', false) && $this->app->isLocal()) {\n $this->app->register(\\Laravel\\Telescope\\TelescopeServiceProvider::class);\n $this->app->register(TelescopeServiceProvider::class);\n }\n }", "public function register()\n {\n $this->registerBrowser();\n\n $this->registerViewFinder();\n }", "public function register()\n {\n $this->registerFriendsLog();\n $this->registerNotifications();\n $this->registerAPI();\n $this->registerMailChimpIntegration();\n }", "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/awesio-auth.php', 'awesio-auth');\n\n $this->app->singleton(AuthContract::class, Auth::class);\n\n $this->registerRepositories();\n\n $this->registerServices();\n\n $this->registerHelpers();\n }", "public function register()\n {\n $this->registerRepository();\n $this->registerMigrator();\n $this->registerArtisanCommands();\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/services.php', 'services'\n );\n }", "public function register()\n {\n $this->registerRateLimiting();\n\n $this->registerHttpValidation();\n\n $this->registerHttpParsers();\n\n $this->registerResponseFactory();\n\n $this->registerMiddleware();\n }", "public function register()\n {\n $this->registerConfig();\n $this->registerView();\n $this->registerMessage();\n $this->registerMenu();\n $this->registerOutput();\n $this->registerCommands();\n require __DIR__ . '/Service/ServiceProvider.php';\n require __DIR__ . '/Service/RegisterRepoInterface.php';\n require __DIR__ . '/Service/ErrorHandling.php';\n $this->registerExportDompdf();\n $this->registerExtjs();\n }", "public function register()\n {\n $this->registerRepository();\n $this->registerParser();\n }", "public function register()\n {\n $this->registerOtherProviders()->registerAliases();\n $this->loadViewsFrom(__DIR__.'/../../resources/views', 'jarvisPlatform');\n $this->app->bind('jarvis.auth.provider', AppAuthenticationProvider::class);\n $this->loadRoutes();\n }", "public function register()\n {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n\n $loader->alias('Laratrust', 'Laratrust\\LaratrustFacade');\n $loader->alias('Form', 'Collective\\Html\\FormFacade');\n $loader->alias('Html', 'Collective\\Html\\HtmlFacade');\n $loader->alias('Markdown', 'BrianFaust\\Parsedown\\Facades\\Parsedown');\n\n $this->app->register('Baum\\Providers\\BaumServiceProvider');\n $this->app->register('BrianFaust\\Parsedown\\ServiceProvider');\n $this->app->register('Collective\\Html\\HtmlServiceProvider');\n $this->app->register('Laravel\\Scout\\ScoutServiceProvider');\n $this->app->register('Laratrust\\LaratrustServiceProvider');\n\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\AuthServiceProvider');\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\EventServiceProvider');\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\ViewServiceProvider');\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->registerGuard();\n $this->registerBladeDirectives();\n }", "public function register()\n {\n $this->registerConfig();\n\n $this->app->register(Providers\\ManagerServiceProvider::class);\n $this->app->register(Providers\\ValidationServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind(ReviewService::class, function ($app) {\n return new ReviewService();\n });\n }", "public function register()\n {\n $this->app->bind(\n Services\\UserService::class,\n Services\\Implementations\\UserServiceImplementation::class\n );\n $this->app->bind(\n Services\\FamilyCardService::class,\n Services\\Implementations\\FamilyCardServiceImplementation::class\n );\n }", "public function register()\n {\n // register its dependencies\n $this->app->register(\\Cviebrock\\EloquentSluggable\\ServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind('gameService', 'App\\Service\\GameService');\n }", "public function register()\n {\n $this->app->bind(VehicleRepository::class, GuzzleVehicleRepository::class);\n }", "public function register()\n {\n $this->app->bindShared(ElasticsearchNedvizhimostsObserver::class, function($app){\n return new ElasticsearchNedvizhimostsObserver(new Client());\n });\n\n // $this->app->bindShared(ElasticsearchNedvizhimostsObserver::class, function()\n // {\n // return new ElasticsearchNedvizhimostsObserver(new Client());\n // });\n }", "public function register()\n {\n // Register the app\n $this->registerApp();\n\n // Register Commands\n $this->registerCommands();\n }", "public function register()\n {\n $this->registerGeography();\n\n $this->registerCommands();\n\n $this->mergeConfig();\n\n $this->countriesCache();\n }", "public function register()\n {\n $this->app->bind(CertificationService::class, function($app){\n return new CertificationService();\n });\n }", "public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'App\\Services\\Registrar'\n\t\t);\n \n $this->app->bind(\"App\\\\Services\\\\ILoginService\",\"App\\\\Services\\\\LoginService\");\n \n $this->app->bind(\"App\\\\Repositories\\\\IItemRepository\",\"App\\\\Repositories\\\\ItemRepository\");\n $this->app->bind(\"App\\\\Repositories\\\\IOutletRepository\",\"App\\\\Repositories\\\\OutletRepository\");\n $this->app->bind(\"App\\\\Repositories\\\\IInventoryRepository\",\"App\\\\Repositories\\\\InventoryRepository\");\n\t}", "public function register()\n {\n $this->registerRollbar();\n }", "public function register()\n {\n $this->app->bind('activity', function () {\n return new ActivityService(\n $this->app->make(Activity::class),\n $this->app->make(PermissionService::class)\n );\n });\n\n $this->app->bind('views', function () {\n return new ViewService(\n $this->app->make(View::class),\n $this->app->make(PermissionService::class)\n );\n });\n\n $this->app->bind('setting', function () {\n return new SettingService(\n $this->app->make(Setting::class),\n $this->app->make(Repository::class)\n );\n });\n\n $this->app->bind('images', function () {\n return new ImageService(\n $this->app->make(Image::class),\n $this->app->make(ImageManager::class),\n $this->app->make(Factory::class),\n $this->app->make(Repository::class)\n );\n });\n }", "public function register()\n {\n App::bind('CreateTagService', function($app) {\n return new CreateTagService;\n });\n\n App::bind('UpdateTagService', function($app) {\n return new UpdateTagService;\n });\n }", "public function register()\n {\n $this->registerDomainLocalization();\n $this->registerDomainLocaleFilter();\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(MailConfigServiceProvider::class);\n }", "public function register()\n {\n $this->registerUserProvider();\n $this->registerGroupProvider();\n $this->registerNeo();\n\n $this->registerCommands();\n\n $this->app->booting(function()\n {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n $loader->alias('Neo', 'Wetcat\\Neo\\Facades\\Neo');\n });\n }", "public function register()\n {\n //\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\CompanyInterface', \n 'App\\Repositories\\CompanyRepo'\n );\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\UtilityInterface', \n 'App\\Repositories\\UtilityRepo'\n );\n }", "public function register()\n {\n $this->registerPayment();\n\n $this->app->alias('image', 'App\\Framework\\Image\\ImageService');\n }", "public function register()\n {\n $this->app->bind(AttributeServiceInterface::class,AttributeService::class);\n $this->app->bind(ProductServiceIntarface::class,ProductService::class);\n\n\n }", "public function register()\n {\n App::bind('App\\Repositories\\UserRepositoryInterface','App\\Repositories\\UserRepository');\n App::bind('App\\Repositories\\AnimalRepositoryInterface','App\\Repositories\\AnimalRepository');\n App::bind('App\\Repositories\\DonationTypeRepositoryInterface','App\\Repositories\\DonationTypeRepository');\n App::bind('App\\Repositories\\NewsAniRepositoryInterface','App\\Repositories\\NewsAniRepository');\n App::bind('App\\Repositories\\DonationRepositoryInterface','App\\Repositories\\DonationRepository');\n App::bind('App\\Repositories\\ProductRepositoryInterface','App\\Repositories\\ProductRepository');\n App::bind('App\\Repositories\\CategoryRepositoryInterface','App\\Repositories\\CategoryRepository');\n App::bind('App\\Repositories\\TransferMoneyRepositoryInterface','App\\Repositories\\TransferMoneyRepository');\n App::bind('App\\Repositories\\ShippingRepositoryInterface','App\\Repositories\\ShippingRepository');\n App::bind('App\\Repositories\\ReserveProductRepositoryInterface','App\\Repositories\\ReserveProductRepository');\n App::bind('App\\Repositories\\Product_reserveRepositoryInterface','App\\Repositories\\Product_reserveRepository');\n App::bind('App\\Repositories\\Ordering_productRepositoryInterface','App\\Repositories\\Ordering_productRepository');\n App::bind('App\\Repositories\\OrderingRepositoryInterface','App\\Repositories\\OrderingRepository');\n App::bind('App\\Repositories\\UserUpdateSlipRepositoryInterface','App\\Repositories\\UserUpdateSlipRepository');\n }", "public function register()\n {\n if ($this->app->runningInConsole()) {\n $this->registerPublishing();\n }\n }", "public function register()\n {\n $this->app->bind(HttpClient::class, function ($app) {\n return new HttpClient();\n });\n\n $this->app->bind(SeasonService::class, function ($app) {\n return new SeasonService($app->make(HttpClient::class));\n });\n\n $this->app->bind(MatchListingController::class, function ($app) {\n return new MatchListingController($app->make(SeasonService::class));\n });\n\n }", "public function register()\n {\n $this->setupConfig();\n\n $this->bindServices();\n }", "public function register()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Console\\MakeEndpointCommand::class,\n Console\\MakeControllerCommand::class,\n Console\\MakeRepositoryCommand::class,\n Console\\MakeTransformerCommand::class,\n Console\\MakeModelCommand::class,\n ]);\n }\n\n $this->registerFractal();\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(AuthServiceProvider::class);\n }", "public function register()\n {\n\n $config = $this->app['config']['cors'];\n\n $this->app->bind('Yocome\\Cors\\CorsService', function() use ($config){\n return new CorsService($config);\n });\n\n }", "public function register()\n {\n // Bind facade\n\n $this->registerRepositoryBibdings();\n $this->registerFacades();\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(\\Laravel\\Socialite\\SocialiteServiceProvider::class);\n }", "public function register()\n {\n\n\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\UserRepository',\n 'Onlinecorrection\\Repositories\\UserRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\ClientRepository',\n 'Onlinecorrection\\Repositories\\ClientRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\ProjectRepository',\n 'Onlinecorrection\\Repositories\\ProjectRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\DocumentRepository',\n 'Onlinecorrection\\Repositories\\DocumentRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\OrderRepository',\n 'Onlinecorrection\\Repositories\\OrderRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\OrderItemRepository',\n 'Onlinecorrection\\Repositories\\OrderItemRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\DocumentImageRepository',\n 'Onlinecorrection\\Repositories\\DocumentImageRepositoryEloquent'\n );\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\PackageRepository',\n 'Onlinecorrection\\Repositories\\PackageRepositoryEloquent'\n );\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\StatusRepository',\n 'Onlinecorrection\\Repositories\\StatusRepositoryEloquent'\n );\n\n }", "public function register()\n {\n $this->registerConfig();\n\n $this->registerDataStore();\n\n $this->registerStorageFactory();\n\n $this->registerStorageManager();\n\n $this->registerSimplePhoto();\n }", "public function register()\n {\n // Default configuration file\n $this->mergeConfigFrom(\n __DIR__.'/Config/auzo_tools.php', 'auzoTools'\n );\n\n $this->registerModelBindings();\n $this->registerFacadesAliases();\n }", "public function register()\n {\n $this->app->bind(\\Cookiesoft\\Repositories\\CategoryRepository::class, \\Cookiesoft\\Repositories\\CategoryRepositoryEloquent::class);\n $this->app->bind(\\Cookiesoft\\Repositories\\BillpayRepository::class, \\Cookiesoft\\Repositories\\BillpayRepositoryEloquent::class);\n $this->app->bind(\\Cookiesoft\\Repositories\\UserRepository::class, \\Cookiesoft\\Repositories\\UserRepositoryEloquent::class);\n //:end-bindings:\n }", "public function register()\n {\n $this->app->singleton(ThirdPartyAuthService::class, function ($app) {\n return new ThirdPartyAuthService(\n config('settings.authentication_services'),\n $app['Laravel\\Socialite\\Contracts\\Factory'],\n $app['Illuminate\\Contracts\\Auth\\Factory']\n );\n });\n\n $this->app->singleton(ImageValidator::class, function ($app) {\n return new ImageValidator(\n config('settings.image.max_filesize'),\n config('settings.image.mime_types'),\n $app['Intervention\\Image\\ImageManager']\n );\n });\n\n $this->app->singleton(ImageService::class, function ($app) {\n return new ImageService(\n config('settings.image.max_width'),\n config('settings.image.max_height'),\n config('settings.image.folder')\n );\n });\n\n $this->app->singleton(RandomWordService::class, function ($app) {\n return new RandomWordService(\n $app['App\\Repositories\\WordRepository'],\n $app['Illuminate\\Session\\SessionManager'],\n config('settings.number_of_words_to_remember')\n );\n });\n\n $this->app->singleton(WordRepository::class, function ($app) {\n return new WordRepository(config('settings.min_number_of_chars_per_one_mistake_in_search'));\n });\n\n $this->app->singleton(CheckAnswerService::class, function ($app) {\n return new CheckAnswerService(\n $app['Illuminate\\Session\\SessionManager'],\n config('settings.min_number_of_chars_per_one_mistake')\n );\n });\n\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n }", "public function register()\n {\n $this->registerJWT();\n $this->registerJWSProxy();\n $this->registerJWTAlgoFactory();\n $this->registerPayload();\n $this->registerPayloadValidator();\n $this->registerPayloadUtilities();\n\n // use this if your package has a config file\n // config([\n // 'config/JWT.php',\n // ]);\n }", "public function register()\n {\n $this->registerManager();\n $this->registerConnection();\n $this->registerWorker();\n $this->registerListener();\n $this->registerFailedJobServices();\n $this->registerOpisSecurityKey();\n }", "public function register()\n {\n $this->app->register(RouterServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind('App\\Services\\TripService.php', function ($app) {\n return new TripService();\n });\n }", "public function register()\n {\n $this->registerUserComponent();\n $this->registerLocationComponent();\n\n }", "public function register()\n {\n $this->app->bind(\n \\App\\Services\\UserCertificate\\IUserCertificateService::class,\n \\App\\Services\\UserCertificate\\UserCertificateService::class\n );\n }", "public function register()\n {\n $this->app->bind(FacebookMarketingContract::class,FacebookMarketingService::class);\n }", "public function register()\n {\n /**\n * Register additional service\n * providers if they exist.\n */\n foreach ($this->providers as $provider) {\n if (class_exists($provider)) {\n $this->app->register($provider);\n }\n }\n }", "public function register()\n {\n $this->app->singleton('composer', function($app)\n {\n return new Composer($app['files'], $app['path.base']);\n });\n\n $this->app->singleton('forge', function($app)\n {\n return new Forge($app);\n });\n\n // Register the additional service providers.\n $this->app->register('Nova\\Console\\ScheduleServiceProvider');\n $this->app->register('Nova\\Queue\\ConsoleServiceProvider');\n }", "public function register()\n {\n\n\n\n $this->mergeConfigFrom(__DIR__ . '/../config/counter.php', 'counter');\n\n $this->app->register(RouteServiceProvider::class);\n\n\n }", "public function register()\r\n {\r\n $this->mergeConfigFrom(__DIR__.'/../config/colissimo.php', 'colissimo');\r\n $this->mergeConfigFrom(__DIR__.'/../config/rules.php', 'colissimo.rules');\r\n $this->mergeConfigFrom(__DIR__.'/../config/prices.php', 'colissimo.prices');\r\n $this->mergeConfigFrom(__DIR__.'/../config/zones.php', 'colissimo.zones');\r\n $this->mergeConfigFrom(__DIR__.'/../config/insurances.php', 'colissimo.insurances');\r\n $this->mergeConfigFrom(__DIR__.'/../config/supplements.php', 'colissimo.supplements');\r\n // Register the service the package provides.\r\n $this->app->singleton('colissimo', function ($app) {\r\n return new Colissimo;\r\n });\r\n }", "public function register(){\n $this->registerDependencies();\n $this->registerAlias();\n $this->registerServiceCommands();\n }", "public function register()\n {\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyService::class,\n \\App\\Services\\Survey\\SurveyService::class\n );\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyQuestionService::class,\n \\App\\Services\\Survey\\SurveyQuestionService::class\n );\n\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyAttemptService::class,\n \\App\\Services\\Survey\\SurveyAttemptService::class\n );\n\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyAttemptDataService::class,\n \\App\\Services\\Survey\\SurveyAttemptDataService::class\n );\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__ . '/../config/atlas.php', 'atlas'\n );\n \n $this->app->singleton(CoreContract::class, Core::class);\n \n $this->registerFacades([\n 'Atlas' => 'Atlas\\Facades\\Atlas',\n ]);\n }", "public function register()\n {\n $this->app->bind(TelescopeRouteServiceContract::class, TelescopeRouteService::class);\n }", "public function register()\n {\n $this->registerRepositoryBindings();\n\n $this->registerInterfaceBindings();\n\n $this->registerAuthorizationServer();\n\n $this->registerResourceServer();\n\n $this->registerFilterBindings();\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/faithgen-events.php', 'faithgen-events');\n\n $this->app->singleton(EventsService::class);\n $this->app->singleton(GuestService::class);\n }", "public function register()\n {\n $this->registerAliases();\n $this->registerFormBuilder();\n\n // Register package commands\n $this->commands([\n 'CoreDbCommand',\n 'CoreSetupCommand',\n 'CoreSeedCommand',\n 'EventEndCommand',\n 'ArchiveMaxAttempts',\n 'CronCommand',\n 'ExpireInstructors',\n 'SetTestLock',\n 'StudentArchiveTraining',\n 'TestBuildCommand',\n 'TestPublishCommand',\n ]);\n\n // Merge package config with one in outer app \n // the app-level config will override the base package config\n $this->mergeConfigFrom(\n __DIR__.'/../config/core.php', 'core'\n );\n\n // Bind our 'Flash' class\n $this->app->bindShared('flash', function () {\n return $this->app->make('Hdmaster\\Core\\Notifications\\FlashNotifier');\n });\n\n // Register package dependencies\n $this->app->register('Collective\\Html\\HtmlServiceProvider');\n $this->app->register('Bootstrapper\\BootstrapperL5ServiceProvider');\n $this->app->register('Codesleeve\\LaravelStapler\\Providers\\L5ServiceProvider');\n $this->app->register('PragmaRX\\ZipCode\\Vendor\\Laravel\\ServiceProvider');\n $this->app->register('Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider');\n\n $this->app->register('Zizaco\\Confide\\ServiceProvider');\n $this->app->register('Zizaco\\Entrust\\EntrustServiceProvider');\n }" ]
[ "0.7879658", "0.7600202", "0.74930716", "0.73852855", "0.736794", "0.7306089", "0.7291359", "0.72896826", "0.72802424", "0.7268026", "0.7267702", "0.72658145", "0.7249053", "0.72171587", "0.7208486", "0.7198799", "0.7196415", "0.719478", "0.7176513", "0.7176227", "0.7164647", "0.71484524", "0.71337837", "0.7129424", "0.71231985", "0.7120174", "0.7103653", "0.71020955", "0.70977163", "0.7094701", "0.7092148", "0.70914364", "0.7088618", "0.7087278", "0.70827085", "0.70756096", "0.7075115", "0.70741326", "0.7071857", "0.707093", "0.7070619", "0.7067406", "0.7066438", "0.7061766", "0.70562875", "0.7051525", "0.7049684", "0.70467263", "0.7043264", "0.7043229", "0.70429426", "0.7042174", "0.7038729", "0.70384216", "0.70348704", "0.7034105", "0.70324445", "0.70282733", "0.7025024", "0.702349", "0.7023382", "0.702262", "0.7022583", "0.7022161", "0.702139", "0.7021084", "0.7020801", "0.7019928", "0.70180106", "0.7017351", "0.7011482", "0.7008627", "0.7007786", "0.70065045", "0.7006424", "0.70060986", "0.69992065", "0.699874", "0.69980377", "0.69980335", "0.6997871", "0.6996457", "0.69961494", "0.6994749", "0.6991596", "0.699025", "0.6988414", "0.6987274", "0.69865865", "0.69862866", "0.69848233", "0.6978736", "0.69779474", "0.6977697", "0.6976002", "0.69734764", "0.6972392", "0.69721776", "0.6970663", "0.6968296", "0.696758" ]
0.0
-1
Bootstrap any application services.
public function boot() { ListResource::withoutWrapping(); ListCollection::withoutWrapping(); ProductByCategoryResources::withoutWrapping(); ProductByCategoryCollection::withoutWrapping(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function bootstrap(): void\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n $this->app->loadDeferredProviders();\n }", "public function boot()\n {\n // Boot here application\n }", "public function bootstrap()\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrapperList);\n }\n\n $this->app->loadDeferredProviders();\n }", "public function boot()\r\n {\r\n // Publishing is only necessary when using the CLI.\r\n if ($this->app->runningInConsole()) {\r\n $this->bootForConsole();\r\n }\r\n }", "public function boot()\n {\n $this->app->bind(IUserService::class, UserService::class);\n $this->app->bind(ISeminarService::class, SeminarService::class);\n $this->app->bind(IOrganizationService::class, OrganizationService::class);\n $this->app->bind(ISocialActivityService::class, SocialActivityService::class);\n }", "public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->loadedServices, function ($s) {\n $this->bootService($s);\n });\n\n $this->booted = true;\n }", "public function boot()\n {\n\n $this->app->bind(FileUploaderServiceInterface::class,FileUploaderService::class);\n $this->app->bind(ShopServiceInterface::class,ShopService::class);\n $this->app->bind(CategoryServiceInterface::class,CategoryService::class);\n $this->app->bind(ProductServiceInterface::class,ProductService::class);\n $this->app->bind(ShopSettingsServiceInterface::class,ShopSettingsService::class);\n $this->app->bind(FeedbackServiceInterface::class,FeedbackService::class);\n $this->app->bind(UserServiceInterface::class,UserService::class);\n $this->app->bind(ShoppingCartServiceInterface::class,ShoppingCartService::class);\n $this->app->bind(WishlistServiceInterface::class,WishlistService::class);\n $this->app->bind(NewPostApiServiceInterface::class,NewPostApiService::class);\n $this->app->bind(DeliveryAddressServiceInterface::class,DeliveryAddressService::class);\n $this->app->bind(StripeServiceInterface::class,StripeService::class);\n $this->app->bind(OrderServiceInterface::class,OrderService::class);\n $this->app->bind(MailSenderServiceInterface::class,MailSenderSenderService::class);\n }", "public function boot()\n {\n $this->setupConfig('delta_service');\n $this->setupMigrations();\n $this->setupConnection('delta_service', 'delta_service.connection');\n }", "public function boot()\n {\n $configuration = [];\n\n if (file_exists($file = getcwd() . '/kaleo.config.php')) {\n $configuration = include_once $file;\n }\n\n $this->app->singleton('kaleo', function () use ($configuration) {\n return new KaleoService($configuration);\n });\n }", "public function boot()\n {\n $this->shareResources();\n $this->mergeConfigFrom(self::CONFIG_PATH, 'amocrm-api');\n }", "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n // Ports\n $this->app->bind(\n IAuthenticationService::class,\n AuthenticationService::class\n );\n $this->app->bind(\n IBeerService::class,\n BeerService::class\n );\n\n // Adapters\n $this->app->bind(\n IUserRepository::class,\n UserEloquentRepository::class\n );\n $this->app->bind(\n IBeerRepository::class,\n BeerEloquentRepository::class\n );\n }", "public function boot()\n {\n $this->setupConfig($this->app);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->loadMigrations();\n }\n if(config($this->vendorNamespace. '::config.enabled')){\n Livewire::component($this->vendorNamespace . '::login-form', LoginForm::class);\n $this->loadRoutes();\n $this->loadViews();\n $this->loadMiddlewares();\n $this->loadTranslations();\n }\n }", "public function boot()\n {\n $source = dirname(__DIR__, 3) . '/config/config.php';\n\n if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) {\n $this->publishes([$source => config_path('dubbo_cli.php')]);\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->configure('dubbo_cli');\n }\n\n $this->mergeConfigFrom($source, 'dubbo_cli');\n }", "public function boot()\n {\n $this->package('domain/app');\n\n $this->setApplication();\n }", "public function boot()\n {\n $this->setUpConfig();\n $this->setUpConsoleCommands();\n }", "public function boot()\n {\n $this->strapRoutes();\n $this->strapViews();\n $this->strapMigrations();\n $this->strapCommands();\n\n $this->registerPolicies();\n }", "public function boot()\n {\n $this->app->singleton('LaraCurlService', function ($app) {\n return new LaraCurlService();\n });\n\n $this->loadRoutesFrom(__DIR__.'/routes/web.php');\n }", "public function boot()\n {\n $providers = $this->make('config')->get('app.console_providers', array());\n foreach ($providers as $provider) {\n $provider = $this->make($provider);\n if ($provider && method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }", "public function boot()\n {\n foreach (glob(app_path('/Api/config/*.php')) as $path) {\n $path = realpath($path);\n $this->mergeConfigFrom($path, basename($path, '.php'));\n }\n\n // 引入自定义函数\n foreach (glob(app_path('/Helpers/*.php')) as $helper) {\n require_once $helper;\n }\n // 引入 api 版本路由\n $this->loadRoutesFrom(app_path('/Api/Routes/base.php'));\n\n }", "public function bootstrap()\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n //$this->app->loadDeferredProviders();\n\n if (!$this->commandsLoaded) {\n //$this->commands();\n\n $this->commandsLoaded = true;\n }\n }", "protected function boot()\n\t{\n\t\tforeach ($this->serviceProviders as $provider)\n\t\t{\n\t\t\t$provider->boot($this);\n\t\t}\n\n\t\t$this->booted = true;\n\t}", "public function boot()\n {\n $this->setupConfig();\n //register rotating daily monolog provider\n $this->app->register(MonologProvider::class);\n $this->app->register(CircuitBreakerServiceProvider::class);\n $this->app->register(CurlServiceProvider::class);\n }", "public function boot(): void\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->services, function ($service) {\n $this->bootServices($service);\n });\n\n $this->booted = true;\n }", "public static function boot() {\n\t\tstatic::container()->boot();\n\t}", "public function boot()\n {\n include_once('ComposerDependancies\\Global.php');\n //---------------------------------------------\n include_once('ComposerDependancies\\League.php');\n include_once('ComposerDependancies\\Team.php');\n include_once('ComposerDependancies\\Matchup.php');\n include_once('ComposerDependancies\\Player.php');\n include_once('ComposerDependancies\\Trade.php');\n include_once('ComposerDependancies\\Draft.php');\n include_once('ComposerDependancies\\Message.php');\n include_once('ComposerDependancies\\Poll.php');\n include_once('ComposerDependancies\\Chat.php');\n include_once('ComposerDependancies\\Rule.php');\n\n \n include_once('ComposerDependancies\\Admin\\Users.php');\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n if ($this->app instanceof LaravelApplication) {\n $this->publishes([\n __DIR__.'/../config/state-machine.php' => config_path('state-machine.php'),\n ], 'config');\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->configure('state-machine');\n }\n }\n }", "public function boot()\n {\n $this->bootEvents();\n\n $this->bootPublishes();\n\n $this->bootTypes();\n\n $this->bootSchemas();\n\n $this->bootRouter();\n\n $this->bootViews();\n \n $this->bootSecurity();\n }", "public function boot()\n {\n //\n Configuration::environment(\"sandbox\");\n Configuration::merchantId(\"cmpss9trsxsr4538\");\n Configuration::publicKey(\"zy3x5mb5jwkcrxgr\");\n Configuration::privateKey(\"4d63c8b2c340daaa353be453b46f6ac2\");\n\n\n $modules = Directory::listDirectories(app_path('Modules'));\n\n foreach ($modules as $module)\n {\n $routesPath = app_path('Modules/' . $module . '/routes.php');\n $viewsPath = app_path('Modules/' . $module . '/Views');\n\n if (file_exists($routesPath))\n {\n require $routesPath;\n }\n\n if (file_exists($viewsPath))\n {\n $this->app->view->addLocation($viewsPath);\n }\n }\n }", "public function boot()\n {\n resolve(EngineManager::class)->extend('elastic', function () {\n return new ElasticScoutEngine(\n ElasticBuilder::create()\n ->setHosts(config('scout.elastic.hosts'))\n ->build()\n );\n });\n }", "public function boot(): void\n {\n try {\n // Just check if we have DB connection! This is to avoid\n // exceptions on new projects before configuring database options\n // @TODO: refcator the whole accessareas retrieval to be file-based, instead of db based\n DB::connection()->getPdo();\n\n if (Schema::hasTable(config('cortex.foundation.tables.accessareas'))) {\n // Register accessareas into service container, early before booting any module service providers!\n $this->app->singleton('accessareas', fn () => app('cortex.foundation.accessarea')->where('is_active', true)->get());\n }\n } catch (Exception $e) {\n // Be quiet! Do not do or say anything!!\n }\n\n $this->bootstrapModules();\n }", "public function boot()\n {\n $this->app->register(UserServiceProvider::class);\n $this->app->register(DashboardServiceProvider::class);\n $this->app->register(CoreServiceProvider::class);\n $this->app->register(InstitutionalVideoServiceProvider::class);\n $this->app->register(InstitutionalServiceProvider::class);\n $this->app->register(TrainingServiceProvider::class);\n $this->app->register(CompanyServiceProvider::class);\n $this->app->register(LearningUnitServiceProvider::class);\n $this->app->register(PublicationServiceProvider::class);\n }", "public function boot()\n {\n Schema::defaultStringLength(191);\n\n $this->app->bindMethod([SendMailPasswordReset::class, 'handle'], function ($job, $app) {\n return $job->handle($app->make(MailService::class));\n });\n\n $this->app->bindMethod([ClearTokenPasswordReset::class, 'handle'], function ($job, $app) {\n return $job->handle($app->make(PasswordResetRepository::class));\n });\n\n $this->app->bind(AuthService::class, function ($app) {\n return new AuthService($app->make(HttpService::class));\n });\n }", "public function boot()\n {\n $this->makeRepositories();\n }", "public function boot(): void\n {\n $this->loadMiddlewares();\n }", "public function boot()\n {\n $this->app->when(ChatAPIChannel::class)\n ->needs(ChatAPI::class)\n ->give(function () {\n $config = config('services.chatapi');\n return new ChatAPI(\n $config['token'],\n $config['api_url']\n );\n });\n }", "public function boot() {\r\n\t\t$hosting_service = HostResolver::get_host_service();\r\n\r\n\t\tif ( ! empty( $hosting_service ) ) {\r\n\t\t\t$this->provides[] = $hosting_service;\r\n\t\t}\r\n\t}", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n require(__DIR__ . '/../routes/console.php');\n } else {\n // Menus for BPM are done through middleware. \n Route::pushMiddlewareToGroup('web', AddToMenus::class);\n \n // Assigning to the web middleware will ensure all other middleware assigned to 'web'\n // will execute. If you wish to extend the user interface, you'll use the web middleware\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group(__DIR__ . '/../routes/web.php');\n \n // If you wish to extend the api, be sure to utilize the api middleware. In your api \n // Routes file, you should prefix your routes with api/1.0\n Route::middleware('api')\n ->namespace($this->namespace)\n ->prefix('api/1.0')\n ->group(__DIR__ . '/../routes/api.php');\n \n Event::listen(ScreenBuilderStarting::class, function($event) {\n $event->manager->addScript(mix('js/screen-builder-extend.js', 'vendor/api-connector'));\n $event->manager->addScript(mix('js/screen-renderer-extend.js', 'vendor/api-connector'));\n });\n }\n\n // load migrations\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n\n // Load our views\n $this->loadViewsFrom(__DIR__.'/../resources/views/', 'api-connector');\n\n // Load our translations\n $this->loadTranslationsFrom(__DIR__.'/../lang', 'api-connector');\n\n $this->publishes([\n __DIR__.'/../public' => public_path('vendor/api-connector'),\n ], 'api-connector');\n\n $this->publishes([\n __DIR__ . '/../database/seeds' => database_path('seeds'),\n ], 'api-connector');\n\n $this->app['events']->listen(PackageEvent::class, PackageListener::class);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->bindCommands();\n $this->registerCommands();\n $this->app->bind(InstallerContract::class, Installer::class);\n\n $this->publishes([\n __DIR__.'/../config/exceptionlive.php' => base_path('config/exceptionlive.php'),\n ], 'config');\n }\n\n $this->registerMacros();\n }", "public function boot(){\r\n $this->app->configure('sdk');\r\n $this->publishes([\r\n __DIR__.'/../../resources/config/sdk.php' => config_path('sdk.php')\r\n ]);\r\n $this->mergeConfigFrom(__DIR__.'/../../resources/config/sdk.php','sdk');\r\n\r\n $api = config('sdk.api');\r\n foreach($api as $key => $value){\r\n $this->app->singleton($key,$value);\r\n }\r\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n EnvironmentCommand::class,\n EventGenerateCommand::class,\n EventMakeCommand::class,\n JobMakeCommand::class,\n KeyGenerateCommand::class,\n MailMakeCommand::class,\n ModelMakeCommand::class,\n NotificationMakeCommand::class,\n PolicyMakeCommand::class,\n ProviderMakeCommand::class,\n RequestMakeCommand::class,\n ResourceMakeCommand::class,\n RuleMakeCommand::class,\n ServeCommand::class,\n StorageLinkCommand::class,\n TestMakeCommand::class,\n ]);\n }\n }", "public function boot()\n {\n $this->app->bind(WeatherInterface::class, OpenWeatherMapService::class);\n $this->app->bind(OrderRepositoryInterface::class, EloquentOrderRepository::class);\n $this->app->bind(NotifyInterface::class, EmailNotifyService::class);\n }", "public function boot()\n {\n $this->app->bind(DateService::class,DateServiceImpl::class);\n $this->app->bind(DisasterEventQueryBuilder::class,DisasterEventQueryBuilderImpl::class);\n $this->app->bind(MedicalFacilityQueryBuilder::class,MedicalFacilityQueryBuilderImpl::class);\n $this->app->bind(RefugeCampQueryBuilder::class,RefugeCampQueryBuilderImpl::class);\n $this->app->bind(VictimQueryBuilder::class,VictimQueryBuilderImpl::class);\n $this->app->bind(VillageQueryBuilder::class,VillageQueryBuilderImpl::class);\n }", "public function boot()\n {\n\t\tif ( $this->app->runningInConsole() ) {\n\t\t\t$this->loadMigrationsFrom(__DIR__.'/migrations');\n\n//\t\t\t$this->publishes([\n//\t\t\t\t__DIR__.'/config/scheduler.php' => config_path('scheduler.php'),\n//\t\t\t\t__DIR__.'/console/CronTasksList.php' => app_path('Console/CronTasksList.php'),\n//\t\t\t\t__DIR__.'/views' => resource_path('views/vendor/scheduler'),\n//\t\t\t]);\n\n//\t\t\tapp('Revolta77\\ScheduleMonitor\\Conntroller\\CreateController')->index();\n\n//\t\t\t$this->commands([\n//\t\t\t\tConsole\\Commands\\CreateController::class,\n//\t\t\t]);\n\t\t}\n\t\t$this->loadRoutesFrom(__DIR__.'/routes/web.php');\n }", "public function boot()\n {\n $this->bootPackages();\n }", "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->commands($this->load(__DIR__.'/../Console', Command::class));\n }\n }", "public function boot(): void\n {\n $this->publishes(\n [\n __DIR__ . '/../config/laravel_entity_services.php' =>\n $this->app->make('path.config') . DIRECTORY_SEPARATOR . 'laravel_entity_services.php',\n ],\n 'laravel_repositories'\n );\n $this->mergeConfigFrom(__DIR__ . '/../config/laravel_entity_services.php', 'laravel_entity_services');\n\n $this->registerCustomBindings();\n }", "public function boot()\n {\n // DEFAULT STRING LENGTH\n Schema::defaultStringLength(191);\n\n // PASSPORT\n Passport::routes(function (RouteRegistrar $router)\n {\n $router->forAccessTokens();\n });\n Passport::tokensExpireIn(now()->addDays(1));\n\n // SERVICES, REPOSITORIES, CONTRACTS BINDING\n $this->app->bind('App\\Contracts\\IUser', 'App\\Repositories\\UserRepository');\n $this->app->bind('App\\Contracts\\IUserType', 'App\\Repositories\\UserTypeRepository');\n $this->app->bind('App\\Contracts\\IApiToken', 'App\\Services\\ApiTokenService');\n $this->app->bind('App\\Contracts\\IModule', 'App\\Repositories\\ModuleRepository');\n $this->app->bind('App\\Contracts\\IModuleAction', 'App\\Repositories\\ModuleActionRepository');\n }", "public function bootstrap(): void\n {\n $globalConfigurationBuilder = (new GlobalConfigurationBuilder())->withEnvironmentVariables()\n ->withPhpFileConfigurationSource(__DIR__ . '/../config.php');\n (new BootstrapperCollection())->addMany([\n new DotEnvBootstrapper(__DIR__ . '/../.env'),\n new ConfigurationBootstrapper($globalConfigurationBuilder),\n new GlobalExceptionHandlerBootstrapper($this->container)\n ])->bootstrapAll();\n }", "public function boot()\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'deniskisel');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', 'deniskisel');\n// $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n // $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n $this->bootingDomain();\n\n $this->registerCommands();\n $this->registerListeners();\n $this->registerPolicies();\n $this->registerRoutes();\n $this->registerBladeComponents();\n $this->registerLivewireComponents();\n $this->registerSpotlightCommands();\n\n $this->bootedDomain();\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->registerMigrations();\n $this->registerMigrationFolder();\n $this->registerConfig();\n }\n }", "public function boot()\n {\n $this->bootModulesMenu();\n $this->bootSkinComposer();\n $this->bootCustomBladeDirectives();\n }", "public function boot(): void\n {\n $this->app->bind(Telegram::class, static function () {\n return new Telegram(\n config('services.telegram-bot-api.token'),\n new HttpClient()\n );\n });\n }", "public function boot()\n {\n\n if (! config('app.installed')) {\n return;\n }\n\n $this->loadRoutesFrom(__DIR__ . '/Routes/admin.php');\n $this->loadRoutesFrom(__DIR__ . '/Routes/public.php');\n\n $this->loadMigrationsFrom(__DIR__ . '/Database/Migrations');\n\n// $this->loadViewsFrom(__DIR__ . '/Resources/Views', 'portfolio');\n\n $this->loadTranslationsFrom(__DIR__ . '/Resources/Lang/', 'contact');\n\n //Add menu to admin panel\n $this->adminMenu();\n\n }", "public function boot()\n {\n if (! config('app.installed')) {\n return;\n }\n\n $this->app['config']->set([\n 'scout' => [\n 'driver' => setting('search_engine', 'mysql'),\n 'algolia' => [\n 'id' => setting('algolia_app_id'),\n 'secret' => setting('algolia_secret'),\n ],\n ],\n ]);\n }", "protected function bootServiceProviders()\n {\n foreach($this->activeProviders as $provider)\n {\n // check if the service provider has a boot method.\n if (method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }", "public function boot(): void\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'imc');\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'imc');\n $this->registerPackageRoutes();\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n // Larapex Livewire\n $this->mergeConfigFrom(__DIR__ . '/../configs/larapex-livewire.php', 'larapex-livewire');\n\n $this->loadViewsFrom(__DIR__ . '/../resources/views', 'larapex-livewire');\n\n $this->registerBladeDirectives();\n\n if ($this->app->runningInConsole()) {\n $this->registerCommands();\n $this->publishResources();\n }\n }", "public function boot()\n {\n // Bootstrap code here.\n $this->app->singleton(L9SmsApiChannel::class, function () {\n $config = config('l9smsapi');\n if (empty($config['token']) || empty($config['service'])) {\n throw new \\Exception('L9SmsApi missing token and service in config');\n }\n\n return new L9SmsApiChannel($config['token'], $config['service']);\n });\n\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/../config/l9smsapi.php' => config_path('l9smsapi.php'),\n ], 'config');\n }\n }", "public function boot()\n\t{\n\t\t$this->bindRepositories();\n\t}", "public function boot()\n {\n if (!$this->app->runningInConsole()) {\n return;\n }\n\n $this->commands([\n ListenCommand::class,\n InstallCommand::class,\n EventsListCommand::class,\n ObserverMakeCommand::class,\n ]);\n\n foreach ($this->listen as $event => $listeners) {\n foreach ($listeners as $listener) {\n RabbitEvents::listen($event, $listener);\n }\n }\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n MultiAuthInstallCommand::class,\n ]);\n }\n }", "public function boot() {\n\n\t\t$this->registerProviders();\n\t\t$this->bootProviders();\n\t\t$this->registerProxies();\n\t}", "public function boot(): void\n {\n // routes\n $this->loadRoutes();\n // assets\n $this->loadAssets('assets');\n // configuration\n $this->loadConfig('configs');\n // views\n $this->loadViews('views');\n // view extends\n $this->extendViews();\n // translations\n $this->loadTranslates('views');\n // adminer\n $this->loadAdminer('adminer');\n // commands\n $this->loadCommands();\n // gates\n $this->registerGates();\n // listeners\n $this->registerListeners();\n // settings\n $this->applySettings();\n }", "public function boot()\n {\n $this->setupFacades();\n $this->setupViews();\n $this->setupBlades();\n }", "public function boot()\n {\n\n $this->app->translate_manager->addTranslateProvider(TranslateMenu::class);\n\n\n\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n $this->loadMigrationsFrom(__DIR__ . '/../migrations/');\n\n\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__ . '/../config/larkeauth-rbac-model.conf' => config_path('larkeauth-rbac-model.conf.larkeauth'),\n __DIR__ . '/../config/larkeauth.php' => config_path('larkeauth.php.larkeauth')\n ], 'larke-auth-config');\n\n $this->commands([\n Commands\\Install::class,\n Commands\\GroupAdd::class,\n Commands\\PolicyAdd::class,\n Commands\\RoleAssign::class,\n ]);\n }\n\n $this->mergeConfigFrom(__DIR__ . '/../config/larkeauth.php', 'larkeauth');\n\n $this->bootObserver();\n }", "public function boot(): void\n {\n $this->app\n ->when(RocketChatWebhookChannel::class)\n ->needs(RocketChat::class)\n ->give(function () {\n return new RocketChat(\n new HttpClient(),\n Config::get('services.rocketchat.url'),\n Config::get('services.rocketchat.token'),\n Config::get('services.rocketchat.channel')\n );\n });\n }", "public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n $this->app->registerConfiguredProvidersInRequest();\n\n $this->fireAppCallbacks($this->bootingCallbacks);\n\n /** array_walk\n * If when a provider booting, it reg some other providers,\n * then the new providers added to $this->serviceProviders\n * then array_walk will loop the new ones and boot them. // pingpong/modules 2.0 use this feature\n */\n array_walk($this->serviceProviders, function ($p) {\n $this->bootProvider($p);\n });\n\n $this->booted = true;\n\n $this->fireAppCallbacks($this->bootedCallbacks);\n }", "public function boot()\n {\n $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n\t{\n\t\t$this->package('atlantis/admin');\n\n\t\t#i: Set the locale\n\t\t$this->setLocale();\n\n $this->registerServiceAdminValidator();\n $this->registerServiceAdminFactory();\n $this->registerServiceAdminDataTable();\n $this->registerServiceModules();\n\n\t\t#i: Include our filters, view composers, and routes\n\t\tinclude __DIR__.'/../../filters.php';\n\t\tinclude __DIR__.'/../../views.php';\n\t\tinclude __DIR__.'/../../routes.php';\n\n\t\t$this->app['events']->fire('admin.ready');\n\t}", "public function boot()\n {\n $this->app->booted(function () {\n $this->callMethodIfExists('jobs');\n });\n }", "public function boot()\n {\n $this->bootSetTimeLocale();\n $this->bootBladeHotelRole();\n $this->bootBladeHotelGuest();\n $this->bootBladeIcon();\n }", "public function boot(): void\n {\n $this->registerRoutes();\n $this->registerResources();\n $this->registerMixins();\n\n if ($this->app->runningInConsole()) {\n $this->offerPublishing();\n $this->registerMigrations();\n }\n }", "public function boot()\n {\n $this->dispatch(new SetCoreConnection());\n $this->dispatch(new ConfigureCommandBus());\n $this->dispatch(new ConfigureTranslator());\n $this->dispatch(new LoadStreamsConfiguration());\n\n $this->dispatch(new InitializeApplication());\n $this->dispatch(new AutoloadEntryModels());\n $this->dispatch(new AddAssetNamespaces());\n $this->dispatch(new AddImageNamespaces());\n $this->dispatch(new AddViewNamespaces());\n $this->dispatch(new AddTwigExtensions());\n $this->dispatch(new RegisterAddons());\n }", "public function boot(): void\n {\n $this->loadViews();\n $this->loadTranslations();\n\n if ($this->app->runningInConsole()) {\n $this->publishMultipleConfig();\n $this->publishViews(false);\n $this->publishTranslations(false);\n }\n }", "public function boot()\n {\n $this->bootForConsole();\n $this->loadRoutesFrom(__DIR__ . '/routes/web.php');\n $this->loadViewsFrom(__DIR__ . '/./../resources/views', 'bakerysoft');\n }", "public function boot()\n {\n $this->app->booted(function () {\n $this->defineRoutes();\n });\n $this->defineResources();\n $this->registerDependencies();\n }", "public function boot()\n {\n $this->app->bind(CustomersRepositoryInterface::class, CustomersRepository::class);\n $this->app->bind(CountryToCodeMapperInterface::class, CountryToCodeMapper::class);\n $this->app->bind(PhoneNumbersValidatorInterface::class, PhoneNumbersRegexValidator::class);\n $this->app->bind(CustomersFilterServiceInterface::class, CustomersFilterService::class);\n $this->app->bind(CacheInterface::class, CacheAdapter::class);\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([$this->configPath() => config_path('oauth.php')], 'oauth');\n }\n\n app()->bind(ClientToken::class, function () {\n return new ClientToken();\n });\n\n app()->bind(TokenParser::class, function () {\n return new TokenParser(\n app()->get(Request::class)\n );\n });\n\n app()->bind(OAuthClient::class, function () {\n return new OAuthClient(\n app()->get(Request::class),\n app()->get(ClientToken::class)\n );\n });\n\n app()->bind(AccountService::class, function () {\n return new AccountService(app()->get(OAuthClient::class));\n });\n }", "public function boot()\n {\n Client::observe(ClientObserver::class);\n $this->app->bind(ClientRepositoryInterface::class, function ($app) {\n return new ClientRepository(Client::class);\n });\n $this->app->bind(UserRepositoryInterface::class, function ($app) {\n return new UserRepository(User::class);\n });\n }", "public function boot()\n {\n $this->setupFacades(); \n //$this->setupConfigs(); \n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n //\n }\n\n $this->loadRoutesFrom(__DIR__ . '/routes.php');\n }", "public function boot()\n {\n $path = __DIR__.'/../..';\n\n $this->package('clumsy/cms', 'clumsy', $path);\n\n $this->registerAuthRoutes();\n $this->registerBackEndRoutes();\n\n require $path.'/helpers.php';\n require $path.'/errors.php';\n require $path.'/filters.php';\n\n if ($this->app->runningInConsole()) {\n $this->app->make('Clumsy\\CMS\\Clumsy');\n }\n\n }", "public function boot()\n {\n $this->mergeConfigFrom(__DIR__ . '/../../config/bs4.php', 'bs4');\n $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'bs');\n $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'bs');\n\n if ($this->app->runningInConsole())\n {\n $this->publishes([\n __DIR__ . '/../../resources/views' => resource_path('views/vendor/bs'),\n ], 'views');\n\n $this->publishes([\n __DIR__ . '/../../resources/lang' => resource_path('lang/vendor/bs'),\n ], 'lang');\n\n $this->publishes([\n __DIR__ . '/../../config' => config_path(),\n ], 'config');\n }\n }", "public function boot()\n {\n $this->client = new HttpClient([\n 'base_uri' => 'https://api.ipfinder.io/v1/',\n 'headers' => [\n 'User-Agent' => 'Laravel-GeoIP-Torann',\n ],\n 'query' => [\n 'token' => $this->config('key'),\n ],\n ]);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Check::class,\n Clear::class,\n Fix::class,\n Fresh::class,\n Foo::class,\n Ide::class,\n MakeDatabase::class,\n Ping::class,\n Version::class,\n ]);\n }\n }", "public function boot()\n {\n $app = $this->app;\n\n if (!$app->runningInConsole()) {\n return;\n }\n\n $source = realpath(__DIR__ . '/config/config.php');\n\n if (class_exists('Illuminate\\Foundation\\Application', false)) {\n // L5\n $this->publishes([$source => config_path('sniffer-rules.php')]);\n $this->mergeConfigFrom($source, 'sniffer-rules');\n } elseif (class_exists('Laravel\\Lumen\\Application', false)) {\n // Lumen\n $app->configure('sniffer-rules');\n $this->mergeConfigFrom($source, 'sniffer-rules');\n } else {\n // L4\n $this->package('chefsplate/sniffer-rules', null, __DIR__);\n }\n }", "public function boot()\r\n\t{\r\n\t\t$this->package('estey/hipsupport');\r\n\t\t$this->registerHipSupport();\r\n\t\t$this->registerHipSupportOnlineCommand();\r\n\t\t$this->registerHipSupportOfflineCommand();\r\n\r\n\t\t$this->registerCommands();\r\n\t}", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n ControllerMakeCommand::class,\n ServiceMakeCommand::class,\n RepositoryMakeCommand::class,\n ModelMakeCommand::class,\n RequestRuleMakeCommand::class,\n ]);\n }\n }", "public function boot() {\n $srcDir = __DIR__ . '/../';\n \n $this->package('baseline/baseline', 'baseline', $srcDir);\n \n include $srcDir . 'Http/routes.php';\n include $srcDir . 'Http/filters.php';\n }", "public function boot()\n {\n $this->app->bind('App\\Services\\ProviderAccountService', function() {\n return new ProviderAccountService;\n });\n }", "public function boot()\n {\n $this->loadViewsFrom(__DIR__ . '/resources/views', 'Counters');\n\n $this->loadTranslationsFrom(__DIR__ . '/resources/lang', 'Counters');\n\n\n //To load migration files directly from the package\n// $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n\n\n $this->app->booted(function () {\n $loader = AliasLoader::getInstance();\n $loader->alias('Counters', Counters::class);\n\n });\n\n $this->publishes([\n __DIR__ . '/../config/counter.php' => config_path('counter.php'),\n ], 'config');\n\n\n\n $this->publishes([\n __DIR__.'/../database/migrations/0000_00_00_000000_create_counters_tables.php' => $this->app->databasePath().\"/migrations/0000_00_00_000000_create_counters_tables.php\",\n ], 'migrations');\n\n\n if ($this->app->runningInConsole()) {\n $this->commands([\\Maher\\Counters\\Commands\\MakeCounter::class]);\n }\n\n\n }", "public function boot(Application $app)\n {\n\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }" ]
[ "0.7344842", "0.7212776", "0.7207748", "0.7123287", "0.7109729", "0.70822036", "0.7076881", "0.70718396", "0.7051853", "0.7025475", "0.7011949", "0.70043486", "0.6955807", "0.69322443", "0.69319373", "0.69272774", "0.6911386", "0.69069713", "0.6898877", "0.6898432", "0.6896597", "0.6889767", "0.6886577", "0.6880688", "0.6875815", "0.6874972", "0.68696195", "0.6864291", "0.6864246", "0.68631536", "0.68599164", "0.6857919", "0.685537", "0.68552583", "0.68522125", "0.6839775", "0.683261", "0.6831196", "0.68272495", "0.68250644", "0.68241394", "0.68181944", "0.68132496", "0.68117976", "0.6811785", "0.6808445", "0.68066794", "0.680175", "0.68005246", "0.67994386", "0.67969066", "0.67912513", "0.67884964", "0.678574", "0.678558", "0.6783794", "0.67782456", "0.6773669", "0.6766658", "0.6766194", "0.67617613", "0.67611295", "0.6758855", "0.6756636", "0.6754412", "0.6751842", "0.6747439", "0.6744991", "0.67441815", "0.6743506", "0.67400324", "0.6739403", "0.6738356", "0.6738189", "0.6731425", "0.6730627", "0.67293024", "0.6726232", "0.67261064", "0.67192256", "0.6716676", "0.6716229", "0.671442", "0.6713091", "0.6702467", "0.66990495", "0.66913867", "0.6689953", "0.66861963", "0.66840357", "0.66826946", "0.6681548", "0.6680455", "0.6676407", "0.6675645", "0.6672465", "0.66722375", "0.66722375", "0.66722375", "0.66722375", "0.66722375" ]
0.0
-1
Calculate the total reward amount of the Monthly Service Excellence rewards program for each enrolled agency in a given year/month
public function calculateReward(int $year, int $month = null): array { $whereClause = [ ['achieved', true], ['agency_rewards_program.rewards_program_id', RewardsProgram::MONTHLY_SERVICE_EXCELLENCE_ID] ]; if ($year) { $whereClause[] = ['year', $year]; } if ($month) { $whereClause[] = ['month', $month]; } $selectClause = "agencies.name AS agency, COUNT(*) * ? AS reward"; $agencyRewards = $this->serviceExcellence ::selectRaw($selectClause, [self::REWARD_FEE]) ->join('agencies', 'agencies.id', '=', 'service_excellences.agency_id') ->join('agency_rewards_program', 'agency_rewards_program.agency_id', 'agencies.id') ->where($whereClause) ->groupBy('service_excellences.agency_id') ->get(); return $agencyRewards->toArray(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function earnedTotal($id=null, $associate=null, $start_year=null, $end_year=null)\n {\n $attend = array();\n $leave = array();\n $total_earned = 0;\n $total_enjoyed = 0;\n $total_due = 0;\n $total_work = 0;\n\n #---------------------------------\n //This is for showing the summation of yearly worked days\n $total_workday_string=\"(\";\n //This is for showing the summation of yearly Earned Leaves\n $total_earned_leave_string=\"(\";\n //This is for showing the summation of yearly enojyed leaves\n $total_enjoyed_Leave_sting=\"(\";\n\n for ($i=$start_year; $i<=$end_year; $i++)\n {\n # -----------------------------------\n // total due earned due\n $attend[$i] = DB::table(\"hr_attendance_mbm\")\n ->where(\"as_id\", $id)\n ->whereYear('in_time', '=', $i)\n ->count(); /// total present return\n\n $total_work += $attend[$i];\n //make total earned\n $this_year_earned = number_format((!empty($attend[$i])?($attend[$i]/18):0), 2);\n $total_earned +=$this_year_earned;\n\n\n # -----------------------------------\n $leave[$i] = DB::table(\"hr_leave\")\n ->select(\n DB::raw(\"\n SUM(CASE WHEN leave_type = 'Earned' THEN DATEDIFF(leave_to, leave_from)+1 END) AS enjoyed\n \")\n )\n ->where(\"leave_ass_id\", $associate)\n ->where(\"leave_status\", \"1\")\n ->where(DB::raw(\"YEAR(leave_from)\"), '=', $i)\n ->value(\"enjoyed\");\n /// total enjoyed leave\n $this_year_enjoyed= number_format((!empty($leave[$i])?$leave[$i]:0), 2);\n $total_enjoyed+=$this_year_enjoyed;\n # -----------------------------------\n // making of summation string\n $total_workday_string.=$attend[$i];\n $total_earned_leave_string.=$this_year_earned;\n $total_enjoyed_Leave_sting.=$this_year_enjoyed;\n if($i<$end_year){\n $total_workday_string.=\"+\";\n $total_earned_leave_string.=\"+\";\n $total_enjoyed_Leave_sting.=\"+\";\n }\n if($i== $end_year){\n $total_workday_string.=\")=\";\n $total_earned_leave_string.=\")=\";\n $total_enjoyed_Leave_sting.=\")=\";\n }\n\n }\n\n $total_due = $total_earned-$total_enjoyed; /// total kotodin suti paona ase\n //return $total_due;\n\n return array('total_earned' => $total_earned,\n 'totaldue' => $total_due,\n 'total_enjoyed' => $total_enjoyed,\n 'total_working' => $total_work,\n 'total_workday_string' => $total_workday_string,\n 'total_earned_leave_string' => $total_earned_leave_string,\n 'total_enjoyed_Leave_sting' => $total_enjoyed_Leave_sting\n );\n }", "function Monthly_Requests_Urgent($year) {\r\n $query2 = $this->db->query(\"SELECT MONTHNAME(designation_date) as month, YEAR(designation_date) as year,DATE_FORMAT(designation_date, '%m') as m,\r\n COUNT(id) as 'total'\r\n FROM request\r\n WHERE DATE_FORMAT(designation_date, '%Y') = '$year' AND urgency = '1'\r\n GROUP BY MONTHNAME(designation_date)\r\n ORDER BY MONTH(designation_date) ASC\");\r\n\r\n return $result = $query2->result();\r\n }", "function getMonthTotal(){\n\t\t$total = $this->hhRentAmount;\n\t\tforeach ($this->members as $member){\n\t\t\tforeach ($member->getBills() as $bill){\n\t\t\t\t$total += $bill->getBillAmount();\n\t\t\t}\n\t\t}\n\t\treturn $total;\n\t}", "public static function calculateEffectiveAmendmentValues($rowData)\n {\n // These are already sorted by ascending source_fiscal\n\n foreach ($rowData as $row) {\n // Fix for situations where the end year is earlier than the start year\n // use whichever is later of the start year or the source year (when it was published).\n if ($row->gen_end_year < $row->gen_start_year) {\n $row->gen_end_year = $row->gen_start_year;\n if ($row->source_year > $row->gen_end_year) {\n $row->gen_end_year = $row->source_year;\n }\n }\n }\n\n // We're using Collection methods here, which are great:\n // https://laravel.com/docs/5.6/collections\n\n // Step 1: find the earliest and latest years of the contract\n $earliestYear = $rowData->min('gen_start_year');\n\n // Update: rather than the maximum end year, it should actually be the end year of the *last* row in the (ordered by source_fiscal) array of amendments.\n // In some cases, the contract gets *shortened* from what was originally planned.\n // $latestYear = $rowData->max('gen_end_year');\n $latestYear = $rowData->last()->gen_end_year;\n\n // Edge cases where the end year is earlier than the start year, use the last one's start year instead:\n if ($rowData->last()->gen_start_year > $rowData->last()->gen_end_year) {\n $latestYear = $rowData->last()->gen_start_year;\n }\n\n $originalValue = $rowData->min('original_value');\n if (! $originalValue) {\n $originalValue = $rowData->min('contract_value');\n }\n\n // Step 2: create an array range of each year in this set, and then match each year with the most updated amendment row ID\n\n $years = range($earliestYear, $latestYear);\n $yearMapping = [];\n\n $firstRow = 1;\n $genAmendmentGroupId = null;\n\n foreach ($rowData as $row) {\n // Store this for error tracking later (it's the same for all rows in rowData)\n if (! $genAmendmentGroupId) {\n $genAmendmentGroupId = $row->gen_amendment_group_id;\n }\n\n foreach ($years as $year) {\n if ($firstRow) {\n // Use the start_year since this is the beginning\n // even if the source_year is later (if it was retroactively published)\n if ($row->gen_start_year <= $year && $row->gen_end_year >= $year) {\n $yearMapping[$year] = $row->id;\n }\n } else {\n // Use the source_year instead of the start_year\n if ($row->source_year <= $year && $row->gen_end_year >= $year) {\n $yearMapping[$year] = $row->id;\n }\n }\n }\n\n $firstRow = 0;\n }\n\n // dd($yearMapping);\n // var_dump($yearMapping);\n // array:3 [\n // 2010 => 1251303\n // 2011 => 1250608\n // 2012 => 1250608\n // ]\n\n // Step 3: loop through rows again and set effective start and end years\n $cumulativeTotal = 0;\n $firstRow = 1;\n $rowIdsToUpdate = [];\n\n foreach ($rowData as $row) {\n $effectiveStartYear = null;\n $effectiveEndYear = null;\n\n foreach ($yearMapping as $year => $rowId) {\n if ($rowId == $row->id) {\n // If they match, update the effective start and end years\n // echo \"Match: \" . $row->id . \" for \" . $year . \"\\n\";\n if ($effectiveStartYear == null || $year < $effectiveStartYear) {\n $effectiveStartYear = $year;\n }\n if ($effectiveEndYear == null || $year > $effectiveEndYear) {\n $effectiveEndYear = $year;\n }\n } else {\n // echo \"No match for: \" . $row->id . \" for \" . $year . \"\\n\";\n }\n }\n\n if ($effectiveStartYear == null || $effectiveEndYear == null) {\n // If this row ID isn't in the yearMapping array, skip to the next row.\n // echo \"Skipping... \\n\";\n continue;\n }\n\n $rowIdsToUpdate[] = $row->id;\n // echo \"here for \" . $row->id . \"\\n\";\n\n $row->gen_effective_start_year = $effectiveStartYear;\n $row->gen_effective_end_year = $effectiveEndYear;\n\n // Effective total value is, the theoretical yearly value of the contract over the originally planned start and end years\n if ($firstRow) {\n $theoreticalYearlyValue = $row->contract_value / ($row->gen_end_year - $row->gen_start_year + 1);\n } else {\n // Update 2021-04-03: Subtract the cumulative total from the latest contract value here, before averaging across the years between the row's end year and source year\n $theoreticalYearlyValue = ($row->contract_value - $cumulativeTotal) / ($row->gen_end_year - $row->source_year + 1);\n }\n \n\n // dd($effectiveEndYear);\n\n $row->gen_effective_total_value = $theoreticalYearlyValue * ($effectiveEndYear - $effectiveStartYear + 1);\n $row->gen_effective_yearly_value = $row->gen_effective_total_value / ($effectiveEndYear - $effectiveStartYear + 1);\n\n $cumulativeTotal += $row->gen_effective_total_value;\n\n $firstRow = 0;\n }\n\n $updatesSaved = 0;\n // Update the rows in the database:\n foreach ($rowData as $index => $row) {\n $isFinalValue = 0;\n if ($index == count($rowData) - 1) {\n $isFinalValue = 1;\n }\n \n\n // Make sure there are actually changes\n if (in_array($row->id, $rowIdsToUpdate)) {\n DB::table('l_contracts')\n ->where('owner_acronym', '=', $row->owner_acronym)\n ->where('id', '=', $row->id)\n ->update([\n 'gen_effective_start_year' => $row->gen_effective_start_year,\n 'gen_effective_end_year' => $row->gen_effective_end_year,\n 'gen_effective_total_value' => $row->gen_effective_total_value,\n 'gen_effective_yearly_value' => $row->gen_effective_yearly_value,\n 'gen_original_value' => $originalValue,\n 'gen_is_most_recent_value' => $isFinalValue,\n ]);\n $updatesSaved = 1;\n // echo \"Updated \" . $row->id . \"\\n\";\n } else {\n // Update the effective total and yearly values, but not the start and end years\n // these are amendments that were overridden by other amendments in the same year.\n DB::table('l_contracts')\n ->where('owner_acronym', '=', $row->owner_acronym)\n ->where('id', '=', $row->id)\n ->update([\n 'gen_effective_total_value' => 0,\n 'gen_effective_yearly_value' => 0,\n ]);\n }\n }\n\n if ($updatesSaved) {\n return true;\n } else {\n echo \"No updates for gen_amendment_group_id \" . $genAmendmentGroupId . \"\\n\";\n return false;\n }\n }", "public function getMonthPartnersIncome($year, $month) {\n //$vydaje = $this->db->table('translator_project')->where('accounted', 1)->where('translator_id=? OR translator_id=?', 1, 2)->where('project_id', $this->db->table('project')->select('id')->where('invoice_date LIKE ?', $year.'-'.$month.'%'))->sum('payment');\n //return $prijmy - $vydaje;\n return 0;\n }", "public static function totalExperience($id){\n $experiences = Experience::where('user_id',$id)->get();\n $months = 0;\n $years = 0;\n $days = 0;\n foreach ($experiences as $experience){\n $start_date = strtotime($experience->start_date);\n if ($experience->is_current==1 && $experience->end_date==\"Continue\"){\n $end_date = strtotime(date('Y-m-d'))+$days*60*60*24;\n }else{\n $end_date = strtotime($experience->end_date)+$days*60*60*24;\n }\n while (strtotime('+1 MONTH', $start_date) < $end_date) {\n $months++;\n $start_date = strtotime('+1 MONTH', $start_date);\n if($months>11){\n $years++;\n $months=0;\n }\n }\n $days = ($end_date - $start_date) / (60*60*24);\n\n }\n return $years.\" year, \". $months. ' month, '. $days . ' days';\n }", "public function monthlyReport($year, $month){\n\t\t$result = collect();\n\t\tforeach(Employee::getActiveEmployee(true, $year, $month) as $employee){\n\t\t\t$result->put($employee->nip, $employee->getAttendanceSummaryByMonth($year, $month));\n\t\t}\n\t\t\n\t\t$return = collect();\n\t\t$returnCount = $result->count();\n\t\tforeach($this->resutlKeys as $key){\n\t\t\t$val = collect($result->map(function($summary) use($key, $returnCount) {\n\t\t\t\t\t\treturn isset($summary[$key])? $summary[$key] : 0;\n\t\t\t\t\t}))->sum();\n\t\t\t$return->put($key, $val);\n\t\t}\n\t\t\n\t\treturn $return;\n\t}", "function monthlyBalancedData(){\n\t\t//results to be returned\n\t\t$results= [];\n\t\t//the total expense of all the month of all users\n\t\t$results['total'] = $this->getMonthTotal();\n\t\t//the fair amount to be paid by each member\n\t\t// total/number of members on household\n\t\t$results['fairAmount'] = $results['total']/$this->getNumberOfMembers();\n\t\tforeach ($this->members as $member) {\n\t\t\t//retrieves the individual expenses\n\t\t\t$name = $member->getUserFirstName();\n\t\t\t$results['members'][$name] = $member->billsDistribution();\n\t\t}\n\t\treturn $results;\n\t}", "function Monthly_Requests_Assignment($year) {\r\n $query2 = $this->db->query(\"SELECT DISTINCT(labref), MONTHNAME(date_issued) as month, YEAR(date_issued) as year,DATE_FORMAT(date_issued, '%m') as m,\r\n COUNT(id) as 'total'\r\n FROM sample_details\r\n WHERE DATE_FORMAT(date_issued, '%Y') = '$year' \r\n AND activity='Analysis'\r\n GROUP BY MONTHNAME(date_issued)\r\n ORDER BY MONTH(date_issued) ASC\");\r\n\r\n return $result = $query2->result();\r\n }", "public function calculate_end_month_bonus()\n {\n $year = (new DateTime)->format(\"Y\");\n $month = (new DateTime)->format(\"n\");\n\n if($month == 1){\n $month = 12;\n $year = $year - 1;\n } else {\n $month = $month - 1;\n }\n\n //count for DO Rank Members\n $do_members = ActiveDo::all();\n $sdo_members = ActiveSdo::all();\n //$userPurchases = UserPurchase::all(); // originall\n $userPurchases = UserPurchase::groupBy('user_id', 'product_id')\n ->selectRaw('user_id, product_id, sum(price) as price, sum(pv) as pv, count(*) as quantity')\n ->whereMonth('created_at', $month)\n ->whereYear('created_at', $year)\n ->get();\n //$userStores = Store::all(); // originall\n $userStores = Store::groupBy('user_id', 'product_id')\n ->selectRaw('user_id, product_id, sum(price) as price, sum(pv) as pv, count(*) as quantity')\n ->whereMonth('created_at', $month)\n ->whereYear('created_at', $year)\n ->get();\n \n $next_do_members= $do_members;\n $i = 0;\n $n = count($do_members);\n\n $total_sales1 = UserPurchase::sum('price');\n $total_sales2 = Store::sum('price');\n $total_sales = $total_sales1 + $total_sales2;\n\n $total_pv1 = UserPurchase::sum('pv');\n $total_pv2 = Store::sum('pv');\n $total_pv = $total_pv1 + $total_pv2;\n\n //$sale = Sale::where('year', $year)->where('month', $month)->first();\n $sale = Sale::firstOrCreate([]);\n $sale->re_total_sale = $total_sales;\n $sale->re_total_pv = $total_pv;\n $sale->save();\n\n // echo '<br>';\n // echo '<pre>';\n // print_r($userStores);\n // echo '<pre>';\n // echo '<br>';\n\n foreach ($userPurchases as $userPurchase) \n {\n $this->retail_price($userPurchase->user_id, $userPurchase->price, $userPurchase->product_id);\n //$this->upline_personal_rebate($userPurchase->user_id, $userPurchase->pv);\n $this->personal_rebate($userPurchase->user_id, $userPurchase->pv, $userPurchase->product_id);\n }\n\n foreach($userStores as $store)\n {\n $this->retail_price($store->user_id, $store->price, $store->product_id);\n //$this->pay_valid_upline_for_personal_rebate($store->user_id, $store->pv);\n //$this->upline_personal_rebate($store->user_id, $store->pv);\n $this->personal_rebate($store->user_id, $store->pv, $store->product_id);\n }\n\n foreach($do_members as $member)\n {\n $this->calculate_active_do_personal_gpv($member->user_id);\n // $this->group_bonus($member->user_id);\n }\n\n foreach($do_members as $member)\n {\n // $this->calculate_active_do_personal_gpv($member->user_id);\n $this->group_bonus($member->user_id);\n }\n\n $this->calculate_total_group_pv();\n\n foreach ($sdo_members as $smember) {\n $this->calculate_active_sdo_personal_gpv($smember->user_id);\n // $this->sdo_bonus($smember->user_id); //need to separate\n // $this->sdo_to_sdo_bonus($smember->user_id); //need to separate\n }\n\n foreach ($sdo_members as $smember) {\n $this->sdo_bonus($smember->user_id); \n $this->sdo_to_sdo_bonus($smember->user_id); \n }\n\n // foreach($next_do_members as $next_member)\n // {\n // //$this->calculate_active_do_personal_gpv($member->user_id);\n // $this->group_bonus($next_member->user_id);\n // }\n\n $ewallets = Wallet::all();\n\n foreach ($ewallets as $wallet) {\n //$this->direct_sponsor_bonus($wallet->user_id, $wallet->pv, $wallet->first_purchased);\n $this->direct_sponsor_bonus($wallet->user_id, $wallet->pv);\n }\n\n $do_cto_bonus = $this->do_cto_bonus();\n $sdo_cto_bonus = $this->sdo_cto_bonus();\n\n //$this->countTotalBonus();\n $this->recordUserBonuses();\n //$this->countTotalBonus();\n }", "public function total(){\n $total = $this->qualification + $this->referee_report + $this->interview;\n }", "public function gettotalStoriesPerMonth() {\n $googleVis = new Googlevis();\n $columns = $googleVis->createColumns(\n array('Year/Month' => 'string', 'No. of Stories' => 'number')\n );\n\n $estimate_data = $this->getEstimateDataByMonth(\n $this->easybacklogClient->getStoriesFromTheme()\n );\n\n $row = $rows = $row_data = $row_label = array();\n\n foreach($estimate_data AS $year => $month) {\n foreach($month AS $month_no => $stories) {\n foreach($stories AS $story) {\n $counter = (!isset($counter) ? 0 : $counter);\n $counter += $story;\n }\n $rows[] = $googleVis->createDataRow(\n $year .\"/\". $month_no,\n $counter\n );\n $counter = 0;\n }\n }\n return array('cols' => $columns, 'rows' => $rows);\n }", "public function getEstimateSpreadPerMonth() {\n\n // Do the columns\n $googleVis = new Googlevis();\n $columns = $googleVis->createColumns(\n array(\n 'Month' => 'string', \n 'Size: 1' => 'number', \n 'Size: 2' => 'number', \n 'Size: 3' => 'number', \n 'Size: 5' => 'number', \n 'Size: 8' => 'number', \n 'Size: 13' => 'number', \n 'Size: 20' => 'number'\n )\n );\n \n $estimate_data = $this->getEstimateDataByMonth(\n $this->easybacklogClient->getStoriesFromTheme()\n );\n\n\n $rows = array();\n foreach($estimate_data AS $year => $month) {\n foreach($month AS $month_no => $estimates) {\n foreach (array(1, 2, 3, 5, 8, 13, 20) AS $est) {\n $row_data[] = (isset($estimates[$est]) ? $estimates[$est] : 0);\n }\n\n $rows[] = $googleVis->createDataRow(\n $year .\"/\". $month_no,\n $row_data\n );\n $row = $row_label = $row_data = array();\n }\n \n }\n\n return array('cols' => $columns, 'rows' => $rows);\n }", "function lab_payment_calculation($appliaction)\n{\n\tif ($appliaction->application_type == 1) {\n\t\t$payment_array['form_chargis'] = 200;\n\t\t$payment_array['registration_chargis'] = 500;\n\t\t$payment_array['renual_charges'] = 250*2;\n\t\t$payment_array['total_amount'] = $payment_array['form_chargis'] + $payment_array['registration_chargis'] + $payment_array['renual_charges'];\n\t} else {\n\t\t$peneltyOnTotalMonth = getDiffrentBetweenTwoDatesInMonth($appliaction->date_of_expiry_certificate,date('Y-m-d'));\n\t\t$payment_array['form_chargis'] = 100;\n\t\t$payment_array['registration_chargis'] = 250*3 + $peneltyOnTotalMonth*100;\n\t\t$payment_array['total_amount'] = $payment_array['form_chargis'] + $payment_array['registration_chargis'];\n\t}\n\treturn json_decode(json_encode($payment_array));\n}", "public function earnNXPPointsMonth($achievement)\n {\n $ride = Rides::haveMonthXP(Auth::client()->user()->id,$achievement->criteria_value);\n if ( count($ride)>0 ) {\n $this->createAchievement($achievement);\n }\n }", "function exeUpdateEmp13Month($yearperiod,$empid) {\n $checkemp = $this->db->query(\"SELECT * \n FROM employee_details\n WHERE user_id = \".$this->db->escape($_POST['userid']).\" \");\n \n $check = $checkemp->result_array();\n $salary = $check[0]['salary'];\n \n $bonus = ($_POST['workedmonths'] * $salary)/12;\n if($bonus > 30000) {\n $bonus_taxed = ($bonus - 30000) * 0.32;\n $totabonus = $bonus_taxed + $bonus;\n } else {\n $totabonus = $bonus; \n }\n \n $exeUpdateEmp13Month = $this->db->query(\"UPDATE 13month\n SET user_id = \".$this->db->escape($_POST['userid']).\",\n yearperiod = '\". $this->uri->segment(3).\"',\n no_of_months = \".$this->db->escape($_POST['workedmonths']).\",\n amount = \".$this->db->escape($totabonus).\",\n status = \".$this->db->escape($_POST['status']).\"\n WHERE yearperiod = \".$this->db->escape($yearperiod).\" \n AND user_id = \".$this->db->escape($empid).\" \");\n\n $rsQuery['affRows'] = $this->db->affected_rows();\n return $rsQuery;\n }", "public static function experienceCalculator($start_date,$end_date,$is_current){\n $start_date = strtotime($start_date);\n if ($is_current==1 && $end_date==\"Continue\"){\n $end_date = strtotime(date('Y-m-d'));\n }else{\n $end_date = strtotime($end_date);\n }\n $months = 0;\n $years = 0;\n while (strtotime('+1 MONTH', $start_date) < $end_date) {\n $months++;\n $start_date = strtotime('+1 MONTH', $start_date);\n if($months>11){\n $years++;\n $months=0;\n }\n }\n return $years.\" year, \". $months. ' month, '. ($end_date - $start_date) / (60*60*24). ' days';\n }", "public function earned($id=null, $associate=null, $start_year=null, $end_year=null)\n {\n $attend = array();\n $leave = array();\n $total_earned = 0;\n $total_enjoyed = 0;\n $total_due = 0;\n $total_work = 0;\n\n # -----------------------------------\n // total due earned due\n $attend = DB::table(\"hr_attendance_mbm\")\n ->where(\"as_id\", $id)\n ->whereYear('in_time', '=', $end_year)\n ->count(); /// total present return\n\n $total_work += $attend;\n //make total earned\n $total_earned += number_format((!empty($attend)?($attend/18):0), 2);\n // total kotodin suti pete pare\n\n # -----------------------------------\n $leave = DB::table(\"hr_leave\")\n ->select(\n DB::raw(\"\n SUM(CASE WHEN leave_type = 'Earned' THEN DATEDIFF(leave_to, leave_from)+1 END) AS enjoyed\n \")\n )\n ->where(\"leave_ass_id\", $associate)\n ->where(\"leave_status\", \"1\")\n ->where(DB::raw(\"YEAR(leave_from)\"), '=', $end_year)\n ->value(\"enjoyed\");\n\n $total_enjoyed += number_format((!empty($leave)?$leave:0), 2); /// total kotodin suti kataise\n # -----------------------------------\n\n $total_due = $total_earned-$total_enjoyed; /// total kotodin suti paona ase\n //return $total_due;\n\n return array('total_earned' => $total_earned,\n 'totaldue' => $total_due,\n 'total_enjoyed' => $total_enjoyed,\n 'total_working' => $total_work\n );\n }", "public function calculateLastMonthScore(EntityManager $em)\r\n {\r\n $sum = 0;\r\n \r\n // set datetime before one week and only add scores of what happened last week\r\n $month = new \\DateTime();\r\n $month->sub(new \\DateInterval('P1M'));\r\n \r\n // trophies\r\n foreach ($this->trophies as $trophy)\r\n if (!is_null($trophy->getReceivedTime()) && $trophy->getReceivedTime() > $month)\r\n $sum += $trophy->getScore();\r\n \r\n // participations\r\n $query = $em\r\n ->createQuery('SELECT p\r\n FROM MensaBattleAPIBundle:Participation p\r\n JOIN p.participant u\r\n WHERE u.id = :id')\r\n ->setParameter('id', $this->id); \r\n $participations = $query->getResult();\r\n // - calculate\r\n foreach ($participations as $participation)\r\n if ($participation->getBeganTime() > $month)\r\n $sum += $participation->getBattle()->getParticipationScore();\r\n \r\n // example photos\r\n $query = $em\r\n ->createQuery('SELECT e\r\n FROM MensaBattleAPIBundle:Example e\r\n JOIN e.participant u\r\n WHERE u.id = :id')\r\n ->setParameter('id', $this->id);\r\n $examples = $query->getResult();\r\n // - calculate\r\n foreach ($examples as $example)\r\n if ($example->getBeganTime() > $month)\r\n $sum += Person::$SCORE_EXAMPLE_PHOTO;\r\n \r\n // ratings\r\n $query = $em\r\n ->createQuery('SELECT r\r\n FROM MensaBattleAPIBundle:Rating r\r\n JOIN r.author u\r\n WHERE u.id = :id')\r\n ->setParameter('id', $this->id);\r\n $ratings = $query->getResult();\r\n // - calculate\r\n foreach ($ratings as $rating)\r\n if ($rating->getTime() > $month)\r\n $sum += Person::$SCORE_RATING;\r\n \r\n return $sum;\r\n }", "function Set_Adjustment($application_id, $request, $agent_id)\n{\n\t$db = ECash::getMasterDb();\n\t$events = array();\n\n\t$log = get_log('scheduling');\n\n\t$date = date(\"Y-m-d\", strtotime($request->adjustment_date));\n\n\t$log->Write(\"[Agent:{$agent_id}][AppID:$application_id] Adjustment for ${$amount} {$request->adjustment_type} to {$request->adjustment_target}\");\n\n\t$balance_info = Fetch_Balance_Information($application_id);\n\t$balance = array(\n\t\t'principal' => $balance_info->principal_balance,\n\t\t'service_charge' => $balance_info->service_charge_balance,\n\t\t'fee' => $balance_info->fee_balance,\n\t);\n\n\t//OK, before we do the adjustment and stuff, let's create the interest first!\n\n\t$biz_rules = new ECash_BusinessRulesCache(ECash::getMasterDb());\n\n\tif(! $application = ECash::getApplicationById($application_id))\n\t{\n\t\tthrow new Exception(\"Cannot locate application $application_id\");\n\t}\n\t$renewal = ECash::getFactory()->getRenewalClassByApplicationID($application_id);\n\t$rules = $application->getBusinessRules();\n\t$schedule = Fetch_Schedule($application_id);\n\t$paid_to = Interest_Calculator::getInterestPaidPrincipalAndDate($schedule, FALSE, $rules);\n\t$ecash_api = eCash_API_2::Get_eCash_API(null, ECash::getMasterDb(), $application_id);\n\t$service_charge_type = $rules['service_charge']['svc_charge_type'];\n\n\tswitch ($service_charge_type)\n\t{\n\t\tcase 'Daily':\n\n\t\t\t$rate_calc = $application->getRateCalculator();\n\t\t\t$int = $rate_calc->calculateCharge($balance['principal'], $paid_to['date'], $date);\n\n\t\t\t// Don't accrue past default date\n\t\t\tif ($rules['loan_type_model'] == 'CSO')\n\t\t\t{\n\t\t\t\tif ($renewal->hasDefaulted($application_id))\n\t\t\t\t\t$int = 0.00;\n\t\t\t}\n\n\t\t\t$rb = $paid_to['date'];\n\n\t\t\t$re = $date;\n\n\t\t\t//If its not a manual payment, or the date is in the future, let's add an interest comment\n\t\t\tif ($int > 0 && ((strtotime($paid_to['date']) < strtotime($date))))\n\t\t\t{\n\t\t\t\t$comment .= \"[service charge includes interest of $int between $rb and $re]\";\n\t\t\t\t$intcomment = \"[interest between $rb and $re]\";\n\t\t\t}\n\t\t\t//log the current balances before we modify the balances.\n\t\t\t$log->Write(\"Balances - P: {$balance['principal']} F: {$balance['fee']} INT: {$int} SC: {$balance['service_charge']} | AMT: $amt\");\n\n\t\t\t//add interest to what is owed if the date is in the future Subtract amount from total balance\n\t\t\tif(((strtotime($paid_to['date']) < strtotime($date))))\n\t\t\t{\n\t\t\t\t$balance['service_charge'] = bcadd($balance['service_charge'],$int,2);\n\t\t\t}\n\n\t\t\t//allocate amounts! Amount allocation comes AFTER the adjustments are made\n\t\t\t$amounts = AmountAllocationCalculator::generateAmountsFromBalance(-$amt, $balance);\n\n\t\t\tbreak;\n\t\tcase 'Fixed':\n\t\tdefault:\n\t\t\t$int = 0;\n\t\t\t//Do nothing! BOO-YAH!\n\t\tbreak;\n\t}\n\tif($int > 0)\n\t{\n\t\t$intamounts = Array(Event_Amount::MakeEventAmount('service_charge', abs($int)));\n\t\t//Schedule service charge and register it on the same day!\n\t\t$sc_event = Schedule_Event::MakeEvent($date, $date, $intamounts, 'assess_service_chg', $intcomment, 'scheduled');\n\t\t$events[] = $sc_event;\n\t}\n\t////////////////////////\n\t$amount = $request->adjustment_type == 'credit' ? $request->adjustment_amount : -$request->adjustment_amount;\n\n\t// Adjust Principal\n\n\n\t$com = $request->adjustment_description . \" (Agent: {$agent_id})\";\n\t$amounts = array();\n\n // GF 8293 [benb]\n // when adjusting delivery fees, apply calculations to generic \"fee\"\n $target = ($request->adjustment_target == \"deliveryfee\") ? \"fee\" : $request->adjustment_target;\n\n // GF 6334 [benb]\n // when adjusting lien fees, apply calculations to generic \"fee\"\n\t$target = ($request->adjustment_target == \"lienfee\") ? \"fee\" : $target;\n\n $amounts = AmountAllocationCalculator::generateInternalAdjustment($target, round($amount, 2), $balance);\n\n\tif (count($amounts))\n\t{\n\t\t// GF 6334 [benb]\n\t\tif ($request->adjustment_target == \"lienfee\")\n\t\t{\n\t\t\t// This is so credits will register under \"assess_fee_lien\"\n\t\t\t$type = ($request->adjustment_type == \"debit\") ? \"writeoff_fee_lien\" : \"assess_fee_lien\";\n\t\t}\n\t\telse if ($request->adjustment_target == \"deliveryfee\")\n\t\t{\n\t\t\t$type = ($request->adjustment_type == \"debit\") ? \"writeoff_fee_delivery\" : \"assess_fee_delivery\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$type = \"adjustment_internal\";\n\t\t}\n\n\t\t$event = Schedule_Event::MakeEvent($date, $date, $amounts, $type, $com, 'scheduled', 'manual');\n\t\t$events[] = $event;\n\n\t\ttry\n\t\t{\n\t\t\t$db->beginTransaction();\n\t\t\tforeach ($events as $ev)\n\t\t\t{\n\n\t\t\t\t// Propagate to the event_schedule\n\t\t\t\t$ev_id = Record_Event($application_id, $ev);\n\t\t\t\t// If the event is set for \"today\", propagate it the reset of the way through.\n\t\t\t\t$today = time();\n\n\t\t\t\tif (strtotime($date) <= $today)\n\t\t\t\t{\n\t\t\t\t\t// Now propagate to the register\n\t\t\t\t\t$tr_ids = Record_Current_Scheduled_Events_To_Register($date, $application_id, $ev_id);\n\t\t\t\t\t// Finally to the ledger\n\t\t\t\t\tforeach ($tr_ids as $trid)\n\t\t\t\t\t{\n\t\t\t\t\t\tPost_Transaction($application_id, $trid);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$db->Commit();\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$db->rollBack();\n\t\t\tthrow $e;\n\t\t}\n\t}\n}", "public function index()\n {\n // Get User\n $user = Auth::user();\n $payments = $user->payments;\n\n // Format Payments ID\n foreach ($payments as $index => $payment) {\n $payments[$index]->keyID = \"p_\" . $payment->ref_id;\n \n if($payment->is_cash) {\n $payments[$index]->cash_only = $payment->amount;\n $payments[$index]->other = 0;\n } else {\n $payments[$index]->cash_only = 0;\n $payments[$index]->other = $payment->amount;\n }\n }\n\n // Total for year\n $total_year = 0;\n foreach ($payments as $payment) {\n if(Carbon::now()->startOfYear() <= Carbon::parse($payment->purchase_date) && Carbon::now()->endOfYear() > Carbon::parse($payment->purchase_date) && $payment->approved === 1) {\n $total_year += $payment->amount;\n }\n }\n\n // Get last 30 days\n $dateMonthAgo = Carbon::now()->subDays(30);\n $total_30_days = 0;\n foreach ($payments as $payment) {\n if($dateMonthAgo <= Carbon::parse($payment->purchase_date) && $payment->approved === 1) {\n $total_30_days += $payment->amount;\n }\n }\n\n // Get total to be paid amount\n $total_to_be_paid = 0;\n foreach ($payments as $payment) {\n if(!$payment->paid_back) {\n $total_to_be_paid += $payment->amount;\n }\n }\n\n // Get number of expenses waiting on approval\n $num_waiting_approval = 0;\n foreach ($payments as $payment) {\n if(!$payment->approved) {\n $num_waiting_approval++;\n }\n }\n\n return view('leader.home')->with([\n 'user' => $user,\n 'payments' => $payments,\n 'total_year' => $total_year,\n 'num_waiting_approval' => $num_waiting_approval,\n 'total_30_days' => $total_30_days,\n 'total_to_be_paid' => $total_to_be_paid, \n ]);\n }", "public function ARTClinicCumulativeMalesAllAges() {\r\n $query = \"SELECT TOP 1 [code_year_quarter].[year] AS [year],\r\n [code_year_quarter].[quarter] AS [quarter],\r\n CONCAT ([code_year_quarter].[year], ' Q',[code_year_quarter].[quarter]) AS [year_quarter],\r\n [code_hdepartment].[hfacility_id] AS [facility_id],\r\n [code_hfacility].[hfacility_name] AS [facility_name],\r\n (SELECT CONCAT ('Cumulative - ', [concept].[concept_name]) FROM [dbo].[concept] WHERE [concept].[ID] = [obs].[data_element]) AS [concept_name],\r\n (CAST([obs].[data_value] AS INT)) AS [cumulative_registered]\r\n FROM [dbo].[obs_dimensions] \r\n LEFT JOIN [dbo].[obs] ON [obs].[obs_dimensions_ID] = [obs_dimensions].[ID] \r\n LEFT JOIN [dbo].[art_clinic_obs] ON [art_clinic_obs].[ID] = [obs_dimensions].[art_clinic_obs_id] \r\n LEFT JOIN [dbo].[code_hdepartment] ON [code_hdepartment].[ID] = [art_clinic_obs].[hdepartment_id]\r\n LEFT JOIN [dbo].[code_year_quarter] ON [code_year_quarter].[ID] = [art_clinic_obs].[year_quarter_id]\r\n LEFT JOIN [dbo].[code_hfacility] ON [code_hfacility].[ID] = [code_hdepartment].[hfacility_id]\r\n\t\t WHERE \r\n [sub_group] = 398\r\n AND [period_report] = 394\r\n AND [obs].[data_element] = 14\r\n AND [art_clinic_obs].[year_quarter_id] = :year_quarter_id\r\n AND [code_hdepartment].[hfacility_id] = :health_facility_id\r\n AND [code_hdepartment].[hservice] = 294\";\r\n //Prepare query statement\r\n $stmt = $this->conn->prepare($query);\r\n //Bind values\r\n $stmt->bindParam(':year_quarter_id', $this->year_quarter);\r\n $stmt->bindParam(':health_facility_id', $this->health_facility_id);\r\n //Execute statement\r\n $stmt->execute();\r\n return $stmt;\r\n }", "function Add_Manual_ACH($application_id, $request)\n{\n\t$log = get_log(\"scheduling\");\n\t$holidays = Fetch_Holiday_List();\n\t$pd_calc = new Pay_Date_Calc_3($holidays);\n\t$payment_amt = round($request->amount, 2);\n\n\t$comment = \"Manual ACH Request - \" . $request->payment_description;\n\n\tif ($request->edate == 'select')\n\t{\n\t\t$due_date = $request->scheduled_date?date(\"Y-m-d\", strtotime($request->scheduled_date)):NULL;\n\t}\n\telse\n\t{\n\t\t$due_date = date('Y-m-d', strtotime($request->edate));\n\t}\n\n\tif(!$due_date)\n\t{\n\t\t$_SESSION['error_message'] = \"No date was selected for Manual ACH\";\n\t\treturn false;\n\t}\n\n\t$action_date = $pd_calc->Get_Business_Days_Backward($due_date, 1);\n\n\t//It's possible that this will put the action date in the past, which is bad.\n\t//If that happens, use the scheduled date as the action date instead. [jeffd][IMPACT #13616]\n\tif(strtotime($action_date) < strtotime(date('Y-m-d')))\n\t{\n\t\t$action_date = $due_date;\n\t\t$due_date = $pd_calc->Get_Business_Days_Forward($due_date, 1);\n\t}\n\n\t$amounts = array();\n\t//pay down amounts other than principal first [#27768]\n\t$log->Write(\"[Agent:{$_SESSION['agent_id']}][AppID:{$application_id}] Adding Manual ACH of {$payment_amt} for {$application_id} on date {$due_date}\");\n\n\t//[#46151] Adjust balance info, accounting for scheduled payments\n\t//between now and the manual ACH due date\n\t$schedule = Fetch_Schedule($application_id);\n\t$balance_info = Fetch_Balance_Information($application_id);\n\tforeach($schedule as $e)\n\t{\n\t\tif($e->status == 'scheduled' && strtotime($e->date_effective) < strtotime($due_date))\n\t\t{\n\t\t\tforeach($e->amounts as $ea)\n\t\t\t{\n\t\t\t\t$balance_info->{$ea->event_amount_type . '_balance'} += $ea->amount;\n\t\t\t}\n\t\t}\n\t}\n\n\t$balance = array(\n\t\t'principal' => $balance_info->principal_balance,\n\t\t'service_charge' => $balance_info->service_charge_balance,\n\t\t'fee' => $balance_info->fee_balance,\n\t\t);\n\n\t$amounts = AmountAllocationCalculator::generateAmountsFromBalance($payment_amt, $balance);\n\n\t$payment = Schedule_Event::MakeEvent($action_date, $due_date, $amounts, 'manual_ach', $comment,'scheduled','manual');\n\tRecord_Event($application_id, $payment);\n\n\treturn true;\n}", "public function rideTotalMilesMonth($achievement)\n {\n $lap = Lap::getTotalDistanceMonth(Auth::client()->user()->id);\n\n if ( !empty($lap) && $lap[0][\"total_distance\"] >= $achievement->criteria_value ) {\n $this->createAchievement($achievement);\n }\n }", "function getTotalofReports(){\r\n $books = getReportofTotal();\r\n $totalIncome = 0;\r\n\r\n for($ctr = 0; $ctr < count($books); $ctr++){\r\n $totalIncome += $books[$ctr][2];\r\n }\r\n\r\n return $totalIncome;\r\n }", "function getOutletDiscountRate()\n {\n $dayOfMonth = date('j');\n return 20 + $dayOfMonth;\n }", "function languagelesson_calculate_lessongrade($lessonid) {\n global $DB;\n $pagescores = array();\n $pagescores = $DB->get_records_menu('languagelesson_pages', array('lessonid' => $lessonid), null, 'id,maxscore');\n $lessongrade = 0;\n foreach ($pagescores as $pagescore) {\n $lessongrade += $pagescore;\n }\n\n return $lessongrade;\n}", "public function getCurrentMonthTotalRevenue() : float;", "function Monthly_Requests($year) {\r\n $query2 = $this->db->query(\"SELECT MONTHNAME(designation_date) as month, YEAR(designation_date) as year, DATE_FORMAT(designation_date, '%m') as m,\r\n COUNT(id) as 'total'\r\n FROM request\r\n WHERE DATE_FORMAT(designation_date, '%Y') = '$year'\r\n GROUP BY MONTHNAME(designation_date)\r\n ORDER BY MONTH(designation_date) ASC\");\r\n\r\n return $result = $query2->result();\r\n }", "function clinic_payment_calculation($appliaction)\n{\n\tif ($appliaction->application_type == 1) {\n\t\t$payment_array['form_chargis'] = 200;\n\t\t$payment_array['registration_chargis'] = 500;\n\t\t$payment_array['renual_charges'] = 250*2;\n\t\t$payment_array['total_amount'] = $payment_array['form_chargis'] + $payment_array['registration_chargis'] + $payment_array['renual_charges'];\n\t} else {\n\t\t$peneltyOnTotalMonth = getDiffrentBetweenTwoDatesInMonth($appliaction->date_of_expiry_certificate,date('Y-m-d'));\n\t\t$payment_array['form_chargis'] = 100;\n\t\t$payment_array['registration_chargis'] = 250*3 + $peneltyOnTotalMonth*100;\n\t\t$payment_array['total_amount'] = $payment_array['form_chargis'] + $payment_array['registration_chargis'];\n\t}\n\treturn json_decode(json_encode($payment_array));\n}", "function getEmployeeLeaveAnnualByYear($db, $strYear, $strSection = \"\", $strIDEmployee = \"\")\n{\n $arrResult = [];\n // langsung dipisah sesuai jenis absennya\n if ($strYear == \"\") {\n return $arrResult;\n }\n $strFrom = \"$strYear-01-01\";\n $strThru = \"$strYear-12-31\";\n $strSQL = \"SELECT id_employee, leave_duration FROM hrd_absence AS t1 LEFT JOIN hrd_employee AS t2 ON t1.id_employee = t2.id\n WHERE t1.status >= '\" . REQUEST_STATUS_APPROVED . \"' \";\n if ($strSection != \"\") {\n $strSQL .= \"AND (t2.section_code = '$strSection') \";\n }\n if ($strIDEmployee != \"\") {\n $strSQL .= \"AND t2.id = '$strIDEmployee' \";\n }\n $strSQL .= \"AND \\\"leave_year\\\" = '$strYear' \";\n $resDb = $db->execute($strSQL);\n while ($rowDb = $db->fetchrow($resDb)) {\n // cari total waktu\n $intTotal = $rowDb['leave_duration'];\n if (isset($arrResult[$rowDb['id_employee']])) {\n $arrResult[$rowDb['id_employee']] += $intTotal;\n } else {\n $arrResult[$rowDb['id_employee']] = $intTotal;\n }\n }\n return $arrResult;\n}", "function obtain_invested_means_month_ago($acc_number)\n\t{\n\t return $this->db->select_sum('pamm_clients_stat_sum')\n\t\t ->from('pamm_clients_statement') \n\t\t ->where(\"pamm_clients_stat_acc_number\",$acc_number)\n\t\t ->where(\"pamm_clients_stat_role IN ('I','U')\")\n\t\t ->where(\"pamm_clients_stat_sum > 0\")\n\t\t ->where(\"pamm_clients_stat_date < date_sub(curdate(),INTERVAL 30 DAY)\")\n\t\t ->get()->result();\n\t}", "function obtain_common_profit_month_ago($acc_number)\n\t{\n\t return $this->db->select_sum('pamm_clients_stat_sum')\n\t\t ->from('pamm_clients_statement') \n\t\t ->where(\"pamm_clients_stat_acc_number\",$acc_number)\n\t\t ->where(\"pamm_clients_stat_role IN ('PLI','PLU')\")\n\t\t ->where(\"pamm_clients_stat_date > date_sub(curdate(),INTERVAL 30 DAY)\")\n\t\t ->get()->result();\n\t}", "function Monthly_Requests_Pending($year) {\r\n $query2 = $this->db->query(\"SELECT MONTHNAME(designation_date) as month, YEAR(designation_date) as year,DATE_FORMAT(designation_date, '%m') as m,\r\n COUNT(id) as 'total'\r\n FROM request\r\n WHERE DATE_FORMAT(designation_date, '%Y') = '$year' AND assign_status = '0'\r\n GROUP BY MONTHNAME(designation_date)\r\n ORDER BY MONTH(designation_date) ASC\");\r\n\r\n return $result = $query2->result();\r\n }", "public function getActivityRewardCount()\n {\n return $this->count(self::_ACTIVITY_REWARD);\n }", "private function _getAmendment()\n\t {\n\t\t$amendment = 0;\n\n\t\t$objects = $this->_getAddresses();\n\t\tif ($objects > 1)\n\t\t {\n\t\t\t$amendment = $objects * 5;\n\t\t } //end if\n\n\t\treturn $amendment;\n\t }", "function calcAmountOfRewards()\n {\n $payoutPercentage = getPayoutPercentage();\n $totalBetCount = getAmountOfBets();\n\n return floor($payoutPercentage * $totalBetCount);\n }", "public function getAnnualUsage($year, $mm = null) {\n \tif ($mm === null) {\n \t\treturn (isset($this->annualUsage[$year])) ? array_sum($this->annualUsage[$year]) : false;\n \t} else {\n \t\treturn (isset($this->annualUsage[$year][$mm])) ? $this->annualUsage[$year][$mm] : false;\n \t}\n\n }", "function getGrossCompensation($month, $year, $emp_id){\n \t$sql = \"SELECT basic_amt-(ut_abs_amt)+ot_amt+cola_amt+pe_entry_amt+amm_amt AS gross\n\t\t\t\tFROM \n\t\t\t\t\n\t\t\t\t(SELECT COALESCE(SUM(a.ppe_amount), 0) AS basic_amt FROM payroll_paystub_entry a\n\t\t\t\tJOIN payroll_pay_stub b ON (b.paystub_id=a.paystub_id)\n\t\t\t\tJOIN payroll_pay_period c ON (c.payperiod_id=b.payperiod_id)\n\t\t\t\tJOIN payroll_paystub_report d ON (d.paystub_id=b.paystub_id)\n\t\t\t\tJOIN payroll_ps_account e ON (e.psa_id=a.psa_id)\n\t\t\t\tJOIN emp_masterfile em on (em.emp_id=d.emp_id)\n\t\t\t\tWHERE c.payperiod_period_year='{$year}' AND d.emp_id='{$emp_id}' AND a.psa_id='1' AND c.payperiod_period='{$month}') basic_tbl,\n\t\t\t\t\n\t\t\t\t(select COALESCE(sum(emp_tarec_amtperrate),0) as ut_abs_amt \n\t\t\t\tFROM ta_emp_rec a \n\t\t\t\tJOIN ta_tbl b on (b.tatbl_id=a.tatbl_id) \n\t\t\t\tJOIN payroll_pay_period c on (c.payperiod_id=a.payperiod_id) \n\t\t\t\tJOIN emp_masterfile em on (em.emp_id=a.emp_id)\n\t\t\t\tWHERE (a.tatbl_id IN (1,3,4)) AND a.emp_id='{$emp_id}' AND a.paystub_id!=0 AND c.payperiod_period = '{$month}' AND c.payperiod_period_year = '{$year}') ut_tbl,\n\t\t\t\t\n\t\t\t\t(select COALESCE(sum(ppe_amount),0) as ot_amt \n\t\t\t\tFROM payroll_paystub_entry a \n\t\t\t\tJOIN payroll_pay_stub b on (b.paystub_id=a.paystub_id) \n\t\t\t\tJOIN payroll_paystub_report c on (c.paystub_id=b.paystub_id) \n\t\t\t\tJOIN payroll_pay_period d on (d.payperiod_id=c.payperiod_id)\n\t\t\t\tJOIN emp_masterfile em on (em.emp_id=c.emp_id)\n\t\t\t\tWHERE a.psa_id='16' AND c.emp_id='{$emp_id}' AND d.payperiod_period = '{$month}' AND d.payperiod_period_year = '{$year}') ot_tbl,\n \t\t\t\n \t\t\t(select COALESCE(sum(ppe_amount),0) as cola_amt \n \t\t\tFROM payroll_paystub_entry a \n \t\t\tJOIN payroll_pay_stub b on (b.paystub_id=a.paystub_id) \n \t\t\tJOIN payroll_paystub_report c on (c.paystub_id=b.paystub_id) \n \t\t\tJOIN payroll_pay_period d on (d.payperiod_id=c.payperiod_id)\n \t\t\tJOIN emp_masterfile em on (em.emp_id=c.emp_id)\n \t\t\tWHERE a.psa_id='39' AND c.emp_id='{$emp_id}' and d.payperiod_period = '{$month}' AND d.payperiod_period_year = '{$year}') cola_tbl,\n \t\t\t\n \t\t\t(SELECT COALESCE(sum(a.ppe_amount),0) as pe_entry_amt \n\t\t\t\tFROM payroll_paystub_entry a \n\t\t\t\tJOIN payroll_paystub_report b on (b.paystub_id=a.paystub_id) \n\t\t\t\tJOIN payroll_pay_period c on (c.payperiod_id=b.payperiod_id) \n\t\t\t\tJOIN emp_masterfile em on (em.emp_id=b.emp_id)\n\t\t\t\tWHERE a.psa_id IN (select distinct a.psa_id \n\t\t\t\tFROM payroll_ps_account a \n\t\t\t\tJOIN payroll_paystub_entry b on (b.psa_id=a.psa_id) \n\t\t\t\tJOIN payroll_pay_stub c on (c.paystub_id=b.paystub_id) \n\t\t\t\tJOIN payroll_pay_period d on (d.payperiod_id=c.payperiod_id)\n\t\t\t\tJOIN payroll_paystub_report e on (e.paystub_id=b.paystub_id) \n\t\t\t\tWHERE a.psa_type=1 and a.psa_procode!=6 and e.emp_id='{$emp_id}' and d.payperiod_period = '{$month}' and d.payperiod_period_year = '{$year}') \n\t\t\t\tAND b.emp_id='{$emp_id}' AND c.payperiod_period = '{$month}' and c.payperiod_period_year = '{$year}') pe_entry_tbl,\n\t\t\t\t\n\t\t\t\t(select COALESCE(sum(a.amendemp_amount),0) as amm_amt \n\t\t\t\tFROM payroll_ps_amendemp a \n\t\t\t\tJOIN payroll_ps_amendment b on (b.psamend_id=a.psamend_id)\n\t\t\t\tJOIN payroll_pay_stub c on (c.paystub_id=a.paystub_id)\n\t\t\t\tJOIN payroll_pay_period d on (d.payperiod_id=c.payperiod_id)\n\t\t\t\tJOIN emp_masterfile em on (em.emp_id=a.emp_id)\n\t\t\t\tWHERE b.psa_id IN (select distinct a.psa_id \n\t\t\t\tFROM payroll_ps_account a \n\t\t\t\tJOIN payroll_ps_amendment b on (b.psa_id=a.psa_id) \n\t\t\t\tJOIN payroll_ps_amendemp c on (c.psamend_id=b.psamend_id) \n\t\t\t\tJOIN payroll_pay_stub d on (d.paystub_id=c.paystub_id) \n\t\t\t\tJOIN payroll_pay_period e on (e.payperiod_id=d.payperiod_id) \n\t\t\t\tWHERE a.psa_type=1 and a.psa_procode!=6 and c.emp_id='{$emp_id}' and e.payperiod_period = '{$month}' and e.payperiod_period_year = '{$year}') \n\t\t\t\tAND a.emp_id='{$emp_id}' AND a.paystub_id!=0 AND d.payperiod_period = '{$month}' AND d.payperiod_period_year = '{$year}') amm_tbl\";\n \t$rsResult = $this->conn->Execute($sql);\n \twhile(!$rsResult->EOF){\n \t\treturn $rsResult->fields;\n \t} \t\n }", "public static function outstandingPayments($yearMonth = false)\n {\n $where = '';\n if ($yearMonth) {\n $where = \" AND due_date BETWEEN '$yearMonth-01' AND '$yearMonth-31'\";\n }\n $open = Invoice::find_by_sql(\"SELECT \n sum(invoices.`sum`) as `summary` \n FROM \n invoices \n WHERE \n (invoices.`status` = 'Sent' \n OR \n invoices.`status` = 'Open') \n AND \n invoices.`estimate` != 1\n $where \n \");\n\n $partially = Invoice::find_by_sql(\"SELECT \n sum(invoices.`outstanding`) as summary \n FROM \n invoices \n WHERE \n invoices.`status` = 'PartiallyPaid'\n $where;\n \");\n $open[0]->summary = $open[0]->summary + $partially[0]->summary;\n return $open[0]->summary;\n }", "public function computeSalary()\n {\n /**\n * Payments are done every 15th and 30th of every month\n * For 15th:\n * Day 1 to 14th of the month plus day 30 and 31st of the previous month\n * For 30th:\n * Day 15th to 29th\n */\n\n // check if today is the 15th or 30th / 28th for Feb\n $today = new \\DateTime();\n $day_today = $today->format( 'd' );\n $is_leap_year = intval( date('Y') ) % 4 == 0;\n\n // compute salary only on the 15th and the 30th\n if( $day_today == 15 ){\n // get teacher whose salary was not computed yet\n $teachers = ( new TeacherPivot )->getSalaryUnprocessedAsOf( $today->format('Y-m-d') );\n foreach( $teachers as $teacher ){\n $teacher->processDailyIncome();\n }\n }elseif( $day_today == 30 ){\n\n }elseif( $day_today == 28 && date('m') == 2 && !$is_leap_year ){\n\n }elseif( $day_today == 29 && date('m') == 2 && $is_leap_year ){\n\n }\n\n }", "public function get_userwisemonthlyearnings($year = '', $userid)\n {\n $output['token'] = $this->security->get_csrf_hash();\n header('Content-Type: application/json');\n\n if (empty($year)) {\n $year = date('Y');\n }\n\n $finalArr = array();\n $arr = $this->database->_get_userwisemonthlyearnings($year, $userid);\n if (!empty($arr)) {\n for ($i = 0; $i < 12; $i++) {\n $finalArr[$i] = $arr[$i]['total'];\n }\n }\n\n $output['response'] = $finalArr;\n exit(json_encode($output));\n }", "function getReviews($studentMoodleId, $month_review, $month_concern, $month_reason, $month_contribs, $dateMonth, $studentsWithReviews, $studentsWithConcerns, $studentsWithReasons, $studentsWithContributions, $totalReviews, $totalConcerns, $totalReasons, $totalContributions, $mysqli)\n{\n $query = \"SELECT status, timemodified FROM mdl_ilpconcern_posts WHERE setforuserid='\" . $studentMoodleId . \"'\";\n $result = $mysqli->query($query);\n\n $review = 0;\n $concern = 0;\n $reason = 0;\n $contribution = 0;\n\n while ($row = $result->fetch_object()) {\n if ($row->status == 0) {\n $review = $review + 1;\n if ($row->timemodified > $dateMonth) {\n $month_review = $month_review + 1;\n }\n } elseif ($row->status == 1) {\n $concern = $concern + 1;\n if ($row->timemodified > $dateMonth) {\n $month_concern = $month_concern + 1;\n }\n } elseif ($row->status == 2) {\n $reason = $reason + 1;\n if ($row->timemodified > $dateMonth) {\n $month_reason = $month_reason + 1;\n }\n } elseif ($row->status == 3) {\n $contribution = $contribution + 1;\n if ($row->timemodified > $dateMonth) {\n $month_contribs = $month_contribs + 1;\n }\n }\n }\n\n if ($review !== 0) {\n $studentsWithReviews++;\n }\n\n if ($concern !== 0) {\n $studentsWithConcerns++;\n }\n\n if ($reason !== 0) {\n $studentsWithReasons++;\n }\n\n if ($contribution !== 0) {\n $studentsWithContributions++;\n }\n\n $totalReviews = $totalReviews + $review;\n $totalConcerns = $totalConcerns + $concern;\n $totalReasons = $totalReasons + $reason;\n $totalContributions = $totalContributions + $contribution;\n\n $reviews = Array(\n $review, $concern, $reason, $contribution, $month_review, $month_concern, $month_reason, $month_contribs, $studentsWithReviews, $studentsWithConcerns, $studentsWithReasons, $studentsWithContributions, $totalReviews, $totalConcerns, $totalReasons, $totalContributions\n );\n\n // print_r($reviews);\n return $reviews;\n}", "function it_returns_one_percent_for_one_payment_one_year_after_the_advance()\n {\n $this->addPayment(101, 365);\n\n $this->calculate()->shouldReturn(1.0);\n }", "function awardForCapture($specsOwned, $mugsOwned, $sausageRollsOwned)\n{\n $award = 10 * (($specsOwned * $mugsOwned * $sausageRollsOwned)/2);\n return $award;\n}", "public function summarizeApprovalStages($appID) {\n\t\t\t$statuses['Sponsor'] = $this->CI->db->query(\"\n\t\t\t\tSELECT * FROM Approval appr\n\t\t\t\t\tJOIN VenueUserRole vur ON vur.VenueUserRoleID = appr.VenueUserRoleID\n\t\t\t\t\tJOIN Venue v ON v.VenueID = vur.VenueID\n\t\t\t\t\tJOIN Application a ON a.ApplicationID = v.ApplicationID\n\t\t\t\t\tJOIN UserRole ur ON ur.UserRoleID = vur.UserRoleID\n\t\t\t\tWHERE a.ApplicationID = {$appID}\n\t\t\t\t\tAND ApprovalType = 'Sponsor'\n\t\t\t\")->result_array();\n\t\t\t$statuses['Venue'] = $this->CI->db->query(\"\n\t\t\tSELECT * FROM Approval appr\n\t\t\t\tJOIN VenueUserRole vur ON vur.VenueUserRoleID = appr.VenueUserRoleID\n\t\t\t\tJOIN Venue v ON v.VenueID = vur.VenueID\n\t\t\t\tJOIN Application a ON a.ApplicationID = v.ApplicationID\n\t\t\t\tJOIN UserRole ur ON ur.UserRoleID = vur.UserRoleID\n\t\t\tWHERE a.ApplicationID = {$appID}\n\t\t\t\tAND ApprovalType = 'VenueOperator'\n\t\t\t\")->result_array();\n\t\t\t$statuses['Committee'] = $this->CI->db->query(\"\n\t\t\t\tSELECT * FROM Approval appr\n\t\t\t\t\tJOIN VenueUserRole vur ON vur.VenueUserRoleID = appr.VenueUserRoleID\n\t\t\t\t\tJOIN Venue v ON v.VenueID = vur.VenueID\n\t\t\t\t\tJOIN Application a ON a.ApplicationID = v.ApplicationID\n\t\t\t\t\tJOIN UserRole ur ON ur.UserRoleID = vur.UserRoleID\n\t\t\t\tWHERE a.ApplicationID = {$appID}\n\t\t\t\t\tAND ApprovalType = 'Committee'\n\t\t\t\")->result_array();\n\n\t\t\tforeach($statuses as $key => $status) {\n\t\t\t\t//echo 'status: ';\n\t\t\t\t//var_dump($status);\n\t\t\t\t# For all stages there can be a mix of approvals and denials\n\t\t\t\t# Search for both and summarize the status accordingly\n\t\t\t\t$column = array_column($status, 'Descision');\n\t\t\t\t$approved = array_search('approved', $column);\n\t\t\t\t$denied = array_search('denied', $column);\n\n\t\t\t\t# If we see at least one approval, assume the status is approved\n\t\t\t\t# Else if we see no approvals and at least one denial, status is denied\n\t\t\t\t# Pending otherwise\n\t\t\t\tif($approved !== false) {\n\t\t\t\t\t$statuses[$key] = array(\n\t\t\t\t\t\t\t\t\t\t$key . \"Decision\" => $status[$approved]['Descision'], \n\t\t\t\t\t\t\t\t\t\t$key . \"DecisionRemark\" => $status[$approved]['DescisionRemark'],\n\t\t\t\t\t\t\t\t\t\t$key . \"ApprovalDate\" => $status[$approved]['ApprovalEndDate']\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t} else if ($denied !== false) {\n\t\t\t\t\t$statuses[$key] = array(\n\t\t\t\t\t\t\t\t\t\t$key . \"Decision\" => $status[$denied]['Descision'], \n\t\t\t\t\t\t\t\t\t\t$key . \"DecisionRemark\" => $status[$denied]['DescisionRemark'],\n\t\t\t\t\t\t\t\t\t\t$key . \"ApprovalDate\" => $status[$denied]['ApprovalEndDate']\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t$statuses[$key] = array(\n\t\t\t\t\t\t\t\t\t\t$key . \"Decision\" => 'Pending', \n\t\t\t\t\t\t\t\t\t\t$key . \"DecisionRemark\" => null,\n\t\t\t\t\t\t\t\t\t\t$key . \"ApprovalDate\" => 'Pending'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t//var_dump($status);\n\t\t\t}\n\t\t\t# var_dump($statuses);\n\t\t\treturn $statuses;\n\t\t}", "public function index(Request $request)\n {\n $last_year_invoices = Invoice::whereDate('created_at', '>', Carbon::now()->subDays(365))->get();\n $last_month_invoices = Invoice::whereDate('created_at', '>', Carbon::now()->subDays(30))->get();\n $last_month_paid = 0;\n $last_month_unpaid = 0;\n $last_month_total = 0;\n $recurring_invoice = 0;\n $last_year_total = 0;\n $paid_invoice_per_day= []; // for graph\n\n foreach ($last_month_invoices as $last_month_invoice) {\n if ($last_month_invoice->is_paid == 1) {\n\n $last_month_paid = $last_month_paid + $last_month_invoice->total_amount;\n\n // paid invoice graph\n if (array_key_exists($last_month_invoice->created_at->format('M d'), $paid_invoice_per_day)) {\n $paid_invoice_per_day[$last_month_invoice->created_at->format('M d')] = $paid_invoice_per_day[$last_month_invoice->created_at->format('M d')] + $last_month_invoice->total_amount;\n }else{\n $paid_invoice_per_day[$last_month_invoice->created_at->format('M d')] = $last_month_invoice->total_amount;\n }\n\n }else{\n $last_month_unpaid = $last_month_unpaid + $last_month_invoice->total_amount;\n }\n\n // recurring total\n if ($last_month_invoice->is_autometic == 1) {\n $recurring_invoice = $recurring_invoice + $last_month_invoice->total_amount;\n }\n\n }\n $last_month_total = $last_month_paid + $last_month_unpaid;\n\n\n\n foreach ($last_year_invoices as $last_year_invoice) {\n $last_year_total = $last_year_total + $last_year_invoice->total_amount; \n }\n\n // customer list\n $keyword = $request->get('search');\n $perPage = 25;\n if (!empty($keyword)) {\n $customers = Customer::where('name', 'LIKE', \"%$keyword%\")\n ->orWhere('email', 'LIKE', \"%$keyword%\")\n ->orWhere('business_name', 'LIKE', \"%$keyword%\")\n ->orWhere('address', 'LIKE', \"%$keyword%\")\n ->orWhere('city', 'LIKE', \"%$keyword%\")\n ->orWhere('state', 'LIKE', \"%$keyword%\")\n ->orWhere('zip', 'LIKE', \"%$keyword%\")\n ->latest()->paginate($perPage);\n } else {\n $customers = Customer::latest()->paginate($perPage);\n }\n return view('home', compact('last_month_paid','last_month_unpaid','last_month_total','last_year_total', 'customers', 'paid_invoice_per_day', 'recurring_invoice'));\n }", "public function advance($advance_no)\n {\n //khai bao bien\n $type = '1';\n $title_vn = '';\n $title_en = '現金借支取款單';\n $SUM_PORT_AMT = 0;\n $SUM_LENDER_AMT = 0;\n $title_sum_money = \"\";\n $INPUT_USER_jobD = \"\";\n $INPUT_DT_jobD = \"\";\n\n $advance = StatisticPayment::advance($advance_no);\n $advance_d = StatisticPayment::advance_D($advance_no);\n $job_d = JobD::getJob($advance->JOB_NO, \"JOB_ORDER\")->whereIn('jd.THANH_TOAN_MK', [null, 'N']);\n foreach ($advance_d as $i) {\n $SUM_LENDER_AMT += $i->LENDER_AMT;\n }\n\n foreach ($job_d as $i) {\n $SUM_PORT_AMT += $i->PORT_AMT + $i->INDUSTRY_ZONE_AMT;\n $INPUT_USER_jobD = $i->INPUT_USER;\n $INPUT_DT_jobD = $i->INPUT_DT;\n }\n if ($SUM_PORT_AMT == 0) {\n $title_sum_money = \"TỔNG TIỀN / TOTAL AMOUNT\";\n }\n if ($advance->LENDER_TYPE == 'T') {\n $title_vn = 'Chi Tạm Ứng';\n $title_en = 'Advance ';\n if ($SUM_LENDER_AMT > $SUM_PORT_AMT) {\n $title_sum_money = \"TỔNG TIỀN TRẢ / TOTAL PAYMENT\";\n } elseif ($SUM_LENDER_AMT < $SUM_PORT_AMT) {\n $title_sum_money = \"TỔNG TIỀN BÙ / TOTAL COMPENSATION\";\n }\n } elseif ($advance->LENDER_TYPE == 'C') {\n $title_vn = 'Chi Trực Tiếp';\n $title_en = 'Applicant';\n $title_sum_money = \"TỔNG TIỀN / TOTAL AMOUNT\";\n } elseif ($advance->LENDER_TYPE == 'U') {\n $title_sum_money = \"TỔNG TIỀN / TOTAL AMOUNT\";\n $title_vn = 'Tạm Ứng';\n $title_en = 'Advance ';\n }\n\n if ($advance) {\n return view('print\\payment\\advance\\index', [\n 'advance' => $advance,\n 'advance_d' => $advance_d,\n 'type' => $type,\n 'title_vn' => $title_vn,\n 'title_en' => $title_en,\n 'SUM_PORT_AMT' => $SUM_PORT_AMT,\n 'SUM_LENDER_AMT' => $SUM_LENDER_AMT,\n 'title_sum_money' => $title_sum_money,\n 'INPUT_USER_jobD' => $INPUT_USER_jobD,\n 'INPUT_DT_jobD' => $INPUT_DT_jobD,\n ]);\n } else {\n return response()->json(\n [\n 'success' => false,\n 'message' => 'PHẢI CHỌN PHIẾU THEO THỨ TỰ NHỎ ĐẾN LỚN'\n ],\n Response::HTTP_BAD_REQUEST\n );\n }\n }", "public function setUsersAcquisitionAverage()\n {\n $this->customersTg = new TableGateway('customers', $this->dbAdapter);\n \n // Get the list of Customers\n $statement = $this->dbAdapter->createStatement('\n SELECT customers.customer_id\n FROM claims,\n customers\n WHERE claims.customer_id = customers.customer_id\n ');\n \n $customers = $statement->execute();\n \n foreach ($customers as $customer) {\n $customerId = $customer['customer_id'];\n \n // Get the Customer's Claims\n $statement = $this->dbAdapter->createStatement('\n SELECT YEAR(claims.created_at) AS year,\n MONTH(claims.created_at) AS month\n FROM claims,\n customers\n WHERE claims.customer_id = customers.customer_id\n AND claims.customer_id = :customerId\n GROUP BY YEAR(claims.created_at),\n MONTH(claims.created_at)\n ORDER BY YEAR(claims.created_at),\n MONTH(claims.created_at)\n ', compact('customerId'));\n \n $result = $statement->execute();\n \n $data = iterator_to_array($result);\n $monthsWithCodesCount = count($data);\n \n // If <= 1, save immediately as 1 and break the loop.\n // I SAID WE BREAK THE LOOP IN HERE.\n if ($monthsWithCodesCount <= 1) {\n $this->setCustomerClaimAcquisitionAverage($customerId, 1);\n continue;\n }\n \n $row = reset($data);\n $startMonth = $row['month'];\n $startYear = $row['year'];\n \n $row = end($data);\n $endMonth = $row['month'];\n $endYear = $row['year'];\n \n $totalMonthsCount = $this->getMonthsCount(\n $startMonth,\n $startYear,\n $endMonth,\n $endYear\n );\n \n $monthsWithoutCodesCount = $totalMonthsCount - $monthsWithCodesCount;\n \n // Here's the gist\n $average = round(($monthsWithCodesCount / $totalMonthsCount) * $monthsWithoutCodesCount);\n \n if ($average == 0) {\n $average = 1;\n }\n \n $this->setCustomerClaimAcquisitionAverage($customerId, $average);\n }\n }", "public function reportMonthlyAttendentForm()\n {\n $year = DB::table('student')->distinct()->get(array('year'));\n $shift = DB::table('shift')->get();\n $dept = DB::table('department')->where('status',1)->get();\n $semister = DB::table('semister')->where('status',1)->get();\n return view('report.reportMonthlyAttendentForm')\n ->with('year',$year)\n ->with('shift',$shift)\n ->with('dept',$dept)\n ->with('semister',$semister);\n }", "public function getTotalPaid();", "public function monthlyConsumption(Request $request){\n $year = date('Y');\n //List all registered ModBus Gateway\n $gateway = Gateway::where('MANUFACTURER_ID',2)->get();\n //Loop all registered ModBus Gateway\n foreach ($gateway as $modBusIP) {\n $gatewayID = $modBusIP->GATEWAY_ID;\n $floorID = $modBusIP->FLOOR_ID;\n //List all registered Electric Meters in a modbus gateway\n $meters = ElectricMeter::where('GATEWAY_ID',$gatewayID)\n ->where('REG_FLAG',1)->get();\n $months = [];\n //Loop 12times (January to December)\n for($i=1;$i<=12; $i++){\n $perMonthData = 0;\n // Get data of each electric meter per month\n foreach ($meters as $meter) {\n $meterID = $meter->SLAVE_ID;\n //Get the latest reading of electric meter in current month iteration\n $res = EMeterData::where('METER_ID', $meterID)\n ->whereMonth('CREATED_AT', '=', $i)\n ->whereYear('CREATED_AT', '=', $year)\n ->latest()->first();\n if(!empty($res) || $res == !null ){\n //Sum of electric meters\n $perMonthData += $res->CURRENT_MONTH_KWH;\n $perMonthData = round($perMonthData, 4);\n }\n }\n //Random floating number of 1.00 to 10.00 for no month data\n if($perMonthData == 0){\n // $perMonthData = number_format((float)(1 + mt_rand() / mt_getrandmax() * (10 - 1)), 2, '.', '');\n }\n $json = array('months' => substr(date('F', mktime(0, 0, 0,\n $i, 1)),0,3), 'floor_data' => $perMonthData);\n array_push($months, $json);\n }\n return $months;\n }\n }", "public function getMonthlyFee();", "function hospital_payment_calculation($number_of_beds,$application)\n{\n\n\tif ($application->application_type == 2) $peneltyOnTotalMonth = getDiffrentBetweenTwoDatesInMonth($application->date_of_expiry_certificate,date('Y-m-d'));\n\n\t$payment_array = array();\n\tif ($number_of_beds <= 5) {\n\t\t$payment_array['amount'] = ($application->application_type == 1) ? 1000*2 : 500*3 + $peneltyOnTotalMonth*100 ;\n\t\t$payment_array['form_chargis'] = ($application->application_type == 1) ? 200 : 100 ;\n\t\t$payment_array['total_amount'] = $payment_array['form_chargis'] + $payment_array['amount'];\n\n\t} elseif ($number_of_beds >= 6 && $number_of_beds <= 10) {\n\t\t$payment_array['amount'] = ($application->application_type == 1) ? 1500*2 : 750*3 + $peneltyOnTotalMonth*100;\n\t\t$payment_array['form_chargis'] = ($application->application_type == 1) ? 200 : 100 ;\n\t\t$payment_array['total_amount'] = $payment_array['form_chargis'] + $payment_array['amount'];\n\n\t} elseif ($number_of_beds >= 11 && $number_of_beds <= 15) {\n\t\t$payment_array['amount'] = ($application->application_type == 1) ? 2000*2 : 1000*3 + $peneltyOnTotalMonth*100;\n\t\t$payment_array['form_chargis'] = ($application->application_type == 1) ? 200 : 100 ;\n\t\t$payment_array['total_amount'] = $payment_array['form_chargis'] + $payment_array['amount'];\n\n\t} else if ($number_of_beds >= 16) {\n\t\t$payment_array['amount'] = ($application->application_type == 1) ? 5000*2 : 2500*3 + $peneltyOnTotalMonth*100;\n\t\t$payment_array['form_chargis'] = ($application->application_type == 1) ? 200 : 100 ;\n\t\t$payment_array['total_amount'] = $payment_array['form_chargis'] + $payment_array['amount'];\n\n\t} else {\n\t\t$payment_array['amount'] = ($application->application_type == 1) ? 0*3 : 1*3 + $peneltyOnTotalMonth*100;\n\t\t$payment_array['form_chargis'] = ($application->application_type == 1) ? 200 : 100 ;\n\t\t$payment_array['total_amount'] = $payment_array['form_chargis'] + $payment_array['amount'] + $beds_renewal_charges;\n\t}\n\treturn json_decode(json_encode($payment_array));\n}", "public function sumConfirmedByMonth($year)\n {\n return $this->repo->select(DB::raw(\"month(bil_date) as mth, sum(bili_gross) as total\"))\n ->join('bills', 'bil_id', '=', 'bili_bill')\n ->join('resources', 'rs_id', '=', 'bili_resource')\n ->join('resource_types', 'rty_id', '=', 'rs_type')\n ->leftJoin('bookings', 'book_id', '=', 'bil_booking')\n ->where('bili_active', '=', 1)\n ->where('bil_status', '=', 'active')\n ->where(function ($query) {\n $query->whereNotIn('book_status', ['cancelled', 'hold'])->orWhereNull('book_status');\n })\n ->whereYear('bil_date', $year)\n ->groupBy(DB::raw(\"month(bil_date)\"))->get();\n }", "public function calculate(Request $request)\n {\n \t$this->validate($request, [\n \t\t'start_date' => 'required',\n \t\t'end_date' => 'required',\n \t]);\n\n \t// get monthly days array\n \t$monthlyDays = getMonthlyDays();\n\n \t$startArray = explode('/', $request->start_date);\n\t\t$endArray = explode('/', $request->end_date);\n\n\t\t$startDate = (int)$startArray[0];\n\t\t$endDate = (int)$endArray[0];\n\t\t$startMonth = (int)$startArray[1];\n\t\t$endMonth = (int)$endArray[1];\n\t\t$startYear = (int)$startArray[2];\n\t\t$endYear = (int)$endArray[2];\n\n\t\t// get yearly days array\n\t\t$totalDaysInYears = [];\n\t\t$leap_years = [];\n\t\tfor ($i = $startYear; $i < $endYear + 1; $i++) {\n\t\t\t$totalDaysInYears[$i] = getYearDays($i);\n\t\t\tif ($totalDaysInYears[$i]==366) {\n\t\t\t\t$leap_years[] = $i;\n\t\t\t}\n\t\t}\n\n\t\t// If both year and months are same\n\t\tif (($startYear == $endYear) && ($startMonth == $endMonth)) {\n\t\t\t$finalDays = $endDate - $startDate;\n\t\t// If only year is same\n\t\t} elseif ($startYear == $endYear) {\n\t\t\t// get total monthly days\n\t\t\t$finalDays = 0;\n\t\t\tfor ($i = $startMonth; $i < $endMonth + 1; $i++) {\n\t\t\t\tif ($i == $startMonth) {\n\t\t\t\t\t$finalDays += $monthlyDays[$i] - $startDate;\n\t\t\t\t} elseif ($i == $endMonth) {\n\t\t\t\t\t$finalDays += $endDate;\n\t\t\t\t} else {\n\t\t\t\t\t$finalDays += $monthlyDays[$i];\n\t\t\t\t}\n\t\t\t}\n\t\t\t// reduce 1 day from total days of year if year isn't leap and start month is 1 or 2 or end month is not 1 or 2\n\t\t\tif (($totalDaysInYears[$startYear] == 365) && (in_array($startMonth, [1, 2])) && (!in_array($endMonth, [1, 2]))) {\n\t\t\t\t$finalDays -= 1;\n\t\t\t}\n\t\t} else {\n\t\t\t// ========== Start years days count ========== //\n\t\t\t// get total monthly days\n\t\t\t$totalStartYearsDays = 0;\n\t\t\tfor ($i = $startMonth + 1; $i < 13; $i++) {\n\t\t\t\t$totalStartYearsDays += $monthlyDays[$i];\n\t\t\t}\n\n\t\t\t// get start months current days and add to total days in start year\n\t\t\t$totalStartYearsDays += $monthlyDays[$startMonth] - $startDate;\n\n\t\t\t// reduce 1 day from total days of year if year isn't leap and start month is 1 or 2\n\t\t\tif (($totalDaysInYears[$startYear] == 365) && (in_array($startMonth, [1, 2]))) {\n\t\t\t\t$totalStartYearsDays -= 1;\n\t\t\t}\n\n\t\t\t// ========== End years days count ========== //\n\t\t\t// get total monthly days\n\t\t\t$totalEndYearsDays = 0;\n\t\t\tfor ($i = 1; $i < $endMonth; $i++) {\n\t\t\t\t$totalEndYearsDays += $monthlyDays[$i];\n\t\t\t}\n\n\t\t\t// get start months current days and add to total days in start year\n\t\t\t$totalEndYearsDays += $endDate;\n\n\t\t\t// reduce 1 day from total days of year if year isn't leap and end month is not 1 or 2\n\t\t\tif (($totalDaysInYears[$endYear] == 365) && (!in_array($endMonth, [1, 2]))) {\n\t\t\t\t$totalEndYearsDays -= 1;\n\t\t\t};\n\t\t\t// print_r($totalDaysInYears[0] - $totalStartYearsDays $totalEndYearsDays);exit();\n\n\t\t\t// total days between two dates\n\t\t\t$finalDays = 0;\n\t\t\tforeach ($totalDaysInYears as $year => $days) {\n\t\t\t\tif ($year == $startYear) {\n\t\t\t\t\t$finalDays += $totalStartYearsDays;\n\t\t\t\t} elseif ($year == $endYear) {\n\t\t\t\t\t$finalDays += $totalEndYearsDays;\n\t\t\t\t} else {\n\t\t\t\t\t$finalDays += $days;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// if end date option included or not\n\t\tif ($request->end_date_included == true) {\n\t\t\t$end_date_included = 1;\n\t\t\t$finalDays += 1;\n\t\t} else {\n\t\t\t$end_date_included = 0;\n\t\t}\n\n\t\t// save to database\n\t\t$dateCalculation = new DateCalculation;\n\t\t$dateCalculation->start_date = $request->start_date;\n\t\t$dateCalculation->end_date = $request->end_date;\n\t\t$dateCalculation->end_date_included = $end_date_included;\n\t\t$dateCalculation->difference = $finalDays;\n\t\t$dateCalculation->created_at = now();\n\t\t$dateCalculation->save();\n\n\t\t$msg = 'Total Days difference: '.$finalDays;\n\t\tif (!empty($leap_years)) {\n\t\t\t$msg = 'Total Days difference: '.$finalDays.' Leap year '.sizeof($leap_years).' detected :'.implode(',', $leap_years);\n\t\t}\n \treturn response()->json(['success' => true, 'message' => $msg]);\n }", "function line_demand_total($line_orders) {\n $line_demand_total = array_reduce(\n $line_orders,\n function ($sum, $line) {\n return $sum + intval($line[QUANTITY]);\n },\n 0);\n return $line_demand_total;\n}", "public function Prevision(Request $request)\n {\n $domains = Domain::selectUltimateDomain();\n $date = $request->get(\"date\");\n // dd($date);\n $prevision = [\n \"nextYearRenewal\" => 0,\n \"totalRegistration\" => 0,\n \"totalRenewal\" => 0\n ];\n if ($date) {\n [$year, $month] = explode(\"-\", $date);\n $selectedMonthRegistrations = Domain::findByTypeAndMonth(\"REGISTER\", new DateTime(\"1-$month-$year\"));\n $totalRegistration = $selectedMonthRegistrations->reduce(function ($t, $registration) {\n return $t + $registration->price;\n });\n $nextYearRenewalTotal = $selectedMonthRegistrations->reduce(function ($t, $registration) {\n $type = $registration->type;\n $renewPrice = 0;\n switch ($type) {\n case 'STARTER':\n $renewPrice = 25000;\n break;\n case 'BUSINESS':\n $renewPrice = 30000;\n break;\n case 'PREMIUM':\n $renewPrice = 40000;\n break;\n case 'ULTIMATE':\n $renewPrice = 50000;\n break;\n default:\n $renewPrice = 0;\n break;\n }\n return $t + $renewPrice;\n });\n $selectedMonthRenewals = Domain::findByTypeAndMonth(\"RENEW\", new DateTime(\"1-$month-$year\"));\n $totalRenewal = $selectedMonthRenewals->reduce(function ($t, $registration) {\n return $t + $registration->price;\n });\n\t\t\t// dd($totalRenewal, $nextYearRenewalTotal, $totalRegistration);\n $prevision = [\n \"nextYearRenewal\" => number_format($nextYearRenewalTotal),\n \"totalRegistration\" => number_format($totalRegistration),\n \"totalRenewal\" => number_format($totalRenewal),\n \"sum\" => number_format($totalRegistration + $totalRenewal),\n \"date\" => new DateTime(\"1-$month-$year\")\n ];\n }\n\n\n $data = [\n 'sale_of_last_month' => number_format(Domain::sale_of_last_month()),\n 'sale_of_current_month' => number_format(Domain::sale_of_current_month()),\n 'percent_of_recipes' => number_format(abs(Domain::percent_of_sale()), 2),\n 'domain_verify' => count(Domain::domain_verify()),\n 'domain_paid' => count(Api::getInvoices()),\n 'domain_account' => Domain::domainDistinct(),\n 'total_user' => Domain::userDistinct(),\n 'user' => auth()->user()->name,\n 'role' => auth()->user()->isRole(),\n 'Action' => 'Show all Domain Name',\n 'ip' => $_SERVER['REMOTE_ADDR'],\n \"prevision\" => $prevision\n ];\n Log::info($data);\n return view('dashboard.accountant.prevision', $data, ['domains' => $domains]);\n }", "public static function paymentsForMonth($yearMonth)\n {\n $Paid = Invoice::find_by_sql(\"SELECT \n SUM(`sum`) as summary\n FROM\n ((SELECT \n SUM(`sum`) AS `sum`\n FROM\n invoices\n WHERE\n `status` = 'Paid' \n AND \n `paid` = '0' \n AND \n paid_date BETWEEN '$yearMonth-01' AND '$yearMonth-31'\n Group By \n `sum`\n ) \n UNION ALL (SELECT \n SUM(T3.`amount`) AS `sum`\n FROM\n invoice_has_payments AS T3\n LEFT JOIN\n invoices AS T4\n ON \n T3.invoice_id = T4.id \n WHERE \n (T4.`status` = 'PartiallyPaid' OR (T4.`status` = 'Paid' AND T4.`paid` != '0'))\n AND \n T3.`date` BETWEEN '$yearMonth-01' AND '$yearMonth-31' \n GROUP BY \n `sum`\n ) ) t1\n \");\n\n return $Paid[0]->summary;\n }", "public function AdjustAgreement($sNextProcessDate) {\r\n\r\n\r\n $ch = curl_init();\r\n\r\n $CURLParameters = http_build_query(array(\r\n // Our default parameters!\r\n \"key\" => $this->key,\r\n \"appid\" => $this->game,\r\n // This can vary from request to request, sometimes its steamid or steamids or even an array.\r\n \"steamid\" => $this->steamid,\r\n // Custom Queries below here.\r\n 'nextprocessdate' => $sNextProcessDate,\r\n \"agreementid\" => $this->agreementid,\r\n ));\r\n\r\n curl_setopt($ch, CURLOPT_URL, \"https://partner.steam-api.com/\" . $this->interface . \"/AdjustAgreement/v1/\");\r\n\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n curl_setopt($ch, CURLOPT_POST, 1);\r\n curl_setopt($ch, CURLOPT_POSTFIELDS, $CURLParameters);\r\n $CURLResponse = json_decode(curl_exec($ch));\r\n $CURLResponseCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\r\n curl_close($ch);\r\n\r\n\r\n // Error handling improved!\r\n\r\n if ($CURLResponseCode != 200) {\r\n if ($CURLResponseCode == 400) {\r\n throw new exceptions\\SteamRequestParameterException(\"The Agreement ID or another parameter is invalid!\");\r\n }\r\n if ($CURLResponseCode == 401) {\r\n throw new exceptions\\SteamException(\"App ID or API Key is invalid.\");\r\n }\r\n throw new exceptions\\SteamRequestException(\"$CURLResponseCode Request Error.\");\r\n }\r\n\r\n if ($CURLResponse->response->result == \"OK\") {\r\n return true;\r\n }\r\n\r\n throw new exceptions\\SteamRequestException(json_encode($CURLResponse->response->error));\r\n }", "public function getProfitMonth(){\n\t\tglobal $db;\n\t\t$date_now = date('Y-m').'-01';\n\t\t$last_month = date('Y-m', strtotime('-1 month')).'-01';\n\n\t\t$sql = $db->prepare(\"SELECT SUM(price) FROM project01_report WHERE date_init BETWEEN '$last_month' AND '$date_now' \");\n\t\t$sql->execute();\n\t\tif ($sql->rowCount()>0) {\n\t\t\t$profit = $sql->fetch();\n\t\t\treturn $profit;\n\t\t}\n\t}", "function total_monthly_cost($sum, $months, $monthfee, $rate, $startfee, $cur)\n{\n\t$sum_j_to_N = 0;\n\t// reference: Avbetalningsplaner.pdf\n\t$K0 = $sum;\n\t$A = $monthfee;\n\t$S = $startfee;\n\t$R = (pow(1.0+$rate/10000, 1.0/12.0));\n\t$N = $months;\n\tif ($rate == 0)\n\t$T = (1 / $N)*($K0 + ($N * $A) + $S);\n\telse\n\t{\n\t\t// the total cost of fees plus the cost of paying off the monthly fee first and after that amortize\n\t\tfor ($j = 2; $j < $N+1; $j++)\n\t\t{\n\t\t\t$sum_j_to_N = $sum_j_to_N + pow($R, $N - $j) * $A;\n\t\t}\n\t\t$T = (($R - 1) / (pow($R, $N) - 1)) * (pow($R, $N) * $K0 + $sum_j_to_N + pow($R, $N - 1) * ($A + $S));\n\t}\n\n\treturn round($T, 0);\n}", "public function sumCashTransactionPerMonths(): array\n {\n $months = ['jan', 'feb', 'mar', 'apr', 'mei', 'jun', 'jul', 'agu', 'sep', 'okt', 'nov', 'des'];\n\n for ($i = 1; $i <= 12; $i++) {\n // Looping dari angka 1-12 karena setiap tahun ada 12 bulan dan menghitung kolom amount\n // berdasarkan bulannya.\n $cashTransactions = $this->model\n ->select('is_paid', 'amount', 'date')\n ->whereMonth('date', \"{$i}\")\n ->whereYear('date', date('Y'))\n ->sum('amount');\n\n $results[$months[$i - 1]] = $cashTransactions;\n }\n\n /**\n * Output yang akan dihasilkan seperti dibawah ini\n * \n * $results = [\n * 'jan' => 10000,\n * 'feb' => 10000,\n * 'mar' => 10000,\n * 'apr' => 10000,\n * 'mei' => 10000,\n * 'jun' => 10000,\n * 'jul' => 10000,\n * 'agu' => 10000,\n * 'sep' => 10000,\n * 'okt' => 10000,\n * 'nov' => 10000,\n * 'des' => 10000\n * ];\n */\n\n return $results;\n }", "function cal_days_in_year($year){\n $days=0; \n for($month=1;$month<=12;$month++){ \n $days = $days + cal_days_in_month(CAL_GREGORIAN,$month,$year);\n }\n return $days;\n}", "public function iN_CurrentMonthTotalSubscriptionEarning() {\n\t\t$query = mysqli_query($this->db, \"SELECT SUM(admin_earning) AS MonthTotalEarnSubscription FROM i_user_subscriptions WHERE status = 'active' AND MONTH(created) = MONTH(CURDATE()) \") or die(mysqli_error($this->db));\n\t\t$row = mysqli_fetch_array($query, MYSQLI_ASSOC);\n\t\treturn isset($row['MonthTotalEarnSubscription']) ? $row['MonthTotalEarnSubscription'] : '0.00';\n\t}", "function exeAddEmp13Month() {\n $exetGet13Month = $this->db->query(\"SELECT *\n FROM 13month\n WHERE yearperiod = '\". $this->uri->segment(3).\"\n AND user_id = \".$this->db->escape($_POST['userid']).\" \");\n\n if($exetGet13Month->num_rows() > 0) {\n return false;\n } else {\n $checkemp = $this->db->query(\"SELECT * \n FROM employee_details\n WHERE user_id = \".$this->db->escape($_POST['userid']).\" \");\n \n $check = $checkemp->result_array();\n $salary = $check[0]['salary'];\n \n $bonus = ($_POST['workedmonths'] * $salary)/12;\n if($bonus > 30000) {\n $temp = $bonus - 30000;\n $bonus_taxed = $temp - ($temp * 0.32);\n $totabonus = $bonus_taxed + $bonus;\n } else {\n $totabonus = $bonus; \n }\n \n $exeAddEmp13Month = $this->db->query(\"INSERT INTO 13month\n SET user_id = \".$this->db->escape($_POST['userid']).\",\n yearperiod = '\". $this->uri->segment(3).\"',\n no_of_months = \".$this->db->escape($_POST['workedmonths']).\",\n amount = \".$this->db->escape($totabonus).\",\n status = \".$this->db->escape($_POST['status']).\" \");\n\n $rsQuery['affRows'] = $this->db->affected_rows();\n return $rsQuery;\n }\n }", "function obtain_month_profitable($acc_number)\n\t{\n\t return $this->db->select('AVG(pamm_tp_profitable) AS ptp,monthname(pamm_tp_timestamp) AS month, year(pamm_tp_timestamp) AS year')\n\t\t ->from('pamm_tp_results') \n\t\t ->where(\"pamm_tp_account\",$acc_number)\n\t\t ->group_by('monthname(pamm_tp_timestamp)')\n\t\t ->order_by('pamm_tp_timestamp','ASC')\n\t\t ->get()->result();\n\t}", "public function calculate() {\n\t\t\tif (!$this->as_refid) {\n\t\t\t\tthrow new Exception('Assessment is not created!');\n\t\t\t}\n\t\t\t$res = db::execSQL(\"\n\t\t\t\tSELECT ae.trial_num,\n\t\t\t\t\t ind.met_mastery,\n\t\t\t\t\t ae.trial_date\n\t\t\t\t FROM webset.std_bgb_measurement_benchmark AS mb\n\t\t\t\t\t INNER JOIN webset.std_bgb_measurement_indicator AS mi ON mi.mi_refid = mb.mi_refid\n\t\t\t\t INNER JOIN webset.std_bgb_indicator AS ind ON ind.ind_refid = mi.ind_refid\n\t\t\t\t INNER JOIN webset.std_bgb_measurement AS m ON m.m_refid = mi.m_refid\n\t\t INNER JOIN webset.std_bgb_assessment_entry AS ae ON ae.en_refid = mb.en_refid\n\t\t\t\t WHERE ae.as_refid = \" . $this->as_refid . \"\n\t\t\t\t AND ind.vndrefid = VNDREFID\n\t\t\t\t AND m.type_measure = 'Measurable'\n\t\t\t\t ORDER BY 1 ASC\n\t\t \")\n\t\t\t\t->assocAll();\n\n\t\t\t$trial_res = array();\n\t\t\tforeach ($res as $key => $value) {\n\t\t\t\tif (!array_key_exists($value['trial_num'], $trial_res)) {\n\t\t\t\t\t$trial_res[$value['trial_num']]['com_num'] = 1;\n\t\t\t\t\t$trial_res[$value['trial_num']]['date'] = $value['trial_date'];\n\t\t\t\t\tif ($value['met_mastery'] == 'Y') {\n\t\t\t\t\t\t$trial_res[$value['trial_num']]['met_num'] = 1;\n\t\t\t\t\t} elseif ($value['met_mastery'] == 'N') {\n\t\t\t\t\t\t$trial_res[$value['trial_num']]['met_num'] = 0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$trial_res[$value['trial_num']]['com_num'] += 1;\n\t\t\t\t\t$trial_res[$value['trial_num']]['date'] = $value['trial_date'];\n\t\t\t\t\tif ($value['met_mastery'] == 'Y') {\n\t\t\t\t\t\t$trial_res[$value['trial_num']]['met_num'] += 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$graph_res = array();\n\t\t\tif ($this->unit_of_measure == 'P') {\n\t\t\t\tforeach ($trial_res as $key => $value) {\n\t\t\t\t\t$graph_res[$key]['result'] = round(($value['met_num'] / $value['com_num']) * 100);\n\t\t\t\t\t$graph_res[$key]['date'] = $value['date'];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tforeach ($trial_res as $key => $value) {\n\t\t\t\t\t$graph_res[$key]['result'] = $value['met_num'];\n\t\t\t\t\t$graph_res[$key]['date'] = $value['date'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $graph_res;\n\t\t}", "public function iN_CurrentMonthTotalPremiumEarning() {\n\t\t$query = mysqli_query($this->db, \"SELECT SUM(admin_earning) AS MonthTotalEarnPremium FROM i_user_payments WHERE payment_type = 'post' AND payment_status = 'ok' AND MONTH(FROM_UNIXTIME(payment_time)) = MONTH(CURDATE()) \") or die(mysqli_error($this->db));\n\t\t$row = mysqli_fetch_array($query, MYSQLI_ASSOC);\n\t\treturn isset($row['MonthTotalEarnPremium']) ? $row['MonthTotalEarnPremium'] : '0.00';\n\t}", "public function calculateSalary($grade, $salary_step, $revision_year){\n $gr3_start = 22935;//Grade 3, step 01 basic salary at 2015\n $gr3_end = 47615;//Grade 3, step 01 basic salary at 2020\n $gr3_start_incr = 645;//Grade 3 increment at 2015\n $gr3_end_incr = 1335;//Grade 3 increment at 2020\n\n $gr2_start = 30175;//Grade 2, step 12 basic salary at 2015\n $gr2_end = 62595;//Grade 2, step 12 basic salary at 2020\n $gr2_start_incr = 790;//Grade 2 increment at 2015\n $gr2_end_incr = 1630;//Grade 2 increment at 2020\n\n $gr1_start = 36755;//Grade 1, step 20 basic salary at 2015\n $gr1_end = 76175;//Grade 1, step 20 basic salary at 2020\n $gr1_start_incr = 1050;//Grade 1 increment at 2015\n $gr1_end_incr = 2170;//Grade 1 increment at 2020\n\n $grsp_start = 42390;//Grade 1, step 20 basic salary at 2015\n $grsp_end = 88000;//Grade 1, step 20 basic salary at 2020\n $grsp_start_incr = 1310;//Grade 1 increment at 2015\n $grsp_end_incr = 2700;//Grade 1 increment at 2020\n\n if($grade == 'Grade I'){\n\n $salary = ($gr1_start + ($gr1_start_incr * ($salary_step - 20))) + ((($gr1_end + ($gr1_end_incr * ($salary_step - 20))) - ($gr1_start + ($gr1_start_incr * ($salary_step - 20))))/5)*($revision_year - 2015);\n\n }else if($grade == 'Grade II'){\n\n $salary = ($gr2_start + ($gr2_start_incr * ($salary_step - 12))) + ((($gr2_end + ($gr2_end_incr * ($salary_step - 12))) - ($gr2_start + ($gr2_start_incr * ($salary_step - 12))))/5)*($revision_year - 2015);\n\n }else if($grade == 'Grade III'){\n\n $salary = ($gr3_start + ($gr3_start_incr * ($salary_step - 1))) + ((($gr3_end + ($gr3_end_incr * ($salary_step - 1))) - ($gr3_start + ($gr3_start_incr * ($salary_step - 1))))/5)*($revision_year - 2015);\n\n }else if($grade == 'Special Grade'){\n\n $salary = ($grsp_start + ($grsp_start_incr * ($salary_step - 1))) + ((($grsp_end + ($grsp_end_incr * ($salary_step - 1))) - ($grsp_start + ($grsp_start_incr * ($salary_step - 1))))/5)*($revision_year - 2015);\n\n }\n return $salary;\n }", "public function reporteMensualTotal(){\n\n }", "public function getCurrentMonthTotalOrder() : int;", "public function calcMonths($overage = 0.00)\n {\n // Can't use standard add on FP numbers\n $tab = bcadd($this->allocation_amt, $overage, 2);\n $result = FeeCalendar::getPeriodsCovered($this->getLobCd(), $this->getRateClass(), $this->getStartDt(), $tab);\n $this->unalloc_remainder = $result['overage'];\n return $result['periods'];\n }", "public function getTotalAttribute()\n {\n return $this->ca_test_score + $this->ca_exam_score;\n }", "function sales_report_annual($year){\n \t\t$this->db->select('products.PRODUCT, SUM(sales.QUANTITY_SOLD) SALES, products.COST_PRICE, products.SALES_PRICE');\n \t\t$this->db->from('sales');\n \t\t$this->db->join('products', 'products.PRODUCT_ID=sales.PRODUCT_ID', 'left');\n \t\t$this->db->where('YEAR(sales.SALES_DATE)', $year);\n \t\t$this->db->where('STATUS', 'Confirmed');\n \t\t$this->db->group_by('sales.PRODUCT_ID');\n\n \t\t$query=$this->db->get();\n \t\tif($query->num_rows()>0){\n \t\t\treturn $query->result();\n \t\t}\n \t\telse{\n \t\t\treturn false;\n \t\t}\n \t}", "public function calculateWeeklyCosts(){\n $view = $this->view;\n $view->setNoRender();\n \n \n Service::loadModels('user', 'user');\n Service::loadModels('team', 'team');\n Service::loadModels('people', 'people');\n Service::loadModels('league', 'league');\n Service::loadModels('car', 'car');\n Service::loadModels('rally', 'rally');\n $teamService = parent::getService('team','team');\n \n /*\n * Wydatki : \n * 1. Pensje zawodnikow\n * 2. Koszty utrzymania samochodu\n * \n * Przychody : \n * 1. Od sponsora (5000)\n */\n \n $teams = $teamService->getAllTeams();\n foreach($teams as $team):\n $playersValue = $teamService->getAllTeamPlayersSalary($team);\n if($playersValue!=0)\n $teamService->removeTeamMoney($team['id'],$playersValue,4,'Player salaries '); \n \n \n $carUpkeep = $teamService->getAllTeamCarsUpkeep($team);\n if($carUpkeep!=0)\n $teamService->removeTeamMoney($team['id'],$carUpkeep,5,'Cars upkeep'); \n \n if(!empty($team['sponsor_id'])){\n $teamService->addTeamMoney($team['id'],5000,2,'Money from '.$team['Sponsor']['name'].' received on '.date('Y-m-d')); \n }\n \n if($team['cash']<0){\n $negativeFinances = (int)$team->get('negative_finances');\n $negativeFinances++;\n $team->set('negative_finances',$negativeFinances);\n $team->save();\n \n if($negativeFinances>=5){\n $team->delete();\n $user = $team->get('User');\n $user->set('active',0);\n $user->save();\n }\n }\n else{\n $team->set('negative_finances',0);\n }\n \n $team->save();\n \n endforeach;\n echo \"done\";exit;\n }", "function get_totals(){\r\n $this_month = date('n', time()) - 1;\r\n\r\n $this->payments_this_month = $this->payment_totals_by_month[$this_month];\r\n\r\n $last_month = $this_month > 0 ? $this_month - 1 : false;\r\n if($last_month){\r\n $payments_last_month = $this->payment_totals_by_month[$last_month];\r\n\r\n if($payments_last_month > 0)\r\n $this->payments_this_month_change_percentage = (($this->payments_this_month/$payments_last_month) - 1) * 100;\r\n else $this->payments_this_month_change_percentage = 0;\r\n }\r\n }", "public static function generate()\n {\n $data = array();\n foreach (College::all() as $college) {\n # $current = The current year\n # $should = How many actieve assessors there is needed at the end of the year\n # $count = Count of all the active assessors\n $data[$college->id] = array(\n 'current' => date('Y'),\n 'should' => 1 + round(Assessors::where('fk_college', $college->id)->where('status', 1)->count() / 100 * 110),\n 'count' => Assessors::where('fk_college', $college->id)->where('status', 1)->count()\n );\n }\n return $data;\n }", "function obtain_year_profitable($acc_number)\n\t{\n\t return $this->db->select('AVG(pamm_tp_profitable) AS ptp,year(pamm_tp_timestamp) AS year')\n\t\t ->from('pamm_tp_results') \n\t\t ->where(\"pamm_tp_account\",$acc_number)\n\t\t ->group_by('year(pamm_tp_timestamp)')\n\t\t ->get()->result();\n\t}", "public function getSumma()\n {\n $summa = 0;\n\n foreach ($purchases as $purchase) {//place for future comments\n\n if($purchase->status_bought == 1)\n {\n\n if($purchase->first()->book->author->status_discont_id == 1 && $purchase->first()->book->discont_privat != 0 && $purchase->magazin->author->status_discont_id == 1 && $purchase->magazin->discont_privat != 0)\n\n {//\n\n if (round($purchase->first()->book->discont_global,2) >= round($purchase->first()->book->author->discont_id,2) && round($purchase->magazin->discont_global,2) >= round($purchase->magazin->author->discont_id,2)) \n\n {//\n\n $summa += ($purchase->first()->book->price - ($purchase->first()->book->price * $purchase->first()->book->discont_global / 100)) * $purchase->qty + ($purchase->magazin->price - ($purchase->magazin->price * $purchase->magazin->discont_global / 100)) * $purchase->qty_m;\n\n } elseif(round($purchase->first()->book->discont_global,2) <= round($purchase->first()->book->author->discont_id,2) && round($purchase->magazin->discont_global,2) <= round($purchase->magazin->author->discont_id,2))\n\n {//\n\n $summa += ($purchase->first()->book->price - ($purchase->first()->book->price * $purchase->first()->book->author->discont_id / 100)) * $purchase->qty + $purchase->magazin->price - ($purchase->magazin->price * $purchase->magazin->author->discont_id / 100)) * $purchase->qty_m;\n\n } elseif (round($purchase->first()->book->discont_global,2) >= round($purchase->first()->book->author->discont_id,2) && round($purchase->magazin->discont_global,2) <= round($purchase->magazin->author->discont_id,2))\n\n {//\n\n $summa += ($purchase->first()->book->price - ($purchase->first()->book->price * $purchase->first()->book->discont_global / 100)) * $purchase->qty + $purchase->magazin->price - ($purchase->magazin->price * $purchase->magazin->author->discont_id / 100)) * $purchase->qty_m;\n\n } elseif (round($purchase->first()->book->discont_global,2) <= round($purchase->first()->book->author->discont_id,2) && round($purchase->magazin->discont_global,2) >= round($purchase->magazin->author->discont_id,2))\n\n {//\n\n $summa += ($purchase->first()->book->price - ($purchase->first()->book->price * $purchase->first()->book->author->discont_id / 100)) * $purchase->qty + ($purchase->magazin->price - ($purchase->magazin->price * $purchase->magazin->discont_global / 100)) * $purchase->qty_m;\n\n } elseif (round($purchase->first()->book->discont_global,2) >= round($purchase->first()->book->author->discont_id,2))\n\n {//\n\n $summa += ($purchase->first()->book->price - ($purchase->first()->book->price * $purchase->first()->book->discont_global / 100)) * $purchase->qty + $purchase->magazin->price * $purchase->qty_m;//\n\n } elseif (round($purchase->first()->book->discont_global,2) <= round($purchase->first()->book->author->discont_id,2))\n\n {//\n\n $summa += ($purchase->first()->book->price - ($purchase->first()->book->price * $purchase->first()->book->author->discont_id / 100)) * $purchase->qty + $purchase->magazin->price * $purchase->qty_m;\n\n } elseif (round($purchase->magazin->discont_global,2) >= round($purchase->magazin->author->discont_id,2))\n\n {//\n\n $summa += ($purchase->magazin->price - ($purchase->magazin->price * $purchase->magazin->discont_global / 100)) * $purchase->qty_m + $purchase->first()->book->price * $purchase->qty;\n\n } elseif (round($purchase->magazin->discont_global,2) <= round($purchase->magazin->author->discont_id,2))\n\n {//\n\n $summa += ($purchase->magazin->price - ($purchase->magazin->price * $purchase->magazin->author->discont_id / 100)) * $purchase->qty_m + $purchase->first()->book->price * $purchase->qty;\n\n }\n\n // \n } elseif($purchase->first()->book->discont_privat != 0 && $purchase->magazin->discont_privat != 0)\n\n {//\n if($purchase->first()->book->discont_privat != 0) \n\n {//\n\n $summa += ($purchase->first()->book->price - ($purchase->first()->book->price * $purchase->first()->book->discont_global / 100)) * $purchase->qty + $purchase->magazin->price * $purchase->qty_m;\n\n\n }\n\n elseif($purchase->magazin->discont_privat != 0) \n\n {//\n\n $summa += ($purchase->magazin->price - ($purchase->magazin->price * $purchase->magazin->discont_global / 100)) * $purchase->qty_m + $purchase->first()->book->price * $purchase->qty;\n\n }\n\n $summa += ($purchase->first()->book->price - ($purchase->first()->book->price * $purchase->first()->book->discont_global / 100)) * $purchase->qty + ($purchase->magazin->price - ($purchase->magazin->price * $purchase->magazin->discont_global / 100)) * $purchase->qty_m;\n\n //\n } elseif($purchase->first()->book->author->status_discont_id == 1 && $purchase->magazin->author->status_discont_id == 1)\n\n {//\n\n if($purchase->first()->book->author->status_discont_id == 1) \n\n {//\n $summa += ($purchase->first()->book->price - ($purchase->first()->book->price * $purchase->first()->book->author->discont_id / 100)) * $purchase->qty + $purchase->magazin->price * $purchase->qty_m;\n\n }\n elseif($purchase->magazin->author->status_discont_id == 1) \n\n {//\n\n $summa += ($purchase->magazin->price - ($purchase->magazin->price * $purchase->magazin->author->discont_id / 100)) * $purchase->qty_m + $purchase->first()->book->price * $purchase->qty;\n\n }\n\n $summa += ($purchase->first()->book->price - ($purchase->first()->book->price * $purchase->first()->book->author->discont_id / 100)) * $purchase->qty + ($purchase->magazin->price - ($purchase->magazin->price * $purchase->magazin->author->discont_id / 100)) * $purchase->qty_m;\n\n // \n } else \n\n {//\n\n $summa += $purchase->first()->book->price * $purchase->qty + $purchase->magazin->price * $purchase->qty_m;\n\n }\n } \n\n }\n return $summa;\n\n }", "public function findSumByYear(\\DateTime $date);", "public static function getSalePerDay($i,$month,$year,$branch)\n {\n $str = $i. '-' . $month . '-' . $year;\n $date = date('Y-m-d', strtotime($str));\n $data = DB::table('month_sales')->where('branch_id', $branch)->where('_date', $date)->first();\n\n $with_receipt_total = 0;\n $with_out_receipt_total = 0;\n $credit_total = 0;\n $expense_total = 0;\n $return_total = 0;\n $total_amount = 0;\n $taken_total = 0;\n $deposit_total = 0;\n $is_check = 2;\n $coh = 0;\n\n\n $expense_string = '';\n $firstRec ='' ;\n $lastRec ='' ;\n\n $number_of_check = 0;\n\n if($data != null){\n $json_data = json_decode($data->data,TRUE);\n\n\n $rec_no = [];\n foreach ($json_data['with_receipt'] as $key => $val){\n $total =0;\n if($val['rec_amount'] == 'null'){\n $total= 0;\n }else{\n $total = $val['rec_amount'];\n }\n $with_receipt_total = $with_receipt_total + $total ;\n array_push($rec_no,$val['rec_no']);\n\n $number_of_check = $number_of_check + (isset($val['is_check']) ? 1 : 0 );\n }\n\n $firstRec = $rec_no[0];\n $lastRec = $rec_no[count($rec_no) - 1];\n\n foreach ($json_data['without_receipt'] as $key => $val){\n $total =0;\n if($val['amount'] == 'null'){\n $total= 0;\n }else{\n $total = $val['amount'];\n }\n $with_out_receipt_total = $with_out_receipt_total + $total ;\n }\n foreach ($json_data['credit'] as $key => $val){\n $total =0;\n if($val['amount'] == 'null'){\n $total= 0;\n }else{\n $total = $val['amount'];\n }\n $credit_total = $credit_total + $total ;\n }\n foreach ($json_data['expense'] as $key => $val){\n $total =0;\n if($val['amount'] == 'null'){\n $total= 0;\n }else{\n $total = $val['amount'];\n }\n $expense_total = $expense_total + $total ;\n\n $expense_string .= $val['details'].' ';\n\n }\n foreach ($json_data['return'] as $key => $val){\n $total =0;\n if($val['amount'] == 'null'){\n $total= 0;\n }else{\n $total = $val['amount'];\n }\n $return_total = $return_total + $total ;\n }\n\n\n $amount_1000 = ($json_data['amount_1000'] != null) ? json_decode($data->data,TRUE)['amount_1000'] * 1000 : 0;\n $amount_500 = ($json_data['amount_500'] != null) ? json_decode($data->data,TRUE)['amount_500'] * 500 : 0;\n $amount_100 = ($json_data['amount_100'] != null) ? json_decode($data->data,TRUE)['amount_100'] * 100 : 0;\n $amount_50 = ($json_data['amount_50'] != null) ? json_decode($data->data,TRUE)['amount_50'] * 50 : 0;\n $amount_20 = ($json_data['amount_20'] != null || json_decode($data->data,TRUE)['amount_20'] != '') ? json_decode($data->data,TRUE)['amount_20'] * 20 : 0;\n $amount_coins = ($json_data['amount_coins'] != null) ? json_decode($data->data,TRUE)['amount_coins'] : 0;\n $total_amount = $amount_1000 + $amount_500 + $amount_100 + $amount_50 +$amount_20+ $amount_coins;\n $is_check = (isset($json_data['is_check'])) ? json_decode($data->data,TRUE)['is_check'] : $is_check;\n $coh = (isset($json_data['coh'])) ? json_decode($data->data,TRUE)['coh'] : $coh;\n\n foreach (json_decode($data->data,TRUE)['taken'] as $key => $val){\n $total =0;\n if($val['amount'] == 'null'){\n $total= 0;\n }else{\n $total = $val['amount'];\n }\n $taken_total = $taken_total + $total ;\n }\n foreach (json_decode($data->data,TRUE)['deposit'] as $key => $val){\n $total =0;\n if($val['amount'] == 'null'){\n $total= 0;\n }else{\n $total = $val['amount'];\n }\n $deposit_total = $deposit_total + $total ;\n }\n\n }\n\n\n $_data =[\n 'with_receipt_total' =>$with_receipt_total,\n 'with_out_receipt_total' =>$with_out_receipt_total,\n 'credit_total' =>$credit_total,\n 'expense_total' =>$expense_total,\n 'return_total' =>$return_total,\n 'amount_total' =>$total_amount,\n 'taken_total' =>$taken_total,\n 'deposit_total' =>$deposit_total,\n 'data' =>($data != null) ? $data->data : '',\n 'date' =>$date,\n 'is_check'=>$is_check,\n 'coh'=>$coh,\n 'expense_details'=>$expense_string,\n 'rec_no'=>$firstRec.'-'.$lastRec,\n 'number_of_check' =>$number_of_check\n\n\n ];\n\n\n return json_encode($_data);\n\n }", "public function run()\n {\n $yearRange = range(2018, 2020);\n $monthRange = range(1, 12);\n $salaries = [10000, 20000, 30000, 40000, 50000, 60000, 70000, 80000, 90000];\n $employeeSalaries = [];\n $i = 0;\n foreach(Employee::all() as $employee) {\n $salaryIncrement = $salaryAmount = 0;\n $i = isset($salaries[$i]) ? $i : 0;\n $salaryAmount = $salaries[$i];\n foreach($yearRange as $year) {\n $salaryAmount += $salaryIncrement;\n foreach ($monthRange as $month) {\n // dump($salaryAmount .'-'. $year.'-'. $month.'===>'.$employee->id);\n $monthYear = Carbon::create($year, $month, '01');\n $employeeSalaries[] = [\n 'employee_id' => $employee->id,\n 'amount' => $salaryAmount,\n 'month_year' => date('Y-m-d', strtotime($monthYear->toDateTimeString())),\n ];\n }\n $salaryIncrement = 5000;\n }\n $i++;\n }\n //dd($employeeSalaries);\n EmployeeSalary::insert($employeeSalaries);\n }", "public function calculateRentalFees($rentalsData): array\n {\n// die(var_dump('test'));\n $totalAmount = 0;\n $frequentRenterPoints = 0;\n $rentals = [];\n\n foreach ($rentalsData as $rental) {\n\n $thisAmount = 0;\n\n switch($rental->code_name) {\n case Movie::REGULAR:\n case Movie::SCI_FI:\n $thisAmount += 2;\n if ($rental->duration > 2) {\n $thisAmount += ($rental->duration - 2) * 1.5;\n }\n break;\n case Movie::NEW_RELEASE:\n $thisAmount += $rental->total_rentals * 3;\n if ($rental->duration > 1) {\n $frequentRenterPoints++;\n }\n break;\n case Movie::CHILDRENS:\n $thisAmount += 1.5;\n if ($rental->duration > 3) {\n $thisAmount += ($rental->duration - 3) * 1.5;\n }\n break;\n }\n\n $totalAmount += $thisAmount;\n $frequentRenterPoints++;\n $rentals[] = [\n 'name' => $rental->name,\n 'total_rentals' => $rental->total_rentals,\n 'duration' => $rental->duration,\n 'individual_amount_owed' => number_format($thisAmount, 2, '.', '')\n ];\n }\n\n $totals = [\n 'total_amount_owed' => number_format($totalAmount, 2, '.', ''),\n 'frequent_renter_points' => $frequentRenterPoints\n ];\n\n return [\n 'rentals' => $rentals,\n 'totals' => $totals\n ];\n }", "public function calculate(LoanApplication $application): float;", "function profit()\n\t{\n\t\t$total = 0;\n\t\t$ante = $this->properties->get('ante');\n\t\tforeach ($this->all() as $record)\n\t\t\tif (!empty($record->making))\n\t\t\t\t$total += $record->balance - $ante;\n\n\t\treturn $total;\n\t}", "public function calculate()\n {\n $person_id = $this->security->xss_clean($this->input->post('person_id'));\n $revision_date = $this->security->xss_clean($this->input->post('increment_date'));\n $grade = $this->security->xss_clean($this->input->post('grade'));\n $current_salary_step = $this->security->xss_clean($this->input->post('salary_step'));\n $revision_year = date(Y, strtotime($revision_date));\n\n $current_salary = $this->calculateSalary($grade, $current_salary_step, $revision_year-1);\n $new_salary = $this->calculateSalary($grade, $current_salary_step, $revision_year);\n\n $next_salary_increment = $this->calculateSalary($grade, $current_salary_step+1, $revision_year);\n\n $increment = $new_salary - $current_salary;\n\n $salaryDetails = array('new_salary' => $new_salary, 'increment' => $increment, 'current_salary' => $current_salary, 'next_salary' => $next_salary_increment, 'year' => $revision_year);\n\n echo json_encode($salaryDetails);\n }", "function Completed_Requests($year = '2014') {\r\n $query2 = $this->db->query(\"SELECT count(id) as total FROM `worksheet_tracking` WHERE date_added like '%$year%' AND stage < 11\");\r\n\r\n return $result = $query2->result();\r\n }", "public function getAcademic()\n {\n $now = Carbon::now();\n\n $year = $now->year + 4;\n\n return ($now->month >= 8) ? ($year - 1911) : ($year - 1912);\n }", "public function index()\n\t{\n\n\t\t$this->data['reportsActive'] = 'active';\n\n\t\t$year\t= (Input::get('year') != '') ? Input::get('year') : date('Y');\n\n\t\t$this->data['departments'] \t\t= \tDepartment::all();\n\t\t$this->data['projectexpenses'] = Expense::all();\n\t\t$this->data['employees'] \t\t= Salary::lists('hour_rate','employeeID');\n\n\t\tforeach( $this->data['departments'] as $department ) {\n\t\t\t$deptname[$department->id] \t\t= \t\"'\".$department->deptName.\"'\";\n\t\t\t$budget[$department->id] \t\t= \t$department->budget;\n\t\t\t$materials[$department->id] \t= \t$department->materials;\n\t\t\t$labor[$department->id] \t\t= \t$department->labor;\n\t\t\t$expenses[$department->id] \t\t= \tDB::select(\"select sum(price) as total from expenses where department=\".$department->id);\t\t\t\n\n\t\t\tforeach( $this->data['employees'] as $employeeID => $hour_rate ) {\n\t\t\t\t\n\t\t\t\t$total_work_hours \t\t\t\t\t\t= \tDB::select(\"select sum(work_hours) as work_hours from attendance where department=\".$department->id.\" AND employeeID=\".$employeeID);\n\t\t\t\t$total_overtime\t\t\t\t\t\t\t= \tDB::select(\"select sum(overtime) as overtime from attendance where department=\".$department->id.\" AND employeeID=\".$employeeID);\n\t\t\t\t//$rate[$department->id][$employeeID] \t= \t$total_work_hours[0]->work_hours * $hour_rate;\n\t\t\t\t$work_hours_rate\t\t\t\t\t\t= \t$total_work_hours[0]->work_hours * $hour_rate;\n\t\t\t\t$overtime_rate \t\t\t\t\t\t\t= \t$total_overtime[0]->overtime * $hour_rate;\n\t\t\t\t$rate[$department->id][$employeeID] \t= \t$work_hours_rate + $overtime_rate;\n\t\t\t}\n\t\t}\n\n\t\tforeach( $rate as $id => $arr ) {\n\t\t\t$total_labor_money[$id] \t\t= array_sum($arr);\n\t\t\t$total_labor_profit_money[$id] \t= $labor[$id] - $total_labor_money[$id];\n\t\t\t$total_labor[$id] \t\t\t\t= number_format(array_sum($arr)/$labor[$id],4);\n\t\t\t$total_labor_profit[$id] \t\t= number_format(1-(array_sum($arr)/$labor[$id]),4);\n\t\t}\n\n\t\tforeach( $expenses as $id => $sum ) {\n\t\t\t$total_expenses_money[$id] \t\t\t= $sum[0]->total;\n\t\t\t$total_expenses_profit_money[$id] \t= $materials[$id] - $total_expenses_money[$id] ;\n\t\t\t$total_expenses[$id] \t\t\t\t= number_format($sum[0]->total/$materials[$id],4);\n\t\t\t$total_expenses_profit[$id] \t\t= number_format(1-($sum[0]->total/$materials[$id]),4);\n\t\t}\n\n\t\tforeach( $deptname as $deptid => $dept ) {\n\t\t\t$budget_percent[$deptid] = number_format(1-($total_expenses_money[$deptid] + $total_labor_money[$deptid])/$budget[$deptid],4);\n\t\t\t$budget_money[$deptid] = $budget[$deptid] - ($total_expenses_money[$deptid] + $total_labor_money[$deptid]);\n\t\t}\n\t\t//return dd($budget_money);\n\t\t\n\t\t$this->data['departments']->alldept = implode(\",\", $deptname);\n\t\t$this->data['departments']->total_expenses = implode(\",\", $total_expenses);\n\t\t$this->data['departments']->total_labor = implode(\",\", $total_labor);\n\t\t$this->data['departments']->total_expenses_profit = implode(\",\", $total_expenses_profit);\n\t\t$this->data['departments']->total_labor_profit = implode(\",\", $total_labor_profit);\n\t\t\n\t\t//return dd($deptname);\n\n $series = \"\";\n $drilldown = \"\";\n foreach( $deptname as $deptid => $dept ) {\n \t$merged = \"'\".str_replace(\"'\",\"\",$dept).\"<br/>₱\".number_format($budget_money[$deptid],2).\"'\";\n \t$series .= \"{\n \t\tname: \".$merged.\",\n \t\ty: \".$budget_percent[$deptid].\",\n \t\tdrilldown: \".$dept.\"\n \t},\";\n\n \t$drilldown .= \"{\n id: \".$dept.\",\n data: [\n ['Materials Expenses<br>₱\".number_format($total_expenses_money[$deptid],2).\"', \".$total_expenses[$deptid].\"],\n ['Materials Profit<br>₱\".number_format($total_expenses_profit_money[$deptid],2).\"', \".$total_expenses_profit[$deptid].\"],\n ['Labor Expenses<br>₱\".number_format($total_labor_money[$deptid],2).\"', \".$total_labor[$deptid].\"],\n ['Labor Profit<br>₱\".number_format($total_labor_profit_money[$deptid],2).\"', \".$total_labor_profit[$deptid].\"],\n ]\n },\";\n\n }\n\n //return dd($series);\n $this->data['departments']->series \t\t= $series;\n $this->data['departments']->drilldown \t= $drilldown;\n\n\t\treturn View::make('admin.reports.index',$this->data);\n\n\t}", "public function reportTeacherMonthlyAttendent()\n {\n $year = DB::table('student')->distinct()->get(array('year'));\n return view('report.reportTeacherMonthlyAttendent')->with('year',$year);\n }", "public function reward(Request $request)\n {\n $this->user->achievement()->update([\n 'points' => ($this->user->achievement->points - $request->rewardPoints)\n ]);\n $this->user->rewards()->attach($request->rewardId, ['id' => Str::random()]);\n\n return response()->json([\n 'message' => \"Confirmation sent. Just present your reference # to the department office to claim your reward.\\n\\nReference #: {$this->user->rewards->first()->pivot->id}\"\n ]);\n }", "public static function retrieveTimesheetTotals($year)\n {\n $rows = Timesheet::whereYear('on_duty', $year)\n ->join('position', 'position.id', 'timesheet.position_id')\n ->where('position.count_hours', true)\n ->with([ 'person:id,callsign,status', 'position:id,title'])\n ->orderBy('timesheet.person_id')\n ->get();\n\n if (!$rows->isEmpty()) {\n PositionCredit::warmYearCache($year, array_unique($rows->pluck('position_id')->toArray()));\n }\n\n $timesheetByPerson = $rows->groupBy('person_id');\n\n $results = [];\n\n foreach ($timesheetByPerson as $personId => $entries) {\n $person = $entries[0]->person;\n\n $group = $entries->groupBy('position_id');\n $positions = [];\n $totalDuration = 0;\n $totalCredits = 0.0;\n\n // Summarize the positions worked\n foreach ($group as $positionId => $posEntries) {\n $position = $posEntries[0];\n $duration = $posEntries->pluck('duration')->sum();\n $totalDuration += $duration;\n $credits = $posEntries->pluck('credits')->sum();\n $totalCredits += $credits;\n $positions[] = [\n 'id' => $positionId,\n 'title' => $position->title,\n 'duration' => $duration,\n 'credits' => $credits,\n ];\n }\n\n // Sort by position title\n usort($positions, function ($a,$b) {\n return strcasecmp($a['title'], $b['title']);\n });\n\n $results[] = [\n 'id' => $personId,\n 'callsign' => $person ? $person->callsign : 'Person #'.$personId,\n 'status' => $person->status,\n 'positions' => $positions,\n 'total_duration' => $totalDuration,\n 'total_credits' => $totalCredits,\n ];\n }\n\n usort($results, function ($a, $b) {\n return strcasecmp($a['callsign'], $b['callsign']);\n });\n\n return $results;\n }", "public function actionPending_revenue() {\n\n /* redirect a user if not super admin */\n if (!Yii::$app->CustomComponents->check_permission('pending_revenue')) {\n return $this->redirect(['site/index']);\n }\n\n $dataService = $this->quickbook_instance();\n $courses_from_qb = $dataService->Query(\"SELECT * FROM Item\");\n $first_date_of_current_month = date(\"Y-m-01\"); /* Default Start Date for filter. Current month First date */\n $last_date_of_current_month = date(\"Y-m-t\"); /* Default End Date for filter. Current month Last date */\n $timestamp_of_first_date_of_month = strtotime($first_date_of_current_month);\n $timestamp_of_last_date_of_month = strtotime($last_date_of_current_month);\n\n $user = Yii::$app->user->identity;\n $usermeta_result = DvUserMeta::find()->where(['uid' => $user->id, 'meta_key' => 'role'])->one();\n $user_role = $usermeta_result->meta_value;\n $data = Yii::$app->request->post();\n\n $filter_data = array();\n $by_team_arr = array();\n $month_year_arr = array();\n $all_invoice_of_customer = array();\n $allInvoices = array();\n $allPayments = array();\n\n $total_invoices = $dataService->Query(\"SELECT count(*) FROM Invoice\");\n $total_payments = $dataService->Query(\"SELECT count(*) FROM Payment\");\n\n if ($data) {\n\n if ($user_role == 33) {\n $this->pending_revenue_manager_filter();\n } else {\n $first_date_of_current_month = date(\"Y-m-01\"); /* Default Start Date for filter. Current month First date */\n $last_date_of_current_month = date(\"Y-m-t\"); /* Default End Date for filter. Current month Last date */\n\n if (isset($data['sales_user_id']) && $data['sales_user_id'] != \"\") {\n $user_id = $data['sales_user_id'];\n } else {\n $user_id = $user->id;\n }\n\n if ($user_role == 7) {\n $filters = [];\n } else if ($user_role == 6) {\n $filters = ['sales_user_id' => $data['sales_user_id']];\n } else if ($user_role == 1) {\n $filters = [];\n } else {\n $filters = ['sales_user_id' => $user_id];\n }\n\n $team_ids = array();\n if (isset($data['email']) && $data['email'] != '') {\n $filter_data['email'] = $data['email'];\n }\n if ($data['bymonth'] != '' && $data['by_date_month'] == 'm') {\n\n $new_date = explode('_', $data['bymonth']);\n $fyear = $new_date['1'];\n $fmonth = $new_date['0'];\n\n if ($fmonth <= 9 && strlen($fmonth) == 1) {\n $fmonth = \"0\" . $fmonth;\n }\n $first_date_of_current_month = date(\"$fyear-$fmonth-01\");\n $last_date_of_current_month = $lastday = date('Y-m-t', strtotime($first_date_of_current_month));\n } else if ($data['by_date_month'] == 'd') {\n $first_date_of_current_month = date(\"Y-m-d\", strtotime($data['sdate']));\n $last_date_of_current_month = date(\"Y-m-d\", strtotime($data['edate']));\n }\n\n $timestamp_of_first_date_of_month = strtotime($first_date_of_current_month);\n $timestamp_of_last_date_of_month = strtotime($last_date_of_current_month);\n\n $allInvoices = array();\n $qb_cust_id_arr = array();\n\n if ($user_role == 7) {\n \n } else if ($user_role == 6) {\n \n } else if ($user_role != 1) {\n $filter_data['sales_user_id'] = $user->id;\n }\n if (isset($data['by_date_month'])) {\n\n if ($user_role == 7) { /* If current user is not super admin */\n\n if (isset($data['byTeam']) && !empty($data['byTeam'])) {\n $by_team_arr['byTeam'] = $data['byTeam'];\n $byteam = $data['byTeam'];\n if (isset($data['sales_user_id']) && !empty($data['sales_user_id'])) {\n if (count($data['sales_user_id']) == 1 && empty($data['sales_user_id'][0])) {\n $team_model_val = Yii::$app->db->createCommand(\"SELECT assist_user_meta.uid FROM assist_users join assist_user_meta ON assist_users.id = assist_user_meta.uid WHERE assist_user_meta.meta_key = 'team' and assist_user_meta.meta_value = $byteam \")->queryAll();\n $sales_head_str = \"\";\n if (!empty($team_model_val)) {\n foreach ($team_model_val as $m_sales_head) {\n $sales_head_str .= $m_sales_head['uid'] . \",\";\n }\n }\n $sales_head_str .= $byteam;\n $sales_head_str = rtrim($sales_head_str, \",\");\n\n $team = $data['byTeam'];\n $qb_id_from_us = Yii::$app->db->createCommand(\"SELECT * FROM assist_participant WHERE sales_user_id IN ($sales_head_str)\")->queryAll();\n\n $combined_arr = $qb_id_from_us;\n\n $qb_cust_id_str = \"\";\n\n if (!empty($combined_arr)) {\n foreach ($combined_arr as $qb_ids) {\n if (!empty($qb_ids['qb_customer_id'])) {\n $qb_cust_id_str .= \"'\" . $qb_ids['qb_customer_id'] . \"',\";\n $qb_cust_id_arr[] = $qb_ids['qb_customer_id'];\n }\n }\n\n $qb_cust_id_str = rtrim($qb_cust_id_str, \",\");\n $allInvoices = $dataService->Query(\"SELECT * FROM Invoice where CustomerRef IN($qb_cust_id_str) ORDER BY Id ASC MAXRESULTS $total_invoices\");\n $allPayments = $dataService->Query(\"SELECT * FROM Payment where CustomerRef IN($qb_cust_id_str) MAXRESULTS $total_payments\");\n }\n } else {\n $by_team_arr['sales_user_id'] = $data['sales_user_id'];\n $sales_user_id_arr = $data['sales_user_id'];\n if (empty($data['sales_user_id'][0])) {\n $sales_user_id_arr[] = $data['byTeam'];\n }\n\n $qb_id_from_us = DvRegistration::find()->select('qb_customer_id')->Where(['in', 'sales_user_id', $sales_user_id_arr])->all();\n\n $qb_cust_id_str = \"\";\n\n if (!empty($qb_id_from_us)) {\n foreach ($qb_id_from_us as $qb_ids) {\n if (!empty($qb_ids->qb_customer_id)) {\n $qb_cust_id_str .= \"'\" . $qb_ids->qb_customer_id . \"',\";\n $qb_cust_id_arr[] = $qb_ids->qb_customer_id;\n }\n }\n $qb_cust_id_str = rtrim($qb_cust_id_str, \",\");\n $allInvoices = $dataService->Query(\"SELECT * FROM Invoice WHERE CustomerRef IN($qb_cust_id_str) ORDER BY Id ASC MAXRESULTS $total_invoices\");\n $allPayments = $dataService->Query(\"SELECT * FROM Payment WHERE CustomerRef IN($qb_cust_id_str) MAXRESULTS $total_payments\");\n }\n }\n } else {\n if (!empty($data['byTeam'])) {\n $team = $data['byTeam'];\n $qb_id_from_us = Yii::$app->db->createCommand(\"SELECT * FROM assist_participant WHERE sales_user_id = $team\")->queryAll();\n\n $combined_arr = $qb_id_from_us;\n } else {\n $qb_id_from_us = Yii::$app->db->createCommand(\"SELECT * FROM assist_participant WHERE sales_user_id IN (SELECT assist_user_meta.uid FROM assist_users join assist_user_meta ON assist_users.id = assist_user_meta.uid WHERE assist_users.department = 1 and assist_user_meta.meta_key = 'team' and assist_user_meta.meta_value = '' )\")->queryAll();\n\n $team_model_val = Yii::$app->db->createCommand(\"SELECT qb_customer_id FROM assist_participant WHERE sales_user_id IN (SELECT assist_user_meta.uid FROM assist_users join assist_user_meta ON assist_users.id = assist_user_meta.uid WHERE assist_user_meta.meta_key = 'team' and assist_user_meta.meta_value IN(SELECT assist_user_meta.uid FROM assist_users join assist_user_meta ON assist_users.id = assist_user_meta.uid WHERE assist_users.department = 1 and assist_user_meta.meta_key = 'team' and assist_user_meta.meta_value = '' ) )\")->queryAll();\n\n $combined_arr = array_merge($qb_id_from_us, $team_model_val);\n }\n\n $qb_cust_id_str = \"\";\n\n if (!empty($combined_arr)) {\n foreach ($combined_arr as $qb_ids) {\n if (!empty($qb_ids['qb_customer_id'])) {\n $qb_cust_id_str .= \"'\" . $qb_ids['qb_customer_id'] . \"',\";\n $qb_cust_id_arr[] = $qb_ids['qb_customer_id'];\n }\n }\n\n $qb_cust_id_str = rtrim($qb_cust_id_str, \",\");\n $allInvoices = $dataService->Query(\"SELECT * FROM Invoice where CustomerRef IN($qb_cust_id_str) ORDER BY Id ASC MAXRESULTS $total_invoices\");\n $allPayments = $dataService->Query(\"SELECT * FROM Payment where CustomerRef IN($qb_cust_id_str) MAXRESULTS $total_payments\");\n }\n }\n } else {\n $qb_id_from_us = Yii::$app->db->createCommand(\"SELECT * FROM assist_participant WHERE sales_user_id IN (SELECT assist_user_meta.uid FROM assist_users join assist_user_meta ON assist_users.id = assist_user_meta.uid WHERE assist_users.department = 1 and assist_user_meta.meta_key = 'team' and assist_user_meta.meta_value = '' )\")->queryAll();\n\n $team_model_val = Yii::$app->db->createCommand(\"SELECT qb_customer_id FROM assist_participant WHERE sales_user_id IN (SELECT assist_user_meta.uid FROM assist_users join assist_user_meta ON assist_users.id = assist_user_meta.uid WHERE assist_user_meta.meta_key = 'team' and assist_user_meta.meta_value IN(SELECT assist_user_meta.uid FROM assist_users join assist_user_meta ON assist_users.id = assist_user_meta.uid WHERE assist_users.department = 1 and assist_user_meta.meta_key = 'team' and assist_user_meta.meta_value = '' ) )\")->queryAll();\n\n $combined_arr = array_merge($qb_id_from_us, $team_model_val);\n\n $qb_cust_id_str = \"\";\n\n if (!empty($combined_arr)) {\n foreach ($combined_arr as $qb_ids) {\n if (!empty($qb_ids['qb_customer_id'])) {\n $qb_cust_id_str .= \"'\" . $qb_ids['qb_customer_id'] . \"',\";\n $qb_cust_id_arr[] = $qb_ids['qb_customer_id'];\n }\n }\n\n $qb_cust_id_str = rtrim($qb_cust_id_str, \",\");\n $total_invoices = $dataService->Query(\"SELECT count(*) FROM Invoice\");\n $allInvoices = $dataService->Query(\"SELECT * FROM Invoice where CustomerRef IN($qb_cust_id_str) ORDER BY Id ASC MAXRESULTS $total_invoices\");\n $total_payments = $dataService->Query(\"SELECT count(*) FROM Payment\");\n $allPayments = $dataService->Query(\"SELECT * FROM Payment where CustomerRef IN($qb_cust_id_str) MAXRESULTS $total_payments\");\n }\n }\n } else if ($user_role == 6) { /* If current user is not super admin */\n $qb_id_from_us = DvRegistration::find()->select('qb_customer_id')->Where(['sales_user_id' => $data['sales_user_id']])->all();\n $by_team_arr['sales_user_id'] = $data['sales_user_id'];\n\n $qb_cust_id_str = \"\";\n\n if (!empty($qb_id_from_us)) {\n foreach ($qb_id_from_us as $qb_ids) {\n if (!empty($qb_ids->qb_customer_id)) {\n $qb_cust_id_str .= \"'\" . $qb_ids->qb_customer_id . \"',\";\n $qb_cust_id_arr[] = $qb_ids->qb_customer_id;\n }\n }\n\n $qb_cust_id_str = rtrim($qb_cust_id_str, \",\");\n $allInvoices = $dataService->Query(\"SELECT * FROM Invoice WHERE CustomerRef IN($qb_cust_id_str) ORDER BY Id ASC MAXRESULTS $total_invoices\");\n $allPayments = $dataService->Query(\"SELECT * FROM Payment WHERE CustomerRef IN($qb_cust_id_str) MAXRESULTS $total_payments\");\n }\n } else if ($user_role != 1) { /* If current user is not super admin */\n $qb_id_from_us = DvRegistration::find()->select('qb_customer_id')->Where(['sales_user_id' => $user->id])->all();\n $qb_cust_id_str = \"\";\n\n if (!empty($qb_id_from_us)) {\n foreach ($qb_id_from_us as $qb_ids) {\n if (!empty($qb_ids->qb_customer_id)) {\n $qb_cust_id_str .= \"'\" . $qb_ids->qb_customer_id . \"',\";\n $qb_cust_id_arr[] = $qb_ids->qb_customer_id;\n }\n }\n $qb_cust_id_str = rtrim($qb_cust_id_str, \",\");\n $allInvoices = $dataService->Query(\"SELECT * FROM Invoice WHERE CustomerRef IN($qb_cust_id_str) ORDER BY Id ASC MAXRESULTS $total_invoices\");\n $allPayments = $dataService->Query(\"SELECT * FROM Payment WHERE CustomerRef IN($qb_cust_id_str) MAXRESULTS $total_payments\");\n }\n } else { /* If current user is super admin */\n $allInvoices = $dataService->Query(\"SELECT * FROM Invoice ORDER BY Id ASC MAXRESULTS $total_invoices\");\n $allPayments = $dataService->Query(\"SELECT * FROM Payment MAXRESULTS $total_payments\");\n }\n } else {\n if ($user_role == 7) { /* If current user is not super admin */\n $qb_id_from_us = Yii::$app->db->createCommand(\"SELECT * FROM assist_participant WHERE sales_user_id IN (SELECT assist_user_meta.uid FROM assist_users join assist_user_meta ON assist_users.id = assist_user_meta.uid WHERE assist_users.department = 1 and assist_user_meta.meta_key = 'team' and assist_user_meta.meta_value = '' )\")->queryAll();\n\n $qb_cust_id_str = \"\";\n\n if (!empty($qb_id_from_us)) {\n foreach ($qb_id_from_us as $qb_ids) {\n if (!empty($qb_ids['qb_customer_id'])) {\n $qb_cust_id_str .= \"'\" . $qb_ids['qb_customer_id'] . \"',\";\n $qb_cust_id_arr[] = $qb_ids['qb_customer_id'];\n }\n }\n $qb_cust_id_str = rtrim($qb_cust_id_str, \",\");\n $allInvoices = $dataService->Query(\"SELECT * FROM Invoice where CustomerRef IN($qb_cust_id_str) ORDER BY Id ASC MAXRESULTS $total_invoices\");\n $allPayments = $dataService->Query(\"SELECT * FROM Payment where CustomerRef IN($qb_cust_id_str) MAXRESULTS $total_payments\");\n }\n } else {\n $allInvoices = $dataService->Query(\"SELECT * FROM Invoice ORDER BY Id ASC MAXRESULTS $total_invoices\");\n $allPayments = $dataService->Query(\"SELECT * FROM Payment MAXRESULTS $total_payments\");\n }\n }\n\n $qb_cust_id_arr = array();\n if (!empty($allInvoices)) {\n $all_invoice_of_customer = $allInvoices;\n\n foreach ($allInvoices as $key => $val) {\n $timestamp_due_date = strtotime($val->DueDate);\n $month_year_arr[date('m', $timestamp_due_date) . \"_\" . date('Y', $timestamp_due_date)] = date('M', $timestamp_due_date) . \" \" . date('Y', $timestamp_due_date);\n if ($timestamp_due_date >= $timestamp_of_first_date_of_month && $timestamp_due_date <= $timestamp_of_last_date_of_month) {\n if ($val->Balance > 0) {\n $qb_cust_id_arr[] = $val->CustomerRef;\n }\n } else {\n unset($allInvoices[$key]);\n }\n }\n }\n\n if ($data['sdate'] != \"\" && $data['by_date_month'] == 'd') {\n $query = DvRegistration::find()\n ->where($filters)\n ->orderBy(['id' => SORT_DESC])\n ->andWhere($filter_data)\n ->andWhere(['IN', 'qb_customer_id', $qb_cust_id_arr]);\n } elseif ($data['bymonth'] != '' && $data['by_date_month'] == 'm') {\n $query = DvRegistration::find()->where($filters)\n ->orderBy(['id' => SORT_DESC])\n ->andWhere($filter_data)\n ->andWhere(['IN', 'qb_customer_id', $qb_cust_id_arr]);\n } else {\n $query = DvRegistration::find()->where($filters)\n ->orderBy(['assist_participant.id' => SORT_DESC])\n ->andWhere($filter_data)\n ->andWhere(['IN', 'qb_customer_id', $qb_cust_id_arr]);\n }\n\n $query->andWhere(['>', 'qb_customer_id', 0]);\n $query->groupBy(['email']);\n $total_model = $query->all();\n $count = $query->count();\n $pagination = new Pagination(['totalCount' => $count, 'pageSize' => 20]);\n $models = $query->offset($pagination->offset)->limit($pagination->limit)->all();\n $offset = $pagination->offset + 1;\n\n if ($data['bymonth'] != '' && $data['by_date_month'] == 'm') {\n $filter_data['bymonth'] = $data['bymonth'];\n }\n if ($data['by_date_month'] != '') {\n $filter_data['by_date_month'] = $data['by_date_month'];\n }\n\n if ($data['sdate'] != '' && $data['by_date_month'] == 'd') {\n $filter_data['sdate'] = $data['sdate'];\n $filter_data['edate'] = $data['edate'];\n }\n\n if ($data['email'] != \"\") {\n $filter_data['email'] = $data['email'];\n }\n\n if (isset($data['sales_user_id']) && $data['sales_user_id'] != \"\") {\n $filter_data['sales_user_id'] = $data['sales_user_id'];\n }\n\n $month_year_arr = array_unique($month_year_arr);\n\n\n $invoice_number = \"\";\n $total_of_all_currencys = array();\n $invoice_balance = 0;\n\n foreach ($total_model as $value) {\n $total_invoice_amt = 0;\n $cnt_invoice = 0;\n if (!empty($all_invoice_of_customer)) {\n foreach ($all_invoice_of_customer as $invoice) {\n if ($value->qb_customer_id == $invoice->CustomerRef) {\n $timestamp_due_date = strtotime($invoice->DueDate);\n if ($timestamp_due_date >= $timestamp_of_first_date_of_month && $timestamp_due_date <= $timestamp_of_last_date_of_month) {\n $total_invoice_amt += $invoice->TotalAmt;\n $invoice_number .= $invoice->DocNumber . \", \";\n }\n }\n }\n }\n\n $invoice_number = rtrim($invoice_number, \", \");\n if (!empty($allInvoices)) {\n foreach ($allInvoices as $invoice) {\n if ($value->qb_customer_id == $invoice->CustomerRef) {\n $currency_ref = $invoice->CurrencyRef;\n $invoice_balance += $invoice->Balance;\n\n if (array_key_exists($currency_ref, $total_of_all_currencys)) {\n $total_of_all_currencys[$currency_ref] = $total_of_all_currencys[$currency_ref] + $invoice->Balance;\n } else {\n $total_of_all_currencys[$currency_ref] = $invoice->Balance;\n }\n }\n } // End for (allInvoices)\n } // End if (allInvoices)\n } // End main for loop\n\n /* echo \"<pre>\";\n print_r($models);\n die; */\n return $this->render('pending_revenue', [\n 'model' => $models,\n 'pagination' => $pagination,\n 'total_of_all_currencys' => $total_of_all_currencys,\n 'count' => $offset,\n 'total_count' => $count,\n 'filter_data' => $filter_data,\n 'by_team_arr' => $by_team_arr,\n 'allInvoices' => $allInvoices,\n 'all_invoice_of_customer' => $all_invoice_of_customer,\n 'allPayments' => $allPayments,\n 'month_year_arr' => $month_year_arr,\n 'last_date_of_current_month' => $last_date_of_current_month,\n 'first_date_of_current_month' => $first_date_of_current_month,\n 'courses_from_qb' => $courses_from_qb\n ]);\n }\n } else {\n $usermeta_result = DvUserMeta::find()->where(['uid' => $user->id, 'meta_key' => 'role'])->one();\n $user_role = $usermeta_result->meta_value;\n if ($user_role == 1) {\n $allInvoices = $dataService->Query(\"SELECT * FROM Invoice MAXRESULTS $total_invoices\");\n $allPayments = $dataService->Query(\"SELECT * FROM Payment MAXRESULTS $total_payments\");\n $qb_cust_id_arr = array();\n if (!empty($allInvoices)) {\n $all_invoice_of_customer = $allInvoices;\n\n foreach ($allInvoices as $key => $val) {\n $timestamp_due_date = strtotime($val->DueDate);\n if ($timestamp_due_date >= $timestamp_of_first_date_of_month && $timestamp_due_date <= $timestamp_of_last_date_of_month) {\n if ($val->Balance > 0) {\n $qb_cust_id_arr[] = $val->CustomerRef;\n }\n } else {\n unset($allInvoices[$key]);\n }\n }\n }\n $query = DvRegistration::find()->where(['IN', 'qb_customer_id', $qb_cust_id_arr]);\n } else if ($user_role == 6) {\n $sales_heads = Yii::$app->db->createCommand(\"SELECT assist_users.id FROM assist_users INNER JOIN assist_user_meta ON assist_users.id = assist_user_meta.uid WHERE assist_users.status = 1 AND assist_users.department = 1 AND assist_user_meta.meta_key = 'team' AND assist_user_meta.meta_value=$user->id\")->queryAll();\n $sales_heads_str = \"\";\n if (!empty($sales_heads)) {\n foreach ($sales_heads as $m_sales_head) {\n $sales_heads_str .= $m_sales_head['id'] . \",\";\n }\n }\n $sales_heads_str .= $user->id;\n $sales_heads_str = rtrim($sales_heads_str, \",\");\n\n $qb_id_from_us = Yii::$app->db->createCommand(\"SELECT qb_customer_id FROM assist_participant WHERE sales_user_id IN ($sales_heads_str )\")->queryAll();\n\n $qb_cust_id_str = \"\";\n if (!empty($qb_id_from_us)) {\n foreach ($qb_id_from_us as $qb_ids) {\n if (!empty($qb_ids['qb_customer_id'])) {\n $qb_cust_id_str .= \"'\" . $qb_ids['qb_customer_id'] . \"',\";\n $qb_cust_id_arr[] = $qb_ids['qb_customer_id'];\n }\n }\n $qb_cust_id_str = rtrim($qb_cust_id_str, \",\");\n $allInvoices = $dataService->Query(\"SELECT * FROM Invoice where CustomerRef IN($qb_cust_id_str) ORDER BY Id ASC MAXRESULTS $total_invoices\");\n $allPayments = $dataService->Query(\"SELECT * FROM Payment where CustomerRef IN($qb_cust_id_str) MAXRESULTS $total_payments\");\n }\n\n $qb_cust_id_arr = array();\n\n if (!empty($allInvoices)) {\n $all_invoice_of_customer = $allInvoices;\n foreach ($allInvoices as $key => $val) {\n $timestamp_due_date = strtotime($val->DueDate);\n $month_year_arr[date('m', $timestamp_due_date) . \"_\" . date('Y', $timestamp_due_date)] = date('M', $timestamp_due_date) . \" \" . date('Y', $timestamp_due_date);\n if ($timestamp_due_date >= $timestamp_of_first_date_of_month && $timestamp_due_date <= $timestamp_of_last_date_of_month) {\n if ($val->Balance > 0) {\n $qb_cust_id_arr[] = $val->CustomerRef;\n }\n } else {\n unset($allInvoices[$key]);\n }\n }\n }\n\n $month_year_arr = array_unique($month_year_arr);\n\n $query = DvRegistration::find()->where(['!=', 'qb_customer_id', ''])->andWhere(['IN', 'qb_customer_id', $qb_cust_id_arr]);\n } else if ($user_role == 7) {\n\n $team_model_val = Yii::$app->db->createCommand(\"SELECT assist_user_meta.uid FROM assist_users join assist_user_meta ON assist_users.id = assist_user_meta.uid WHERE assist_users.department = 1 and assist_user_meta.meta_key = 'team' and assist_user_meta.meta_value = '' \")->queryAll();\n\n $executive_model_val = Yii::$app->db->createCommand(\"SELECT assist_user_meta.uid FROM assist_users join assist_user_meta ON assist_users.id = assist_user_meta.uid WHERE assist_user_meta.meta_key = 'team' and assist_user_meta.meta_value IN(SELECT assist_user_meta.uid FROM assist_users join assist_user_meta ON assist_users.id = assist_user_meta.uid WHERE assist_users.department = 1 and assist_user_meta.meta_key = 'team' and assist_user_meta.meta_value = '' ) \")->queryAll();\n $team_model_val[]['uid'] = $user->id;\n $combined_sales_head_arr = array_merge($team_model_val, $executive_model_val);\n\n $sales_head_str = \"\";\n if (!empty($combined_sales_head_arr)) {\n foreach ($combined_sales_head_arr as $m_sales_head) {\n $sales_head_str .= $m_sales_head['uid'] . \",\";\n }\n }\n $sales_head_str = rtrim($sales_head_str, \",\");\n $qb_id_from_us = Yii::$app->db->createCommand(\"SELECT qb_customer_id FROM assist_participant WHERE sales_user_id IN ($sales_head_str)\")->queryAll();\n\n $combined_arr = $qb_id_from_us;\n\n $qb_cust_id_str = \"\";\n if (!empty($combined_arr)) {\n foreach ($combined_arr as $qb_ids) {\n if (!empty($qb_ids['qb_customer_id'])) {\n $qb_cust_id_str .= \"'\" . $qb_ids['qb_customer_id'] . \"',\";\n $qb_cust_id_arr[] = $qb_ids['qb_customer_id'];\n }\n }\n $qb_cust_id_str = rtrim($qb_cust_id_str, \",\");\n $allInvoices = $dataService->Query(\"SELECT * FROM Invoice where CustomerRef IN($qb_cust_id_str) ORDER BY Id ASC MAXRESULTS $total_invoices\");\n $allPayments = $dataService->Query(\"SELECT * FROM Payment where CustomerRef IN($qb_cust_id_str) MAXRESULTS $total_payments\");\n }\n $qb_cust_id_arr = array();\n\n if (!empty($allInvoices)) {\n $all_invoice_of_customer = $allInvoices;\n /* echo \"<pre>\";\n print_r($all_invoice_of_customer);\n die; */\n foreach ($allInvoices as $key => $val) {\n $timestamp_due_date = strtotime($val->DueDate);\n $month_year_arr[date('m', $timestamp_due_date) . \"_\" . date('Y', $timestamp_due_date)] = date('M', $timestamp_due_date) . \" \" . date('Y', $timestamp_due_date);\n if ($timestamp_due_date >= $timestamp_of_first_date_of_month && $timestamp_due_date <= $timestamp_of_last_date_of_month) {\n if ($val->Balance > 0) {\n $qb_cust_id_arr[] = $val->CustomerRef;\n }\n } else {\n unset($allInvoices[$key]);\n }\n }\n }\n\n $month_year_arr = array_unique($month_year_arr);\n\n $query = DvRegistration::find()->where(['!=', 'qb_customer_id', ''])->andWhere(['IN', 'qb_customer_id', $qb_cust_id_arr]);\n } else {\n $qb_id_from_us = DvRegistration::find()->select('qb_customer_id')->Where(['sales_user_id' => $user->id])->all();\n $qb_cust_id_str = \"\";\n\n if (!empty($qb_id_from_us)) {\n foreach ($qb_id_from_us as $qb_ids) {\n if (!empty($qb_ids->qb_customer_id)) {\n $qb_cust_id_str .= \"'\" . $qb_ids->qb_customer_id . \"',\";\n $qb_cust_id_arr[] = $qb_ids->qb_customer_id;\n }\n }\n $qb_cust_id_str = rtrim($qb_cust_id_str, \",\");\n $allInvoices = $dataService->Query(\"SELECT * FROM Invoice where CustomerRef IN($qb_cust_id_str) ORDER BY Id ASC MAXRESULTS $total_invoices\");\n $allPayments = $dataService->Query(\"SELECT * FROM Payment where CustomerRef IN($qb_cust_id_str) MAXRESULTS $total_payments\");\n }\n $qb_cust_id_arr = array();\n\n if (!empty($allInvoices)) {\n $all_invoice_of_customer = $allInvoices;\n foreach ($allInvoices as $key => $val) {\n $timestamp_due_date = strtotime($val->DueDate);\n $month_year_arr[date('m', $timestamp_due_date) . \"_\" . date('Y', $timestamp_due_date)] = date('M', $timestamp_due_date) . \" \" . date('Y', $timestamp_due_date);\n if ($timestamp_due_date >= $timestamp_of_first_date_of_month && $timestamp_due_date <= $timestamp_of_last_date_of_month) {\n if ($val->Balance > 0) {\n $qb_cust_id_arr[] = $val->CustomerRef;\n }\n } else {\n unset($allInvoices[$key]);\n }\n }\n }\n\n $month_year_arr = array_unique($month_year_arr);\n\n $query = DvRegistration::find()->where(['sales_user_id' => $user->id])->andWhere(['!=', 'qb_customer_id', ''])->andWhere(['IN', 'qb_customer_id', $qb_cust_id_arr]);\n }\n $query->groupBy(['email']);\n $query->orderBy(['id' => SORT_DESC]);\n $total_model = $query->all();\n $count = $query->count();\n $pagination = new Pagination(['totalCount' => $count, 'pageSize' => 10]);\n $models = $query->offset($pagination->offset)->limit($pagination->limit)->all();\n $offset = $pagination->offset + 1;\n\n // echo \"in\"; die;\n // Start Get Total of different currency \n $invoice_number = \"\";\n $total_of_all_currencys = array();\n\n $invoice_balance = 0;\n\n foreach ($total_model as $value) {\n $total_invoice_amt = 0;\n $cnt_invoice = 0;\n if (!empty($all_invoice_of_customer)) {\n foreach ($all_invoice_of_customer as $invoice) {\n if ($value->qb_customer_id == $invoice->CustomerRef) {\n $timestamp_due_date = strtotime($invoice->DueDate);\n if ($timestamp_due_date >= $timestamp_of_first_date_of_month && $timestamp_due_date <= $timestamp_of_last_date_of_month) {\n $total_invoice_amt += $invoice->TotalAmt;\n $invoice_number .= $invoice->DocNumber . \", \";\n }\n }\n }\n }\n\n\n $invoice_number = rtrim($invoice_number, \", \");\n if (!empty($allInvoices)) {\n foreach ($allInvoices as $invoice) {\n if ($value->qb_customer_id == $invoice->CustomerRef) {\n $currency_ref = $invoice->CurrencyRef;\n $invoice_balance += $invoice->Balance;\n\n if (array_key_exists($currency_ref, $total_of_all_currencys)) {\n $total_of_all_currencys[$currency_ref] = $total_of_all_currencys[$currency_ref] + $invoice->Balance;\n } else {\n $total_of_all_currencys[$currency_ref] = $invoice->Balance;\n }\n }\n } // End for (allInvoices)\n } // End if (allInvoices)\n } // End main for loop\n\n\n return $this->render('pending_revenue', [\n 'model' => $models,\n 'total_of_all_currencys' => $total_of_all_currencys,\n 'pagination' => $pagination,\n 'count' => $offset,\n 'total_count' => $count,\n 'allInvoices' => $allInvoices,\n 'courses_from_qb' => $courses_from_qb,\n 'all_invoice_of_customer' => $all_invoice_of_customer,\n 'allPayments' => $allPayments,\n 'month_year_arr' => $month_year_arr,\n 'last_date_of_current_month' => $last_date_of_current_month,\n 'first_date_of_current_month' => $first_date_of_current_month\n ]);\n }\n }", "public function actionAdvance()\r\n {\r\n $searchModel = new OrderAdvanceSearch();\r\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\r\n \r\n return $this->render('advance', [\r\n 'searchModel' => $searchModel,\r\n 'dataProvider' => $dataProvider,\r\n 'menus' => $this->_getMenus(),\r\n ]);\r\n }", "public static function findAmendmentEntries($rowData)\n {\n\n $totalAmendments = 0;\n \n // mode 1: same gen_vendor_normalized, same reference_number, different contract_value\n $amendmentRows = DB::table('l_contracts')\n ->where('owner_acronym', '=', $rowData['owner_acronym'])\n // Ensure it's not the exact same row:\n ->where('id', '!=', $rowData['id'])\n // Make sure it's not a duplicate entry\n ->where('gen_is_duplicate', '=', 0)\n // Make sure it's not an error row\n ->where('gen_is_error', '=', 0)\n // Make sure it isn't part of a different amendment group (TODO - review this)\n ->whereNull('gen_amendment_group_id')\n ->whereNotNull('source_fiscal')\n // Make sure it's the same vendor:\n ->where('gen_vendor_normalized', '=', $rowData['gen_vendor_normalized'])\n\n // This is a bit of a complicated combination, but the resulting SQL is,\n // and (\"reference_number\" = ? or (\"original_value\" = ? and \"gen_start_year\" = ?))\n // Because of threshold limits (sole source, NAFTA, etc.), we wouldn't want to just match original and contract values without also matching start years (in case completely different contracts have the same values).\n ->where(function ($query) use ($rowData) {\n return $query->where('reference_number', '=', $rowData['reference_number'])\n ->orWhere(function ($query) use ($rowData) {\n return $query->where('original_value', '=', $rowData['contract_value'])\n ->where('gen_start_year', '=', $rowData['gen_start_year']);\n });\n })\n ->orderBy('source_fiscal', 'asc')\n ->orderBy('contract_value', 'asc')\n // ->orderBy('id', 'asc')\n // ->toSql();\n ->pluck('id');\n\n if ($amendmentRows->count() > 0) {\n // Just 1 row is enough (since it'll be different than the original row)\n // Add back in the original ID (sorted by source_fiscal then ID in the earlier query in findAmendments)\n $amendmentRows->prepend($rowData['id']);\n\n $totalAmendments += self::markAmendmentEntries($rowData['owner_acronym'], $amendmentRows, 1);\n }\n\n return $totalAmendments;\n }", "public function monthly_sales_report()\n\t{\n\t\t$query1 = $this->db->query(\"\n\t\t\tSELECT \n\t\t\t\tdate,\n\t\t\t\tEXTRACT(MONTH FROM date) as month, \n\t\t\t\tCOUNT(invoice_id) as total\n\t\t\tFROM \n\t\t\t\tinvoice\n\t\t\tWHERE \n\t\t\t\tEXTRACT(YEAR FROM date) >= EXTRACT(YEAR FROM NOW())\n\t\t\tGROUP BY \n\t\t\t\tEXTRACT(YEAR_MONTH FROM date)\n\t\t\tORDER BY\n\t\t\t\tmonth ASC\n\t\t\")->result();\n\n\t\t$query2 = $this->db->query(\"\n\t\t\tSELECT \n\t\t\t\tpurchase_date,\n\t\t\t\tEXTRACT(MONTH FROM purchase_date) as month, \n\t\t\t\tCOUNT(purchase_id) as total_month\n\t\t\tFROM \n\t\t\t\tproduct_purchase\n\t\t\tWHERE \n\t\t\t\tEXTRACT(YEAR FROM purchase_date) >= EXTRACT(YEAR FROM NOW())\n\t\t\tGROUP BY \n\t\t\t\tEXTRACT(YEAR_MONTH FROM purchase_date)\n\t\t\tORDER BY\n\t\t\t\tmonth ASC\n\t\t\")->result();\n\n\t\treturn [$query1,$query2];\n\t}", "public function calculate_unit_award($qualID)\n\t{\n\t\t$passCriteria = array();\n\t\t$meritCriteria = array();\n\t\t$distinctionCriteria = array();\n\t\t$found = false;\n\t\tif($this->criterias)\n\t\t{\n\t\t\t//first get all of the criteria that is being used in this unit.\n\t\t\tforeach($this->criterias AS $criteria)\n\t\t\t{ \n\t\t\t\tif(strpos($criteria->get_name(), \"P\") === 0)\n\t\t\t\t{\n\t\t\t\t\t$passCriteria[$criteria->get_id()] = $criteria;\t\n\t\t\t\t}\n\t\t\t\telseif(strpos($criteria->get_name(), \"M\") === 0)\n\t\t\t\t{\n\t\t\t\t\t$meritCriteria[$criteria->get_id()] = $criteria;\t\n\t\t\t\t}\n\t\t\t\telseif(strpos($criteria->get_name(), \"D\") === 0)\n\t\t\t\t{\n\t\t\t\t\t$distinctionCriteria[$criteria->get_id()] = $criteria;\n\t\t\t\t}\t\n\t\t\t}\t\n\t\t\t\n\t\t\t$merit = false;\n\t\t\t$distinction = false;\n\t\t\t$award = \"\";\n\t\t\t$rank = 0;\n\t\t\t$pass = $this->check_criteria_award_set_for_met($passCriteria);\n\t\t\tif($pass)\n\t\t\t{\n\t\t\t\t$found = true;\n\t\t\t\t$rank = 1;\n\t\t\t\t$merit = $this->check_criteria_award_set_for_met($meritCriteria);\n\t\t\t\tif($merit)\n\t\t\t\t{\n\t\t\t\t\t$rank = 2;\n\t\t\t\t\t$distinction = $this->check_criteria_award_set_for_met($distinctionCriteria);\n\t\t\t\t\tif($distinction)\n\t\t\t\t\t{\n\t\t\t\t\t\t//update done on save ??\n\t\t\t\t\t\t$rank = 3;\n\t\t\t\t\t\t//return \"DISTINCTION\";\n\t\t\t\t\t}\n\t\t\t\t\t//return \"MERIT\";\n\t\t\t\t}\n\t\t\t\t//return \"PASS\";\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!$found)\n\t\t{\n\t\t\t//set award to N/S\n\t\t\t$this->userAward = new Award(-1, 'N/S', 0);\n\t\t\t$this->update_unit_award($qualID);\n\t\t\treturn null;\n\t\t}\n\t\t//else get the unit award for the rank and then set it, return it\n\t\t//and update the users database record. \n\t\t$awardRecord = $this->get_unit_award($rank);\n\t\tif($awardRecord)\n\t\t{\n $params = new stdClass();\n $params->award = $awardRecord->award;\n $params->rank = $awardRecord->ranking;\n\t\t\t$award = new Award($awardRecord->id, $params);\n\t\t\t$this->userAward = $award;\n\t\t\t$this->update_unit_award($qualID);\n\t\t\treturn $award;\n\t\t}\t\t\t\n\t}", "public function getEstimateDataByMonth($stories) {\n\n $aggEstimates = array();\n foreach($stories AS $story) {\n\n // Grab the date of the story and put it into a \n // [year][month][estimate] = counter\n list($year, $month, $dayTime) = explode(\"-\", $story['created_at']);\n\n // Does the year exist?\n if (!isset($aggEstimates[$year])) \n $aggEstimates[$year] = null;\n\n // Does the month exist?\n if (!isset($aggEstimates[$year][$month])) \n $aggEstimates[$year][$month] = null;\n\n // Does the estimate exist?\n $est = round($story['score_50']);\n if (!isset($aggEstimates[$year][$month][$est])) \n $aggEstimates[$year][$month][$est] = 0;\n \n $aggEstimates[$year][$month][$est]++;\n \n }\n\n $new = $aggEstimates;\n $aggEstimates = array();\n foreach($new AS $year => $month) {\n ksort($month);\n foreach($month AS $monthNo => $estimates) {\n ksort($estimates);\n $aggEstimates[$year][$monthNo] = $estimates;\n }\n }\n ksort($aggEstimates);\n return $aggEstimates;\n }", "function suma_monto_total($requerimientos){\n $i=0; $suma=0;\n foreach ($requerimientos as $linea_num => $linea){ \n if($i != 0){\n $datos = explode(\";\",$linea);\n \n if(count($datos)==21){\n $suma=$suma+(float)$datos[7];\n }\n }\n\n $i++;\n }\n\n return $suma;\n }" ]
[ "0.58534706", "0.55079216", "0.5489875", "0.5387489", "0.5344066", "0.5293691", "0.528958", "0.5258331", "0.5227522", "0.519151", "0.51081103", "0.507879", "0.50779545", "0.50777465", "0.5031171", "0.49952346", "0.49944076", "0.4994315", "0.49848998", "0.4982182", "0.4981929", "0.49741203", "0.49521795", "0.49473774", "0.4944662", "0.49349633", "0.4923799", "0.49138367", "0.49054167", "0.49034393", "0.48962858", "0.48918238", "0.4879303", "0.48706558", "0.483025", "0.48270863", "0.48253658", "0.48154464", "0.47904465", "0.47865587", "0.47687316", "0.47683343", "0.47615683", "0.47609887", "0.47577155", "0.47508863", "0.47417638", "0.4735339", "0.47293356", "0.4721604", "0.47184148", "0.47155514", "0.47136077", "0.4713286", "0.47103316", "0.4708142", "0.47040036", "0.4695598", "0.4692171", "0.46917254", "0.4689142", "0.46871805", "0.4683822", "0.46808004", "0.46806994", "0.46778", "0.46514174", "0.4650351", "0.46503162", "0.4642564", "0.46386644", "0.46275857", "0.4624436", "0.46210548", "0.45984244", "0.45844525", "0.4584137", "0.45820874", "0.45774838", "0.45744154", "0.4566504", "0.45557183", "0.45541778", "0.45498168", "0.45467472", "0.45346716", "0.45326307", "0.4531629", "0.4525536", "0.4521597", "0.45158157", "0.45144817", "0.450502", "0.44984943", "0.44979087", "0.4495142", "0.44924292", "0.44920343", "0.4490922", "0.44897652" ]
0.7051478
0
/ is this a composite design pattern ?
private function array_to_xml($student_info, &$xml_student_info,$nodeName) { foreach($student_info as $key => $value) { $key = str_replace(array(' '),array(''),$key); if(is_array($value)) { if(!is_numeric($key)){ $subnode = $xml_student_info->addChild("$key"); $this->array_to_xml($value, $subnode,$nodeName); } else{ $subnode = $xml_student_info->addChild($nodeName); $this->array_to_xml($value, $subnode,$nodeName); } } else { $xml_student_info->addChild("$key","$value"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __CONSTRUCT(){\n\t}", "abstract protected function __construct();", "abstract function __construct();", "protected abstract function __construct();", "abstract protected function external();", "protected function __construct() {\r\r\n // contain shared code in its constructor\r\r\n parent::__construct();\t\r\r\n\t}", "abstract public function __construct();", "abstract public function __construct();", "abstract public function __construct();", "function _construct() {\n \t\n\t\t\n\t}", "private function __construct()\t{}", "abstract protected function init();", "abstract protected function init();", "abstract protected function init();", "abstract protected function init();", "abstract protected function init();", "abstract protected function init();", "function __construct() ;", "function __construct(){parent::__construct();}", "abstract function build();", "abstract public function build();", "abstract public function build();", "abstract protected function create ();", "abstract protected function _init();", "abstract protected function _init();", "abstract public function assemble();", "public function __construct()\n {\n //to be extended by children\n }", "abstract public function object();", "public function isComposite() {}", "public function __contruct(){\r\n parent::__contruct();\r\n }", "abstract public function instance();", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t// ben duoi nay se la cac logic cua __construct lop con ma chung ta can dinh nghia - xu ly\n\t}", "public function __init(){}", "abstract protected function _init( );", "abstract protected function interface();", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "function _construct() {\n\t\tparent::_construct();\n\t}", "final private function __construct(){\r\r\n\t}", "abstract protected function construct($params);", "abstract public function otherfoo();", "protected abstract function init();", "protected function construct(){\n\n }", "function __construct(){\n\t\t// nowt much...\n\t}", "private function __construct() {\r\n\t\t\r\n\t}", "protected function __construct() \r\n {\r\n parent::__construct();\r\n // to do: instantiate members representing substructures/blocks\r\n }", "abstract protected function _prepare();", "protected function __init__() { }", "abstract protected function _process();", "abstract protected function _process();", "protected abstract function performImpl();", "abstract function init();", "abstract public function init();", "function _construct(){ }", "function custom_construction() {\r\n\t\r\n\t\r\n\t}", "private function __construct(){\n\t\n\t}", "public function _construct(){\n parent::_construct();\n }", "private function __construct()\r\n\t{\r\n\t\r\n\t}", "abstract protected function initialize();", "abstract protected function initialize();", "abstract protected function initialize();", "abstract protected function initialize();", "abstract protected function initialize();", "function __construct()\r\n\t{\t\t//Yeah bro! Freaking PhP yo..\r\n\t}", "abstract protected function setup();", "private function __construct () {}", "private function __construct() {\r\n\t\r\n\t}", "private function __construct()\n\t{\n\t\t\n\t}", "function __Construct()\n {\n parent::__Construct();\n }", "public function __construct(){\n\t\t/* calling parent construct */\n\t\tparent::__construct();\n\t}", "public function __construct(){\n\t\t/* calling parent construct */\n\t\tparent::__construct();\n\t}", "function __construct(){\n\t\t parent::__construct();\n\t\t \n }", "private function __construct() { \n\t\t\n\n\t}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}" ]
[ "0.59798044", "0.59225744", "0.58293927", "0.5752177", "0.56989264", "0.56787235", "0.5659309", "0.5659309", "0.5659309", "0.5655723", "0.5634769", "0.56249774", "0.56249774", "0.56249774", "0.56249774", "0.56249774", "0.56249774", "0.5573394", "0.55598074", "0.55577993", "0.55566067", "0.55566067", "0.55532515", "0.55387795", "0.55387795", "0.55200493", "0.55193526", "0.55153364", "0.5504199", "0.5446226", "0.54328454", "0.54282385", "0.5419869", "0.54042", "0.5403279", "0.5399165", "0.5399165", "0.5399165", "0.5399165", "0.5399165", "0.5399165", "0.5399165", "0.5399165", "0.5399165", "0.5399165", "0.5399165", "0.5399165", "0.5399165", "0.5399165", "0.5399165", "0.5399165", "0.5399165", "0.5378856", "0.5370583", "0.5368729", "0.5362623", "0.5350369", "0.5345011", "0.53326875", "0.5332386", "0.5327882", "0.5326775", "0.53216493", "0.5320235", "0.5320235", "0.53102785", "0.5302555", "0.5298195", "0.5297806", "0.52972764", "0.52925086", "0.5288056", "0.5286676", "0.52856505", "0.52856505", "0.52856505", "0.52856505", "0.52856505", "0.5277247", "0.5273905", "0.5271527", "0.52709913", "0.5270554", "0.52684486", "0.52675027", "0.52675027", "0.52616996", "0.5261028", "0.5257766", "0.5257422", "0.5257422", "0.5257422", "0.5257422", "0.5257422", "0.5257422", "0.5257422", "0.5257422", "0.5257422", "0.5257422", "0.5257422", "0.5257422" ]
0.0
-1
Display a listing of the resource.
public function index() { $id=Auth::user()->id; $userpr_ids=userchat::where('user_id','=',$id)->get()->pluck('pro_id')->toArray(); //$chat = DB::select( DB::raw("SELECT * FROM userchats WHERE user_id='$id'")); $chat = userchat::where('user_id',$id)->first(); $chatt = DB::select( DB::raw("SELECT id,pro_id,user_id FROM userchats WHERE user_id='$id'")); $country = DB::select( DB::raw("SELECT * FROM country ORDER BY name ASC")); return view('website.userdashboard',compact('chat','chatt','userpr_ids','country')); }
{ "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() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { // }
{ "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($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "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($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request) { $request->validate([ 'name'=>'required', 'phone'=>'required', 'location_add'=>'required', 'country'=>'required' ]); $update = User::find($request->id); $update->name = $request->name; $update->phone = $request->phone; $update->country = $request->country; $update->location_add = $request->location_add; $update->save(); Session::flash('update','Successfully update'); return back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // }
{ "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
mengambil POST yang harus di approve olah user tersebut
public function getByApproveUser($user_id) { $query = <<< __query select a.*, c.NAME from B_POSTS a INNER JOIN B_POST_APPROVES b ON (a.ID = b.POST_ID) INNER JOIN B_USERS c ON (a.USER_ID = c.ID) where b.USER_ID = '$user_id' AND b.APPROVE = 'n' AND NOT EXISTS ( SELECT z.POST_ID, COUNT(*) from B_POST_APPROVES z WHERE a.ID = z.POST_ID AND z.APPROVE = 'y' GROUP BY z.POST_ID HAVING count(*) >= 3 ) order by a.ID DESC __query; return $this->db->query($query); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function approve() {\n\n }", "public function publishuser(){\n $post = User::where('id', \\request(\"id\"))->first();\n $post->approved = $post->approved==\"pending\"?\"approved\":\"pending\";\n $post->save();\n return redirect(route('voyager.users.index'));\n }", "function actionapproveUser($id=NULL) \n\t{\n\t\terror_reporting(E_ALL);\n $this->isLogin();\n if(!isset($id)){\n\t\t\theader(\"Location: \" . Yii::app()->params->base_path . \"admin/clientRequest\");\n\t\t}\n\t\t//\tDELETE OTHER VERIFIED PHONE NUMBERS\n\t\t$userObj\t=\tnew Users();\n\t\t$incoming_sms_sender\t=\t$userObj->getPhoneById($id);\n\t\t\n\t\tif($incoming_sms_sender!=''){\n\t\t\t$userObj = new Users();\n\t\t\t//$userObj->deletePhoneNumber($incoming_sms_sender,$id);\n\t\t\t//$userObj->deleteOtherVerifiedPhone($id);\n\t\t}\n\t\t\n\t\t$userObj=Users::model()->findByPk($id);\n\t\t$user_value['id'] = $id;\n $user_value['modifiedAt']=date('Y-m-d h:m:s');\n $user_value['isVerified'] = '1';\n\t\t$userObj = new Users();\n\t\t$userObj->veriryUser($user_value,$id);\n\t\t$vefiry = \"Verified Successfully\";\n\t\tYii::app()->user->setFlash('success',$vefiry);\n $this->actionclientRequest();\n }", "public function approve()\n {\n $type = $this->input->get('type');\n $id = $this->input->get('id');\n\n $this->model_review->approve($type, $id);\n\n redirect($_SERVER['HTTP_REFERER']);\n }", "public function approve($id)\n\t{\n\t\t$user = User::findOrFail($id);\n\t\tAuth::user()->requestOf()->sync([$user->id => ['status' => 'Accepted']], false);\n\t\treturn response()->json(['Request Accepted!']);\n\t}", "public function verify_user_post()\n {\n $pdata = file_get_contents(\"php://input\");\n $data = json_decode($pdata,true);\n $id = $data['id'];\n $status = $data['status'];\n $data = array(\n 'is_verified' => $status\n );\n $where = array(\n 'id' => $id\n );\n $this->model->update('users', $data, $where);\n \n $resp = array('rccode' => 200,'message' =>'success');\n $this->response($resp);\n }", "public function approveByUser() {\n $this->status = parent::STATUS_APPROVED_BY_USER;\n $this->admin_id = NULL;\n\n //no reason to keep this (cause we will save to history)\n $this->decline_reason = null;\n $this->comment = null;\n \n return $this->save(false);\n }", "public function approve()\n {\n $post = new PostBag();\n $id = $post->fetchInt('id');\n \n $this->db->query(\"UPDATE `film_review` SET `status` = 'show' WHERE `id` = {$id} LIMIT 1\");\n if (!empty($this->db->error)) {\n return false;\n }\n\n $result = $this->db->query(\"SELECT `userId` FROM `film_review` WHERE `id` = {$id} LIMIT 1\");\n if ($row = $result->fetch_assoc()) {\n $this->db->query(\"UPDATE `user` SET `count_review` = `count_review` + 1 WHERE `id` = {$row['userId']} LIMIT 1\");\n }\n \n return true;\n }", "public function changestatus_post()\r\n {\r\n $userid=$this->uri->segment(3);\r\n\r\n $user=$this->user_m->get($userid);\r\n if($user->status==\"1\"){\r\n $data=array(\r\n \"status\"=> \"0\"\r\n );\r\n }\r\n else{\r\n $data=array(\r\n \"status\"=> \"1\"\r\n ); \r\n }\r\n if ($succes_status = $this->user_m->update_data($userid,$data)){\r\n if($user->status==\"1\"){\r\n $this->response(\r\n array(\r\n 'Status_code' => \"201\",\r\n 'Message' => \"User Deactivated\"\r\n )\r\n );\r\n }\r\n else{\r\n $this->response(\r\n array(\r\n 'Status_code' => \"201\",\r\n 'Message' => \"User Activated\"\r\n )\r\n ); \r\n }\r\n }\r\n else\r\n {\r\n $this->response(\r\n array(\r\n 'Status_code' => \"401\",\r\n 'Message' => \"ops something went wrong\"\r\n )\r\n ); \r\n }\r\n }", "function ihc_do_user_approve($uid=0){\n\tif ($uid){\n\t\t$data = get_userdata($uid);\n\t\tif ($data && isset($data->roles) && isset($data->roles[0]) && $data->roles[0]=='pending_user'){\n\t\t\t$default_role = get_option('default_role');\n\t\t\t$user_id = wp_update_user(array( 'ID' => $uid, 'role' => $default_role));\n\t\t\tif ($user_id==$uid){\n\t\t\t\tihc_send_user_notifications($user_id, 'approve_account');\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t}\n\treturn FALSE;\n}", "function submitVerifikasi($id_user){\n\t\t$this->Kesehatan_M->update('user',array('id_user'=>$id_user),array('verified'=>'sudah'));\n\t\tredirect(\"Admin/verifikasi\");\n\t}", "public function approve_submission(Request $request)\n {\n }", "function approveMember($userId) {\r\n $sql = $this->db->prepare(\"UPDATE USER SET type=2 WHERE UserID=:user_id\");\r\n $sql->execute(array('user_id' => $userId));\r\n return true;\r\n }", "public function doApproveUser ($uid) {\n\t\t$userInfo = resolve('userInfo');\n\n\t\tif ($userInfo->usr_role != \"AD\") {\n\t\t\treturn redirect('error');\n\t\t}\n\n\t\t$user = User::getUserById($uid);\n\n\t\tDB::table('users')->where('usr_id', $uid)->update(array('usr_approval'=>'Yes'));\n\t\tLog::doAddLog (\"Approve user\", $uid, $user->usr_firstname.' '.$user->usr_lastname);\n\t\treturn redirect('personnelboard')->with('success', \"User has been approved\");\n\n\t}", "public function accept()\n {\n\n $update['id'] = $this->session->userdata('user_id');\n $update['data']['agree'] = '1';\n $update['table'] = 'users';\n $this->Application_model->update($update);\n\n redirect('/dashboard','refresh');\n\n }", "public function approve($id){\n\n return 'hi';\n }", "function approve(){\n\t\t$points= $this->ref('currently_requested_to_id')->get('points_available');\n\t\tif($points < 3000)\n\t\t\t$this->api->js()->univ()->errorMessage(\"Not suficcient points available, [ $points ]\")->execute();\n\t\t// Send point to the requester and less from your self ... \n\n\t\t$purchaser= $this->add('Model_MemberAll')->addCondition(\"id\",$this['request_from_id'])->tryLoadAny();\n\t\t$purchaser['points_available'] = $purchaser['points_available'] + 3000;\n\t\t$purchaser->save();\n\n\t\t$seller=$this->add('Model_MemberAll')->addCondition(\"id\",$this['currently_requested_to_id'])->tryLoadAny();\n\t\t$seller['points_available'] = $seller['points_available'] - 3000;\n\t\t$seller->save();\n\n\t\tif($this->api->auth->model->id == 1)\n\t\t\t$this['status']='Approved By Admin';\n\t\telse\n\t\t\t$this['status']='Approved';\n\n\t\t$this->save();\n\n\n\t}", "public function approvePosts(){\n if (Request::isMethod('get'))\n {\n $posts = Post::where('status', '=', 0)->paginate(5);\n \n return View::make('admin.authenticated.approve_posts')->with('posts',$posts);\n }\n \n if (Request::isMethod('post'))\n {\n if(Session::has('admin_auth')){\n $pid = Input::get('pid');\n \n $post = Post::where('p_id','=',$pid)->update(array(\n 'status' => 1\n ));\n if($post){\n return Response::json(true);\n }\n }\n }\n }", "function approve_block_user($master_user_id, $master_user_type){\n\t\tif( isset($master_user_id) ){\n\t\t\tglobal $base;\n\n\t\t\t$id \t= $base->clear_string($_POST[$master_user_id]);\n\t\t\t$type \t= $base->clear_string($_POST[$master_user_type]);\n\t\t\t\n\t\t\tswitch($type){\n\t\t\t\tcase 'approve_status':\n\t\t\t\t\tuser::do_approve_user($id);\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'block_status':\n\t\t\t\t\tuser::do_block_user($id);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t}", "public function approveMahasiswa(Request $request, $id)\n {\n $mahasiswa = Mahasiswa::find($id);\n $currentDosen = Dosen::where('user_id', $request->user()->id)->first();\n\n if(!$mahasiswa->isPembimbing($currentDosen->kode_bimbing)) {\n return response()->json([\n 'message' => 'Hanya dosen pembimbing utama yang dapat menyetujui registarsi mahasiswa.'\n ], 422);\n }\n else {\n $user = User::where('email', $mahasiswa->email)->first();\n if($user) {\n $mahasiswa->user_id = $user->id;\n $mahasiswa->save();\n }\n\n else {\n $role_mahasiswa = Role::where('name', 'mahasiswa')->first();\n\n $newUser = User::create([\n 'name' => $mahasiswa->nama,\n 'email' => $mahasiswa->email,\n 'avatar' => $mahasiswa->foto,\n 'role_id' => $role_mahasiswa->id\n ]);\n $newUser->roles()->save($role_mahasiswa);\n\n $mahasiswa->user_id = $newUser->id;\n $mahasiswa->save();\n\n $newUser->notify(new MahasiswaApproved($mahasiswa));\n }\n\n\n// TODO: notify mahasiswa\n\n return response()->json(['message' => 'Mahasiswa berhasil diverifikasi.']);\n }\n }", "function update_promoter_guest_list_set_auto_approve(){\n\t\t\n\t\tif(!$pgla_id = $this->CI->input->post('pgla_id')){\n\t\t\treturn array('success' => false,\n\t\t\t\t\t\t\t'message' => 'pgla_id not set');\n\t\t}\n\t\t\n\t\tif(!$auto_approve = $this->CI->input->post('auto_approve')){\n\t\t\treturn array('success' => false,\n\t\t\t\t\t\t\t'message' => 'auto_approve not set');\n\t\t}\n\t\t\n\t\t$this->CI->load->model('model_users_promoters', 'users_promoters', true);\n\t\treturn $this->CI->users_promoters->update_promoter_guest_list_set_auto_approve($pgla_id, $auto_approve, $this->promoter->up_id);\n\t}", "public function approveEvent(){\n \t\n \t$data=$this->request->all();\n \t\n \t // print_r($data['value']);die();\n \t$status=$data['value'];\n \t$state['status']=$status;\n \t$event=Event::where('_id',$data['id'])->update($state);\n\n \tif($event){\n \t\treturn \"Success\";\n \t}\n \t// print_r($event);die();\n \t // return view('');\n }", "public function approve_request($id) {\r\n\t\treturn $this->db->update('orders', [\r\n\t\t\t'_assigned_staff'=>$this->input->post('staff'), \r\n\t\t\t'price'=>$this->input->post('amount'), \r\n\t\t\t'_status' => STATUS_PENDING_PAYMENT], ['_id' => $id]);\r\n\t}", "public function approve(User $user)\n {\n return $user->role->can_approve_posts == 1;\n }", "public function approve(Request $request, $id)\n {\n\n $updateData = $request->validate([\n \n 'status' => 'max:255'\n \n ]);\n\n User::whereId($id)->update($updateData);\n return redirect('/user')->with('completed', 'user has been updated');\n }", "public function approve($id)\n {\n $kondisi = $this->input->post('id_kondisi');\n $sql = $this->db->query(\"SELECT tanggal FROM ticket WHERE id_ticket = '$id'\")->row();\n $sql2 = $this->db->query(\"SELECT nama_kondisi FROM kondisi WHERE id_kondisi = '$kondisi'\")->row();\n //Data\n $prio = $sql2->nama_kondisi;\n $date = $sql->tanggal;\n $date2 = $this->input->post('waktu_respon');\n //Mengambil session admin\n $id_user = $this->session->userdata('id_user');\n\n //Melakukan update data ticket dengan mengubah status ticket menjadi 2, data ditampung ke dalam array '$data' yang nanti akan diupdate dengan query\n $data = array(\n 'id_kondisi' => $kondisi,\n 'deadline' => date('Y-m-d H:i:s', strtotime($date. ' + '.$date2.' days')),\n 'status' => 3,\n 'last_update'=> date(\"Y-m-d H:i:s\"),\n 'teknisi' => $this->input->post('id_teknisi')\n );\n\n //Melakukan insert data tracking ticket bahwa ticket di-approve oleh admin, data tracking ke dalam array '$datatracking' yang nanti akan di-insert dengan query\n $datatracking = array(\n 'id_ticket' => $id,\n 'tanggal' => date(\"Y-m-d H:i:s\"),\n 'status' => \"Ticket Received\",\n 'deskripsi' => \"Priority of the ticket is set to \".$prio.\" and assigned to technician.\",\n 'id_user' => $id_user\n );\n\n //Query untuk melakukan update data ticket sesuai dengan array '$data' ke tabel ticket\n $this->db->where('id_ticket', $id);\n $this->db->update('ticket', $data);\n\n //Query untuk melakukan insert data tracking ticket sesuai dengan array '$datatracking' ke tabel tracking\n $this->db->insert('tracking', $datatracking);\n }", "public function approveCommentMethod()\n { \n $choice = $this->getGet()[\"approve\"];\n $data = [\"approved\" => (int) $choice]; \n $comment_id = (string) $this->getId();\n\n if ($choice === \"1\") {\n $message = \"Le commentaire a bien été approuvé et publié.\";\n } elseif ($choice === \"0\") {\n $message = \"Le commentaire a été refusé et ne sera pas publié.\";\n };\n\n ModelFactory::getModel(\"Comment\")->updateData($comment_id, $data);\n $this->setMessage($message);\n $this->redirect(\"user!admin\");\n }", "protected function _setApprovedFlag()\n {\n $user = $this->getUser();\n\n if (!empty($user['id'])) {\n $settings = $this->getSettings();\n if ($settings['enable_listings_approval']) {\n return 0;\n }\n else if ($user['listing_approval']) {\n return 0;\n }\n }\n\n return 1;\n }", "public function actionApprove($id){\n $model = $this->findModel($id);\n \n if ($model->status_listing == 1){\n $model->status_listing = 5;\n \n if ($model->save()){\n return 'success';\n }\n \n }else{\n return 'Not Valid for Approve';\n }\n }", "public function actionApprove(){\n \t// Set no waiting limit\n \tset_time_limit(0);\n \t// REST client is flash app\n \t$this->restFlashClient = true;\n \t\n \tif (!isset($_POST['userJobId']) || !isset($_POST['approved'])){\n \t\t$this->_sendResponse(\"Approval workflow has failed. Missing userJobId or approval status\", 400);\n \t\treturn;\n \t}\n \t\t\n \t$userJobId = $_POST['userJobId'];\n \t$approved = $_POST['approved'] == 'false' ? false : true;\n \t\n \t// Get UserJob object\n \t$userJob = PUserJob::model()->findByPk($userJobId);\n \t\n \t/* \n \t * Send bad request in case the provided $userJobId does not exist.\n \t */\n \tif(!$userJob instanceof PUserJob){\n \t\t$this->_sendResponse(\"The job with id '{$userJobId}' does not exist in database.\", 400);\n \t}\n \t\n \tif($this->taskWorkflowAPI()->setProjectJobId($userJob->projectJob->id)->validate()) {\n \t\t// Start delivery\n \t\t$this->taskWorkflowAPI()->deliver();\n \t\t\n \t\t// Add breakdown report about task delivery\n \t\t$mainAPI = $this->mainAPI();\n \t\t$mainAPI->projectBreakdownByUserJob($mainAPI::PBR_TASK_DELIVERED, $userJob->id);\n \t\t$mainAPI->sferaAPIByProject($userJob->projectJob->project_id);\n \t\t\n \t\t// mark parent job as disapproved\n \t\tif ($approved == false){\n \t\t\t$mainProjectJob = PProjectJob::model()->findByPk($userJob->projectJob->id)->getMainJob();\n \t\t\tYii::app()->projectAPI->markAsDisapproved($mainProjectJob->id);\n \t\t\t\n \t\t\t//TODO send mail\n \t\t}\t\n \t\t\n \t\t// Send successful response\n \t\t$this->_sendResponse('Approval has been done successfully.');\n \t}\n \telse{\n \t\t// Send failure response\n \t\t$this->_sendResponse(\"Approval workflow has failed.\", 400);\n \t}\n }", "public function approve_advertiser(Request $request)\n {\n\n }", "public function approveMultiple(){\n\t\t\tif(isset($_SESSION['admin_email'])){\n\t\t\t$this->model(\"AdminApproveModel\");\n\t\t\tif(isset($_POST['admin_approve_all'])){\n\t\t\t$approve_all = $this->sanitizeString($_POST['admin_approve_all']);\n\t\t\t$id = $this->sanitizeString($_POST['id']);\n\t\t\t$check_all = $this->sanitizeString($_POST['admin_check_all']);\n\t\t\tif(!empty($check_all)){\n\t\t\t\tAdminApproveModel::where('id', $id)->update(['priority'=>'Activated']);\n\t\t\t}\n\t\t}\n\t}\n\t}", "public function acceptRequest($id)\n {\n $user = User::find($id);\n $user->update([\n\n 'active' => 1,\n\n ]);\n\n //Thực hiện chuyển trang\n return redirect('master/data-user-request');\n }", "public function approveItem(Request $request)\n {\n $user = auth()->user();\n $returnResult = [];\n $success = false;\n $quoteItem = \\App\\QuoteItem::find($request->id);\n $quoteUser = \\App\\Quote::find($quoteItem->quote_id)->users;\n if ($user->organization_id == $quoteUser->organization_id) {\n if ($request->invoice === \"true\") {\n $quoteItem->invoice = 1;\n } else {\n $quoteItem->invoice = 0;\n }\n if ($quoteItem->save()) {\n $success = true;\n $returnResult['message'] = 'Success';\n } else {\n $returnResult['message'] = 'An internal server erros has ocurred, please contact your administrator';\n }\n } else {\n $returnResult['message'] = 'You have no permissions on this record';\n }\n return response()->json(array('success' => $success, 'data'=>$returnResult));\n }", "public function approve()\n {\n $message = new MailMessage;\n $message->greeting(\"Hi {$this->post->reporting->name}!\");\n $message->line(\"The post {$this->post->titile} has been approved successfully.\"); \n foreach ($this->workflow as $key => $value) {\n if ($key == 0) {\n $message->action($value->action, url('workflows/workflow/' . $value->id));\n continue;\n }\n $message->line('<a href=\"'.url('workflows/workflow/' . $value->id).'\">'.$value->action.'</a>');\n }\n\n return $message;\n }", "function approve_block_more_users($users_id, $users_type){\n\t\tif( isset($_POST[$users_id]) ){\n\t\t\tglobal $base;\n\t\t\t\n\t\t\tuser::users_manipulation($_POST[$users_id], $_POST[$users_type]);\n\t\t\tredirect('../../master_admin.php');\n\t\t}\n\n\t}", "public function approve(\\App\\Models\\Request $request)\n {\n $id = $request->id;\n $request = DB::table('requests')->where('id', $id);\n $request->update(['status' => 'approved']);\n\n return redirect('/profile/' . auth()->user()->id);\n }", "public function approve(Request $request)\n {\n $plat_nomor = explode('|', $request->input('plat_nomor'));\n\n $tanggal = $request->input('tanggal');\n $id_op_keberangkatan = $request->input('id_op_keberangkatan');\n\n // simpan ke tabel kedatangan\n $page2 = new OpKedatangan();\n $page2->id_kendaraan = $plat_nomor[0];\n $page2->tanggal = $tanggal;\n $page2->save();\n\n \n // update status di tabel operasional keberangkatan\n $page = OpKeberangkatan::find($plat_nomor[1]);\n if($page) {\n $page->status = 'Y';\n $page->save();\n }\n \n Alert::success('Succes', 'Data Berhasil Diubah');\n return back();\n }", "public function isApproved()\n {\n\n return false;\n }", "function approve_comment($approve_comment_id){\n\t\tif( isset($_POST[$approve_comment_id]) ){\n\t\t\t$comment_id = $_POST[$approve_comment_id];\n\t\t\tarticles_marks::approve_comment_status($comment_id);\n\t\t}\t\n\t}", "public function do_approve(Request $request, $id){\n\n\n $leave = Leave::find($id);\n\n /* for supervisours */\n if(auth::id() == $leave->supervisor_id){\n\n $leave->supervisor_action = 1;\n $leave->current_position = 1;\n $leave->leave_status = 1;\n $leave->leave_message = \"Approved by Supervisor, Pending HR approval\";\n\n $leave->save();\n\n\n\n $action = WorkflowAction::create([\n\n 'type' => 'leave',\n 'user_id' =>Auth::id(),\n 'post_id' => $id,\n 'status' => 'approved',\n 'comments' => 'Pending HR approval',\n 'position' => 'Supervisor',\n 'sent_to' => 162\n\n ]);\n\n /////////////////////////////////////////////send notification to users\n $toHr1 = User::find(162);\n $toHr2 = User::find(168);\n $torequester = User::find($leave->user_id);\n $toreliever = User::find($leave->reliever_id);\n\n /*auth()->user()->notify(new LeaveNotification($leave));\n $toHr1->notify(new LeaveNotification($leave));\n $toHr2->notify(new LeaveNotification($leave));\n $torequester->notify(new LeaveNotification($leave));*/\n\n\n $message_requester = \"Your \".$leave->no_days.\" day(s) \".$leave->leave_category.\" leave\n application has\n been approved by \".User::find($leave->supervisor_id)->display_name.\".\";\n\n $message_suppervisor = \" You have successfully approved \".User::find($leave->user_id)->display_name.\"\n \".$leave->no_days.\" day(s) \".$leave->leave_category.\" leave\n application, pushed to HR for approval.\";\n\n $message_reliever = \"\".User::find($leave->user_id)->display_name.\" \".$leave->no_days.\" day(s) \".$leave->leave_category.\" leave\n application has\n been approved by \".User::find($leave->supervisor_id)->display_name.\".\";\n\n $message_hr = \" \".User::find($leave->user_id)->display_name.\" needs your approval for\n \".$leave->no_days.\" day(s) \".$leave->leave_category.\" leave application as supervisor (\".User::find($leave->supervisor_id)->display_name.\") has successfully approved this leave application.\";\n\n //send notification to users\n auth()->user()->notify(new LeaveNotification($leave,$message_suppervisor));\n //$toHr1->notify(new LeaveNotification($leave,$message_hr));\n //$toHr2->notify(new LeaveNotification($leave,$message_hr));\n $torequester->notify(new LeaveNotification($leave,$message_requester));\n $toreliever->notify(new LeaveNotification($leave,$message_reliever));\n\n\n /*auth()->user()->notify(new LeaveNotification($post,$message_requester) );\n User::find($request->supervisor)->notify(new LeaveNotification($post,$message_suppervisor) );\n User::find($request->reliever)->notify(new LeaveNotification($post, $message_reliever) );*/\n\n //sending email staff\n $link = route('leave.show', ['id' => $leave->id]);\n $title = \"Your Leave Request\";\n $button_title = \"Click to view\";\n $leave_date = \"\".$leave->start_date.\" to \".$leave->end_date.\"\";\n $this->send_email(\"\".User::find($leave->user_id)->display_name.\"\",\"\".User::find( $leave->user_id)->user_email.\"\",$message_requester,$link,$title,$button_title,\"\".User::find($leave->user_id)->display_name.\"\",$leave->leave_category,$leave->no_days,$leave_date,$leave->leave_year,\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->display_name.\"\");\n //end of send email\n\n\n //sending email reliever\n $link = route('leave.show', ['id' => $leave->id]);\n $title2 = \"Leave Request From \".ucwords(User::find($leave->user_id)->display_name).\"\";\n $button_title = \"Click here to view\";\n $leave_date = \"\".$leave->start_date.\" to \".$leave->end_date.\"\";\n $this->send_email(\"\".User::find($leave->reliever_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->user_email.\"\",$message_reliever,$link,$title2,$button_title,\"\".User::find($leave->user_id)->display_name.\"\",$leave->leave_category,$leave->no_days,$leave_date,$leave->leave_year,\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->display_name.\"\");\n //end of send email\n\n //sending email manager\n $link = route('leave.show', ['id' => $leave->id]);\n $title2 = \"Leave Request From \".ucwords(User::find($leave->user_id)->display_name).\"\";\n $button_title = \"Click here to Approve / Decline\";\n $leave_date = \"\".$leave->start_date.\" to \".$leave->end_date.\"\";\n $this->send_email(\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->supervisor_id)->user_email.\"\",$message_suppervisor,$link,$title2,$button_title,\"\".User::find($leave->user_id)->display_name.\"\",$leave->leave_category,$leave->no_days,$leave_date,$leave->leave_year,\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->display_name.\"\");\n //end of send email\n\n\n //sending email HR\n $link = route('leave.show', ['id' => $leave->id]);\n $title2 = \"Leave Request From \".ucwords(User::find($leave->user_id)->display_name).\"\";\n $button_title = \"Click here to Approve / Decline \";\n $leave_date = \"\".$leave->start_date.\" to \".$leave->end_date.\"\";\n $hr_email = \"[email protected]\";\n $this->send_email(\"HR\",$hr_email,$message_hr,$link,$title2,$button_title,\"\".User::find($leave->user_id)->display_name.\"\",$leave->leave_category,$leave->no_days,$leave_date,$leave->leave_year,\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->display_name.\"\");\n //end of send email\n\n\n\n\n\n // fire leavePublished event after post is successfully added to database\n // event(new leavePublished($post));\n\n\n\n\n return response()->json(['result'=>'1','message'=> \"You have successfully approved \".User::find\n ($leave->user_id)->display_name.\" \".$leave->no_days.\" day(s) leave application. \"]);\n\n } elseif((auth::id() == '162') || (auth::id() == '168') || (auth::id() == '182')) {\n\n /*FOR HR APPROVAL*/\n\n\n $leave->hr_action = 1;\n $leave->current_position = 3;\n $leave->leave_status = 3;\n $leave->leave_message = \"Approved by Supervisor and HR\";\n\n $leave->save();\n\n\n\n $action = WorkflowAction::create([\n\n 'type' => 'leave',\n 'user_id' =>Auth::id(),\n 'post_id' => $id,\n 'status' => 'approved',\n 'comments' => 'Approved by HR',\n 'position' => 'HR',\n 'sent_to' => 162\n\n ]);\n\n\n //send notification to users\n $toHr1 = User::find(162);\n $toHr2 = User::find(168);\n $torequester = User::find($leave->user_id);\n $toreliever = User::find($leave->reliever_id);\n $tosupervisor = User::find($leave->supervisor_id);\n\n /*auth()->user()->notify(new LeaveNotification($leave));\n $toHr1->notify(new LeaveNotification($leave));\n $toHr2->notify(new LeaveNotification($leave));\n $torequester->notify(new LeaveNotification($leave));*/\n\n\n $message_requester = \"Your \".$leave->no_days.\" day(s) \".$leave->leave_category.\" leave\n application has\n been approved by \".User::find(auth::id())->display_name.\". (HR)\";\n\n $message_suppervisor = \"\".User::find($leave->user_id)->display_name.\" \".$leave->no_days.\" day(s) \".$leave->leave_category.\" leave\n application has\n been approved by \".User::find(auth::id())->display_name.\" (HR)\";\n\n $message_reliever = \"\".User::find($leave->user_id)->display_name.\" \".$leave->no_days.\" day(s) \".$leave->leave_category.\" leave\n application has\n been approved by \".User::find(auth::id())->display_name.\" (HR)\";\n\n $message_hr = \" \".User::find(auth::id())->display_name.\" successfully approved \".User::find($leave->user_id)->display_name.\"\n \".$leave->no_days.\" day(s) \".$leave->leave_category.\" leave\n application.\";\n\n //send notification to users\n // auth()->user()->notify(new LeaveNotification($leave,$message_suppervisor));\n $toHr1->notify(new LeaveNotification($leave,$message_hr));\n $toHr2->notify(new LeaveNotification($leave,$message_hr));\n $torequester->notify(new LeaveNotification($leave,$message_requester));\n $toreliever->notify(new LeaveNotification($leave,$message_reliever));\n $tosupervisor->notify(new LeaveNotification($leave,$message_suppervisor));\n\n // fire leavePublished event after post is successfully added to database\n // event(new leavePublished($post));\n\n\n //sending email staff\n $link = route('leave.show', ['id' => $leave->id]);\n $title = \"Your Leave Request\";\n $button_title = \"Click to view\";\n $leave_date = \"\".$leave->start_date.\" to \".$leave->end_date.\"\";\n $this->send_email(\"\".User::find($leave->user_id)->display_name.\"\",\"\".User::find( $leave->user_id)->user_email.\"\",$message_requester,$link,$title,$button_title,\"\".User::find($leave->user_id)->display_name.\"\",$leave->leave_category,$leave->no_days,$leave_date,$leave->leave_year,\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->display_name.\"\");\n //end of send email\n\n\n //sending email reliever\n $link = route('leave.show', ['id' => $leave->id]);\n $title2 = \"Leave Request From \".ucwords(User::find($leave->user_id)->display_name).\"\";\n $button_title = \"Click here to view\";\n $leave_date = \"\".$leave->start_date.\" to \".$leave->end_date.\"\";\n $this->send_email(\"\".User::find($leave->reliever_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->user_email.\"\",$message_reliever,$link,$title2,$button_title,\"\".User::find($leave->user_id)->display_name.\"\",$leave->leave_category,$leave->no_days,$leave_date,$leave->leave_year,\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->display_name.\"\");\n //end of send email\n\n //sending email manager\n $link = route('leave.show', ['id' => $leave->id]);\n $title2 = \"Leave Request From \".ucwords(User::find($leave->user_id)->display_name).\"\";\n $button_title = \"Click here to Approve / Decline\";\n $leave_date = \"\".$leave->start_date.\" to \".$leave->end_date.\"\";\n $this->send_email(\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->supervisor_id)->user_email.\"\",$message_suppervisor,$link,$title2,$button_title,\"\".User::find($leave->user_id)->display_name.\"\",$leave->leave_category,$leave->no_days,$leave_date,$leave->leave_year,\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->display_name.\"\");\n //end of send email\n\n\n //sending email HR\n $link = route('leave.show', ['id' => $leave->id]);\n $title2 = \"Leave Request From \".ucwords(User::find($leave->user_id)->display_name).\"\";\n $button_title = \"Click here to Approve / Decline \";\n $leave_date = \"\".$leave->start_date.\" to \".$leave->end_date.\"\";\n $hr_email = \"[email protected]\";\n $this->send_email(\"HR\",$hr_email,$message_hr,$link,$title2,$button_title,\"\".User::find($leave->user_id)->display_name.\"\",$leave->leave_category,$leave->no_days,$leave_date,$leave->leave_year,\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->display_name.\"\");\n //end of send email\n\n\n\n\n\n\n\n\n\n return response()->json(['result'=>'1','message'=> \"You have successfully approved \".User::find\n ($leave->user_id)->display_name.\" \".$leave->no_days.\" day(s) leave application.\"]);\n\n\n\n\n }else{\n\n return response()->json(['result'=>'0','message'=> \"You are not authorized\"]);\n\n }\n\n\n\n\n\n }", "public function approveTicket(Request $request)\n\t\t{\n\t\t\tif(isset($_POST['ticket_id']))\n\t\t\t{\t\n\t\t\t\t$ticket_id = $_POST['ticket_id'];\n\t\t\t\t$ins_data['status'] = 'approve';\n\t\t\t\ttickets::where('id',$ticket_id)->update($ins_data);\n\t\t\t}\n\t\t}", "public function send_approvals() {\n if (isset($_POST['approval'])) {\n $PDO = Record::getConnection();\n\t\t\t $common = new APCommon();\n \t\t\t foreach($_POST['approval'] as $id){\n\t\t\t\t\n\t\t\t\t//Find the record in the temp table and send the confirmation email\n\t\t\t\t$sql = \"SELECT * FROM \". TABLE_PREFIX . \"approved_users_temp WHERE id=:id\";\n $stmt = $PDO->prepare($sql);\n $stmt->execute(array(\"id\" => $id));\n\t\t\t\t$row = $stmt->fetch();\n\t\t\t\t$email = $row[2];\n\t\t\t\t$name = $row[1];\n\t\t\t\t$common->confirmation_email($email, $name);\n\t\t\t\t\n\t\t\t\t//Update the temp table to mark row as processed\n $sql = \"UPDATE \" . TABLE_PREFIX . \"approved_users_temp SET processed=1 WHERE id=:id\";\n $stmt = $PDO->prepare($sql);\n $stmt->execute(array(\"id\" => $id));\n\t\t\t }\n \n \t\t\tFlash::set('success', __('Approvals processed'));\n \t\t} else {\n Flash::set('error', __('Unable to process approvals'));\n }\n\n redirect(get_url('plugin/approved_users/approvals'));\n }", "function approve()\r\n\t{\r\n\t\tJRequest::checkToken() or jexit('Invalid Token');\r\n\t\t\r\n\t\t// Get the selected items\r\n\t\t$cid = JRequest::getVar('cid', array(0), 'post', 'array');\r\n\t\t\r\n\t\t$total = count($cid);\r\n\t\t$msg = JText::sprintf('RSM_TRANSACTIONS_APPROVED', $total);\r\n\t\t\r\n\t\t// Force array elements to be integers\r\n\t\tJArrayHelper::toInteger($cid, array(0));\r\n\t\t\r\n\t\t$msg = '';\r\n\t\t\r\n\t\t// No items are selected\r\n\t\tif (!is_array($cid) || count($cid) < 1)\r\n\t\t\tJError::raiseWarning(500, JText::_('SELECT ITEM'));\r\n\t\telse\r\n\t\t{\r\n\t\t\t$user =& JFactory::getUser();\r\n\t\t\t$user_id = $user->get('username');\r\n\t\t\tforeach ($cid as $id)\r\n\t\t\t{\r\n\t\t\t\tRSMembership::saveTransactionLog('Manually approved by '.$user_id, $id);\r\n\t\t\t\tRSMembership::approve($id);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$total = count($cid);\r\n\t\t\t$msg = JText::sprintf('RSM_TRANSACTIONS_APPROVED', $total);\r\n\t\t\t\r\n\t\t\t// Clean the cache, if any\r\n\t\t\t$cache =& JFactory::getCache('com_rsmembership');\r\n\t\t\t$cache->clean();\r\n\t\t}\r\n\t\t\r\n\t\t$this->setRedirect('index.php?option=com_rsmembership&view=transactions', $msg);\r\n\t}", "public function approveMultiple(Request $request){\n\n if($request->isMethod('post')){\n \n $i=0;\n foreach ($request->toUpdate as $key => $eachUser) {\n \n $trans = CustomerTransaction::where(['id' => $eachUser ,'firm_id' => auth()->user()->firm_id])->first();\n if($trans){\n $trans->status = 1;\n $trans->approved_by = auth()->user()->id;\n if ($trans->save()) {\n $i++;\n } \n }\n }\n Session::flash('status',$i.' Transaction Approved Successfully');\n Session::flash('class','success');\n return redirect('merchant/customers/transaction');\n }\n }", "public function approve($requests) {\n $sql = \"UPDATE user SET role='1' WHERE user.id=?\";\n $sth = $this->db->prepare($sql);\n foreach ($requests as $teacher_id) {\n $sth-> execute(array($teacher_id));\n if ($sth->rowCount()==1) {\n $this->deleteFromRequest($teacher_id);\n } else {\n //Site refreshes after approve is done, not sure how to pass data\n echo 'fail';\n }\n }\n }", "function _approveNewVendor(){\n \n $this->ci->load->library('form_validation');\n $person_id = $this->ci->session->userdata('user_id');\n \n $this->resetResponse();\n\n $this->ci->form_validation->set_rules('personId', 'Vendor Person Id', 'trim|required|xss_clean|encode_php_tags|integer', array('required' => 'You must provide a %s.'));\n\n if ($this->ci->form_validation->run() == FALSE) { \n $this->_status = false;\n $this->_message = $this->ci->lang->line('person_id_missing');\n return $this->getResponse();\n } else {\n\n $personId = $this->ci->input->post('personId', true);\n $result = $this->model->get_tb('mm_person', 'person_id', array('person_id' => $personId))->result();\n if (count($result) > 0) {\n $this->model->update_tb('mm_person', array('person_id' => $personId), array('person_status'=>1));\n \n if( $this->model->getAffectedRowCount() > 0 ) {\n $this->_status = true;\n $this->_message = $this->ci->lang->line('vendor_approved'); \n }\n } else {\n $this->_status = FALSE;\n $this->_message = $this->ci->lang->line('invalid_data'); \n \n }\n\n return $this->getResponse();\n }\n \n }", "function requestApproval() \t{\n\t\t$this->getMenu() ;\n\t\t$id = $this->input->post('id');\n\t\t$this->timesheetModel->saveTimesheetRequest($id);\n\t\tredirect ('/timesheet/');\n\t}", "function _erpal_crm_activity_queue_view_approve_submit (&$form, &$form_state) {\n\n if (erpal_crm_activity_queue\\ActivityQueueModel::approve($form_state['values']['result'])) {\n drupal_set_message (t('Activity elements has been successfuly approved.'));\n }else{\n drupal_set_message (t('An error occured while trying to approve some activity elements.'));\n }\n \n return;\n}", "public function approve(Request $request, $id)\n {\n //\n $postulation = Postulation::find($id);\n $postulation->state = 2;\n $postulation->save();\n\n $user = User::find($postulation->user->id);\n if($postulation->type===1){\n $role = Level::find(4);\n $user->level()->associate($role);\n }elseif ($postulation->type===2) {\n $role = Level::find(5);\n $user->level()->associate($role);\n $enterprise = $user->postulation->where('id', $id)->get()->first()->enterprise;\n $enterprise->state = 1;\n $enterprise->save();\n }\n $user->state = 1;\n $user->save();\n\n $type = Type::find(9);\n $notification = New Notification();\n $notification->user()->associate($user);\n $notification->from_id = 0;\n $notification->type()->associate($type);\n $notification->url = $postulation->uid;\n $notification->from_name = '(RCEE)';\n $notification->save();\n\n return redirect()->route('admin.postulations.index');\n }", "public function postApprover(Request $request)\n {\n $input = Input::all();\n $id = isset($input['id']) ? $input['id'] : null;\n $loanId = isset($input['loanId']) ? $input['loanId'] : null;\n $loanType = isset($input['type']) ? $input['type'] : null;\n $amount = isset($input['loan_amount']) ? $input['loan_amount'] : null;\n $loanTenure = isset($input['loan_tenure']) ? $input['loan_tenure'] : null;\n $endUseList = isset($input['end_use']) ? $input['end_use'] : null;\n $user = Auth::getUser();\n\n\n LoansStatus::updateOrCreate(['loan_id' => $loanId], ['loan_id' => $loanId, 'praposalApproved' => $input['loan_status'],'remark'=>$input['remark']]);\n if($input['loan_status']=='Y'){\n $loansStatus = Loan::updateOrCreate(['id' => $loanId], ['id' => $loanId, 'status' => '24']);\n $loansStatus->save();\n }else{\n $loansStatusNo = Loan::updateOrCreate(['id' => $loanId], ['id' => $loanId, 'status' => '23']);\n $loansStatusNo->save();\n }\n\n // $loansStatus->save();\n $redirectUrl = 'home';\n return Redirect::to($redirectUrl)->withInput();\n }", "public function userupdatesuccessAction()\n {\n }", "public function confirm()\n {\n $addRecord = $this->reviews->create();\n\n $addRecord->ID = $this->input->post('ID');\n $addRecord->from = $this->input->post('from');\n $addRecord->to = $this->input->post('to');\n $addRecord->review = $this->input->post('review');\n $addRecord->rating = $this->input->post('rating');\n\n // Add validation here once log in is implemented\n // there shouldn't be an anonymous review\n\n // Create review if review doesn't exist\n // else update\n if($this->reviews->exists($addRecord->ID))\n {\n $this->reviews->update($addRecord);\n\n }\n else\n {\n $this->reviews->add($addRecord);\n }\n\n\n redirect('/user_detail/index/'. $addRecord->to);\n }", "public function requestAcceptAction() {\r\n $notification = $this->_getParam('notification', 0);\r\n\t\t$is_suggestionExist = Engine_Api::_()->getItem('user', $notification->object_id);\r\n\t\tif( empty($is_suggestionExist) ) {\r\n\t\t\t// If user are not exist then we are deleting the \"User Request\" which loggden user are gettig.\r\n\t\t\tEngine_Api::_()->getDbtable('notifications', 'activity')->delete(array('notification_id = ?' => $notification->notification_id));\r\n\t\t\t$this->_helper->redirector->gotoRoute(array('route' => 'default'));\r\n\t\t}else {\r\n\t\t\t$this->view->notification = $notification;\r\n\t\t}\r\n }", "public function actionAccept()\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 $status = $request->paramsGet()->get('status', 1);\n $model->status = $status;\n $model->save(false);\n\n return $this->back();\n }", "public function member_post_po(){\r\n\t $this->OuthModel->CSRFVerify();\r\n $data = $_REQUEST ;\r\n $res = $this->OrderModel->insertPOForUser( $data );\r\n\r\n\r\n }", "public function approve($id)\n {\n //\n $data = DB::select(\"SELECT * FROM riders WHERE Rider_Status = 'PENDING'\");\n rider::where('Rider_ID', $id)->update(array('Rider_Status' => 'APPROVED'));\n $message = \"Rider registration approved.\";\n echo \"<script type='text/javascript'>alert('$message');</script>\";\n return view('ManageAccount.RegistrationListInterface', compact(\"data\"));\n }", "public function approve($table,$id,$pageId=''){\n\t\t DB::table($table)\n ->where('id',$id)\n ->update(array(\n\t\t\t 'approve' =>'1',\n\t\t\t 'updated_at' =>time()\t\n\t\t\t));\n\t return Redirect::back()->with('message', 'Approval Information Updated !!');\n\t}", "public function authorize()\n {\n /*\n * Ovde mozete vrsiti proveru da li vas user ima dozvolu\n * za kreiranje Bloga, i vrsiti bilo kakvu dodatnu proveru u zavisnosti od\n * biznis logike\n * (pr. mozda user mora da ima min 18 godina da bi submitovao blog)\n *\n * Posto nemam nikakvu logiku za to, samo vracam true\n */\n return true;\n }", "public function update(Request $request, $id)\n {\n //Approve user\n $user = Pending::find($id);\n\n if($user->user_role == 102) {\n $user->user_role = 2;\n } \n if($user->user_role == 103) {\n $user->user_role = 3;\n } \n \n $user->save();\n\n return redirect('/pending')->with('success', 'User Approved');\n }", "public function approve(Request $request, User $user): RedirectResponse\n {\n $joinable = $user->joinable;\n\n Gate::forUser($request->user())->authorize('update', $joinable);\n\n $user->forceFill([\n 'joinable_type' => null,\n 'joinable_id' => null,\n ])->save();\n\n $joinable->users()->attach($user);\n\n flash(__('You have approved :name’s request to join :team and they are now a member.', ['name' => $user->name, 'team' => $joinable->name]), 'success');\n\n return redirect(\\localized_route($joinable->getRoutePrefix().'.edit', $joinable));\n }", "public function confirmApplication($id)\n{\n \n $user = requesttomanagermodel::where('id',$id) \n ->first();\n $user->status='completed';\n\n $user->save();\n return (response()->json([\n 'status' => 200 \n \n ]));\n}", "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}", "function ajax_approve_candidate() {\n $_POST['nonce'] = empty($_POST['nonce']) ? '' : trim($_POST['nonce']);\n\n if(\n empty($_POST['link-id'])\n || empty($_POST['doer-id'])\n || empty($_POST['task-id'])\n || empty($_POST['nonce'])\n || !wp_verify_nonce($_POST['nonce'], $_POST['link-id'].'-candidate-ok-'.$_POST['doer-id'])\n ) {\n die(json_encode(array(\n 'status' => 'fail',\n 'message' => __('<strong>Error:</strong> wrong data given.', 'tst'),\n )));\n }\n\n// wp_update_post(array('ID' => $_POST['task-id'], 'post_status' => 'closed'));\n p2p_update_meta($_POST['link-id'], 'is_approved', true);\n\n // Send email to the task doer:\n $task = get_post($_POST['task-id']);\n $doer = get_user_by('id', $_POST['doer-id']);\n $task_author = get_user_by('id', $task->post_author);\n \n tst_actualize_member_role($doer); \n tst_actualize_member_role($task_author); \n\n // Notice to doer:\n global $email_templates;\n wp_mail(\n $doer->user_email,\n $email_templates['approve_candidate_doer_notice']['title'],\n nl2br(sprintf(\n $email_templates['approve_candidate_doer_notice']['text'],\n $doer->first_name,\n $task->post_title,\n $task_author->user_email,\n $task_author->user_email,\n home_url('members/'.$task_author->user_login.'/')\n ))\n );\n\n // Notice to author:\n wp_mail(\n $task_author->user_email,\n $email_templates['approve_candidate_author_notice']['title'],\n nl2br(sprintf(\n $email_templates['approve_candidate_author_notice']['text'],\n $task_author->first_name,\n $task->post_title,\n $doer->user_email,\n $doer->user_email,\n home_url('members/'.$doer->user_login.'/')\n ))\n );\n\n // Task is automatically switched \"to work\":\n wp_update_post(array('ID' => $_POST['task-id'], 'post_status' => 'in_work'));\n\n die(json_encode(array(\n 'status' => 'ok',\n )));\n}", "public function approveUnapprove(Request $request){\n $status = DB::table($request->table)->where('id', $request->id)->first();\n\n $field = ($request->field) ? $request->field : 'status';\n //check number(1) or string(active)\n $value_type = is_numeric($status->$field) ? 1 : 'active';\n\n if(is_numeric($status->$field)){\n $value = ($status->$field == 1) ? 0 : 1;\n }else{\n $value = ($status->$field == 'active') ? 'unapprove' : 'active';\n }\n if($status){\n if($status->$field == $value_type){\n DB::table($request->table)->where('id', $request->id)->update([$field => $value]);\n }else{\n DB::table($request->table)->where('id', $request->id)->update([$field => $value]);\n }\n $output = array( 'status' => true, 'message' => ' Approve successful.');\n }else{\n $output = array( 'status' => false, 'message' => 'Sorry can\\'t approve.!');\n }\n return response()->json($output);\n }", "public function authorize()\n {\n return true; // todos pueden usar este form...\n }", "public function usuario_post() {\n $respuesta = $this->Account_model->selectUsuario($this->post('usuario'), $this->post('contraseña'));\n if(!$respuesta) {\n $this->response('', 204);\n } else {\n $this->response($respuesta, 200);\n }\n }", "public function confirm($user_uuid)\n {\n $this->load->helper(array('form', 'url'));\n $this->load->library('vision_users');\n $this->load->library('form_validation');\n $this->load->model('users_m');\n $this->load->model('terms_m');\n \n $user = $this->users_m->get_user_by_uuid($user_uuid);\n \n if (empty($user))\n {\n echo 'Error: User not found.'; exit();\n }\n else\n { \n $this->form_validation->set_rules('terms_accept', 'Accept Terms Checkbox', 'required');\n \n $view_data['error_msg'] = '';\n \n if ($this->form_validation->run() == FALSE)\n {\n $view_data['error_msg'] = 'After reviewing the terms, please check the \"I accept\" checkbox and click on the Accept button to continue.';\n }\n else\n {\n //var_dump($_POST); exit();\n \n if (isset($_POST['terms_accept']))\n {\n $user = $this->users_m->get_user_by_uuid($user_uuid);\n\n // update user\n $update_data = array(\n 'terms_accepted' => 1 \n );\n \n $this->users_m->update_user($user['id'], $update_data);\n \n // Christophe: hack for demo accounts that don't have an email address\n if ($user['email'] == '')\n {\n redirect('/signup/s/' . $user['uuid']);\n }\n else\n {\n redirect('/signup/password/' . $user['uuid']);\n }\n }\n }\n \n $user_type_id = $user['role_id'];\n \n $terms = $this->terms_m->get_terms_by_user_type($user_type_id);\n \n $view_data['user_uuid'] = $user_uuid;\n $view_data['terms'] = $terms;\n \n $this->load->view('signup/confirm', $view_data); \n }\n }", "public function pendingAction()\n {\n Zend_Registry::set('SubCategory', SubCategory::USERUPDATE);\n \t$user = $this->_user;\n if($user->{User::COLUMN_STATUS} == User::STATUS_MEMBER ){\n // Redirect to update if is a member already\n $this->_helper->redirectToRoute('userupdate');\n }\n\n $form = new User_Form_Update($user, true);\n\n // Populate form with data from DB in case user comes back to this page\n $form->populateFromDatabaseData($user->toArray());\n\n $data = $this->_request->getPost();\n if(!$data){\n // Display default data form\n $this->view->form = $form;\n return;\n }\n\n if (!$form->isValid($data)) {\n // Display form with errors\n $this->view->form = $form;\n return;\n }\n\n if(!$this->_updateUser($user, $form->getFormattedValuesForDatabase(), false)){\n // Update failed\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::UPDATE_FAILED));\n }\n\n // Update succeeded, redirect to next page\n $this->_helper->redirectToRoute('userwaitforconfirmation');\n }", "public function approve($id)\n {\n $update_status = Recipie::find($id);\n\n $update_status->publication_status = \"1\";\n\n $update_status->update();\n\n return redirect(\"admin-view-recipie\");\n }", "public function emailApprovalByUser($user) {\n\t\t$user->getPrimaryElectronicAddress()->setApproved(TRUE);\n\t\t$this->personRepository->update($user);\n\t\t$this->persistenceManager->persistAll();\n\t}", "public function act_edit_user()\n {\n $id = strip_tags($this->input->post('id'));\n $email = strip_tags($this->input->post('email'));\n $pass = strip_tags(hash('sha256',$this->input->post('password')));\n\n\n if (validation_edit_admin()) {\n $update_user = $this->dashboard->update('m_admin', array('id' => $id), array('email' => $email, 'password' => $pass));\n if ($update_user) {\n $response = array('error'=>false,'title'=>'Update Berhasil','pesan'=>'');\n echo json_encode($response);\n }\n\n }else{\n $response = array('error'=>true,'title'=>'Update Gagal!','pesan'=>strip_tags(validation_errors()));\n echo json_encode($response);\n }\n }", "public function approve(Req $request, $id)\n\t{\n\n\t\t$bookReq = BookRequest::findOrFail($id);\n\t\t$property = Property::findOrFail($bookReq->property_id);\n\t\tif($property->property_type == 'apartment'){\n\t\t\t\n\t\t}\n\t\t$bookReq->status = 1;\n\t\t$bookReq->save();\n\t\tMail::send('emails.requestAccepted',['email'=>$data['email'],\n\t\t\t\t\t\t\t\t\t 'name'=>$data['name'],\n\t\t\t\t\t\t\t\t\t 'body'=>$data['body']], \n\t\tfunction($message) use($data)\n\t\t{\n\t\t $message->to('[email protected]', $data['name'])->subject($data['name'].' question');\n\t\t});\t\n\n\n\t}", "public function Approve($fid)\n {\n include_once '../model/Mymodels.php';\n $mod=new Mymodel();\n $var=$mod->Approve($fid);\n if ($var == 'true')\n {\n header('location:adminhome.php');\n }\n }", "public function changeUserStatus_post() {\n /* Validation section */\n $this->form_validation->set_rules('ContestGUID', 'ContestGUID', 'trim|required|callback_validateEntityGUID[Contest,ContestID]');\n $this->form_validation->set_rules('UserGUID', 'UserGUID', 'trim|required|callback_validateEntityGUID[User,UserID]');\n $this->form_validation->set_rules('DraftUserStatus', 'DraftUserStatus', 'trim|required|in_list[Online,Offline]');\n $this->form_validation->validation($this); /* Run validation */\n /* Validation - ends */\n $this->SnakeDrafts_model->changeUserStatus($this->Post, $this->UserID, $this->ContestID);\n $this->Return['Message'] = \"Status has been changed.\";\n }", "public function actualizarEstadoAplicante($uid_aplicante, $nid_puesto, $tid_estado){\n\t \t$request_url = base_url().'rrhh/api/users/user/'. $uid_aplicante;\t\n\n \t//validar los argumentos url\n \tif(!is_numeric($nid_puesto) || !is_numeric($uid_aplicante) || !is_numeric($tid_estado)){\n \t\t$data['success'] = false;\n\t\t\t$data['error'] = 'Alguno de los argumentos no es numérico';\n\t\t\t$data['code'] = '406';\n \t}else{\n\t \t\t$auth_data = $this->autenticacion();\n\t\t \t\n\t\t \t//validar sesion del usuario\n\t\t \tif($auth_data['valido']){\n\t\t\t\t$csrf_token = $auth_data['csrf_token'];\n\t\t\t\t$session_cookie = $auth_data['session_cookie'];\n\n\t\t\t\t//validar existencia del puesto\n\t\t\t\t$node = $this->Node->load($nid_puesto);\n\t\t\t\tif((int)count($node) > 0){\n\n\t\t\t\t\t//validar el usuario si existe\n\t\t\t\t\t$user = $this->Users->load($uid_aplicante);\n\t\t\t\t\tif((int)count($user) > 0){\n\n\t\t\t\t\t\t$puesto = $this->Node->load($nid_puesto);\n\t\t\t\t\t\t$usuario_admin = $this->Users->load($puesto[0]->uid);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//validar autoria\n\t\t\t\t\t\t//validar usuario administrador\n\t\t\t\t\t\tif($_POST['mail'] == $usuario_admin[0]->mail){\n\t\t\t\t\t\t\t//Obtener el aplicante\n\t\t\t\t\t\t\t$aplicante_url = base_url('/rrhh/api/users/detalle-aplicante-blip.xml?user_id='.$uid_aplicante);\n\t\t\t\t\t\t\t$obtener_aplicante = consumirServicio($aplicante_url, $session_cookie, $csrf_token);\n\n\t\t\t\t\t\t\t$validar_aplicante = false;\n\t\t\t\t\t\t\tforeach ($obtener_aplicante->results as $key => $value) {\n\t\t\t\t\t\t\t\tforeach ($value as $key2 => $value2) {\n\t\t\t\t\t\t\t\t\t$pais_trabajar = $value2->field_pais_trabajar;\n\t\t\t\t\t\t\t\t\tforeach ($pais_trabajar as $key3 => $value3) {\n\t\t\t\t\t\t\t\t\t\tforeach ($value3->item as $key4 => $value4) {\n\t\t\t\t\t\t\t\t\t\t\t//validar si el aplicante desea laborar en Costa Rica\n\t\t\t\t\t\t\t\t\t\t\tif($value4->target_id == '10'){\n\t\t\t\t\t\t\t\t\t\t\t\t$validar_aplicante = true;\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t//validar el aplicante\n\t\t\t\t\t\t\tif($validar_aplicante){\t\n\t\t\t\t\t\t\t\t//validar si el estado ingresado es el que corresponde\n\t\t\t\t\t\t\t\t$estados_url = base_url('/rrhh/api/filtros/filtros-taxonomias-estados-bitacora.xml');\n\t\t\t\t\t\t\t\t$estados = consumirServicio($estados_url, $session_cookie, $csrf_token);\n\t\t\t\t\t\t\t\t$estado_valido = false;\n\t\t\t\t\t\t\t\tforeach ($estados->results as $key => $value) {\n\t\t\t\t\t\t\t\t\tforeach ($value as $key2 => $value2) {\n\t\t\t\t\t\t\t\t\t\tif($tid_estado == (int)$value2->tid){\n\t\t\t\t\t\t\t\t\t\t\t$estado_valido = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif($estado_valido){\n\t\t\t\t\t\t\t\t\t//verificar si el puesto a modificar es el correcto al usuario\n\t\t\t\t\t\t\t\t\t//extrar todas las aplicaciones del usuario\n\t\t\t\t\t\t\t\t\t//Obtener todos los puestos aplicados por el aplicante\n\t\t\t\t\t\t\t\t\t$puestos_aplicados_url = base_url('/rrhh/api/users/listado-puestos-aplicados-por-aplicante.xml?uid_aplicante='.$uid_aplicante);\n\t\t\t\t\t\t\t\t\t$puestos_aplicados_por_aplicante = consumirServicio($puestos_aplicados_url, $session_cookie, $csrf_token);\n\n\t\t\t\t\t\t\t\t\t$aplicacion_encontrada = false;\n\t\t\t\t\t\t\t\t\tforeach ($puestos_aplicados_por_aplicante->results as $key => $value) {\n\t\t\t\t\t\t\t\t\t\tforeach ($value as $key2 => $value2) {\n\t\t\t\t\t\t\t\t\t\t\tif($nid_puesto == (int)$value2->Nid){\n\t\t\t\t\t\t\t\t\t\t\t\t$aplicacion_encontrada = true;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Obtener todos los puestos aplicados por el aplicante\n\t\t\t\t\t\t\t\t\t$puestos_aplicados_url = base_url('/rrhh/api/puestos/puestos_aplicados_por_aplicante.xml?uid='.$uid_aplicante);\n\t\t\t\t\t\t\t\t\t$puestos_aplicados = consumirServicio($puestos_aplicados_url, $session_cookie, $csrf_token);\n\n\t\t\t\t\t\t\t\t\t//validar si el puesto esta asignado al usuario, de lo contrario se realizara una auto asignacion\n\t\t\t\t\t\t\t\t\tif($aplicacion_encontrada){\n\t\t\t\t\t\t\t\t\t\t//validar preselecciones\n\t\t\t\t\t\t\t\t\t\t$listado_puestos = array();\n\t\t\t\t\t\t\t\t\t\tforeach ($puestos_aplicados->items as $value) {\n\t\t\t\t\t\t\t\t\t\t\tforeach ($value->item as $key2 => $value2) {\n\t\t\t\t\t\t\t\t\t\t\t\t$puesto = $value2;\n\t\t\t\t\t\t\t\t\t\t\t\tarray_push($listado_puestos, array('estado' => (string)$puesto->tid_estado));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t$count_preselecciones = 0;\n\t\t\t\t\t\t\t\t\t\tforeach ($listado_puestos as $key => $value) {\n\t\t\t\t\t\t\t\t\t\t\tif($value['estado'] == '29')\n\t\t\t\t\t\t\t\t\t\t\t\t$count_preselecciones++;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif(($count_preselecciones < 1) || (($count_preselecciones == 1) && ($tid_estado != 29))) {\n\n\t\t\t\t\t\t\t\t\t\t\t$user_data = array(\"field_estado\" => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"und\" => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$tid_estado => $tid_estado\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"field_ultimo_puesto_aplicado\" => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"und\" => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$nid_puesto => $nid_puesto\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t );\n\n\t\t\t\t\t\t\t\t\t\t\t//verificar el estado del puesto\n\t\t\t\t\t\t\t\t\t \t\t$estado_puesto_url = base_url().'rrhh/api/puestos/obtener_estado_puesto/retrieve?nid_puesto=' . $nid_puesto . '.xml';\n\t\t\t\t\t\t\t\t\t\t\t$resultado_estado_puesto = consumirServicioSinToken($estado_puesto_url, $session_cookie);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t$cambiarEstado = false;\n\t\t\t\t\t\t\t\t\t\t\tif($resultado_estado_puesto == '0'){\n\t\t\t\t\t\t\t\t\t\t\t\t$cambiarEstado = true;\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t$actualizar_puesto_url = base_url().'rrhh/api/puestos/actualizar_puesto_temporalmente/retrieve?nid_puesto=' . $nid_puesto . '.xml';\n\t\t\t\t\t\t\t\t\t\t\t\t$resultado_puesto_actualizado = consumirServicioSinToken($actualizar_puesto_url, $session_cookie);\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t$result = ServicioActualizar($request_url, $user_data, $session_cookie, $csrf_token);\n\n\t\t\t\t\t\t\t\t\t\t\tif($cambiarEstado){\n\t\t\t\t\t\t\t\t\t\t\t\t$actualizar_puesto_url = base_url().'rrhh/api/puestos/actualizar_puesto_temporalmente/retrieve?nid_puesto=' . $nid_puesto . '.xml';\n\t\t\t\t\t\t\t\t\t\t\t\t$resultado_puesto_actualizado = consumirServicioSinToken($actualizar_puesto_url, $session_cookie);\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\tif($result){\n\t\t\t\t\t\t\t\t\t\t\t\t$data['success'] = true;\n\t\t\t\t\t\t\t\t\t\t\t\t$data['code'] = $result['httpcode'];\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tif($data['code'] != 200){\n\t\t\t\t\t\t\t\t\t\t\t\t\t$data['success'] = false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$data['mensaje'] = $result['mensaje'];\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t//no se encontro ninguna aplicacion con el id ingresado desde el url\n\t\t\t\t\t\t\t\t\t\t\t$data['success'] = false;\n\t\t\t\t\t\t\t\t\t\t\t$data['error'] = 'Ha excedido la cantidad de preselecciones por aplicante';\n\t\t\t\t\t\t\t\t\t\t\t$data['code'] = '406';\n\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t//validar cantidad de aplicaciones y preselecciones\n\t\t\t\t\t\t\t\t\t\tif((int)count($puestos_aplicados_por_aplicante->results->item) < 3){\n\n\t\t\t\t\t\t\t\t\t\t\t//validar preselecciones\n\t\t\t\t\t\t\t\t\t\t\t$listado_puestos = array();\n\t\t\t\t\t\t\t\t\t\t\tforeach ($puestos_aplicados->items as $value) {\n\t\t\t\t\t\t\t\t\t\t\t\tforeach ($value->item as $key2 => $value2) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$puesto = $value2;\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray_push($listado_puestos, array('estado' => (string)$puesto->tid_estado));\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t$count_preselecciones = 0;\n\t\t\t\t\t\t\t\t\t\t\tforeach ($listado_puestos as $key => $value) {\n\t\t\t\t\t\t\t\t\t\t\t\tif($value['estado'] == '29')\n\t\t\t\t\t\t\t\t\t\t\t\t\t$count_preselecciones++;\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t//exit(var_dump($count_preselecciones));\n\n\t\t\t\t\t\t\t\t\t\t\tif(($count_preselecciones < 1) || (($count_preselecciones == 1) && ($tid_estado != 29))) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t//obtener el estado general, si esta en lista negra se sobreescribe el estado a aplicar\n\t\t\t\t\t\t\t\t\t\t\t\t$estado_general_url = base_url('/rrhh/api/users/obtener_estado_general/retrieve.xml?uid_aplicante='. $uid_aplicante);\n\t\t\t\t\t\t\t\t\t\t\t\t$estado_general = consumirServicio($estado_general_url, $session_cookie, $csrf_token);\n\t\t\t\t\t\t\t\t\t\t\t\t$tid_estado_general = 0;\n\n\t\t\t\t\t\t\t\t\t\t\t\tif(isset($estado_general->item)){\n\t \t\t\t\t\t\t\t\t\t\t\t\tforeach($estado_general->item as $key => $value){\n\t \t\t\t\t\t\t\t\t\t\t\t\t\t$tid_estado_general = $value->tid_estado;\n\t \t\t\t\t\t\t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t\t\t\t\t}\n\n\t \t\t\t\t\t\t\t\t\t\t\tif($tid_estado_general == 28){\n\t \t\t\t\t\t\t\t\t\t\t\t\t$tid_estado = $tid_estado_general;\n\t \t\t\t\t\t\t\t\t\t\t\t}\n\n\t \t\t\t\t\t\t\t\t\t\t\t//$data['message'] = $tid_estado;\n\n\t \t\t\t\t\t\t\t\t\t\t\t//Se realizará una asignacion automática\n\t\t\t\t\t\t\t\t\t\t\t\t$user_data = array(\"field_estado\" => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"und\" => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(int)$tid_estado => (int)$tid_estado\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"field_ultimo_puesto_aplicado\" => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"und\" => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$nid_puesto => (int)$nid_puesto\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"field_puesto\" => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"und\" => array()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t );\n\n\t\t\t\t\t\t\t\t\t\t\t\t$listado_puestos = array();\n\t\t\t\t\t\t\t\t\t\t\t\tforeach ($puestos_aplicados->items as $value) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($value->item as $key2 => $value2) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$puesto = $value2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$listado_puestos[(string)$puesto->nid_puesto] = (int)$puesto->nid_puesto;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t//asignar el arreglo de los puestos aplicados junto con el que hay que agregar\n\t\t\t\t\t\t\t\t\t\t\t\t$user_data[\"field_puesto\"][\"und\"] = $listado_puestos;\n\t\t\t\t\t\t\t\t\t\t\t\t$user_data[\"field_puesto\"][\"und\"][$nid_puesto] = $nid_puesto;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t//exit(var_dump($user_data));\n\n\t\t\t\t\t\t\t\t\t\t\t\t//verificar el estado del puesto\n\t\t\t\t\t\t\t\t\t\t \t\t$estado_puesto_url = base_url().'rrhh/api/puestos/obtener_estado_puesto/retrieve?nid_puesto=' . $nid_puesto . '.xml';\n\t\t\t\t\t\t\t\t\t\t\t\t$resultado_estado_puesto = consumirServicioSinToken($estado_puesto_url, $session_cookie);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t$cambiarEstado = false;\n\t\t\t\t\t\t\t\t\t\t\t\tif($resultado_estado_puesto == '0'){\n\t\t\t\t\t\t\t\t\t\t\t\t\t$cambiarEstado = true;\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t$actualizar_puesto_url = base_url().'rrhh/api/puestos/actualizar_puesto_temporalmente/retrieve?nid_puesto=' . $nid_puesto . '.xml';\n\t\t\t\t\t\t\t\t\t\t\t\t\t$resultado_puesto_actualizado = consumirServicioSinToken($actualizar_puesto_url, $session_cookie);\t\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t$result = ServicioActualizar($request_url, $user_data, $session_cookie, $csrf_token);\n\n\t\t\t\t\t\t\t\t\t\t\t\tif($cambiarEstado){\n\t\t\t\t\t\t\t\t\t\t\t\t\t$actualizar_puesto_url = base_url().'rrhh/api/puestos/actualizar_puesto_temporalmente/retrieve?nid_puesto=' . $nid_puesto . '.xml';\n\t\t\t\t\t\t\t\t\t\t\t\t\t$resultado_puesto_actualizado = consumirServicioSinToken($actualizar_puesto_url, $session_cookie);\t\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t// cURL - utiliza el helper SevicioActualizar\n\t\t\t\t\t\t\t\t\t\t\t\t//$result = ServicioActualizar($request_url, $user_data, $session_cookie, $csrf_token);\n\n\t\t\t\t\t\t\t\t\t\t\t\tif($result){\n\t\t\t\t\t\t\t\t\t\t\t\t\t$data['success'] = true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$data['code'] = $result['httpcode'];\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t$data['mensaje'] = 'Se ha aplicado satisfactoramiente al puesto con el id: ' . $nid_puesto;\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($data['code'] != 200){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$data['success'] = false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$data['mensaje'] = $result['mensaje'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\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//no se encontro ninguna aplicacion con el id ingresado desde el url\n\t\t\t\t\t\t\t\t\t\t\t\t$data['success'] = false;\n\t\t\t\t\t\t\t\t\t\t\t\t$data['error'] = 'Ha excedido la cantidad de preselecciones por aplicante';\n\t\t\t\t\t\t\t\t\t\t\t\t$data['code'] = '406';\n\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t//no se encontro ninguna aplicacion con el id ingresado desde el url\n\t\t\t\t\t\t\t\t\t\t\t$data['success'] = false;\n\t\t\t\t\t\t\t\t\t\t\t$data['error'] = 'No es posible realizar la aplicación, se ha excedido el máximo permitido de 3 puestos por usuario';\n\t\t\t\t\t\t\t\t\t\t\t$data['code'] = '406';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t//no se encontro ninguna aplicacion con el id ingresado desde el url\n\t\t\t\t\t\t\t\t\t$data['success'] = false;\n\t\t\t\t\t\t\t\t\t$data['error'] = 'Has ingresado un codigo de estado incorrecto, favor verifique';\n\t\t\t\t\t\t\t\t\t$data['code'] = '406';\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t//no se pudo validar que el aplicante sea nacional\n\t\t\t\t\t\t\t\t$data['success'] = false;\n\t\t\t\t\t\t\t\t$data['error'] = 'El usuario aplicante con el id #'.$uid_aplicante. ', no es es permitido para hacer la asignación';\n\t\t\t\t\t\t\t\t$data['code'] = '406';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$data['success'] = false;\n\t\t\t\t\t\t\t$data['error'] = 'Error: El puesto con el identificador #'.$nid_puesto.', no pertenece al usuario: '.$_POST['mail'];\n\t\t\t\t\t\t\t$data['code'] = '406';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//no se pudo validar que el aplicante sea nacional\n\t\t\t\t\t\t$data['success'] = false;\n\t\t\t\t\t\t$data['error'] = 'No existe el aplicante con el codigo: '.$uid_aplicante.', por favor verifique';\n\t\t\t\t\t\t$data['code'] = '406';\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\t//no se pudo validar que el aplicante sea nacional\n\t\t\t\t\t$data['success'] = false;\n\t\t\t\t\t$data['error'] = 'No existe el puesto con el codigo: '.$nid_puesto.', por favor verifique';\n\t\t\t\t\t$data['code'] = '406';\n\t\t\t\t}\t\t\t\n\n\t\t\t} else {\n\t\t\t\t//mensaje de error al fallar la autenticacion\n\t\t\t\t$data['success'] = false;\n\t\t\t\t$data['error'] = $auth_data['mensaje'];\n\t\t\t\t$data['code'] = '406';\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t\t$data['response'] = $data;\n\t\t\t$this->load->view('user/user-response', $data);\n \t}", "public function checkPostAuth(UserInterface $user)\n {\n }", "public function approveAction() {\n\t\t$request = $this->getRequest();\n\t\t$ta_id = (int)($request->getParam('id'));\n\t\t$lo_id = (int)($request->getParam('loid'));\n\n\t\t$taFinder = new TeachingActivities();\n\t\t$ta = $taFinder->getTa($ta_id);\n\t\tif (($result = UserAcl::checkTaPermission($ta, UserAcl::$APPROVE)) !== true) {\n\t\t\tthrow new Exception($result);\n\t\t}\n\n\t\t$linkFinder = new LinkageLoTas();\n\t\t$link = $linkFinder->getLinkageByLoAndTaId($lo_id, $ta_id);\n\t\tif (!$link->isNewVersionRequest()) {\n\t\t\tthrow new Exception(\"Teaching activity $ta_id does not need approval.\");\n\t\t}\n\n\t\t$link->approveNewTaVersion();\n\t\t\n\t\t$session = new Zend_Session_Namespace('taapprovecomplete');\n\t\t$session->ta_id = $ta_id;\n\t\t$session->lo_id = $lo_id;\n\t\t$this->_redirect('/teachingactivity/approvecomplete');\n\t}", "public function isApproved(): bool;", "public function checkPostAuth(UserInterface $user);", "public function approve($id)\n {\n $borrow = Borrows::find($id);\n\n $borrow->status = \"approved\";\n\n $borrow->save();\n\n //push status of details of borrows to borrows_inventory\n $details = Borrows_InventoryTools::where('borrow_id', $borrow->id)->get();\n\n foreach ($details as $index => $tool) {\n $detail = Borrows_InventoryTools::find($tool->id);\n $detail->status = \"approved\";\n $detail->save();\n }\n\n \n\n return back();\n }", "public function approveMajor(Request $request){\n //get the education by the education id\n $education_details = Education::findOrFail($request->input('education_id'));\n if($request->has('status') && $request->input('status') == \"approved\"):\n //udpate the record in the storage\n $education_details->is_approved = \"1\";\n $education_details->user_id = Auth::user()->id; //to do if we need to list the career advisor added education details then we need to change the database structure thus we can alter those changes there\n if($education_details->save()):\n //success message to the client\n return response()->json(array('status'=>'success','msg'=>'Education has been approved!!'),200);\n else:\n return response()->json(array('status'=>'failed','msg'=>'Cannot update record in the storage, please try again'),200);\n endif;\n \n else:\n //failed reponse back to the client\n return response()->json(array('status'=>'failed','msg'=>'Status not defined'),200);\n endif;\n }", "public function approveAction()\n {\n /** @var Facepalm_Model_Row_Point $point */\n $this->_helper->assertHasParameter('id');\n\n $pointsModel = new Facepalm_Model_Points();\n $point = $pointsModel->find($this->_getParam('id'))->current();\n\n $this->_helper->assertResourceExists($point);\n\n $this->_helper->assertCanApprove($point, $this->getCurrentUser());\n\n $point->approved = true;\n $point->save();\n\n $this->_helper->sendNotifications(\n $point, $this->getCurrentUser()\n );\n\n $this->_helper->redirector->gotoRouteAndExit(\n array(\n 'action' => 'view',\n 'id' => $point->id,\n )\n );\n\n }", "public function updatePoinsUserAction()\n {\n \t$this->pointServices->updatePointUser($this->getUser());\n \t\n \treturn new Response(\"OK\");\n }", "function approveTimesheet() \t{\n\t\t$this->getMenu() ;\n\t\t$id = $this->input->post('id');\n\t\t$this->timesheetModel->saveApproveTimesheet($id);\n\t\tredirect ('timesheet');\n\t}", "public function approve($id) {\n $id = (int)$id;\n if ($this->user->can('approve_comment')) {\n $comment = ORM::factory('comment')->where('id', $id)->find();\n $comment->is_approved = 1;\n $comment->save();\n Tip::set(T::_('Comment approved.'));\n }\n\n $redirect_uri = $this->input->get('redirect_uri');\n if (empty($redirect_uri)) {\n url::admin_redirect('comments');\n } else {\n url::redirect($redirect_uri);\n }\n }", "public function leave_status_approve(Request $request){\n $leave_application = DB::table('tb_leave_application')\n ->where('id',$request->id)\n ->update(\n [\n 'status' =>1,\n 'approved_by'=>Auth::user()->id,\n ]\n );\n\n return response()->json(['success' => 'Leave Application been successfully Approved.']);\n }", "public function ajax_deny_approval()\n {\n if (empty($_POST)) return;\n\n ee()->load->model('publisher_approval');\n $msg = ee()->publisher_approval->deny();\n ee()->publisher_helper->send_ajax_response($msg);\n }", "public function approveInvitation() {\n $this->autoRender = false;\n $communityId = $this->request->data['communityId'];\n $community = $this->Community->findById($communityId);\n if (!empty($community)) {\n $userId = $this->Auth->user('id');\n $this->CommunityMember->approve($communityId, $userId);\n\t\t\t//Community follow data\n\t\t\t$followCommunityData = array(\n\t\t\t\t'type' => FollowingPage::COMMUNITY_TYPE,\n\t\t\t\t'page_id' => $communityId,\n\t\t\t\t'user_id' => $userId,\n\t\t\t\t'notification' => FollowingPage::NOTIFICATION_ON\n\t\t\t);\n\t\t\t$this->FollowingPage->followPage($followCommunityData);\n\t\t\t\n $this->Session->setFlash(__('You are now a member of this community.'), 'success');\n } else {\n $this->Session->setFlash(__($this->invalidMessage), 'error');\n }\n }", "public function approveSubmission(Request $request)\n {\n $submission = Usersubmissionstatus::find($request->id);\n\n // Getting employee id for current submission\n $employeeID = $submission->user_id;\n $submission->status_id = config('constant.status.HR_APPROVAL_PENDING');\n $status = $submission->save();\n $reviewComment = ['submission_status_id' => $request->id, 'reviewer_id' => Auth::user()->id, 'status_id' => config('constant.status.HR_APPROVAL_PENDING'), 'comment' => $request->review_comment, 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()];\n if ($status == 1) {\n Submissionreviewcomment::insert($reviewComment);\n\n // Let's notify user and hr about submission approval\n $status = $this->sendMail(config('constant.email_status.L1_APPROVED'), $employeeID);\n return response()->json(['status' => 1, 'message' => 'Sucessfully Approved', 'email_status' => $status], 200);\n }\n else {\n return response()->json(['status' => 0, 'message' => 'There was an error processing your request, please try again'], 200); \n }\n }", "public function parafPermintaanAtk(Request $request)\n {\n $id = $request->get('permintaan_id');\n $status = $request->get('status');\n $user_id = '1';\n $updatePermintaanAtk = PermintaanAtk::where([\n 'id' => $id\n ])->update([\n 'is_paraf' => $status,\n 'paraf_user_id' => $user_id,\n ]);\n if ($updatePermintaanAtk && $status == 'Y')\n {\n $newDistribusi = new DistribusiAtk();\n $newDistribusi->permintaan_atk_id = $id;\n $newDistribusi->status = 'never';\n $newDistribusi->save();\n }\n return response()->json(['success' => true, 'msg' => 'Berhasil']);\n}", "public function approve()\n {\n // Initialize variables\n $cid = JRequest::getVar('cid', array(), 'post', 'array');\n $task = JRequest::getCmd('task');\n $publish = ($task == 'approve');\n\n if(empty($cid))\n {\n $this->setRedirect($this->_ambit->getRedirectUrl(), JText::_('COM_JOOMGALLERY_COMMAN_MSG_NO_COMMENTS_SELECTED'));\n $this->redirect();\n }\n\n $model = $this->getModel('comments');\n if($count = $model->publish($cid, $publish, 'approve'))\n {\n if($count != 1){\n $msg = JText::sprintf($publish ? 'COM_JOOMGALLERY_COMMAN_MSG_COMMENTS_APPROVED' : 'COM_JOOMGALLERY_COMMAN_MSG_COMMENTS_REJECTED', $count);\n } else {\n $msg = JText::_($publish ? 'COM_JOOMGALLERY_COMMAN_MSG_COMMENT_APPROVED' : 'COM_JOOMGALLERY_COMMAN_MSG_COMMENT_REJECTED');\n }\n $this->setRedirect($this->_ambit->getRedirectUrl(), $msg);\n }\n else\n {\n $msg = JText::_('COM_JOOMGALLERY_COMMON_MSG_ERROR_APPROVING_REJECTING');\n $this->setRedirect($this->_ambit->getRedirectUrl(), $msg, 'error');\n }\n }", "public function postAction() {\n return $this->getResponse()->setHttpResponseCode(403);\n }", "public function allowAction()\n\t{\trequire_once( 'form.inc' );\n\n\t\tif( $this->_getParam('user') )\n\t\t{\tif( $this->db->allowRefund($this->_getParam('user')) )\n\t\t\t{\n\t\t\t}else\n\t\t\t{\n\t\t\t}\n\t\t}\n\n\t\t// Calculate the number for the past term\n\t\t$term = (date('Y') - 1900) * 10 + floor((date('m') - 1) / 4) * 4 + 1;\n\t\tif( $term % 10 == 1 )\n\t\t{\t$term -= 2;\n\t\t}else\n\t\t{\t$term -= 4;\n\t\t}\n\n\t\t// Add list of people who already have been enabled\n\t\t$this->view->user_allowed = implode( \", \", $this->db->getRefunds('REGULAR', $term));\n\n\t\t// Add list of users who got their refunds last term\n\t\t$this->view->user_options = $this->db->getRefunds('RECEIVED', $term);\n\t}", "function userConfirmation($data){\n\t\t$requiredData['action'] = $this->getPassword(@trim($data->action));\n\t\t$user_name_id = explode(\"#/#\",$requiredData['action']);\n\t\t$rec = $this->query(\"UPDATE `users` SET `status`=1 where `user_name` = '\".@$user_name_id[0].\"' AND `id`= \".@$user_name_id[1]);\n\t\tif($rec){\n\t\t\t$url = HTTP_HOST.\"confirm.php?action=1\";\n\t\t\techo \"<meta http-equiv=Refresh content=0;url=\".$url.\">\";\t\t\t\n\t\t\texit;\n\t\t}else{\n\t\t\t$url = HTTP_HOST.\"confirm.php?action=0\";\n\t\t\techo \"<meta http-equiv=Refresh content=0;url=\".$url.\">\";\t\t\t\n\t\t\texit;\t\t\n\t\t}\n\t}", "public function authorize()\n {\n $status = request()->post('status');\n if (!empty($status) && !in_array($status, [\n LoanApplicationService::PENDING_STATUS, LoanApplicationService::APPOVED_STATUS, LoanApplicationService::REJECTED_STATUS])) {\n return false;\n }\n return true;\n }", "public function actionUpdate()\n {\n $bodyRaw = json_decode(Yii::$app->getRequest()->getRawBody(), true);\n //$body = json_decode(Yii::$app->getRequest()->getBodyParams(), true);\n\n if (is_array($bodyRaw)) {\n // check user is a guest\n if (array_key_exists('token', $bodyRaw)) {\n $userByToken = \\Yii::$app->user->loginByAccessToken($bodyRaw['token']);\n if (empty($userByToken)) {\n //return $this->goHome();\n return Json::encode(array('method' => 'PUT', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: Аутентификация не выполнена'));\n }\n } else {\n return Json::encode(array('method' => 'PUT', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: Аутентификация не выполнена'));\n }\n\n // Get array with user Roles\n $userRole =[];\n $userAssigned = Yii::$app->authManager->getAssignments($userByToken->id);\n foreach($userAssigned as $userAssign){\n array_push($userRole, $userAssign->roleName);\n }\n //return Json::encode(array('method' => 'GET', 'status' => 1, 'type' => 'error', 'message' => $userRole));\n\n // Check rights\n // If user have create right that his allowed to other actions to the Spacialization table\n if (static::CHECK_RIGHTS_RBAC && !\\Yii::$app->user->can('createCustomer') && !\\Yii::$app->user->can('createMediator')) {\n return Json::encode(array('method' => 'PUT', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: Не хватает прав на операцию обновления'));\n }\n /*\n $flagRights = false;\n foreach(array('admin', 'customer', 'contractor') as $value) {\n if (in_array($value, $userRole)) {\n $flagRights = true;\n }\n }\n if (!$flagRights) return Json::encode(array('method' => 'POST', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: Не хватает прав на операцию добавления'));\n */\n\n // Because the field names may match within a single query, the parameter names may not match the table field names. To solve this problem let's create an associative arrays\n $arrayFeedbackAssoc = array ('id' => 'id', 'profile_id' => 'profile_id', 'status_feedback_id' => 'status_feedback_id', 'content' => 'content');\n\n if (array_key_exists($arrayFeedbackAssoc['id'], $bodyRaw)) {\n // check id parametr\n if (!preg_match(\"/^[0-9]*$/\",$bodyRaw[$arrayFeedbackAssoc['id']])) {\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка валидации: id'));\n }\n\n // Search record by id in the database \n if (in_array('admin', $userRole)) {\n $queryFeedback = Feedback::find()->where(['id' => $bodyRaw[$arrayFeedbackAssoc['id']]]); // get all records\n } else {\n $queryFeedback = Feedback::find()->where(['AND', ['id' => $bodyRaw[$arrayFeedbackAssoc['id']]], ['created_by'=> $userByToken->id]]); // get records created by this user\n }\n $modelFeedback = $queryFeedback->one();\n\n if (empty($modelFeedback)) {\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: В БД не найден Отзыв по id'));\n }\n\n foreach ($arrayFeedbackAssoc as $nameFeedbackAssoc => $valueFeedbackAssoc) {\n if (array_key_exists($valueFeedbackAssoc, $bodyRaw)) {\n if ($modelFeedback->hasAttribute($nameFeedbackAssoc)) {\n $modelFeedback->$nameFeedbackAssoc = $bodyRaw[$arrayFeedbackAssoc[$nameFeedbackAssoc]];\n if (!$modelFeedback->validate($nameFeedbackAssoc)) return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка валидации: параметр '.$valueRequestAssoc));\n\n $modelFeedback->created_by = $userByToken->id;\n $modelFeedback->updated_at = time();\n }\n }\n }\n\n // Save Feedback object\n if ($modelFeedback->validate()) {\n $transaction = \\Yii::$app->db->beginTransaction();\n try {\n $flagFeedback = $modelFeedback->save(false); // update Feedback table\n\n if ($flagFeedback) {\n $transaction->commit();\n } else {\n $transaction->rollBack();\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: Отзыв не может быть обновлен'));\n }\n } catch (Exception $ex) {\n $transaction->rollBack();\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: Отзыв не может быть обновлен'));\n }\n } else {\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка валидации'));\n }\n\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 0, 'type' => 'success', 'message' => 'Отзыв успешно сохранен'));\n } else {\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Отсутствет id параметр в запросе'));\n }\n } else {\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: Тело запроса не обработано'));\n }\n }", "function approveUsers($getSelectedUser, $addedOn, $username)\n{\n require('../core/db2.php');\n\n $sql = \"UPDATE users SET \n registration_status = 'Approved',\n approved_by = '$username',\n approved_on = '$addedOn'\n WHERE username = '$getSelectedUser'\";\n if ($con->query($sql) === true) {\n echo \"\";\n } else {\n // echo \"Error: \" . $sql . \"<br>\" . $con->error;\n echo \"Error\";\n }\n}", "public function block_restaurant() {\n\n $restaurant = Restaurant::where('id',$_POST['restaurant_id'])->first();\n $restaurant->status = $_POST['status'];\n $restaurant->save();\n\n if(!$restaurant){\n $finalResult = array('msg' => 'error', 'response' => 'Something went');\n echo json_encode($finalResult);\n exit;\n }else{ \n $finalResult = array('msg' => 'success', 'response' => 'Restaurant has been blocked successfully.');\n echo json_encode($finalResult);\n exit;\n }\n }", "public function postAction()\n {\n \n }", "public function authorize()\n {\n return true; //Autorizar al usuario para hacer peticiones \n }" ]
[ "0.72634614", "0.7230634", "0.70822245", "0.7035418", "0.70323926", "0.70258343", "0.70066947", "0.6881222", "0.68757385", "0.68666846", "0.6864265", "0.68475556", "0.6846282", "0.6743815", "0.67027783", "0.6675582", "0.65586007", "0.6529838", "0.6525549", "0.65224856", "0.64922285", "0.6483551", "0.6473516", "0.6471676", "0.64591616", "0.6398313", "0.63927495", "0.638354", "0.63737464", "0.6352962", "0.6335268", "0.6318841", "0.6288604", "0.62819487", "0.6277583", "0.6277408", "0.6277197", "0.62750673", "0.6261555", "0.6260226", "0.6249878", "0.6248111", "0.6245652", "0.6232924", "0.62305605", "0.62258697", "0.620674", "0.6205581", "0.62049216", "0.6187263", "0.6174013", "0.6172414", "0.61516154", "0.6140321", "0.6131355", "0.61241686", "0.6111123", "0.6099948", "0.60998523", "0.6095762", "0.6088875", "0.60824597", "0.60769564", "0.60652536", "0.6052155", "0.60454667", "0.6044648", "0.6043837", "0.603528", "0.6034851", "0.60323274", "0.6027917", "0.60248965", "0.6018649", "0.6009462", "0.60040116", "0.6001235", "0.5995538", "0.5987936", "0.5961927", "0.5954172", "0.5951727", "0.5948099", "0.5934434", "0.5931149", "0.5926981", "0.5926718", "0.592416", "0.59124225", "0.5904342", "0.58873427", "0.5886431", "0.5884745", "0.58778125", "0.58769757", "0.58753186", "0.5869659", "0.58689046", "0.5868825", "0.5865467", "0.58652425" ]
0.0
-1
Run the database seeds.
public function run() { DB::table('destinacijas')->insert([ 'Grad' => 'Beograd', 'Zemlja' => 'Srbija', 'Opisi' => 'Destinacija', 'Latitude' => '44.30812668488613', 'Longitude' => '21.189193725585938', 'created_at' => '2018-02-07 08:42:27', 'updated_at' => '2018-02-07 08:42:27' ]); DB::table('destinacijas')->insert([ 'Grad' => 'Novi Sad', 'Zemlja' => 'Srbija', 'Opisi' => 'Odaberite destinaciju', 'Latitude' => '46.08847179577592', 'Longitude' => '12.993392944335938', 'created_at' => '2017-11-07 08:42:27', 'updated_at' => '2017-12-17 09:42:27' ]); DB::table('destinacijas')->insert([ 'Grad' => 'Nis', 'Zemlja' => 'Srbija', 'Opisi' => 'Destinacija', 'Latitude' => '46.70973594407157', 'Longitude' => '9.214096069335938', 'created_at' => '2018-02-15 08:42:27', 'updated_at' => '2018-02-07 08:42:27' ]); }
{ "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
Gets the value of the TransactionId property.
public function getTransactionId() { return $this->_fields['TransactionId']['FieldValue']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTransactionID()\n\t{\n\t\treturn $this->transaction_id;\n\t}", "public function getTransactionID()\r\n\t{\r\n\t\treturn $this->root->getAttribute('transactionid');\r\n\t}", "public function getTransactionIdentifier()\n {\n return $this->transactionIdentifier;\n }", "public function getTxId()\n {\n return $this->tx_id;\n }", "public function getTransactionId() { return $this->transactionId; }", "public function getTransactionId() {\n return $this->transactionId;\n }", "public function getTransactionID();", "public function getTransactionId()\n {\n return $this->transactionId;\n }", "public function getTransactionId()\n {\n return $this->transactionIdentifier;\n }", "public function get_transaction_id() {\n\n\t\treturn $this->transaction_tag;\n\t}", "public function getTransactionId()\n {\n return isset($this->transaction['transactionId']) ? $this->transaction['transactionId'] : '';\n }", "public function getTransactionId()\n {\n return $this->transaction_id;\n }", "public function getTransactionId()\n {\n return $this->transaction_id;\n }", "public function getTransactionId()\n {\n return $this->transaction_id;\n }", "public function getTransactionId()\n {\n $value = $this->get(self::TRANSACTION_ID);\n\n return $value === null ? (int) $value : $value;\n }", "public function getTxnID()\n\t{\n\t\treturn $this->get('TxnID');\n\t}", "public function getTransactionId() {\n return $this->transactionId;\n }", "public function getTxnId()\n {\n return $this->response['result']['id'];\n }", "public function getTransactionId(): string\n {\n return $this->transactionId;\n }", "public function getTransactionXID()\n {\n return $this->transactionXID;\n }", "function getTxnId() {\n return $this->txn_id;\n }", "public function getId()\n {\n return $this->transaction->getTransactionResponse()->getTransId();\n }", "public function getTransactionID(): string\n {\n return (string) $this->transactionID;\n }", "public function getTxid()\n {\n return $this->txid;\n }", "public function get_transaction_id() {\n\n\t\treturn $this->is_credit_card_response() && isset( $this->response->paymentMethod, $this->response->paymentMethod->verification ) ? $this->response->paymentMethod->verification->id : null;\n\t}", "function get_transaction_id()\n {\n return $this->platnosci_post_vars['txn_id']; \n }", "public function getTransactionId();", "public function getTransactionId();", "public function uniqueId()\n {\n return $this->transaction->id;\n }", "public function getTransactionGroupId() {\n return $this->transactionGroupId;\n }", "public function getTransactionId()\n {\n return $this->transactionId++;\n }", "public function getTrxId()\n {\n return $this->trxId;\n }", "public function getTransactionId()\n {\n return $this->data['ORDERINFO']['ORDERNUMBER'];\n }", "public function getTransactionReference()\n {\n if (!isset($this->data['error'])) {\n return $this->data['transactionResponse']['transactionId'];\n }\n\n return null;\n }", "public function getTransactionUid ();", "public static function transaction($transactionId) {\n //Get information on a single transaction\n\t\t\treturn self::get(self::transaction_index() . $transactionId);\n\t\t}", "public function getCustomerTransactionId($id) {\n \treturn $this->customerTransactionId;\n }", "public function getTransactionReference()\n {\n if(isset($this->data['properties'])) {\n $properties = $this->data['properties'];\n $paymentIdProperty = array_filter($properties, function ($item) {\n return $item['name'] === 'PAYMENT_ID';\n });\n if (isset($paymentIdProperty[0]['value'])) {\n return (string)$paymentIdProperty[0]['value'];\n }\n };\n\n return null;\n }", "public function getTransactioncode()\n {\n return isset($this->Transactioncode) ? $this->Transactioncode : null;\n }", "public function getTransactionId(): string;", "public function getTransactionNumber();", "protected function _get_transaction_id( $order_id ) {\n\t\t\treturn get_post_meta( $order_id, '_transaction_id', true );\n\t\t}", "public function getTransferId()\n {\n return $this->transfer_id;\n }", "public function getTransactionReference()\n {\n return $this->getDataItem('transactionReference');\n }", "public function getTransactionReference()\n {\n return $this->transactionReference;\n }", "public function getTransactionReference()\n {\n if (!empty($this->data['transactions']) && !empty($this->data['transactions'][0]['related_resources'])) {\n foreach (array('sale', 'authorization') as $type) {\n if (!empty($this->data['transactions'][0]['related_resources'][0][$type])) {\n return $this->data['transactions'][0]['related_resources'][0][$type]['id'];\n }\n }\n }\n\n // This is a fallback, but is correct for fetch transaction and possibly others\n if (!empty($this->data['id'])) {\n return $this->data['id'];\n }\n\n return null;\n }", "public function getTransaction()\n {\n return $this->transaction;\n }", "public function getTransaction()\n {\n return $this->transaction;\n }", "public function getTransaction()\n {\n return $this->transaction;\n }", "public function getShopTransactionId() {\n\t\treturn $this->shop_transaction_id;\n\t}", "public function getTransaction()\r\n\t{\r\n\t\treturn $this->transaction;\r\n\t}", "public function getTransactionKey()\n {\n return Mage::getStoreConfig(self::GENERAL_SETTINGS_PATH . 'trans_key', $this->getStoreId());\n }", "public function setTxId($var)\n {\n GPBUtil::checkString($var, True);\n $this->tx_id = $var;\n\n return $this;\n }", "public function getTransactionIndex()\n {\n return $this->transactionIndex;\n }", "public function getTransactionReference()\n {\n if (empty($this->getOrder()->reference)) {\n return null;\n }\n\n $attributes = $this->getOrder()->reference->attributes();\n\n if (isset($attributes['id'])) {\n return $attributes['id'];\n }\n\n return null;\n }", "public function transactionById($transactionId)\n {\n return $this->transaction->whereTransactionId($transactionId)->first();\n }", "public function transactionId($hubtelTransactionId)\n {\n return $this->hubtelTransactionId($hubtelTransactionId);\n }", "public function getTransactionSerialNumber() \n {\n return $this->_fields['TransactionSerialNumber']['FieldValue'];\n }", "public function getTransactionReference()\n {\n foreach (['vpc_MerchTxnRef', 'vpc_TransactionNo'] as $key) {\n if (isset($this->data[$key])) {\n return $this->data[$key];\n }\n }\n }", "public function getTransactionType()\n {\n return $this->transactionType;\n }", "public function getTransactionAmount()\n {\n return $this->transactionAmount;\n }", "public function getId()\n {\n return $this->getProperty('account_id', 'int');\n }", "public function getTid()\n {\n return $this->tid;\n }", "public function GetId()\n\t{\n\t\treturn $this->id;\n\t}", "public function getTransactionRecord()\n {\n return $this->transactionRecord;\n }", "public function getTid()\n {\n return $this->get(self::_TID);\n }", "public function getTid()\n {\n return $this->get(self::_TID);\n }", "public function getTid()\n {\n return $this->get(self::_TID);\n }", "public function getTid()\n {\n return $this->get(self::_TID);\n }", "public function getTId()\n {\n return $this->t_id;\n }", "public function generateTransactionId()\n {\n if ($this->configurator->useOwnTransactionId()) {\n //TODO: this should be injected instead\n $transactionIdGenerator = new TransactionIdGenerator();\n $transactionId = $transactionIdGenerator->generate($this->configurator->getTransactionIdPrefix()); //THIS SHOULD BE CONFIGURABLE\n } else {\n $posId = $this->getPosId();\n\n $this->suppressLibraryErrors();\n $transactionId = $this->service->tranzakcioAzonositoGeneralas($posId);\n $this->restoreErrorReporting();\n }\n\n return $transactionId;\n }", "protected function generateTransactionId()\n {\n return 'transaction_' . $this->getUniqId();\n }", "public function getTid()\n {\n return $this->_tid;\n }", "function get_TID() {\n return $this->ID;\n }", "protected function getTransactionId($entity)\n {\n return $entity->getTransaction()->getId();\n }", "public function getTransaction(): Transaction\n {\n return $this->transaction;\n }", "public function getTransaction(): Transaction\n {\n return $this->transaction;\n }", "public function getPaymentId()\n {\n return $this->paymentId;\n }", "public function getTransaction($id){\n\n $gateway = $this->getGateway();\n \n $transaction = $gateway->transaction()->find($id);\n\n return $transaction;\n\n }", "public function getScriptTransportId()\n {\n return $this->scriptTransportId;\n }", "public function getTransaction($txId)\n {\n return $this->getData('gettransaction', array(\n $txId\n ));\n }", "public function getOrderIdByTransactionId($transactionId)\n {\n $searchCriteria = $this->searchCriteriaBuilder\n ->addFilter('mollie_transaction_id', $transactionId, 'eq')->create();\n $orderList = $this->orderRepository->getList($searchCriteria);\n $orderId = $orderList->getFirstItem()->getId();\n\n if ($orderId) {\n return $orderId;\n } else {\n $this->mollieHelper->addTolog('error', __('No order found for transaction id %1', $transactionId));\n\n return false;\n }\n }", "public function getOrderIdByTransactionId($transactionId)\n {\n $searchCriteria = $this->searchCriteriaBuilder\n ->addFilter('mollie_transaction_id', $transactionId, 'eq')->create();\n $orderList = $this->orderRepository->getList($searchCriteria);\n $orderId = $orderList->getFirstItem()->getId();\n\n if ($orderId) {\n return $orderId;\n } else {\n $this->mollieHelper->addTolog('error', __('No order found for transaction id %1', $transactionId));\n\n return false;\n }\n }", "public function getTransactionDetails($transactionId) {\n return $this->getService()->detailTransaction($transactionId);\n }", "function getTid() {\n return $this->tid;\n }", "public function getID() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->orderId;\r\n\t}", "public function getPurchase_Id() {\n return $this->purchase_Id;\n }", "public function getTid() {\n return $this->getInnslag()->getTid();\n }", "public function getid()\n {\n return $this->Id;\n }", "public function getId() {\n\t\treturn $this->Id;\n\t}", "public function getLastTransactionID()\n {\n }", "public function getPaymentId() \n {\n if (!$this->hasPaymentId()) \n {\n $this->paymentId = '';\n }\n\n return $this->paymentId;\n }", "public function get_id() {\n\n\t\treturn $this->id;\n\t}", "public function get_id() {\n\n\t\treturn $this->id;\n\t}", "public function get_id() {\r\n\t\treturn ($this->id);\r\n\t}", "public function get_id() {\r\n\t\treturn ($this->id);\r\n\t}", "public function getId()\n {\n return $this->getIfSet('id');\n }", "public function getId()\n {\n return $this->getIfSet('id');\n }", "public function get_id() {\n\t\t\treturn $this->id;\n\t\t}", "public function get_order_id_from_transaction_id ($transaction_id)\n\t{\n\t\t$query = tep_db_query(\"SELECT osc_order_id FROM \" . self::DB_PAYMENTS_TABLE . \" WHERE payment_id = '\".tep_db_input($transaction_id).\"'\");\n\t\t$row = tep_db_fetch_array($query);\n\n\t\treturn $row ? $row['osc_order_id'] : 0;\n\t}" ]
[ "0.8380556", "0.8225381", "0.8050818", "0.8015609", "0.8004488", "0.7982758", "0.7972595", "0.79565585", "0.79547995", "0.7942626", "0.79128546", "0.78801", "0.78801", "0.78801", "0.78311455", "0.78125185", "0.77974504", "0.7765088", "0.7728045", "0.7724168", "0.7680048", "0.75979286", "0.75790405", "0.74302727", "0.72463053", "0.72432643", "0.7079745", "0.7079745", "0.70737904", "0.7035302", "0.7010723", "0.6960262", "0.6938837", "0.69105977", "0.6825988", "0.68065125", "0.67269", "0.669102", "0.66511595", "0.6623252", "0.6591342", "0.65592325", "0.6506128", "0.64873385", "0.64666474", "0.6460121", "0.64565206", "0.64565206", "0.64565206", "0.6397036", "0.63956636", "0.6318", "0.6303559", "0.6274209", "0.6270635", "0.6236537", "0.6157009", "0.6080197", "0.6071547", "0.6069054", "0.6068861", "0.6065595", "0.6051785", "0.6045105", "0.6038983", "0.6031642", "0.6031642", "0.6031642", "0.6031642", "0.60257035", "0.5982088", "0.59674686", "0.5966393", "0.59580076", "0.5955431", "0.5949623", "0.5949623", "0.5901527", "0.5898858", "0.5888354", "0.58788174", "0.5874584", "0.5874584", "0.586299", "0.58624023", "0.5845963", "0.5827654", "0.582698", "0.5825858", "0.5825777", "0.58247894", "0.5820109", "0.5813335", "0.5813335", "0.5806686", "0.5806686", "0.5798408", "0.5798408", "0.5786538", "0.5782582" ]
0.7168297
26
Sets the value of the TransactionId property.
public function setTransactionId($value) { $this->_fields['TransactionId']['FieldValue'] = $value; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setTransactionId($id)\n {\n $this->_data['trx_id'] = $id;\n }", "public function setTxId($var)\n {\n GPBUtil::checkString($var, True);\n $this->tx_id = $var;\n\n return $this;\n }", "public function setCustomerTransactionId($id) {\n \t$this->customerTransactionId = $id;\n }", "public function setTxnID($value)\n\t{\n\t\treturn $this->set('TxnID', $value);\n\t}", "public function setTransactionId($transactionId)\n {\n $this->transactionId = $transactionId;\n return $this;\n }", "public function setTxid($var)\n {\n GPBUtil::checkString($var, True);\n $this->txid = $var;\n\n return $this;\n }", "public function setTransactionId($var)\n {\n GPBUtil::checkString($var, True);\n $this->transaction_id = $var;\n\n return $this;\n }", "public function setTransactionId($var)\n {\n GPBUtil::checkString($var, False);\n $this->transaction_id = $var;\n\n return $this;\n }", "public function setTransactionId($var)\n {\n GPBUtil::checkString($var, True);\n $this->transaction_id = $var;\n $this->has_transaction_id = true;\n\n return $this;\n }", "public function setTransId($transId)\n {\n $this->transId = $transId;\n return $this;\n }", "public function setTransactionId($value)\n {\n return $this->set(self::TRANSACTION_ID, $value);\n }", "function SetId($value) { $this->id=$value; }", "public function getTransactionID()\n\t{\n\t\treturn $this->transaction_id;\n\t}", "public function setTrxId($trxId)\n {\n if ($trxId == null || strtolower($trxId) == 'autocreatetrxid') {\n $this->trxId = $this->autoGenerateTrxId();\n } elseif (strlen($trxId) < 30) {\n $this->trxId = $this->modifyTrxId($trxId);\n } else {\n $this->trxId = $trxId;\n }\n\n return $this;\n }", "public function getTransactionId() { return $this->transactionId; }", "public function getTxId()\n {\n return $this->tx_id;\n }", "public final function setTransaction(iTransaction $transaction) {\n $this->_transaction = $transaction;\n }", "public function setTransferId($var)\n {\n GPBUtil::checkString($var, True);\n $this->transfer_id = $var;\n\n return $this;\n }", "public function setMerchantId($val)\n\t{\n\t\t$this->_merchantId = $val;\n\t\treturn $this;\n\t}", "public function setTransaction(Transaction $transaction)\n {\n $this->transaction = $transaction;\n }", "public function setTransaction(Transaction $transaction)\n {\n $this->transaction = $transaction;\n }", "public function SetId ($id);", "public function set_id( $id ) {\n\t\t\t$this->id = $id;\n\t\t}", "public function setId($id)\n {\n $this->setIdSale($id);\n }", "public function getTxnId()\n {\n return $this->response['result']['id'];\n }", "protected function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->_id = $id;\n }", "public function setTransactionId($value)\n {\n return $this->setParameter('issuer_id', $value);\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id) {\n $this->id = $id;\n }", "public function getTransactionID()\r\n\t{\r\n\t\treturn $this->root->getAttribute('transactionid');\r\n\t}", "public function setId($id)\n {\n $this->_id = (int)$id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id) {\n $this->id = $id;\n }", "public function setId($id) {\n $this->id = $id;\n }", "public function setId($id) {\n $this->id = $id;\n }", "public function setId($id) {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->_id = (int) $id;\n }", "public function setId($id) {\r\n $this->id = $id;\r\n }", "public function setId($id) {\r\n $this->id = $id;\r\n }", "public function set_id( $id ) {\n\t\t$this->id = absint( $id );\n\t}", "public function setId($id) {\r\n $this->_id = $id;\r\n }", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setId($id)\n {\n $id = (int) $id;\n \n if ($id > 0)\n {\n $this->_id = $id;\n }\n }", "public function setScriptTransportId($id)\n {\n $this->scriptTransportId = $id;\n }", "public function setId($id)\n {\n $this->_id = (int) $id;\n }", "public function setTransactionNumber($transaction_number);", "function setId($id) {\n $this->id = $id;\n }", "function setId($id) {\n $this->id = $id;\n }", "public function setId($id) {\n $this->id = $id;\n }", "private function set_id(int $id)\n {\n $this->_id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "function setId($id) {\n\t\t$this->setData('id', $id);\n\t}", "private function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\r\n {\r\n $this->_id = (int) $id;\r\n }", "public function setId( $id ) {\n\t\t$this->id = $id;\n\t}", "public function setId( $id ) {\n\t\t$this->id = $id;\n\t}", "public function setId($id)\r\n {\r\n if (is_int($id))\r\n {\r\n $this->id = $id;\r\n }\r\n }", "public function setId($id)\r\n {\r\n if (is_int($id))\r\n {\r\n $this->id = $id;\r\n }\r\n }", "public function setId($id)\r\n {\r\n if (is_int($id))\r\n {\r\n $this->id = $id;\r\n }\r\n }", "public function setId($id)\r\n {\r\n if (is_int($id))\r\n {\r\n $this->id = $id;\r\n }\r\n }", "public function setId($id): void\r\n {\r\n $this->id = $id;\r\n }", "function setId($id)\n {\n $this->id = $id;\n }", "public function setID($id) {\n\t\t// if passed in task ID is not null or not numeric, is not between 0 and 9223372036854775807 (signed bigint max val - 64bit)\n\t\t// over nine quintillion rows\n\t\tif(($id !== null) && (!is_numeric($id) || $id <= 0 || $id > 9223372036854775807 || $this->_id !== null)) {\n\t\t\tthrow new TaskException(\"Task ID error\");\n\t\t}\n\t\t$this->_id = $id;\n\t}", "public function setId($id)\n\t\t{\n\t\t\t$this->id = $id;\n\t\t}", "public function setId($id)\n {\n $id = (int) $id;\n $this->_id = $id;\n }", "public function setId($id)\n {\n $id = (int) $id;\n if ($id > 0) {\n $this->id = $id;\n }\n }", "protected function setId(int $id) {\n $this->id = $id;\n }", "public function setId($id): void\n {\n $this->id = $id;\n }" ]
[ "0.7440668", "0.73687536", "0.6994135", "0.65264755", "0.6516705", "0.6362519", "0.60952514", "0.605746", "0.60227877", "0.5707884", "0.56591773", "0.56493515", "0.5627069", "0.5623414", "0.5526677", "0.5519431", "0.55075014", "0.5496418", "0.54957175", "0.54440516", "0.54440516", "0.543924", "0.54262435", "0.5424809", "0.5420051", "0.54001355", "0.53716034", "0.53672", "0.5358456", "0.5358456", "0.5358456", "0.5358456", "0.5358456", "0.5358456", "0.5358456", "0.5358456", "0.5358456", "0.5358456", "0.5358456", "0.5358456", "0.5358456", "0.5358456", "0.5358456", "0.5358456", "0.5358456", "0.5358456", "0.5358456", "0.5358456", "0.5358456", "0.5358456", "0.5358456", "0.5358456", "0.5358456", "0.5358456", "0.5358456", "0.5358456", "0.5358319", "0.53544056", "0.5343688", "0.5343591", "0.5338802", "0.5338802", "0.5338802", "0.5338802", "0.53362966", "0.53359526", "0.53359526", "0.5333288", "0.5332538", "0.5328123", "0.5328123", "0.5328123", "0.5328123", "0.5328123", "0.532487", "0.53231925", "0.53205675", "0.5317874", "0.53168005", "0.53168005", "0.52975506", "0.5297005", "0.52958655", "0.5295207", "0.5294176", "0.52916634", "0.52904594", "0.52904594", "0.5289228", "0.5289228", "0.5289228", "0.5289228", "0.5285527", "0.5282652", "0.5280866", "0.52772975", "0.5277132", "0.5268958", "0.52629876", "0.52590024" ]
0.5608448
14
Sets the value of the TransactionId and returns this instance
public function withTransactionId($value) { $this->setTransactionId($value); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setTransactionId($transactionId)\n {\n $this->transactionId = $transactionId;\n return $this;\n }", "public function setTransId($transId)\n {\n $this->transId = $transId;\n return $this;\n }", "public function setTxId($var)\n {\n GPBUtil::checkString($var, True);\n $this->tx_id = $var;\n\n return $this;\n }", "public function setTransactionId($id)\n {\n $this->_data['trx_id'] = $id;\n }", "public function setTrxId($trxId)\n {\n if ($trxId == null || strtolower($trxId) == 'autocreatetrxid') {\n $this->trxId = $this->autoGenerateTrxId();\n } elseif (strlen($trxId) < 30) {\n $this->trxId = $this->modifyTrxId($trxId);\n } else {\n $this->trxId = $trxId;\n }\n\n return $this;\n }", "public function setTxnID($value)\n\t{\n\t\treturn $this->set('TxnID', $value);\n\t}", "public function setTransactionId($value) \n {\n $this->_fields['TransactionId']['FieldValue'] = $value;\n return $this;\n }", "public function getTransactionId() { return $this->transactionId; }", "public function setTxid($var)\n {\n GPBUtil::checkString($var, True);\n $this->txid = $var;\n\n return $this;\n }", "public function setTransactionId($var)\n {\n GPBUtil::checkString($var, True);\n $this->transaction_id = $var;\n\n return $this;\n }", "public function setTransactionId($var)\n {\n GPBUtil::checkString($var, False);\n $this->transaction_id = $var;\n\n return $this;\n }", "public function setTransactionIdentifier($transactionIdentifier)\n {\n $this->transactionIdentifier = $transactionIdentifier;\n return $this;\n }", "public function setTransactionId($var)\n {\n GPBUtil::checkString($var, True);\n $this->transaction_id = $var;\n $this->has_transaction_id = true;\n\n return $this;\n }", "public function getTransactionID()\n\t{\n\t\treturn $this->transaction_id;\n\t}", "public function assetId(?BigInteger $assetId): self\n {\n $this->assetTransaction->assetId = $assetId;\n\n return $this;\n }", "public function setCustomerTransactionId($id) {\n \t$this->customerTransactionId = $id;\n }", "public function setMerchantId($val)\n\t{\n\t\t$this->_merchantId = $val;\n\t\treturn $this;\n\t}", "public function getTxId()\n {\n return $this->tx_id;\n }", "public function _setId($id)\n {\n $this->id = $id;\n\n return $this;\n }", "public function _setId($id)\n {\n $this->id = $id;\n\n return $this;\n }", "public function _setId($id)\n {\n $this->id = $id;\n\n return $this;\n }", "public function setTransactionId($value)\n {\n return $this->set(self::TRANSACTION_ID, $value);\n }", "public function setTransactionIdentifier($transactionIdentifier)\n {\n $this->transactionIdentifier = $transactionIdentifier;\n\n return $this;\n }", "private function _setId($id)\n {\n $this->_id = $id;\n\n return $this;\n }", "public function setTId($t_id)\n {\n $this->t_id = $t_id;\n\n return $this;\n }", "function getTxnId() {\n return $this->txn_id;\n }", "public function setTransactionXID($transactionXID)\n {\n $this->transactionXID = $transactionXID;\n\n return $this;\n }", "public function getTransactionID();", "public function setId($id)\n {\n $this->Id = $id;\n\n return $this;\n }", "public function setId($Id)\n {\n $this->id = $Id;\n return $this;\n }", "public function setId($Id)\n {\n $this->id = $Id;\n return $this;\n }", "public function setId($Id)\n {\n $this->id = $Id;\n\n return $this;\n }", "function setParent($txn_id) {\n $this->checkChange();\n\n $this->parent_txn_id = $txn_id;\n return $this;\n }", "public function getTxnId()\n {\n return $this->response['result']['id'];\n }", "public function setId($id)\n {\n $this->values['Id'] = $id;\n return $this;\n }", "public function setId($id)\n {\n $this->values['Id'] = $id;\n return $this;\n }", "public function getTransactionId() {\n return $this->transactionId;\n }", "public function setId($id)\n {\n $this->id = $id;\n\n return $this;\n }", "public function getTransactionId()\n {\n return $this->transactionId;\n }", "public function setId($id) {\n $this->_id = (int) $id;\n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n\n return $this;\n }", "public function getTransactionIdentifier()\n {\n return $this->transactionIdentifier;\n }", "public function referenceId(string $id): self\n {\n $this->set('merchant_order_id', $id);\n\n return $this;\n }", "public function getTxid()\n {\n return $this->txid;\n }", "public function setId($id)\r\n {\r\n $this->id = $id;\r\n\r\n return $this;\r\n }", "public function setId($id)\r\n {\r\n $this->id = $id;\r\n\r\n return $this;\r\n }", "public function setId($id)\r\n {\r\n $this->id = $id;\r\n\r\n return $this;\r\n }", "public function setId($id)\r\n {\r\n $this->id = $id;\r\n\r\n return $this;\r\n }", "public function setId($id)\r\n {\r\n $this->id = $id;\r\n\r\n return $this;\r\n }", "public function setId($id)\r\n {\r\n $this->id = $id;\r\n\r\n return $this;\r\n }", "public function setId($id)\r\n {\r\n $this->id = $id;\r\n\r\n return $this;\r\n }", "public function setId($id)\r\n {\r\n $this->id = $id;\r\n return $this;\r\n }", "public function setId($id)\n {\n $this->_id = $id;\n return $this;\n }", "private function setId($id)\n {\n $this->id = $id;\n\n return $this;\n }", "public function setId($id) {\r\n $this->id = $id;\r\n\r\n return $this;\r\n }", "public function set_id( $id ) {\n $this->id = $id;\n return $this;\n }", "public function setId($id) {\n\t\t$this->id = $id;\n\t\treturn $this;\n\t}", "public function setId($id) {\n\t\t$this->id = $id;\n\t\treturn $this;\n\t}", "public function setId($id): self\n {\n $this->id->setId($id);\n\n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n \n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n\n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n\n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n\n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n\n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n\n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n\n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n\n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n\n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n\n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n\n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n\n return $this;\n }", "protected function setId($id)\n {\n $this->id = $id;\n\n return $this;\n }", "public function getTransactionId()\n {\n return $this->transaction_id;\n }", "public function getTransactionId()\n {\n return $this->transaction_id;\n }", "public function getTransactionId()\n {\n return $this->transaction_id;\n }", "public function setId($id){\n $this->id = $id;\n return $this;\n }", "public function setId($id) {\n $this->_id = $id;\n return $this;\n }", "public function setId($id)\n {\n $this->_id = $id;\n\n return $this;\n }", "public function setId($id) {\n\t\t$this->id = $id;\n\n\t\treturn $this;\n\t}", "public function setId($id) {\n\t\t$this->id = $id;\n\n\t\treturn $this;\n\t}", "public function setId($id) {\n\t\t$this->id = $id;\n\n\t\treturn $this;\n\t}", "public function setId($id)\n {\n $this->id = $id;\n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n return $this;\n }", "public function setId($id)\n {\n $this->id = $id;\n return $this;\n }", "public function getTransactionId() {\n return $this->transactionId;\n }" ]
[ "0.78278446", "0.71686506", "0.7119031", "0.66812027", "0.65610796", "0.64864177", "0.6478361", "0.6320493", "0.62555915", "0.6173719", "0.61566114", "0.61276656", "0.61233777", "0.6117405", "0.6088881", "0.6081403", "0.60770875", "0.60517526", "0.6038887", "0.6038887", "0.6038887", "0.60113186", "0.5996954", "0.5987448", "0.594729", "0.59125155", "0.5860992", "0.5829479", "0.5828005", "0.5814734", "0.5814734", "0.58060324", "0.57708955", "0.5769867", "0.5760291", "0.5760291", "0.5758409", "0.5742252", "0.5740348", "0.5733996", "0.5724017", "0.5721962", "0.57189995", "0.57123244", "0.57098055", "0.57098055", "0.57098055", "0.57098055", "0.57098055", "0.57098055", "0.57098055", "0.57087904", "0.5697817", "0.569555", "0.56924015", "0.5688649", "0.5688571", "0.5688571", "0.56863016", "0.5684924", "0.5682262", "0.5682262", "0.568183", "0.568183", "0.568183", "0.568183", "0.568183", "0.568183", "0.568183", "0.568183", "0.568183", "0.5679686", "0.5678061", "0.5678061", "0.5678061", "0.5677745", "0.567304", "0.56704295", "0.56671274", "0.56671274", "0.56671274", "0.5664935", "0.5664935", "0.5664935", "0.5664935", "0.5664935", "0.5664935", "0.5664935", "0.5664935", "0.5664935", "0.5664935", "0.5664935", "0.5664935", "0.5664935", "0.5664935", "0.5664935", "0.5664935", "0.5664935", "0.5664935", "0.5664529" ]
0.6165917
10
Checks if TransactionId is set
public function isSetTransactionId() { return !is_null($this->_fields['TransactionId']['FieldValue']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function in_transaction() {\r\n return isset($this->sem_id) && $this->sem_id;\r\n }", "private function isTransactionExist($transactionId)\n {\n if (strlen($transactionId) <= 3) {\n return false;\n }\n\n $insertOrder = $this->db->fetchRow(\n 'SELECT id FROM s_order WHERE transactionID = ? AND status != -1',\n [$transactionId]\n );\n\n return !empty($insertOrder['id']);\n }", "public function getTransactionID();", "private function checkTransID($transaction_id, $client_id) {\n\t\tLoader::loadModels($this, array(\"Transactions\"));\n\n\t\t$transaction = $this->Transactions->getByTransactionId($transaction_id, $client_id);\n\n\t\tif ($transaction) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function isInTransaction();", "public function rollback(string $transactionId): bool;", "public function isTransactionPart()\n {\n return $this->_transaction != null;\n }", "public function hasId()\n {\n return $this->id !== null;\n }", "public function isInTransaction(): bool;", "public function hasPaystackId()\n {\n return ! is_null($this->paystack_id);\n }", "public function hasTransactions();", "public function isValidTransactionId($id)\n {\n // if we've already got a transaction database ID, we're fine\n if (isset($this->_transactionDatabaseID)) {\n return true;\n }\n\n try {\n // inserts the new transaction and retrieves the database row ID\n $this->_transactionDatabaseID = intval($this->_insertTransaction($id));\n return true;\n } catch (Exception $e) {\n return false;\n }\n }", "public function getTransactionID()\n\t{\n\t\treturn $this->transaction_id;\n\t}", "public function isTransactionPartOf($id)\n {\n if ( $this->isTransactionPart() ) {\n return $id == $this->_transaction->id;\n } else {\n return false;\n }\n }", "function get_transaction_id()\n {\n return $this->platnosci_post_vars['txn_id']; \n }", "public function isUnderTransaction();", "public function getTxId()\n {\n return $this->tx_id;\n }", "public function getTransactionId() { return $this->transactionId; }", "public function hasId(): bool\n {\n return $this->id !== null;\n }", "public function isTransaction(): bool\n {\n return $this->inTransaction();\n }", "public function hasTraceId(){\n return $this->_has(1);\n }", "public function hasTraceId(){\n return $this->_has(1);\n }", "public function hasToBoxId()\n {\n return $this->ToBoxId !== null;\n }", "public function setTxId($var)\n {\n GPBUtil::checkString($var, True);\n $this->tx_id = $var;\n\n return $this;\n }", "function transaction_check(){\n }", "public function transaction(): bool\r\n {\r\n return $this->instance->inTransaction() === true;\r\n }", "public function isTransaction()\n {\n return $this->_isTransaction;\n }", "public function getTransactionID()\r\n\t{\r\n\t\treturn $this->root->getAttribute('transactionid');\r\n\t}", "function getTxnId() {\n return $this->txn_id;\n }", "public function is_transaction_exist() {\n\n $transaction = $this->ci->generic_model->retrieve_one(\n \"transaction_general\",\n array(\n \"package_id\" => $this->ci->input->post(\"package_id\"),\n \"package_type\" => $this->ci->input->post(\"package_type\")\n )\n );\n\n if ($transaction) { // there exists an object.\n return TRUE;\n } else { // object is not found.\n $this->ci->form_validation->set_message(\"is_transaction_exist\", \"Paket belum dibeli.\");\n return FALSE;\n }\n }", "public function inTransaction(): bool\n {\n return $this->inTransaction;\n }", "public function hasId(){\n return $this->_has(17);\n }", "public function inTransaction(): bool;", "public function getTransactionId()\n {\n return isset($this->transaction['transactionId']) ? $this->transaction['transactionId'] : '';\n }", "public function isSetTdsOrderId()\n {\n return !is_null($this->_fields['TdsOrderId']['FieldValue']);\n }", "public function isSetTransactionAmount()\n {\n return !is_null($this->_fields['TransactionAmount']['FieldValue']);\n\n }", "public function getTransactionXID()\n {\n return $this->transactionXID;\n }", "public function hasId(): bool\n {\n return $this->getEntityDao()->hasId();\n }", "public function setTransactionId($id)\n {\n $this->_data['trx_id'] = $id;\n }", "public function getTxid()\n {\n return $this->txid;\n }", "public function isTransactionActive()\n {\n return $this->transactionNestingLevel > 0;\n }", "function isProcessed($TxnId)\n{\n # Check database if order relating to TxnId has alread been processed\n\treturn false;\n}", "public function get_transaction_id() {\n\n\t\treturn $this->is_credit_card_response() && isset( $this->response->paymentMethod, $this->response->paymentMethod->verification ) ? $this->response->paymentMethod->verification->id : null;\n\t}", "public function isValid() {\n return !empty($id);\n }", "private function validateId()\n {\n return is_numeric($this->id) && (int)$this->id >= 1;\n }", "public function isSetSellerId()\n {\n return !is_null($this->_fields['SellerId']['FieldValue']);\n }", "public function isSetSellerOrderId()\n {\n return !is_null($this->_fields['SellerOrderId']['FieldValue']);\n }", "public function hasId()\n {\n $id = $this->getId();\n\n if (is_array($id)) {\n foreach ($id as $k => $v) {\n if (\"\" == \"$v\") {\n return false;\n }\n }\n }\n else if (\"\" == \"$id\") {\n return false;\n }\n\n return true;\n }", "public function getTransactionId() {\n return $this->transactionId;\n }", "public function getTransactionIdentifier()\n {\n return $this->transactionIdentifier;\n }", "public function isSetAmazonOrderId()\n {\n return !is_null($this->_fields['AmazonOrderId']['FieldValue']);\n }", "public function isSetTransactionSerialNumber()\n {\n return !is_null($this->_fields['TransactionSerialNumber']['FieldValue']);\n }", "public function getTransactionId();", "public function getTransactionId();", "public function hasMessageId()\n {\n return $this->MessageId !== null;\n }", "public function CheckTransactionUser() {\n\t\t\t\t\t\tif (isset ( $_SESSION ['UserSession'] )) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t}", "function is_previously_used_txn_id ($txn_id) {\r\n\t\tglobal $db;\r\n\t\tif (!$result = $db->query(\"SELECT id FROM registrations WHERE pp_txn_id = '$txn_id'\")) {\r\n\t\t\tif (DEBUG == true) { error_log(($msg = \"Error running query: $sql\") . PHP_EOL, 3, LOG_FILE); }\r\n\t\t\tdie($msg);\r\n\t\t}\r\n\t\treturn $result->num_rows;\r\n\t}", "public function getTxnId()\n {\n return $this->response['result']['id'];\n }", "protected function _fcpoCheckTxid()\n {\n $blAppointedError = false;\n $sTxid = $this->_oFcpoHelper->fcpoGetSessionVariable('fcpoTxid');\n\n $sTestOxid = '';\n if ($sTxid) {\n $sQuery = \"SELECT oxid FROM fcpotransactionstatus WHERE FCPO_TXACTION = 'appointed' AND fcpo_txid = '\" . $sTxid . \"'\";\n $sTestOxid = $this->_oFcpoDb->getOne($sQuery);\n }\n\n if (!$sTestOxid) {\n $blAppointedError = true;\n $this->oxorder__oxfolder = new oxField('ORDERFOLDER_PROBLEMS', oxField::T_RAW);\n $oLang = $this->_oFcpoHelper->fcpoGetLang();\n $sCurrentRemark = $this->oxorder__oxremark->value;\n $sAddErrorRemark = $oLang->translateString('FCPO_REMARK_APPOINTED_MISSING');\n $sNewRemark = $sCurrentRemark.\" \".$sAddErrorRemark;\n $this->oxorder__oxremark = new oxField($sNewRemark, oxField::T_RAW);\n }\n $this->_fcpoSetAppointedError($blAppointedError);\n\n return $blAppointedError;\n }", "public static function hasIdProperty(): bool\n {\n return static::getIdProperty() !== null;\n }", "public function getIsTransaction()\n {\n return $this->isTransaction;\n }", "public function get_transaction_id() {\n\n\t\treturn $this->transaction_tag;\n\t}", "public function isInTransaction()\n {\n return $this->_getWriteAdapter()->getTransactionLevel() > 0;\n }", "public function setTxnID($value)\n\t{\n\t\treturn $this->set('TxnID', $value);\n\t}", "public function hasFromBoxId()\n {\n return $this->FromBoxId !== null;\n }", "function merchantExists()\n {\n\n $this->getById();\n if ($this->auth_id != null) return true;\n else {\n return false;\n }\n }", "final private function __isTransaction()\n\t{\n\t\tif( ! $this->transaction )\n\t\t{\n\t\t\tthrow new \\Exception('Do not using transaction.', 421);\n\t\t}\n\t}", "public function hasSenderid(){\n return $this->_has(2);\n }", "public function hasId()\n {\n $attributes = $this->getAttributes();\n\n if ( ! isset($attributes['id'])) return false;\n\n return true;\n }", "public function getTxnID()\n\t{\n\t\treturn $this->get('TxnID');\n\t}", "public function getTransactionId()\n {\n return $this->transaction_id;\n }", "public function getTransactionId()\n {\n return $this->transaction_id;\n }", "public function getTransactionId()\n {\n return $this->transaction_id;\n }", "public function hasAccountId()\n {\n return $this->account_id !== null;\n }", "public function setCustomerTransactionId($id) {\n \t$this->customerTransactionId = $id;\n }", "public function getTransactionId()\n {\n return $this->transactionId;\n }", "public function isSetMarketplaceId()\n {\n return !is_null($this->_fields['MarketplaceId']['FieldValue']);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\r\n return $this->_has(5);\r\n }", "protected function transactionIDExists(&$record) {\n \n $trxn_id = $record['transmission_number'] . '-' . $record['transaction_number'];\n\n $dao = CRM_Core_DAO::executeQuery(\n \"SELECT id, contact_id FROM civicrm_contribution WHERE trxn_id = %1\",\n array(\n 1 => array($trxn_id, 'String')\n )\n );\n\n if ($dao->fetch()) {\n $message = ts(\n \"Duplicate transaction number (%1) - already exists for contribution id %2 (%3) - KID number '%4' at line %5. %6\",\n array(\n 1 => $record['transaction_number'],\n 2 => $dao->id,\n 3 => $this->getDisplayName($dao->contact_id),\n 4 => $record['kid'],\n 5 => $record['line_no'],\n 6 => $this->test ? ts('Record will not be imported.') : ts('Record was not imported.')\n )\n );\n $this->addReportLine('warning', $message);\n if (!$this->test)\n $this->createFailureTableEntry($record, $message);\n return true;\n }\n \n return false; \n \n }", "public function hasActiveTransaction()\n {\n return $this->hasActiveTransaction;\n }", "public function hasUuid()\n {\n return !empty($this->getUuid());\n }", "public function isTransactionActive()\n {\n return $this->conn->isTransactionActive();\n }", "public function hasFortId()\n {\n return $this->FortId !== null;\n }", "public function isSetId()\n {\n return !empty($this->_fields['Id']['FieldValue']);\n }", "public function hasSourceId()\n {\n return $this->source_id !== null;\n }", "function isvalid_ID( $id = null, $request_param = null ) {\n\n\t\t\tif ( ! is_null( $request_param ) && ! empty( $_REQUEST[ $request_param ] ) ) {\n\t\t\t\t$id = (int) $_REQUEST[ $request_param ];\n\t\t\t}\n\n\t\t\tif ( is_null( $id ) ) {\n\t\t\t\t$id = $this->id;\n\t\t\t}\n\n\t\t\t$id = (int) $id;\n\n\t\t\treturn ( $id > 0 );\n\t\t}", "public function isIdValid($id)\n {\n \treturn $this->mgrOrder->isIdValid($id);\n }", "abstract public function determineTransaction();", "public function getTransactionId() {\n return $this->transactionId;\n }", "public function inTransaction(): bool\n\t{\n\t\treturn $this->connection->inTransaction();\n\t}" ]
[ "0.6433023", "0.6415373", "0.63016856", "0.6268571", "0.6195287", "0.61504877", "0.60925895", "0.6056837", "0.60351664", "0.6031524", "0.60262144", "0.59809947", "0.5930771", "0.59139407", "0.5894046", "0.58718264", "0.5870215", "0.58631074", "0.5844541", "0.5806273", "0.5772528", "0.5772528", "0.57622755", "0.57233953", "0.57166415", "0.5705576", "0.56915003", "0.5688183", "0.567921", "0.56746626", "0.5667541", "0.5648719", "0.56248796", "0.56145364", "0.5603824", "0.5601695", "0.5567801", "0.5545525", "0.5534135", "0.55008125", "0.5496388", "0.5495499", "0.54872686", "0.54744816", "0.5470917", "0.54659885", "0.5463773", "0.5459926", "0.54568344", "0.54542804", "0.5448135", "0.5446774", "0.5443504", "0.5443504", "0.5439974", "0.5437751", "0.54316443", "0.54278296", "0.5427539", "0.5427034", "0.54268104", "0.5420323", "0.5395003", "0.5390959", "0.53871197", "0.53826594", "0.53685987", "0.5368017", "0.53621656", "0.5346805", "0.5342415", "0.5342415", "0.5342415", "0.53380096", "0.53157043", "0.53083473", "0.5306264", "0.5302644", "0.5302644", "0.5302644", "0.5302644", "0.5302644", "0.5302644", "0.5302644", "0.5302644", "0.5302644", "0.5302644", "0.5296654", "0.529615", "0.52921414", "0.52891886", "0.5289136", "0.52842706", "0.5279285", "0.52662736", "0.5256172", "0.5253566", "0.52521306", "0.52490115", "0.5248648" ]
0.6665745
0
Gets the value of the TransactionDate property.
public function getTransactionDate() { return $this->_fields['TransactionDate']['FieldValue']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTransactionDate() {\n\t\treturn self::$_transactionDate;\n\t}", "public function getDateTransaction()\n {\n return $this->dateTransaction;\n }", "public function getTransactionDateAttribute(){\n return $this->format_date($this->attributes['transaction_date']);\n }", "public function getTransactionPostedDate()\n {\n return $this->_fields['TransactionPostedDate']['FieldValue'];\n }", "public function getTradeDate()\n {\n return $this->TradeDate;\n }", "public function getTransferDate()\n {\n $value = $this->get(self::TRANSFERDATE);\n return $value === null ? (string)$value : $value;\n }", "public function getDate() {\n return $this->date;\n }", "public function setTransactionDate($value) \n {\n $this->_fields['TransactionDate']['FieldValue'] = $value;\n return $this;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\r\n {\r\n return $this->date;\r\n }", "public function getDate()\n\t{\n\t\treturn $this->date;\n\t}", "public function getDate()\n\t{\n\t\treturn $this->date;\n\t}", "public function getDate()\n\t{\n\t\treturn $this->date;\n\t}", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->_date;\n }", "public function getPaymentDate() {\n\t\t// return $this->created_at;\n\t\treturn $this->account ? $this->account->payment_date : $this->created_at;\n\t}", "function getDate() {\n return $this->date;\n }", "public function getDate() {\n\t\treturn $this->_date;\n\t}", "public function getEffectiveTransferDate()\n {\n return $this->effectiveTransferDate;\n }", "public function getDate() { return $this->date; }", "function getDate( )\r\n\t{\r\n\t\treturn $this->date;\r\n\t}", "public function setTransactionDate($value) {\n\t\tself::$_transactionDate = $value;\n\t}", "public function setDateTransaction($dateTransaction)\n {\n $this->dateTransaction = $dateTransaction;\n\n return $this;\n }", "public function getPayDate() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->payDate;\r\n\t}", "public function getOrderdate()\n {\n return $this->orderdate;\n }", "public function getPurchaseDateCreated() {\n return $this->purchaseDateCreatedDate;\n }", "public function getDate(){\n\t\treturn $this->_date;\n\t}", "public function getDate()\n\t{\n\t\treturn $this->datetime;\n\t}", "public function get()\n {\n return $this->date;\n }", "public function getQuotdate()\n {\n return $this->quotdate;\n }", "public function getArticleDate(): \\DateTime {\n\t\treturn ($this->articleDate);\n\t}", "public function getOrderDate()\n {\n return $this->order_date;\n }", "public function getPurchaseDateModified() {\n return $this->PurchaseDateModified;\n }", "public function setTxnDate($date)\n\t{\n\t\treturn $this->setDateType('TxnDate', $date);\n\t}", "public function getDate(): \\DateTime\n {\n return $this->date;\n }", "public function getDate(): \\DateTime\n {\n return $this->date;\n }", "public function getPaymentDate();", "public function getDateTransfert(): ?DateTime {\n return $this->dateTransfert;\n }", "public function getDate()\n {\n return new \\DateTime($this->date);\n }", "public function getChangeDate()\n {\n return $this->changeDate;\n }", "public function getBillDate()\n {\n return isset($this->billDate) ? $this->billDate : new DateTime;\n }", "public function getCreateDate() {\n\t\treturn $this->createDate;\n\t}", "public function getCreateDate() {\n\t\treturn $this->createDate;\n\t}", "public function getShipmentReceiptDate()\n {\n $value = $this->get(self::SHIPMENTRECEIPTDATE);\n return $value === null ? (string)$value : $value;\n }", "public function getContactDate() {\n return $this->date;\n }", "public function getMessageDate()\n {\n return $this->messageDate;\n }", "public function isSetTransactionDate()\n {\n return !is_null($this->_fields['TransactionDate']['FieldValue']);\n }", "public function getTransaction()\r\n\t{\r\n\t\treturn $this->transaction;\r\n\t}", "public function getTransaction()\n {\n return $this->transaction;\n }", "public function getTransaction()\n {\n return $this->transaction;\n }", "public function getTransaction()\n {\n return $this->transaction;\n }", "public function getEventDate() \n {\n return $this->_fields['EventDate']['FieldValue'];\n }", "public function getDateTask()\n {\n return $this->date_task;\n }", "public function getDate()\n {\n return $this->date = new \\DateTime($this->get()->post_date);\n }", "public function getDate() {\n return @$this->attributes['date'];\n }", "public function getStatusDate()\n {\n return $this->statusDate;\n }", "public function getWarrantyDate()\n {\n return $this->warrantyDate;\n }", "public function getRestoreDate()\n {\n return $this->restoreDate;\n }", "public function getDateEn() {\n return $this->date;\n }", "public function getReceiveDate()\n {\n return $this->receiveDate;\n }", "public function getCreateDate()\n\t{\n\t\treturn $this->CreateDate;\n\t}", "public function get_bookDate() {\n return $this->bookDate;\n }", "function getDate() {\n\t\treturn $this->data_array['adddate'];\n\t}", "public function getCreatedThingTransferDate()\n {\n $value = $this->get(self::CREATEDTHINGTRANSFERDATE);\n return $value === null ? (string)$value : $value;\n }", "function getCreateDate() {\n\t\treturn $this->_CreateDate;\n\t}", "function getCreateDate() {\n\t\treturn $this->_CreateDate;\n\t}", "public function getCreateDate()\n {\n return $this->create_date;\n }", "public function getDate()\n {\n return $this->getData('created_at');\n }", "public function getEntryDate()\n {\n return $this->entry_date;\n }", "public function getTodoDate(): \\DateTime {\n\t\treturn $this->todoDate;\n\t}" ]
[ "0.8441441", "0.8270813", "0.7253118", "0.71960604", "0.7015922", "0.6742537", "0.67181605", "0.67136", "0.66942775", "0.66942775", "0.66942775", "0.66942775", "0.66942775", "0.66942775", "0.66942775", "0.66942775", "0.66942775", "0.66942775", "0.66942775", "0.66942775", "0.66942775", "0.66942775", "0.66942775", "0.66942775", "0.66942775", "0.66942775", "0.66942775", "0.66942775", "0.66942775", "0.66942775", "0.66942775", "0.66942775", "0.66942775", "0.66942775", "0.66942775", "0.66942775", "0.66942775", "0.66844904", "0.664893", "0.664893", "0.664893", "0.6646697", "0.66249806", "0.66249806", "0.66110885", "0.6598744", "0.65973747", "0.6591852", "0.6570906", "0.65318286", "0.6494687", "0.6485247", "0.6422687", "0.63956594", "0.6388508", "0.6383082", "0.63654464", "0.63613063", "0.6335974", "0.6329697", "0.6301584", "0.6298902", "0.625047", "0.62270784", "0.6223831", "0.6223831", "0.62071997", "0.6202169", "0.6174547", "0.612103", "0.60941446", "0.60920876", "0.60920876", "0.6090444", "0.6078084", "0.60722274", "0.6062454", "0.6059702", "0.60570335", "0.60570335", "0.60570335", "0.60382134", "0.6036235", "0.60357827", "0.603388", "0.6031433", "0.60308176", "0.6018193", "0.60177076", "0.6015207", "0.6013315", "0.5995117", "0.59907854", "0.5988429", "0.59844667", "0.59844667", "0.59813046", "0.59767395", "0.5974115", "0.59712785" ]
0.8536782
0
Sets the value of the TransactionDate property.
public function setTransactionDate($value) { $this->_fields['TransactionDate']['FieldValue'] = $value; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setTransactionDate($value) {\n\t\tself::$_transactionDate = $value;\n\t}", "public function setTxnDate($date)\n\t{\n\t\treturn $this->setDateType('TxnDate', $date);\n\t}", "public function setDateTransaction($dateTransaction)\n {\n $this->dateTransaction = $dateTransaction;\n\n return $this;\n }", "public function setDate($date) {\n $this->date = $date;\n }", "public function setDate($date)\n {\n $this->date = $date;\n }", "public function setDate($date)\n {\n $this->date = $date;\n }", "public function setDate($date)\n\t{\n\t\t$this->date = $date;\n\t}", "public function setDate($date){\n\t\t$this->date = $date;\n\t}", "public function setDate( $sDate ) {\n\t\t$this->sDate = $sDate;\n\t}", "public function setDate($date);", "public function withTransactionDate($value)\n {\n $this->setTransactionDate($value);\n return $this;\n }", "public function setDate(\\DateTime $date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($value) {\n\t\t$this->_date = $value;\n\t}", "public function setDate(\\DateTime $date)\n\t{\n\t\t$this->date = $date;\n\n\t\treturn $this;\n\t}", "public function setDate($date){\r\n\t\t$this->wishDate = $date;\r\n\t}", "public function setDate(Carbon $date) {\n\t\t$this->setDateRange($date, $to);\n\t}", "public function setDate(DateTime $date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setPaymentDate(RDate $paymentDate): void\n {\n $this->paymentDate = $paymentDate;\n \\Logger::getLogger(\\get_class($this))\n ->debug(\n \\sprintf(\n __METHOD__.\" set to '%s'\",\n $this->paymentDate->format(RDate::SQL_DATE)\n )\n );\n }", "public function setDate($date)\n {\n $this->values['Date'] = $date;\n return $this;\n }", "public function setPaymentDate($payment_date);", "public function setDate($date) {\n $this->date = $date;\n $this->updateData();\n return $this;\n }", "public function setDate()\n\t{\n\t\tif ($this->getIsNewRecord())\n\t\t\t$this->create_time = time();\n\t}", "public function setDate($date)\n {\n $this->date = $date;\n \n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setTradeDate($var)\n {\n GPBUtil::checkInt32($var);\n $this->TradeDate = $var;\n\n return $this;\n }", "public function setDate(Carbon $date) {\n\n\t\t$this->date = new Carbon($date);\n\t\t$this->page = 0;\n\t}", "public function setDate()\n\t{\n\t\tif($this->isNewRecord)\n\t\t\t$this->create_time=$this->update_time=time();\n\t\telse\n\t\t\t$this->update_time=time();\n\t}", "public function setDate()\n\t{\n\t\tif($this->isNewRecord)\n\t\t\t$this->create_time=$this->update_time=time();\n\t\telse\n\t\t\t$this->update_time=time();\n\t}", "public function setDepositDueDate($depositDueDate)\n {\n if (stristr($depositDueDate, \"-\")) {\n $depositDueDate = strtotime($depositDueDate);\n }\n $this->depositDueDate = $depositDueDate;\n }", "public function setContactDate($date) {\n $this->date = $date;\n }", "public function setDate($date)\n {\n $this->date = $date;\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n return $this;\n }", "public function setDate(\\DateTime $date): self\n {\n $this->date = $date;\n\n return $this;\n }", "public function setTransaction(Transaction $transaction)\n {\n $this->transaction = $transaction;\n }", "public function setTransaction(Transaction $transaction)\n {\n $this->transaction = $transaction;\n }", "public function setDate(string $date)\r\n {\r\n $this->date = $date;\r\n\r\n return $this;\r\n }", "public function setDate(\\DateTime $date): Event\n {\n $this->date = $date;\n\n return $this;\n }", "public function setOrderDate($date)\n {\n $this->order_date = $date;\n }", "public function setDate($date)\n {\n if ($date instanceof Zend_Date) {\n $this->_date = $date;\n } else {\n if ($date instanceof DateTime) {\n $date = $date->getTimestamp();\n }\n\n $part = is_numeric($date) ? Zend_Date::TIMESTAMP : Zend_Date::ISO_8601;\n $this->_date = new Zend_Date($date, $part);\n }\n return $this;\n }", "public function setTakingDate($takingDate) {\n $this->_takingDate = $takingDate;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "function setDateConfirmed($dateConfirmed) {\n\t\t$this->setData('dateConfirmed', $dateConfirmed);\n\t}", "public function setDate(string $date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setBalanceDueDate($balanceDueDate)\n {\n if (stristr($balanceDueDate, \"-\")) {\n $balanceDueDate = strtotime($balanceDueDate);\n }\n $this->balanceDueDate = $balanceDueDate;\n }", "public function setArticle_date($t)\n {\n if(is_string($t))\n $this->_article_date = $t;\n }", "public function getTransactionDate() {\n\t\treturn self::$_transactionDate;\n\t}", "public function setToDate($toDate)\n {\n if (stristr($toDate, \"-\")) {\n $toDate = strtotime($toDate);\n }\n $this->toDate = $toDate;\n }", "public function setTransactionPostedDate($value)\n {\n $this->_fields['TransactionPostedDate']['FieldValue'] = $value;\n return $this;\n }", "public function testSetDateTransfert() {\n\n // Set a Date/time mock.\n $dateTransfert = new DateTime(\"2018-09-10\");\n\n $obj = new FichesControlesEntetes();\n\n $obj->setDateTransfert($dateTransfert);\n $this->assertSame($dateTransfert, $obj->getDateTransfert());\n }", "public function setArticleDate($newArticleDate = null): void {\n\t\t// base case: if the date is null, use the current date and time\n\t\tif($newArticleDate === null) {\n\t\t\t$this->articleDate = new \\DateTime();\n\t\t\treturn;\n\t\t}\n\n\t\t// store the like date using the ValidateDate trait\n\t\ttry {\n\t\t\t$newArticleDate = self::validateDateTime($newArticleDate);\n\t\t} catch(\\InvalidArgumentException | \\RangeException $exception) {\n\t\t\t$exceptionType = get_class($exception);\n\t\t\tthrow(new $exceptionType($exception->getMessage(), 0, $exception));\n\t\t}\n\t\t$this->articleDate = $newArticleDate;\n\t}", "public function setDate( $date ) {\n\t\tif ( !preg_match( self::DATERE, $date ) ) {\n\t\t\tthrow new InvalidArgumentException( \"Not a valid date: \".$date );\n\t\t}\n\t\t$this->setParameter( \"dtreviewed\", $date );\n\t}", "public function setCreateDate($createDate) {\n\t\t$this->createDate = $createDate;\n\t}", "public function setCreateDate($createDate) {\n\t\t$this->createDate = $createDate;\n\t}", "public function setCreatedDate($date)\r\n\t\t{\r\n\t\t\t$this->_created_date = $date;\r\n\t\t}", "public function getTransactionDate() \n {\n return $this->_fields['TransactionDate']['FieldValue'];\n }", "public function getDateTransaction()\n {\n return $this->dateTransaction;\n }", "public final function setTransaction(iTransaction $transaction) {\n $this->_transaction = $transaction;\n }", "public function setCreateDate(string $create_date): void\n {\n $this->create_date = $create_date;\n }", "public function setStartDate($startDate) {\n $this->startDate = $startDate;\n }", "public function setExpiryDate($date)\n {\n $this->expiryDate = $date;\n }", "public function setToDate($toDate)\n {\n // $this->toDate = $newDate->format('c');\n $this->toDate = $toDate;\n }", "public function setStartDate(string $date);", "public function setBillDate(DateTime $date)\n {\n $this->billDate = $date;\n return $this;\n }", "public function setStartDate($date)\n\t\t{\n\t\t\t$this->start_date = $date;\n\t\t}", "public function setCreated($date)\n {\n $this->created = $date;\n }", "public function isSetTransactionDate()\n {\n return !is_null($this->_fields['TransactionDate']['FieldValue']);\n }", "public function _setShipmentDate($shipmentDate) {\n\t\t$this->_shipmentDate = $shipmentDate;\n\t}", "function setDateApproved($dateApproved) {\n\t\treturn $this->setData('dateApproved', $dateApproved);\n\t}", "public function set_approved_date( $date ) {\n\t\t$this->set_prop( 'approved_date', $date ) ;\n\t}", "public function setReviewDate($newReviewDate = null) {\n\t\t\t\t// base case: if the date is null, use the current date and time\n\t\t\t\tif($newReviewDate = null) {\n\t\t\t\t\t$this->reviewDate = new \\DateTime();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// store the review date\n\t\t\t\ttry {\n\t\t\t\t\t$newReviewDate = self::validateDateTime($newReviewDate);\n\t\t\t\t} catch(\\InvalidArgumentException $invalidArgument) {\n//\t\t\t\t\t\tthrow(new \\InvalidArgumentException($invalidArgument->getMessage(), 0, $range));\n\t\t\t\t\tthrow(new \\InvalidArgumentException (\"No date specified\", 405));\n\t\t\t\t} catch(\\RangeException $range) {\n\t\t\t\t\tthrow(new \\RangeException($range->getMessage(), 0, $range));\n\t\t\t\t}\n\t\t\t\t$this->reviewDate = $newReviewDate;\n\t\t\t}", "public function changeTransaction(Transaction $recordTransaction, Array $date)\n {\n $recordTransaction->date = date('Y-m-d H:i:s', $this->randomDate($date['currentMonth'], $date['currentYear']));\n $recordTransaction->account_id = AccountTableSeeder::randomAccountId();\n $recordTransaction->category_id = CategoryTableSeeder::randomCategoryId();\n $recordTransaction->person_id = !$recordTransaction->transfer_code && rand(1, 2) % 2 === 0 ? PersonTableSeeder::randomPersonId() : null;\n\n return $recordTransaction;\n }", "public function setSettleDate($var)\n {\n GPBUtil::checkInt64($var);\n $this->settle_date = $var;\n\n return $this;\n }", "public function setUseDate($use_date) \n \t{\n \t\t$this->use_date = $use_date;\n \t}", "public function setLastActivityDate(\\DateTime $date): void\n {\n $this->lastActivityDate = $date;\n }", "public function setPropertyDate($date=true)\n {\n if($date === false)\n {\n $this->date =false;\n }\n elseif($date !== true)\n {\n $this->date =$date;\n }\n }", "public function setDate($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\StringValue::class);\n $this->date = $var;\n\n return $this;\n }", "public function setDate(?TimeRange $date): void\n {\n $this->date = $date;\n }", "public function setFromDate($fromDate)\n {\n // $this->fromDate = $newDate->format('c');\n $this->fromDate = $fromDate;\n }", "public function setStartDate(?Date $value): void {\n $this->getBackingStore()->set('startDate', $value);\n }", "public function setDate($date = null): object\n\t{\n\t\tif (null !== $date && !($date instanceof FHIRDateTime)) {\n\t\t\t$date = new FHIRDateTime($date);\n\t\t}\n\t\t$this->_trackValueSet($this->date, $date);\n\t\t$this->date = $date;\n\t\treturn $this;\n\t}", "function setDateCompleted($dateCompleted) {\n\t\t$this->setData('dateCompleted', $dateCompleted);\n\t}", "public function set_bookDate($bookDate) {\n $this->bookDate = (string) $bookDate;\n }", "public function setDateDeclaration(?DateTime $dateDeclaration): DeclarationCafat {\n $this->dateDeclaration = $dateDeclaration;\n return $this;\n }", "public function setTransferDate($value)\n {\n return $this->set(self::TRANSFERDATE, $value);\n }", "function setCreateDate($inCreateDate) {\n\t\tif ( $inCreateDate !== $this->_CreateDate ) {\n\t\t\tif ( !$inCreateDate instanceof DateTime ) {\n\t\t\t\t$inCreateDate = new systemDateTime($inCreateDate, system::getConfig()->getSystemTimeZone()->getParamValue());\n\t\t\t}\n\t\t\t$this->_CreateDate = $inCreateDate;\n\t\t\t$this->setModified();\n\t\t}\n\t\treturn $this;\n\t}", "public function setDateAttribute($date)\n {\n \t$this->attributes['date'] = Carbon::parse($date);\n }", "public function setUpRegisterDate()\n {\n $this->setRegisterDate(new \\DateTime());\n }" ]
[ "0.8202121", "0.7464201", "0.74367666", "0.67547405", "0.67321664", "0.67321664", "0.6634368", "0.6578614", "0.641355", "0.63304555", "0.6203483", "0.6146795", "0.6071096", "0.5977475", "0.5973856", "0.59625137", "0.5955056", "0.595319", "0.5939422", "0.5900034", "0.58811903", "0.58776647", "0.5864856", "0.5858895", "0.58530134", "0.58424884", "0.5828823", "0.5828823", "0.5816377", "0.57988167", "0.5786534", "0.5786534", "0.57861197", "0.5785872", "0.5785872", "0.5767292", "0.57553625", "0.57406723", "0.5740545", "0.5721499", "0.57202536", "0.57202536", "0.57202536", "0.57202536", "0.57202536", "0.57202536", "0.57202536", "0.57202536", "0.57202536", "0.57202536", "0.57202536", "0.57202536", "0.57202536", "0.57202536", "0.5683249", "0.5679103", "0.56706995", "0.56676745", "0.56604326", "0.565868", "0.56558734", "0.564865", "0.5647251", "0.5626575", "0.5600954", "0.5600954", "0.5595963", "0.55947006", "0.5590262", "0.5577942", "0.55759597", "0.5569463", "0.5524725", "0.550815", "0.5505102", "0.5499483", "0.5488498", "0.54453975", "0.5434059", "0.54101855", "0.54010844", "0.5394731", "0.5389356", "0.53857255", "0.53633904", "0.53596264", "0.5352825", "0.53503394", "0.53501093", "0.5347495", "0.5337727", "0.53345275", "0.5333472", "0.5329256", "0.53143454", "0.5311686", "0.52885544", "0.5280307", "0.527982", "0.52794075" ]
0.7589754
1
Sets the value of the TransactionDate and returns this instance
public function withTransactionDate($value) { $this->setTransactionDate($value); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setTransactionDate($value) \n {\n $this->_fields['TransactionDate']['FieldValue'] = $value;\n return $this;\n }", "public function setDateTransaction($dateTransaction)\n {\n $this->dateTransaction = $dateTransaction;\n\n return $this;\n }", "public function setTransactionDate($value) {\n\t\tself::$_transactionDate = $value;\n\t}", "public function setTxnDate($date)\n\t{\n\t\treturn $this->setDateType('TxnDate', $date);\n\t}", "public function setDate(\\DateTime $date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n \n return $this;\n }", "public function setDate(\\DateTime $date)\n\t{\n\t\t$this->date = $date;\n\n\t\treturn $this;\n\t}", "public function setDate($date) {\n $this->date = $date;\n $this->updateData();\n return $this;\n }", "public function setDate(DateTime $date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function withTransactionPostedDate($value)\n {\n $this->setTransactionPostedDate($value);\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n return $this;\n }", "public function setDate($date)\n {\n $this->values['Date'] = $date;\n return $this;\n }", "public function setDate(\\DateTime $date): self\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setTransactionPostedDate($value)\n {\n $this->_fields['TransactionPostedDate']['FieldValue'] = $value;\n return $this;\n }", "public function setDate(string $date)\r\n {\r\n $this->date = $date;\r\n\r\n return $this;\r\n }", "public function setDate(string $date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function getTransactionDate() {\n\t\treturn self::$_transactionDate;\n\t}", "public function getDateTransaction()\n {\n return $this->dateTransaction;\n }", "public function setDate($date)\n {\n if ($date instanceof Zend_Date) {\n $this->_date = $date;\n } else {\n if ($date instanceof DateTime) {\n $date = $date->getTimestamp();\n }\n\n $part = is_numeric($date) ? Zend_Date::TIMESTAMP : Zend_Date::ISO_8601;\n $this->_date = new Zend_Date($date, $part);\n }\n return $this;\n }", "public function getTransactionDate() \n {\n return $this->_fields['TransactionDate']['FieldValue'];\n }", "public function setDate(\\DateTime $date): Event\n {\n $this->date = $date;\n\n return $this;\n }", "public function openingDate($openingDate)\n {\n $this->dailyTransaction->setOpeningDate($openingDate);\n return $this;\n\n }", "public function setDateConnection($dateConnection)\n {\n $this->dateConnection = $dateConnection;\n\n return $this;\n }", "public function setBillDate(DateTime $date)\n {\n $this->billDate = $date;\n return $this;\n }", "public function setExpirationDate(\\DateTime $expirationDate)\n {\n $this->expirationDate = $expirationDate;\n return $this;\n }", "public function setDate($date = null): object\n\t{\n\t\tif (null !== $date && !($date instanceof FHIRDateTime)) {\n\t\t\t$date = new FHIRDateTime($date);\n\t\t}\n\t\t$this->_trackValueSet($this->date, $date);\n\t\t$this->date = $date;\n\t\treturn $this;\n\t}", "public function setDate()\n\t{\n\t\tif ($this->getIsNewRecord())\n\t\t\t$this->create_time = time();\n\t}", "final public function setCopyWithDate($copyWithDate)\n\t{\n\t\t$this->_copyWithDate = $copyWithDate;\n\n\t\treturn $this;\n\t}", "public function getTransactionDateAttribute(){\n return $this->format_date($this->attributes['transaction_date']);\n }", "public function setTransactionId($transactionId)\n {\n $this->transactionId = $transactionId;\n return $this;\n }", "public function setDate()\n\t{\n\t\tif($this->isNewRecord)\n\t\t\t$this->create_time=$this->update_time=time();\n\t\telse\n\t\t\t$this->update_time=time();\n\t}", "public function setDate()\n\t{\n\t\tif($this->isNewRecord)\n\t\t\t$this->create_time=$this->update_time=time();\n\t\telse\n\t\t\t$this->update_time=time();\n\t}", "function setCreateDate($inCreateDate) {\n\t\tif ( $inCreateDate !== $this->_CreateDate ) {\n\t\t\tif ( !$inCreateDate instanceof DateTime ) {\n\t\t\t\t$inCreateDate = new systemDateTime($inCreateDate, system::getConfig()->getSystemTimeZone()->getParamValue());\n\t\t\t}\n\t\t\t$this->_CreateDate = $inCreateDate;\n\t\t\t$this->setModified();\n\t\t}\n\t\treturn $this;\n\t}", "public function setRunDate(DateTime $runDate): self\n {\n $this->runDate = $runDate;\n return $this;\n }", "public function setDate($date = null): object\n {\n if (null !== $date && !($date instanceof FHIRDate)) {\n $date = new FHIRDate($date);\n }\n $this->_trackValueSet($this->date, $date);\n $this->date = $date;\n return $this;\n }", "public function setDate($date);", "public function date($value): self\n {\n $this->date = $value;\n \n return $this;\n }", "public function setTransactionId($value) \n {\n $this->_fields['TransactionId']['FieldValue'] = $value;\n return $this;\n }", "public function setExpirationDate($expirationDate)\n {\n $this->values['ExpirationDate'] = $expirationDate;\n return $this;\n }", "public function date($date = null)\n {\n if (null === $date) {\n $date = new Zend_Date();\n }\n $this->setDate($date);\n return $this;\n }", "public function setDate($date) {\n $this->date = $date;\n }", "function setCreateDate($inCreateDate) {\n\t\tif ( $inCreateDate !== $this->_CreateDate ) {\n\t\t\t$this->_CreateDate = $inCreateDate;\n\t\t\t$this->setModified();\n\t\t}\n\t\treturn $this;\n\t}", "public function setCreateDate($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->create_date !== null || $dt !== null) {\n $currentDateAsString = ($this->create_date !== null && $tmpDt = new DateTime($this->create_date)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;\n if ($currentDateAsString !== $newDateAsString) {\n $this->create_date = $newDateAsString;\n $this->modifiedColumns[] = BangunanPeer::CREATE_DATE;\n }\n } // if either are not null\n\n\n return $this;\n }", "public function setDate($date){\n\t\t$this->date = $date;\n\t}", "public function setTransferDate($value)\n {\n return $this->set(self::TRANSFERDATE, $value);\n }", "protected function setTermsDateOfAcceptance()\n {\n if ($this->termsDateOfAcceptance === null) {\n $now = new \\DateTime();\n $this->termsDateOfAcceptance = $now;\n }\n return $this;\n }", "public function setCreateDate($createDate)\n {\n $this->createDate = $createDate;\n\n return $this;\n }", "public function setCreate_date($create_date){\n $this->create_date = $create_date;\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n }", "public function setDate($date)\n {\n $this->date = $date;\n }", "public function setOrderDate(string $orderDate): self\n {\n $this->setParam(self::ORDER_DATE, $orderDate);\n return $this;\n }", "protected function setValueDateTime(\\DateTime $value)\n {\n\n $this->valueDateTime = $value;\n return $this;\n }", "public function setDateStart(DateTime $dateStart)\n {\n $this->dateStart = $dateStart;\n\n return $this;\n }", "public function setCreateDate($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->create_date !== null || $dt !== null) {\n $currentDateAsString = ($this->create_date !== null && $tmpDt = new DateTime($this->create_date)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;\n if ($currentDateAsString !== $newDateAsString) {\n $this->create_date = $newDateAsString;\n $this->modifiedColumns[] = JadwalPeer::CREATE_DATE;\n }\n } // if either are not null\n\n\n return $this;\n }", "public function setToDate($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->to_date !== null || $dt !== null) {\n $currentDateAsString = ($this->to_date !== null && $tmpDt = new DateTime($this->to_date)) ? $tmpDt->format('Y-m-d') : null;\n $newDateAsString = $dt ? $dt->format('Y-m-d') : null;\n if ($currentDateAsString !== $newDateAsString) {\n $this->to_date = $newDateAsString;\n $this->modifiedColumns[] = YearPeer::TO_DATE;\n }\n } // if either are not null\n\n\n return $this;\n }", "public function setDT(\\DateTime $dt)\n {\n $this->dt = $dt;\n\n return $this;\n }", "public function setDateDeclaration(?DateTime $dateDeclaration): DeclarationCafat {\n $this->dateDeclaration = $dateDeclaration;\n return $this;\n }", "protected function setTimestamp(\\DateTime $timestamp)\n\t{\n\t\t$this->_timestamp = $timestamp;\n\t\treturn $this;\n\t}", "public function setDateUpdate($dateUpdate)\n {\n if($dateUpdate instanceof DateTime) {\n $this->dateUpdate = $dateUpdate;\n }\n else {\n if($dateUpdate === null) {\n $dateUpdate = '';\n }\n $this->dateUpdate = new DateTime($dateUpdate);\n }\n return $this;\n }", "public function setTransactionRecord($transactionRecord)\n {\n $this->transactionRecord = $transactionRecord;\n return $this;\n }", "public function setStatusDate($statusDate = null)\n {\n if (null === $statusDate) {\n $this->statusDate = null;\n return $this;\n }\n if ($statusDate instanceof FHIRDateTime) {\n $this->statusDate = $statusDate;\n return $this;\n }\n $this->statusDate = new FHIRDateTime($statusDate);\n return $this;\n }", "public function setStartDate($startDate) {\n $this->startDate = $startDate;\n return $this;\n }", "public function trans(){\n\t\t$this->is_transaction = true;\n\t\treturn $this;\n\t}", "public function set_date_create($date_create) \n\t{\n\t\t$this->date_create = $date_create;\n\t\treturn $this;\n\t}", "public function setDate($date)\n\t{\n\t\t$this->date = $date;\n\t}", "public function setFromDate(DrupalDateTime $date) {\n $this->fromDate = $date;\n return $this;\n }", "public function setInvoiceDate($val)\n {\n $this->_propDict[\"invoiceDate\"] = $val;\n return $this;\n }", "public function setCreateddate(DateTime $createddate)\n {\n $this->createddate = $createddate;\n\n return $this;\n }", "public function setCreatedDate(\\DateTime $createdDate)\n {\n $this->createdDate = $createdDate;\n return $this;\n }", "public function setCreatedDate(\\DateTime $createdDate)\n {\n $this->createdDate = $createdDate;\n return $this;\n }", "public function setCreatedDate(\\DateTime $createdDate)\n {\n $this->createdDate = $createdDate;\n return $this;\n }", "public function setCreatedDate(\\DateTime $createdDate)\n {\n $this->createdDate = $createdDate;\n return $this;\n }", "public function setCreatedDate(\\DateTime $createdDate)\n {\n $this->createdDate = $createdDate;\n return $this;\n }", "public function setCreatedDate(\\DateTime $createdDate)\n {\n $this->createdDate = $createdDate;\n return $this;\n }", "public function setCreatedDate(\\DateTime $createdDate)\n {\n $this->createdDate = $createdDate;\n return $this;\n }", "public function setCreatedDate(\\DateTime $createdDate)\n {\n $this->createdDate = $createdDate;\n return $this;\n }", "public function setCreatedDate(\\DateTime $createdDate)\n {\n $this->createdDate = $createdDate;\n return $this;\n }", "public function setValue($date = null)\r\n {\r\n if ($date instanceof \\Type\\DateTime)\r\n {\r\n $this->setDay($date->getDay());\r\n $this->setMonth($date->getMonth());\r\n $this->setYear($date->getYear());\r\n $this->setTime($date->getHour(), $date->getMinute(), $date->getSecond());\r\n\r\n return $this;\r\n }\r\n\r\n $this->clean();\r\n\r\n if (!is_null($date))\r\n {\r\n $this->explodeDate($date);\r\n }\r\n\r\n return $this;\r\n }", "public function setCreatedAt(DateTime $createdAt):self\n {\n $this->createdAt = $createdAt;\n return $this;\n }", "public function setCreatedAt(\\DateTime $createdAt) : self\n {\n $this->initialized['createdAt'] = true;\n $this->createdAt = $createdAt;\n return $this;\n }", "public function setData(\\DateTime $data) {\n $this->data = $data;\n return $this;\n }", "public function setDueDate($val)\n {\n $this->_propDict[\"dueDate\"] = $val;\n return $this;\n }", "public function setDateExpiration($DateExpiration)\n {\n $this->DateExpiration = $DateExpiration;\n\n return $this;\n }", "public function setCreateDate($create_date)\n {\n $this->create_date = $create_date;\n\n return $this;\n }" ]
[ "0.83423644", "0.7978316", "0.76280487", "0.71316916", "0.6641158", "0.65859526", "0.6584126", "0.6565608", "0.65510494", "0.65486574", "0.6525574", "0.65180653", "0.65180653", "0.6491724", "0.6490778", "0.6485906", "0.6485906", "0.6485906", "0.6485906", "0.6485906", "0.6485906", "0.6485906", "0.6485906", "0.6485906", "0.6485906", "0.6485906", "0.6485906", "0.6485906", "0.6485906", "0.63740027", "0.6284691", "0.619886", "0.611779", "0.61094874", "0.60683876", "0.60552526", "0.6054321", "0.6019397", "0.6000634", "0.5922105", "0.5849603", "0.58077466", "0.5788197", "0.5786632", "0.5760223", "0.57538515", "0.5753062", "0.5753062", "0.57293636", "0.57209355", "0.5706471", "0.57035834", "0.56736356", "0.5641242", "0.56338924", "0.5628994", "0.5604921", "0.5594167", "0.55558443", "0.5546127", "0.5543738", "0.55431235", "0.5517273", "0.55164856", "0.55095226", "0.55095226", "0.55085206", "0.55076146", "0.55040103", "0.55026776", "0.5502013", "0.54931074", "0.5479213", "0.54790366", "0.54774165", "0.54674065", "0.54595226", "0.54394996", "0.54259586", "0.5417837", "0.541416", "0.54088104", "0.54074866", "0.5400259", "0.53949463", "0.53949463", "0.53949463", "0.53949463", "0.53949463", "0.53949463", "0.53949463", "0.53949463", "0.53949463", "0.53932667", "0.5384235", "0.5374009", "0.5371048", "0.53692716", "0.53689075", "0.53681827" ]
0.77789026
2
Checks if TransactionDate is set
public function isSetTransactionDate() { return !is_null($this->_fields['TransactionDate']['FieldValue']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSetTransactionPostedDate()\n {\n return !is_null($this->_fields['TransactionPostedDate']['FieldValue']);\n }", "public function issetPaymentDate(): bool\n {\n return isset($this->paymentDate);\n }", "public function setTransactionDate($value) {\n\t\tself::$_transactionDate = $value;\n\t}", "public function issetMovementDate(): bool\n {\n return isset($this->movementDate);\n }", "public function isSetEventDate()\n {\n return !is_null($this->_fields['EventDate']['FieldValue']);\n }", "public function hasDate() : bool\n {\n return isset($this->date);\n }", "public function hasDate(): bool\n {\n return isset($this->date);\n }", "public function hasDate(): bool\n {\n return isset($this->date);\n }", "public function setTxnDate($date)\n\t{\n\t\treturn $this->setDateType('TxnDate', $date);\n\t}", "public function isSetTransactionAmount()\n {\n return !is_null($this->_fields['TransactionAmount']['FieldValue']);\n\n }", "public function isSetConfirmedNeedByDate()\n {\n return !is_null($this->_fields['ConfirmedNeedByDate']['FieldValue']);\n }", "private function compare_with_date()\n {\n }", "public function getDateTransaction()\n {\n return $this->dateTransaction;\n }", "public function getTransactionDate() {\n\t\treturn self::$_transactionDate;\n\t}", "private function checkDatesValidity(){\n\t\t$valid=true;\n\t\t$today = date(\"Y-m-d\");\n\t\tif($this->validFrom!=\"\" && $this->validFrom!=\"0000-00-00\" && $today<$this->validFrom) $valid=false;\n\t\tif($this->validUntil!=\"\" && $this->validUntil!=\"0000-00-00\" && $today>$this->validUntil) $valid=false;\n\t\treturn $valid;\n\t}", "public function isSetStartDate()\n {\n return !is_null($this->_fields['StartDate']['FieldValue']);\n }", "public function isSetTransactionId()\n {\n return !is_null($this->_fields['TransactionId']['FieldValue']);\n }", "public function getTransactionDate() \n {\n return $this->_fields['TransactionDate']['FieldValue'];\n }", "public function isSetSortOrderByDate()\n {\n return !is_null($this->_fields['SortOrderByDate']['FieldValue']);\n }", "public function setDateTransaction($dateTransaction)\n {\n $this->dateTransaction = $dateTransaction;\n\n return $this;\n }", "public function getPurchaseRequestValidStartDate()\n\t{\n\t return $this->purchaseRequestValidStartDate;\n\t}", "public function validateDate()\n {\n if (\n ($from = $this->getAvailableFrom()) &&\n ($till = $this->getAvailableTill()) &&\n $from->InPast() &&\n $till->InFuture()\n ) {\n return true;\n }\n\n return false;\n }", "public function setTransactionDate($value) \n {\n $this->_fields['TransactionDate']['FieldValue'] = $value;\n return $this;\n }", "public function isValidPaydate($date);", "public function hasDate() : bool;", "public function hasDate() {\n return $this->_has(3);\n }", "public function hasExpirationDate()\n {\n return isset($this->user_expiration);\n }", "protected function checkCreateDate(&$inMessage = '') {\n\t\t$isValid = true;\n\t\tif ( !is_string($this->_CreateDate) && $this->_CreateDate !== '' ) {\n\t\t\t$inMessage .= \"{$this->_CreateDate} is not a valid value for CreateDate\";\n\t\t\t$isValid = false;\n\t\t}\n\t\treturn $isValid;\n\t}", "public function isSetPostedDate()\n {\n return !is_null($this->_fields['PostedDate']['FieldValue']);\n }", "public function isSetPostedDate()\n {\n return !is_null($this->_fields['PostedDate']['FieldValue']);\n }", "public static function isDeclinedToday(Transaction $transaction)\n {\n $declinedTransaction = static::find()\n ->byCharge($transaction)\n ->orderLast()\n ->one();\n\n if (!$declinedTransaction) {\n return false;\n }\n\n return ($declinedTransaction->isDayPassed() === false);\n }", "public function is_date()\n {\n }", "function started(){\n\t\treturn !is_null($this->g(\"payment_transaction_started_at\"));\n\t}", "private function checkEventDateNotDue(){\n $event = Event::find($this->id);\n $now = Carbon::now();\n \n $startTime = Carbon::createFromFormat('Y-m-d H:i:s', $event->start_time);\n return $startTime->gt($now);\n }", "public function isNotFillFirstStartDate () {\n return '0000-00-00' == $this->first_start_date;\n }", "public function testSetDateTransfert() {\n\n // Set a Date/time mock.\n $dateTransfert = new DateTime(\"2018-09-10\");\n\n $obj = new FichesControlesEntetes();\n\n $obj->setDateTransfert($dateTransfert);\n $this->assertSame($dateTransfert, $obj->getDateTransfert());\n }", "public function getDATE_VALIDITE()\n {\n return $this->DATE_VALIDITE;\n }", "public function isValidDate() {\n\t\t// TODO\n\t\treturn TRUE;\n\t}", "public function setDate()\n\t{\n\t\tif ($this->getIsNewRecord())\n\t\t\t$this->create_time = time();\n\t}", "public function validateDate(){\n \t$attrs = ['requested_at', 'replied_at', 'fixed_begin', 'fixed_end'];\n \tforeach ($attrs as $a){\n \t\tif (is_array($d = $this->getAttribute($a)) && array_key_exists('date', $d) && array_key_exists('time', $d)){\n \t\t\t$fmt = ['Y-m-d H:i:s', 'Y-m-d H:i', 'Y-m-d H', 'Y-m-d '];\n \t\t\tforeach ($fmt as $f){\n\t \t\t\t$date = \\DateTime::createFromFormat($f, $d['date'] . ' ' . $d['time']);\n\t \t\t\tif (is_object($date)){\n\t \t\t\t\t$this->setAttribute($a, $date->format('Y-m-d H:i:s'));\n\t \t\t\t\tbreak;\n\t \t\t\t}\n \t\t\t}\n \t\t}\n \t}\n }", "public function isTransactionPart()\n {\n return $this->_transaction != null;\n }", "protected function checkUpdateDate(&$inMessage = '') {\n\t\t$isValid = true;\n\t\tif ( !is_string($this->_UpdateDate) && $this->_UpdateDate !== '' ) {\n\t\t\t$inMessage .= \"{$this->_UpdateDate} is not a valid value for UpdateDate\";\n\t\t\t$isValid = false;\n\t\t}\n\t\treturn $isValid;\n\t}", "public function getPurchaseRequestRequiredDate()\n\t{\n\t return $this->purchaseRequestRequiredDate;\n\t}", "public function isSetTransactionSerialNumber()\n {\n return !is_null($this->_fields['TransactionSerialNumber']['FieldValue']);\n }", "public function issetMovementStartTime(): bool\n {\n return isset($this->movementStartTime);\n }", "public function getPurchaseRequestValidEndDate()\n\t{\n\t return $this->purchaseRequestValidEndDate;\n\t}", "public function check()\r\n\t{\r\n\t\tif(!$this->active)\r\n\t\t{\r\n\t\t\t// Activate it with a default value\r\n\t\t\t$this->setType('');\r\n\t\t}\r\n\t\t\r\n\t\t$nullDate\t= $this->_db->getNullDate();\r\n\t\tif (empty($this->modified_date) || $this->modified_date == $nullDate)\r\n\t\t{\r\n\t\t\t$date = JFactory::getDate();\r\n\t\t\t$this->modified_date = $date->toMysql();\r\n\t\t}\r\n\t\tif (empty($this->created_date) || $this->created_date == $nullDate)\r\n\t\t{\r\n\t\t\t$date = JFactory::getDate();\r\n\t\t\t$this->created_date = $date->toMysql();\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "public function checkValidity()\n {\n // le pb est que la propriété publicationDate est de type dateTime or les tests initiaux\n // se basent sur un format de type date --> ce qui génère une erreur de type notice\n \n return true;\n }", "private function validateCreatedAt()\n {\n try {\n new DateTime($this->created_at);\n return true;\n } catch (Exception $e) {\n return false;\n }\n }", "private function CheckStartFinishDate()\n\t{\n\t\t$start_date = MicroGrid::GetParameter('start_date', false);\n\t\t$finish_date = MicroGrid::GetParameter('finish_date', false);\n\t\t\n\t\tif($start_date > $finish_date){\n\t\t\t$this->error = _START_FINISH_DATE_ERROR;\n\t\t\treturn false;\n\t\t}\t\n\t\treturn true;\t\t\n\t}", "public function isSetDateFormat()\n {\n return $this->setDateFormat;\n }", "function validateDate($date)\n\t\t{\n\t\t\t$d = DateTime::createFromFormat('Y-m-d', $date);\n\t\t\treturn $d && $d->format('Y-m-d') == $date;\n\t\t}", "function validateDate($date)\n\t\t{\n\t\t\t$d = DateTime::createFromFormat('Y-m-d', $date);\n\t\t\treturn $d && $d->format('Y-m-d') == $date;\n\t\t}", "public function setCurrentLoanRepaymentExpectedDate()\n {\n if (!empty($this->current_loan_details)) {\n $date_time_add_month_str = '+' . $this->current_loan_details['loans'][0]['terms']['repayment_term'] . ' month';\n // Instantiate a DateTime object\n $date_time_zone = new DateTimeZone('UTC');\n $date = new DateTime(\"2017-02-13T05:40:05Z\", $date_time_zone);\n $date->modify(\"$date_time_add_month_str\");\n $this->currentLoanRepaymentExpectedDate = $date->format('Y-m-d H:i:s');\n \n return true;\n }\n \n return false; // hopefully not\n }", "public function valid()\n {\n return $this->_current !== null\n && $this->_current->getTimestamp() < $this->_endDate->getTimestamp();\n }", "final private function __isTransaction()\n\t{\n\t\tif( ! $this->transaction )\n\t\t{\n\t\t\tthrow new \\Exception('Do not using transaction.', 421);\n\t\t}\n\t}", "public function isTransaction()\n {\n return $this->_isTransaction;\n }", "public static function isEmptyDate($date = null)\n {\n if (!empty($date) && $date != '0000-00-00 00:00:00' && $date != '0000-00-00') {\n return false;\n }\n return true;\n }", "public function setDate()\n\t{\n\t\tif($this->isNewRecord)\n\t\t\t$this->create_time=$this->update_time=time();\n\t\telse\n\t\t\t$this->update_time=time();\n\t}", "public function setDate()\n\t{\n\t\tif($this->isNewRecord)\n\t\t\t$this->create_time=$this->update_time=time();\n\t\telse\n\t\t\t$this->update_time=time();\n\t}", "public function getTransactionDateAttribute(){\n return $this->format_date($this->attributes['transaction_date']);\n }", "public function testSetSignDate() {\n\n // Set a Date/time mock.\n $signDate = new DateTime(\"2018-09-10\");\n\n $obj = new AttestationCacm();\n\n $obj->setSignDate($signDate);\n $this->assertSame($signDate, $obj->getSignDate());\n }", "public function isSetEndDate()\n {\n return !is_null($this->_fields['EndDate']['FieldValue']);\n }", "private function validate_booking(): bool {\n\t $this->errors = array();\n\n // Clear data using test_input function\n foreach ($this->request->post as $key => $value) {\n $this->request->post[$key] = self::test_input($this->request->post[$key]);\n }\n\n // Time\n if(!(preg_match(\"/^(?:2[0-3]|[01][0-9]):[0-5][0-9]$/\", $this->request->post[\"time\"]))){\n array_push($this->errors,$this->language->get('time_error'));\n }\n\n // Date\n $temp = new DateTime();\n\n // Create date object (without time)\n $date = DateTime::createFromFormat('Y-m-d', $this->request->post[\"date\"]);\n\n // Remove time from datetime string\n $now = DateTime::createFromFormat(\"Y-m-d\", $temp->format(\"Y-m-d\"));\n\n // Extract data\n $year = $date->format(\"Y\");\n $month = $date->format(\"m\");\n $day = $date->format(\"d\");\n\n if($date < $now){\n array_push($this->errors,$this->language->get('date_past_error'));\n }\n else if(!checkdate($month,$day,$year)) {\n //$this->errors[\"date\"] = $this->language->get('date_error');\n array_push($this->errors,$this->language->get('date_value_error'));\n }\n\n //TODO: REMOVE\n return count($this->errors) == 0;\n }", "function isDateValid($dateInput){\n\t\t$d = DateTime::createFromFormat('Y-m-d', $dateInput);\n\t\treturn $d && $d->format('Y-m-d') === $dateInput;\n\t}", "public function checkDateVisit(){\n $yearError = new DaYearError($this->record[\"DateVisit\"]);\n if($yearError->getErrorType() != DaYearError::ERR_NONE){\n $this->addError(\"[DateVisit] invalid: \\\"{$yearError}\\\" \");\n return false;\n }\n return true;\n }", "public function isEqualTo(Tiramizoo_Shipping_Model_Date $date)\n {\n return $this->getTimestamp() == $date->getTimestamp();\n }", "public function contract_boot_create_start_date_null_if_empty()\n {\n $this->assertNull(self::$contract->start_date);\n }", "public function checkDateWithInvalidDateValuesDataProvider() {}", "public function isTransaction(): bool\n {\n return $this->inTransaction();\n }", "public function setTokenValidDate()\n {\n $this->tokenValidDate = new DateTime('+ 2 hours');\n }", "public function hasCreatetime(){\n return $this->_has(1);\n }", "public function hasPubDate(): bool\n {\n return null !== $this->pubDate;\n }", "public function beforeValidate()\n {\n if (!parent::beforeValidate()) {\n return false;\n }\n\n if (!$this->userID) {\n $this->userID = Yii::$app->user->id;\n }\n if (!$this->date) {\n $this->date = Yii::$app->time->getCurrentDateTime();\n }\n\n return true;\n }", "public function hasTransactions();", "public function isInTransaction();", "public function getIsTransaction()\n {\n return $this->isTransaction;\n }", "public function BeforeInsertRecord()\n\t{\n\t\tif(!$this->CheckStartFinishDate()) return false;\n\t\tif(!$this->CheckDateOverlapping()) return false;\n\t\treturn true;\n\t}", "public function getDateTransfert(): ?DateTime {\n return $this->dateTransfert;\n }", "public function testGetCreateDate()\n {\n $this->assertEquals($this->attributes->{'create date'}, \n $this->user->getCreateDate());\n }", "public function getCreateDate()\n {\n $this->create_date = null;\n\n return;\n }", "public function isToday()\n {\n \t$today = new Tiramizoo_Shipping_Model_Date();\n \treturn $this->get('Y-m-d') == $today->get('Y-m-d');\n }", "public function hasExpirationDate()\n {\n if (empty($this->expires_at)) {\n return null;\n }\n\n return ($this->expires_at instanceof Carbon)\n ? true\n : false;\n }", "private function validate_expiry_date() {\n\t\tif ( $this->expiry_date && current_time( 'timestamp' ) > $this->expiry_date ) {\n\t\t\tthrow new Exception( $error_code = self::E_WC_COUPON_EXPIRED );\n\t\t}\n\t}", "public function canResetShippingDate()\n {\n $oOrder = oxNew(\"oxorder\");\n $blCan = false;\n if ($oOrder->load($this->getEditObjectId())) {\n $blCan = $oOrder->oxorder__oxstorno->value == \"0\" &&\n !($oOrder->oxorder__oxsenddate->value == \"0000-00-00 00:00:00\" || $oOrder->oxorder__oxsenddate->value == \"-\");\n }\n\n return $blCan;\n }", "public function hasTimestamp(): bool\n {\n return isset($this->timestamp);\n }", "function validate_date($date) {\n $d = \\DateTime::createFromFormat('Y-m-d', $date);\n return $d && $d->format('Y-m-d') === $date;\n }", "public function isInvoiced() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->invoiceDate) ? false: true;\r\n\t}", "public function isDelivered() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->deliveryDate) ? false: true;\r\n\t}", "public function isCreated() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->creationDate) ? false: true;\r\n\t}", "function set_change_sale_date_enable() {\n $this->sale_lib->set_change_sale_date_enable($this->input->post('change_sale_date_enable'));\n if (!$this->sale_lib->get_change_sale_date()) {\n $this->sale_lib->set_change_sale_date(date(get_date_format()));\n }\n }", "public function post_dated(){ \n\t\tif(strtotime($this->format_date_save($this->data['HrPermission']['per_date'])) < strtotime(date('Y-m-d'))){\t\t\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t}", "public function isSetCreatedBefore()\n {\n return !is_null($this->_fields['CreatedBefore']['FieldValue']);\n }", "public function checkDateWithTypo3DateSyntaxDataProvider() {}", "function birthdate_required()\n\t\t{\n\t\t\tglobal $config;\n\n\t\t\treturn ($config['allow_birthdays'] == BIRTHDATE_REQUIRE || $config['allow_birthdays'] == BIRTHDATE_LOCKED);\n\t\t}", "public function is_set()\n {\n return parent::is_set() || $this->has_filter_property(self::FILTER_FREQUENCY) ||\n $this->has_date(self::FILTER_START_DATE) || $this->has_date(self::FILTER_END_DATE);\n }", "public static function isNotifiedToday(Transaction $transaction)\n {\n $query = static::find()\n ->byStudent($transaction->student);\n\n if ($transaction->tutor) {\n $query->byTutor($transaction->tutor);\n }\n\n return $query->exceptCharge($transaction->getRootParent())\n ->declinedToday()\n ->exists();\n }", "protected function isActivatedViaStartDateAndTime() {}", "public function hasPassed() {\n \treturn $this < new \\DateTime();\n }", "function validate(){\n $errors = array();\n\n // throw message indicating that this field is numeric\n if( $this->post->isNumeric('noOfTransactions')==false){\n $errors[] = $this->Raxan->locale(\"request.missing.transcount\");\n }\n // throw message indicating that this field is date\n if( $this->post->isDate(\"startDate\",\"Y-m-d\" )==false){\n $errors[] = $this->Raxan->locale(\"request.missing.startdate\");\n }\n // throw message indicating that this field is date\n if( $this->post->isDate( \"endDate\",\"Y-m-d\" )==false ){\n $errors[] = $this->Raxan->locale(\"request.missing.enddate\");\n }\n\n if(!empty ($errors)) {\n $this->postMessage($errors, \"Request History\");\n }\n return (count($errors) == 0);\n }" ]
[ "0.69332784", "0.6855565", "0.65742403", "0.65198755", "0.6270264", "0.624418", "0.6243844", "0.6243844", "0.61545384", "0.5987248", "0.596079", "0.5952231", "0.594129", "0.5886225", "0.5831047", "0.5816786", "0.578498", "0.5769643", "0.574846", "0.5746798", "0.57334036", "0.57298046", "0.5728645", "0.5678156", "0.5665089", "0.56505185", "0.5638242", "0.56284595", "0.5626862", "0.5626862", "0.56109184", "0.56026053", "0.55973494", "0.55744666", "0.55578965", "0.5550755", "0.55408734", "0.5533891", "0.54904777", "0.54858863", "0.5472683", "0.54367435", "0.5420924", "0.54062873", "0.5381546", "0.537905", "0.5354452", "0.5349635", "0.5347934", "0.53349024", "0.5331203", "0.53229123", "0.53229123", "0.5321736", "0.5319267", "0.53095627", "0.5308176", "0.5302749", "0.53024334", "0.53024334", "0.5291504", "0.528784", "0.5270906", "0.5270295", "0.5263914", "0.5236829", "0.52242166", "0.5223201", "0.52211696", "0.5196986", "0.5192569", "0.5191918", "0.51876295", "0.51830983", "0.5180877", "0.5173067", "0.51707065", "0.51692045", "0.51690483", "0.51650846", "0.51623064", "0.5161622", "0.515075", "0.5146717", "0.51405627", "0.51336044", "0.5128855", "0.51218516", "0.51189053", "0.5118429", "0.5118225", "0.5108912", "0.5089394", "0.508177", "0.5081714", "0.5077988", "0.5074643", "0.50676703", "0.50633967", "0.50616914" ]
0.8191195
0
Gets the value of the TransactionSerialNumber property.
public function getTransactionSerialNumber() { return $this->_fields['TransactionSerialNumber']['FieldValue']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSerialNumber()\n {\n return $this->serialNumber;\n }", "public function getSerialNumber() {\n\t\treturn self::$_serialNumber;\n\t}", "public function setTransactionSerialNumber($value) \n {\n $this->_fields['TransactionSerialNumber']['FieldValue'] = $value;\n return $this;\n }", "public function getSerialNumber() {\n if ($this->serial) {\n return $this->serial;\n }\n if (is_array($this->rawData)) {\n $this->serial = $this->rawData[\"serial number\"];\n if (!$this->serial) { \n $this->serial = $this->rawData[\"серийный номер\"];\n }\n if (!$this->serial) { \n $this->serial = $this->rawData[12]; // CP-3911\n }\n }\n return $this->serial;\n }", "public function getDeviceSerialNumber()\n {\n return $this->deviceSerialNumber;\n }", "public function getSerialId()\n\t{\n\n\t\treturn $this->serial_id;\n\t}", "public function getTransactionNumber();", "public function getSerialNo(): ?string {\n return $this->serialNo;\n }", "public function getSerialId()\n {\n return $this->get(self::_SERIAL_ID);\n }", "public function getTransactionIdentifier()\n {\n return $this->transactionIdentifier;\n }", "public function getTransactionId()\n {\n return $this->transactionIdentifier;\n }", "public function getHexSerialNumber()\n {\n return $this->hex_serial_number;\n }", "public function getTransactionId() {\n return $this->transactionId;\n }", "public function getTransactionId()\n {\n return $this->transactionId;\n }", "public function getTransactionId(): string\n {\n return $this->transactionId;\n }", "public function getSerial()\n {\n if (isset($this->serial)) {\n return $this->serial;\n }\n\n throw new RuntimeException(\"Unable to create Invoice: serial not set.\");\n }", "public function getSequenceNumber()\n {\n return $this->sequenceNumber;\n }", "public function getSequenceNumber()\n {\n return $this->sequenceNumber;\n }", "public function getTransactionId()\n {\n return $this->data['ORDERINFO']['ORDERNUMBER'];\n }", "public function getTransactionId() { return $this->transactionId; }", "public function get_sequence_no() {\n\n\t\treturn $this->sequence_no;\n\t}", "public function getTxnID()\n\t{\n\t\treturn $this->get('TxnID');\n\t}", "public function getTransactionId() {\n return $this->transactionId;\n }", "public function getTransactionId()\n {\n return $this->transaction_id;\n }", "public function getTransactionId()\n {\n return $this->transaction_id;\n }", "public function getTransactionId()\n {\n return $this->transaction_id;\n }", "public function getTransactionId()\n {\n return isset($this->transaction['transactionId']) ? $this->transaction['transactionId'] : '';\n }", "public function getSequenceNumber()\n {\n return $this->sequence_number;\n }", "public function getSequenceNumber()\n {\n return $this->sequence_number;\n }", "public function getTransactionID()\r\n\t{\r\n\t\treturn $this->root->getAttribute('transactionid');\r\n\t}", "public function getTransactionXID()\n {\n return $this->transactionXID;\n }", "public function getSerialNumber(): ?string {\n $val = $this->getBackingStore()->get('serialNumber');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'serialNumber'\");\n }", "public function getTransactionID()\n\t{\n\t\treturn $this->transaction_id;\n\t}", "public function withTransactionSerialNumber($value)\n {\n $this->setTransactionSerialNumber($value);\n return $this;\n }", "public function getCertificateSerialNumber(): ?string {\n $val = $this->getBackingStore()->get('certificateSerialNumber');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'certificateSerialNumber'\");\n }", "public function isSetTransactionSerialNumber()\n {\n return !is_null($this->_fields['TransactionSerialNumber']['FieldValue']);\n }", "public function getTransactioncode()\n {\n return isset($this->Transactioncode) ? $this->Transactioncode : null;\n }", "public function getSequence_no()\n {\n return $this->sequence_no;\n }", "public function getReceiptNo()\n {\n return $this->receipt_no;\n }", "public function get_serialNumber(): string\n {\n // $res is a string;\n // $dev is a YDevice;\n if ($this->_cacheExpiration == 0) {\n $dev = $this->_getDev();\n if (!($dev == null)) {\n return $dev->getSerialNumber();\n }\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::SERIALNUMBER_INVALID;\n }\n }\n $res = $this->_serialNumber;\n return $res;\n }", "public function get_transaction_id() {\n\n\t\treturn $this->transaction_tag;\n\t}", "public function getTransactionID(): string\n {\n return (string) $this->transactionID;\n }", "public function getTransactionId() \n {\n return $this->_fields['TransactionId']['FieldValue'];\n }", "public function getTransactionId()\n {\n $value = $this->get(self::TRANSACTION_ID);\n\n return $value === null ? (int) $value : $value;\n }", "public function getTxId()\n {\n return $this->tx_id;\n }", "public function getSerial() : int\n {\n return $this->getValue('nb_domain_zone_serial');\n }", "function getTxnId() {\n return $this->txn_id;\n }", "public function serial() {\n\t\tif(is_null($this->serial))\n\t\t\tthrow new DataAuthenticatorException('Unable to find a valid serial');\n\t\treturn $this->serial;\n\t}", "public function getTxid()\n {\n return $this->txid;\n }", "public function serialNumber($serialNumber)\n {\n return $this->setProperty('serialNumber', $serialNumber);\n }", "public function getTransactionSignature()\n {\n return $this->transactionSignature;\n }", "public function getTransactionId()\n {\n return $this->transactionId++;\n }", "public function getTransactionAmount()\n {\n return $this->transactionAmount;\n }", "public function getTransactionID();", "public function getPurchaseOrderNumber()\n {\n return isset($this->purchase_order_number) ? $this->purchase_order_number : null;\n }", "public function getSubserial()\n\t{\n\n\t\treturn $this->subserial;\n\t}", "function get_transaction_id()\n {\n return $this->platnosci_post_vars['txn_id']; \n }", "public function getTransactionRecord()\n {\n return $this->transactionRecord;\n }", "public function getPayNumTrans()\n {\n return $this->payNumTrans;\n }", "public function get_transaction_id() {\n\n\t\treturn $this->is_credit_card_response() && isset( $this->response->paymentMethod, $this->response->paymentMethod->verification ) ? $this->response->paymentMethod->verification->id : null;\n\t}", "function getSubjectsNumber() {\n\t\treturn $this->getData('subjectsNumber');\n\t}", "public function getSequenceNumber();", "public function getSequenceNumber();", "public function getRevisionNumber()\n {\n return $this->revision_number;\n }", "public function getTransaction()\n {\n return $this->transaction;\n }", "public function getTransaction()\n {\n return $this->transaction;\n }", "public function getTransaction()\n {\n return $this->transaction;\n }", "public function getTransaction()\r\n\t{\r\n\t\treturn $this->transaction;\r\n\t}", "public function getInfoSerialNumber() {\n //\n // 3COM\n return PNMSnmp::get($this, '1.3.6.1.2.1.47.1.1.1.1.11.1', Yii::app()->params['cacheTtlGetSnmp']);\n }", "public function getTransactionId();", "public function getTransactionId();", "public function setSerialNumber($value) {\n\t\tself::$_serialNumber = $value;\n\t}", "public function getPlateNumber()\n {\n return $this->plateNumber;\n }", "public function getTransactionIndex()\n {\n return $this->transactionIndex;\n }", "public function getTransactionReference()\n {\n if(isset($this->data['properties'])) {\n $properties = $this->data['properties'];\n $paymentIdProperty = array_filter($properties, function ($item) {\n return $item['name'] === 'PAYMENT_ID';\n });\n if (isset($paymentIdProperty[0]['value'])) {\n return (string)$paymentIdProperty[0]['value'];\n }\n };\n\n return null;\n }", "public function getTransactionId(): string;", "public function getTransactionReference()\n {\n return $this->transactionReference;\n }", "public function getTxSerialHardware()\n\t{\n\t\treturn $this->tx_serial_hardware;\n\t}", "public function getTransactionReference()\n {\n return $this->getDataItem('transactionReference');\n }", "public function getItenerarySequenceNumber()\n {\n return $this->ItenerarySequenceNumber;\n }", "public function getStreetNumber() {\n\t\treturn $this->streetNumber;\n\t}", "public function getTransactionCCNumber()\n {\n if (empty($this->transactionId)) {\n throw new MerchantException('Transaction ID must be set to use this method.');\n }\n\n $result = $this->getMTRInfo();\n if ($result === false) {\n return false;\n }\n\n if (!isset($result['authorizing_pfp_index'])\n || !isset($result['pfp_transactions'][$result['authorizing_pfp_index']])) {\n throw new MerchantException(\"Transaction $transactionId no cc log authorizing trans found\");\n }\n\n $authorizingPFPTransaction = $result['pfp_transactions'][$result['authorizing_pfp_index']];\n\n $requestData = json_decode($authorizingPFPTransaction['raw_request'], true);\n return $requestData['ACCT'];\n }", "public function getTxDetails()\n {\n return $this->txDetails;\n }", "public function getNumber() {\n return $this->number;\n }", "public function getRevision()\n {\n return $this->systemProperties->getRevision();\n }", "public function getFlexiBookNumber()\n {\n return isset($this->flexiBookNumber) ? $this->flexiBookNumber : null;\n }", "public function getSequenceNumeric()\n {\n return $this->sequenceNumeric;\n }", "public function getOrderno()\n {\n return $this->orderno;\n }", "public function getTransactionAmount() \n {\n return $this->_fields['TransactionAmount']['FieldValue'];\n }", "public function getNumber()\n {\n return $this->number;\n }", "public function getAccountNo()\n {\n return $this->accountNo;\n }", "public function getVendorPartNumber(): string\n {\n return $this->vendorPartNumber;\n }", "public function getSequence()\n {\n return $this->sequence;\n }", "public function getNumber()\n {\n return $this->number;\n }", "public function getNumber()\n {\n return $this->number;\n }", "public function getNumber()\n {\n return $this->number;\n }", "public function getNumber()\n {\n return $this->number;\n }", "public function getNumber()\n {\n return $this->number;\n }", "public function getNumber()\n {\n return $this->number;\n }", "public function getNumber()\n {\n return $this->number;\n }" ]
[ "0.78678876", "0.7796591", "0.72673583", "0.7085732", "0.703391", "0.6638911", "0.6625839", "0.6535014", "0.6534574", "0.6502947", "0.6418346", "0.63189894", "0.6315975", "0.6288073", "0.6274891", "0.6246662", "0.6237993", "0.6237993", "0.6216595", "0.62128127", "0.6210147", "0.62065107", "0.6198945", "0.61963564", "0.61963564", "0.61963564", "0.61954653", "0.61839366", "0.61839366", "0.6177305", "0.6167495", "0.6122011", "0.61173886", "0.6088077", "0.6074742", "0.60715324", "0.60483557", "0.60399055", "0.602553", "0.6006257", "0.5998159", "0.5972374", "0.590236", "0.58930534", "0.5844689", "0.57914764", "0.57715803", "0.57013124", "0.5671204", "0.56186426", "0.5597585", "0.5595923", "0.55661017", "0.5542572", "0.55396086", "0.5533269", "0.55108106", "0.54999757", "0.54612905", "0.54512733", "0.54488146", "0.5448295", "0.5448295", "0.5439079", "0.54353034", "0.54353034", "0.54353034", "0.54264987", "0.5420312", "0.54096985", "0.54096985", "0.540097", "0.53777426", "0.5348769", "0.53450114", "0.53238875", "0.5319202", "0.53134066", "0.5294806", "0.5293788", "0.5285264", "0.5280324", "0.52786434", "0.5273343", "0.5271822", "0.5268727", "0.5260974", "0.5248756", "0.5226553", "0.5225022", "0.521987", "0.5209189", "0.5206231", "0.5202455", "0.5202455", "0.5202455", "0.5202455", "0.5202455", "0.5202455", "0.5202455" ]
0.86894405
0
Sets the value of the TransactionSerialNumber property.
public function setTransactionSerialNumber($value) { $this->_fields['TransactionSerialNumber']['FieldValue'] = $value; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setSerialNumber($value) {\n\t\tself::$_serialNumber = $value;\n\t}", "public function withTransactionSerialNumber($value)\n {\n $this->setTransactionSerialNumber($value);\n return $this;\n }", "public function setDeviceSerialNumber($deviceSerialNumber)\n {\n $this->deviceSerialNumber = $deviceSerialNumber;\n }", "public function setSerialNumber(string $serialNumber)\n {\n $this->serialNumber = $serialNumber;\n\n return $this;\n }", "public function setSerialNumber(?string $value): void {\n $this->getBackingStore()->set('serialNumber', $value);\n }", "public function setCertificateSerialNumber(?string $value): void {\n $this->getBackingStore()->set('certificateSerialNumber', $value);\n }", "public function setSerialNumber($serialNumber) {\r\n $this->_input->getCertificate->setSerialNumber($serialNumber);\r\n return $this;\r\n }", "public function serialNumber($serialNumber)\n {\n return $this->setProperty('serialNumber', $serialNumber);\n }", "private function set_serial($serial) {\n\t\t$this->set_region(substr($serial, 0, 2));\n\t\t$this->serial = $serial;\n\t}", "public function setTransactionNumber($transaction_number);", "public function getTransactionSerialNumber() \n {\n return $this->_fields['TransactionSerialNumber']['FieldValue'];\n }", "public function setSequenceNumber($var)\n {\n GPBUtil::checkInt64($var);\n $this->sequence_number = $var;\n }", "public function isSetTransactionSerialNumber()\n {\n return !is_null($this->_fields['TransactionSerialNumber']['FieldValue']);\n }", "public function getSerialNumber()\n {\n return $this->serialNumber;\n }", "public function setSerial($v)\n\t{\n\n\n\t\tif ($v === null) {\n\t\t\t$this->setSerialId(NULL);\n\t\t} else {\n\t\t\t$this->setSerialId($v->getId());\n\t\t}\n\n\n\t\t$this->aSerial = $v;\n\t}", "public function setSequenceNumber($var)\n {\n GPBUtil::checkInt64($var);\n $this->sequence_number = $var;\n\n return $this;\n }", "public function setTransaction(Transaction $transaction)\n {\n $this->transaction = $transaction;\n }", "public function setTransaction(Transaction $transaction)\n {\n $this->transaction = $transaction;\n }", "public function setBusNo(string $busNo) : void\n {\n $this->busNo = $busNo; \n }", "public function setHexSerialNumber($var)\n {\n GPBUtil::checkString($var, True);\n $this->hex_serial_number = $var;\n\n return $this;\n }", "public function getSerialNumber() {\n\t\treturn self::$_serialNumber;\n\t}", "public function setSerialNo(?string $serialNo): Card {\n $this->serialNo = $serialNo;\n return $this;\n }", "public function setSequenceNumber($number) {\n\t\t$this->sequence = $number;\n\t\t// create the field\n\t\t$field = new ACHRecordField([84,87], $this->sequence);\n\t\t\n\t\t// add padding to the number\n\t\t$field->addPadding('0');\n\n\t\t// add the field.\n\t\t$this->addField( $field );\n\t}", "public function setSequenceNumber($sequenceNumber)\n {\n $this->sequenceNumber = $sequenceNumber;\n return $this;\n }", "public function setSequenceNumber($sequenceNumber)\n {\n $this->sequenceNumber = $sequenceNumber;\n return $this;\n }", "public function getDeviceSerialNumber()\n {\n return $this->deviceSerialNumber;\n }", "public function setTicketNumber(?string $value): void {\n $this->getBackingStore()->set('ticketNumber', $value);\n }", "public function setSerial(int $serial = 1) : CNabuDataObject\n {\n if ($serial === null) {\n throw new ENabuCoreException(\n ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,\n array(\"\\$serial\")\n );\n }\n $this->setValue('nb_domain_zone_serial', $serial);\n \n return $this;\n }", "public final function setTransaction(iTransaction $transaction) {\n $this->_transaction = $transaction;\n }", "public function setNumber($number)\n {\n $this->_number = $number;\n }", "public function setNumber($number) {\n $this->_number = $number;\n }", "function isValidSerialNumber($serialNumber) {\n\tunset($serialNumber);\n\treturn true;\n}", "public function setEntryDetailSequenceNumber( $number ) {\n\t\t$this->entryDetailSequence = $number;\n\t\t$this->addField( new ACHRecordField([88,94], $this->entryDetailSequence));\n\t}", "public function setSequenceNumberAction($sequenceNumberAction)\n {\n $this->_sequenceNumberAction = $sequenceNumberAction;\n }", "public function setNumber($number)\n {\n $this->number = $number;\n }", "public function setSerialId($value)\n {\n return $this->set(self::_SERIAL_ID, $value);\n }", "public function setMobileNumber($mobileNumber);", "function setBankReceiptNumber($num)\n {\n $this->bank_receipt = $num;\n }", "private function setSequence(): void\n {\n $this->sequence = $this->getSequence();\n }", "protected function setTransactionKey()\n {\n $payment = $this->order->getPayment();\n $originalKey = AbstractMethod::BUCKAROO_ORIGINAL_TRANSACTION_KEY_KEY;\n $transactionKey = $this->getTransactionKey();\n\n if (!$payment->getAdditionalInformation($originalKey) && strlen($transactionKey) > 0) {\n $payment->setAdditionalInformation($originalKey, $transactionKey);\n }\n }", "public function setSerialId($v)\n\t{\n\r\n\t\t// Since the native PHP type for this column is integer,\r\n\t\t// we will cast the input value to an int (if it is not).\r\n\t\tif ($v !== null && !is_int($v) && is_numeric($v)) {\r\n\t\t\t$v = (int) $v;\r\n\t\t}\r\n\n\t\tif ($this->serial_id !== $v) {\n\t\t\t$this->serial_id = $v;\n\t\t\t$this->modifiedColumns[] = MmPeer::SERIAL_ID;\n\t\t}\n\n\t\tif ($this->aSerial !== null && $this->aSerial->getId() !== $v) {\n\t\t\t$this->aSerial = null;\n\t\t}\n\n\t}", "public function _set($number) {\n\t\t$this->number = $number;\n\t\t$this->id = $this->id_base . '-' . $number;\n\t}", "public function transactionNum($value) {\n $this->annotations['transaction_num'] = $value;\n return $this;\n }", "public function getSerialNumber() {\n if ($this->serial) {\n return $this->serial;\n }\n if (is_array($this->rawData)) {\n $this->serial = $this->rawData[\"serial number\"];\n if (!$this->serial) { \n $this->serial = $this->rawData[\"серийный номер\"];\n }\n if (!$this->serial) { \n $this->serial = $this->rawData[12]; // CP-3911\n }\n }\n return $this->serial;\n }", "public function _set($number)\n {\n }", "public function setQuantity(int $quantity): void\n {\n $this->_quantity = $quantity;\n }", "public function setRevision($_revision)\n {\n $this->_revision = null !== $_revision ? (int)$_revision : null;\n }", "public function setStreetNumber($streetNumber) {\n\t\t$this->streetNumber = $streetNumber;\n\t}", "public function setFlexiBookNumber($flexiBookNumber = null)\n {\n // validation for constraint: string\n if (!is_null($flexiBookNumber) && !is_string($flexiBookNumber)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($flexiBookNumber, true), gettype($flexiBookNumber)), __LINE__);\n }\n if (is_null($flexiBookNumber) || (is_array($flexiBookNumber) && empty($flexiBookNumber))) {\n unset($this->flexiBookNumber);\n } else {\n $this->flexiBookNumber = $flexiBookNumber;\n }\n return $this;\n }", "public function setArticleNumber($articleNumber)\n {\n if ($this->_validation->validateIsString($articleNumber)) {\n $this->_articleNumber = $articleNumber;\n } else {\n throw new PiRatepay_Paypage_Util_ValidationException(115);\n }\n }", "public function store(CASerialNumberRequest $request)\n\t{\n\t\t//\n if(count(CASerialNumber::all()) > 0)\n {\n\n\n $csaerialNumber=CASerialNumber::all()->first();\n $csaerialNumber->startno= $request->serial_no;\n $csaerialNumber->save();\n }\n else\n {\n $csaerialNumber=new CASerialNumber;;\n $csaerialNumber->startno= 1;\n $csaerialNumber->save();\n }\n\n\n\n return redirect('serialno');\n\t}", "public function setBatchNo($batch_no)\n {\n $this->_batch_no = $batch_no;\n }", "public function setTransactionIdentifier($transactionIdentifier)\n {\n $this->transactionIdentifier = $transactionIdentifier;\n return $this;\n }", "public function setTxnID($value)\n\t{\n\t\treturn $this->set('TxnID', $value);\n\t}", "public function setVatNumber(string $vatNumber):void\n {\n $this->vatNumber = $vatNumber;\n }", "public function setNumberParallel($number)\n {\n if ($number < 1) {\n throw new \\InvalidArgumentException('Number has to be > 0.');\n }\n $this->number_parallel = (integer)$number;\n }", "function setSubjectsNumber($subjectsNumber) {\n\t\treturn $this->setData('subjectsNumber', $subjectsNumber);\n\t}", "public function setOrderNumber($number) {\n\n $this->jsonData['OrderNumber'] = $this->validateNumber($number, 64);\n }", "public function getSerialId()\n\t{\n\n\t\treturn $this->serial_id;\n\t}", "public function setSubserial($v)\n\t{\n\n\t\tif ($this->subserial !== $v || $v === false) {\n\t\t\t$this->subserial = $v;\n\t\t\t$this->modifiedColumns[] = MmPeer::SUBSERIAL;\n\t\t}\n\n\t}", "public function setSequence_no($sequence_no)\n {\n $this->sequence_no = $sequence_no;\n\n return $this;\n }", "public function setSequenceNumeric(\\horstoeko\\ubl\\entities\\cbc\\SequenceNumeric $sequenceNumeric)\n {\n $this->sequenceNumeric = $sequenceNumeric;\n return $this;\n }", "public function setTxSerialHardware($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->tx_serial_hardware !== $v) {\n\t\t\t$this->tx_serial_hardware = $v;\n\t\t\t$this->modifiedColumns[] = C060InventarioPeer::TX_SERIAL_HARDWARE;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function setTimestamp($timestamp)\n {\n if (null !== $timestamp) {\n $timestamp = (int) $timestamp;\n }\n $this->clearCachedValueIf($this->_timestamp != $timestamp);\n $this->_timestamp = $timestamp;\n }", "public function setTransactionIdentifier($transactionIdentifier)\n {\n $this->transactionIdentifier = $transactionIdentifier;\n\n return $this;\n }", "public function setTransactionSignature($transactionSignature)\n {\n $this->transactionSignature = $transactionSignature;\n\n return $this;\n }", "public function SetInvoiceNumber($parameters = []) {\n\t\t// set the action as required\n\t\t$this->parameters['Action'] = 'SetInvoiceNumber';\n\n\t\t// merge the prepared parameters with base parameters\n\t\t$parameters = HttpHelper::handle($parameters);\n\t\t$this->parameters = array_merge($this->parameters, $parameters);\n\n\t\t// make the http request\n\t\t$data = HttpClient::makeCall($this->baseURL, $this->parameters);\n\n\t\t// handle the response given\n\t\t$data = ResponseHelper::property($data, 'SuccessResponse->Body');\n\t\treturn (isset($data[0])) ? $data : null;\n\t}", "public function setNumber($number);", "public function setSequence(?int $value): void {\n $this->getBackingStore()->set('sequence', $value);\n }", "public function set_object_number($object_number)\n {\n $this->set_default_property(self::PROPERTY_OBJECT_NUMBER, $object_number);\n }", "public function setVatNumber(string $vat_number): void\n {\n $this->_vat_number = $vat_number;\n }", "public function setBlockNumberAttribute($value) {\n $this->attributes['block_number'] = ($value === null ? null : (int)$value);\n }", "public function setStreetAddress($street_address): void\n {\n $this->_streetAddress = $street_address;\n }", "public function setRegistrationNumber($value) {\n\t\tself::$_registrationNumber = $value;\n\t}", "public function setPlatformNo(string $platformNo): void\n {\n $this->platformNo = $platformNo;\n }", "public function setQuantityAttribute($quantity = null)\n\t{\n\t\t$this->attributes['quantity'] = intval($quantity);\n\t}", "public function getSerial()\n {\n if (isset($this->serial)) {\n return $this->serial;\n }\n\n throw new RuntimeException(\"Unable to create Invoice: serial not set.\");\n }", "public function __construct(Transaction $transaction, Vendor $vendor)\n {\n $this->transaction = $transaction;\n $this->vendor = $vendor;\n }", "public function setTimestamp($timestamp)\r\n {\r\n if (!is_null($timestamp))\r\n {\r\n $timestamp = (int) $timestamp;\r\n }\r\n $this->clearCachedValueIf($this->_timestamp != $timestamp);\r\n $this->_timestamp = $timestamp;\r\n }", "public function setTransaction($var)\n {\n GPBUtil::checkString($var, False);\n $this->transaction = $var;\n\n return $this;\n }", "public function setMobileNumber($mobileNumber)\n {\n // Todo: Validate this mobile number\n $this->personState['mobileNumber'] = $mobileNumber;\n }", "public function setNumber(?string $number): self\n {\n $this->initialized['number'] = true;\n $this->number = $number;\n\n return $this;\n }", "public function setTransactioncode($transactioncode = null)\n {\n // validation for constraint: string\n if (!is_null($transactioncode) && !is_string($transactioncode)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value, please provide a string, \"%s\" given', gettype($transactioncode)), __LINE__);\n }\n if (is_null($transactioncode) || (is_array($transactioncode) && empty($transactioncode))) {\n unset($this->Transactioncode);\n } else {\n $this->Transactioncode = $transactioncode;\n }\n return $this;\n }", "public function setSequence($var)\n {\n GPBUtil::checkString($var, True);\n $this->sequence = $var;\n }", "public function setProcessIdentifier($process_identifier) {\n $this->process_identifier = $process_identifier;\n }", "public function setVendorPartNumber(string $vendorPartNumber): self\n {\n $this->vendorPartNumber = $vendorPartNumber;\n\n return $this;\n }", "private function setTransaction($paymentData): void\n {\n //====================================================================//\n // Safety Check\n if (!array_key_exists(\"number\", $paymentData)) {\n return;\n }\n //====================================================================//\n // Init Transaction Informations\n $this->txnUpdate = false;\n $transaction = $this->payment->getTransaction($paymentData[\"number\"]);\n if (!$transaction) {\n $this->payment->setTransactionId($paymentData[\"number\"]);\n $transaction = $this->payment->addTransaction(Transaction::TYPE_PAYMENT, null, true);\n if (!$transaction) {\n Splash::log()->errTrace(\"Failed to add new transaction.\");\n\n return;\n }\n $transaction->save();\n }\n //====================================================================//\n // Update Transaction Data\n $this->setTransactionDate($transaction, $paymentData);\n //====================================================================//\n // Update Transaction Amount\n $this->setTransactionAmount($transaction, $paymentData);\n //====================================================================//\n // Save Changes\n if ($this->txnUpdate) {\n $transaction->save();\n $this->txnUpdate = false;\n $this->needUpdate();\n }\n }", "public function setWheelsNumber($wheelsNumber) {\n /*\n * param validation using filter\n */\n if(filter_var($wheelsNumber, FILTER_VALIDATE_INT) && $wheelsNumber >= 0) {\n $this->wheelsNumber = $wheelsNumber;\n return $this;\n } else {\n throw new InvalidCarWheelsNumberException();\n }\n \n }", "public function setParameter(int $parameter): void\n {\n $this->parameter = $parameter;\n }", "public function setTransactionDate($value) {\n\t\tself::$_transactionDate = $value;\n\t}", "public function setNumber($number)\n {\n if (1 <= $number && $number <= 12) {\n $this->_number = $number;\n } else {\n throw new Exception(\n 'Month numbers should be between 1 and 12'\n );\n }\n }", "public function setPageNumber(int $pageNumber): void\n {\n $this->pageNumber = $pageNumber;\n }", "public function set_telephone_number( $number ) {\n\t\treturn $this->set_field( 'OWNERTELNO', $number );\n\t}", "public function setPackageNumber($packageNumber = null)\n {\n // validation for constraint: string\n if (!is_null($packageNumber) && !is_string($packageNumber)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value, please provide a string, \"%s\" given', gettype($packageNumber)), __LINE__);\n }\n if (is_null($packageNumber) || (is_array($packageNumber) && empty($packageNumber))) {\n unset($this->packageNumber);\n } else {\n $this->packageNumber = $packageNumber;\n }\n return $this;\n }", "public function setQuantityAttribute($quantity)\n {\n $this->attributes['quantity'] = $quantity > 0\n ? $quantity\n : 0;\n }", "public function setQuantity(int $quantity)\n {\n $this->quantity = $quantity;\n }", "public function setMobileNumber(string $mobile_number) {\n\n $this->mobile_number = $mobile_number;\n\n }", "public function setStart($number)\n {\n parent::setAttr(\"start\", $number);\n }", "public function setSmsNumber($number)\n {\n $currentNumber = $this->getSmsNumber();\n if ($number === $currentNumber) {\n return;\n }\n $this->unsetSmsNumber();\n $updated = false;\n if ($this->data->contact_info->phone) {\n foreach ($this->data->contact_info->phone as $phone) {\n if ($phone->phone_number === $number) {\n $phone->preferred_sms = true;\n }\n }\n }\n if (!$updated) {\n $this->addSmsNumber($number);\n }\n }", "public function setCustomerTransactionId($id) {\n \t$this->customerTransactionId = $id;\n }" ]
[ "0.71494627", "0.7022598", "0.6847384", "0.6510159", "0.64565825", "0.62683654", "0.6162722", "0.61319673", "0.6049664", "0.6021285", "0.584186", "0.5558376", "0.55288124", "0.54489386", "0.5399534", "0.5309954", "0.51309836", "0.51309836", "0.51204187", "0.5115362", "0.51021206", "0.50457937", "0.498184", "0.49237692", "0.49237692", "0.48802543", "0.48739833", "0.48539573", "0.48486608", "0.4842639", "0.48313054", "0.4823881", "0.47965518", "0.47911108", "0.47571945", "0.47410628", "0.47128385", "0.4692752", "0.46895415", "0.46579665", "0.46490172", "0.46352428", "0.46028027", "0.45979592", "0.45964277", "0.45805764", "0.456775", "0.454529", "0.45357725", "0.45101613", "0.44973364", "0.44954494", "0.44834787", "0.44792452", "0.44650653", "0.44563842", "0.4438504", "0.44368547", "0.44243905", "0.44236386", "0.4407726", "0.43933412", "0.4382861", "0.43765488", "0.4370475", "0.43555033", "0.43530974", "0.4346034", "0.43343055", "0.43331468", "0.43214625", "0.43061486", "0.43025696", "0.43017894", "0.42983368", "0.4293728", "0.4291364", "0.4284789", "0.42707902", "0.42700016", "0.42618626", "0.4258832", "0.4257192", "0.4255395", "0.42502344", "0.4242985", "0.42297772", "0.42217308", "0.42179415", "0.4216689", "0.42140612", "0.42089313", "0.42065892", "0.42000106", "0.41982535", "0.41799453", "0.41708875", "0.4167124", "0.4166867", "0.416511" ]
0.8068719
0
Sets the value of the TransactionSerialNumber and returns this instance
public function withTransactionSerialNumber($value) { $this->setTransactionSerialNumber($value); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setTransactionSerialNumber($value) \n {\n $this->_fields['TransactionSerialNumber']['FieldValue'] = $value;\n return $this;\n }", "public function setSerialNumber(string $serialNumber)\n {\n $this->serialNumber = $serialNumber;\n\n return $this;\n }", "public function setSerialNumber($serialNumber) {\r\n $this->_input->getCertificate->setSerialNumber($serialNumber);\r\n return $this;\r\n }", "public function serialNumber($serialNumber)\n {\n return $this->setProperty('serialNumber', $serialNumber);\n }", "public function setSerialNumber($value) {\n\t\tself::$_serialNumber = $value;\n\t}", "public function getTransactionSerialNumber() \n {\n return $this->_fields['TransactionSerialNumber']['FieldValue'];\n }", "public function setSequenceNumber($sequenceNumber)\n {\n $this->sequenceNumber = $sequenceNumber;\n return $this;\n }", "public function setSequenceNumber($sequenceNumber)\n {\n $this->sequenceNumber = $sequenceNumber;\n return $this;\n }", "public function setTransactionNumber($transaction_number);", "public function transactionNum($value) {\n $this->annotations['transaction_num'] = $value;\n return $this;\n }", "public function getSerialNumber()\n {\n return $this->serialNumber;\n }", "public function setSequence_no($sequence_no)\n {\n $this->sequence_no = $sequence_no;\n\n return $this;\n }", "public function setSerialNo(?string $serialNo): Card {\n $this->serialNo = $serialNo;\n return $this;\n }", "public function setSerialNumber(?string $value): void {\n $this->getBackingStore()->set('serialNumber', $value);\n }", "public function setTransactionIdentifier($transactionIdentifier)\n {\n $this->transactionIdentifier = $transactionIdentifier;\n return $this;\n }", "public function setTransactionIdentifier($transactionIdentifier)\n {\n $this->transactionIdentifier = $transactionIdentifier;\n\n return $this;\n }", "public function setSequenceNumber($var)\n {\n GPBUtil::checkInt64($var);\n $this->sequence_number = $var;\n\n return $this;\n }", "public function setDeviceSerialNumber($deviceSerialNumber)\n {\n $this->deviceSerialNumber = $deviceSerialNumber;\n }", "public function getSerialNumber() {\n\t\treturn self::$_serialNumber;\n\t}", "public function setTransactionId($value) \n {\n $this->_fields['TransactionId']['FieldValue'] = $value;\n return $this;\n }", "public function setTransactionXID($transactionXID)\n {\n $this->transactionXID = $transactionXID;\n\n return $this;\n }", "public function setTransactionId($transactionId)\n {\n $this->transactionId = $transactionId;\n return $this;\n }", "public function setCertificateSerialNumber(?string $value): void {\n $this->getBackingStore()->set('certificateSerialNumber', $value);\n }", "public function set($number)\n {\n $this->number = $number;\n\n return $this;\n }", "public function setNumber(?string $number): self\n {\n $this->number = $number;\n\n return $this;\n }", "public function setTransactionSignature($transactionSignature)\n {\n $this->transactionSignature = $transactionSignature;\n\n return $this;\n }", "public function setNumber(?string $number): self\n {\n $this->initialized['number'] = true;\n $this->number = $number;\n\n return $this;\n }", "protected function setNumber($number)\n {\n $this->number = $number;\n\n return $this;\n }", "public function isSetTransactionSerialNumber()\n {\n return !is_null($this->_fields['TransactionSerialNumber']['FieldValue']);\n }", "public function setNumber($number)\n {\n $this->number = $number;\n return $this;\n }", "public function setNumber($number)\n {\n $this->number = $number;\n return $this;\n }", "public function setNumber($number)\n {\n $this->number = $number;\n\n return $this;\n }", "public function setNumber($number)\n {\n $this->number = $number;\n\n return $this;\n }", "public function setNumber($number)\n {\n $this->number = $number;\n\n return $this;\n }", "public function setNumber($number)\n {\n $this->number = $number;\n\n return $this;\n }", "public function setTxnID($value)\n\t{\n\t\treturn $this->set('TxnID', $value);\n\t}", "private function set_serial($serial) {\n\t\t$this->set_region(substr($serial, 0, 2));\n\t\t$this->serial = $serial;\n\t}", "public function setSequenceNumber($var)\n {\n GPBUtil::checkInt64($var);\n $this->sequence_number = $var;\n }", "public function setItenerarySequenceNumber(int $value): self\n {\n $this->ItenerarySequenceNumber = $value;\n\n return $this;\n }", "public function setSerialId($value)\n {\n return $this->set(self::_SERIAL_ID, $value);\n }", "public function setTransactionRecord($transactionRecord)\n {\n $this->transactionRecord = $transactionRecord;\n return $this;\n }", "public function getSerialNumber() {\n if ($this->serial) {\n return $this->serial;\n }\n if (is_array($this->rawData)) {\n $this->serial = $this->rawData[\"serial number\"];\n if (!$this->serial) { \n $this->serial = $this->rawData[\"серийный номер\"];\n }\n if (!$this->serial) { \n $this->serial = $this->rawData[12]; // CP-3911\n }\n }\n return $this->serial;\n }", "public function setNumber(?int $number): self\n {\n $this->initialized['number'] = true;\n $this->number = $number;\n\n return $this;\n }", "public function withTransactionId($value)\n {\n $this->setTransactionId($value);\n return $this;\n }", "public function setTimestamp(?int $timestamp): self\n {\n $this->timestamp = $timestamp;\n\n return $this;\n }", "public function setNumber(?int $number)\n {\n $this->number = $number;\n\n return $this;\n }", "public function getDeviceSerialNumber()\n {\n return $this->deviceSerialNumber;\n }", "public function setNumber($number)\n {\n $this->values['Number'] = $number;\n return $this;\n }", "public function setTransactionAmount($transactionAmount)\n {\n $this->transactionAmount = $transactionAmount;\n\n return $this;\n }", "public function setTransaction($var)\n {\n GPBUtil::checkString($var, False);\n $this->transaction = $var;\n\n return $this;\n }", "public function withTransactionCode($code)\n {\n $this->_model['code'] = $code;\n return $this;\n }", "public function sequenceName()\n {\n $this->useSequenceName = true;\n\n return $this;\n }", "public function setNumber(int $number) : self\n {\n $this->initialized['number'] = true;\n $this->number = $number;\n return $this;\n }", "public function setSequenceNumber($number) {\n\t\t$this->sequence = $number;\n\t\t// create the field\n\t\t$field = new ACHRecordField([84,87], $this->sequence);\n\t\t\n\t\t// add padding to the number\n\t\t$field->addPadding('0');\n\n\t\t// add the field.\n\t\t$this->addField( $field );\n\t}", "public function setSerial($v)\n\t{\n\n\n\t\tif ($v === null) {\n\t\t\t$this->setSerialId(NULL);\n\t\t} else {\n\t\t\t$this->setSerialId($v->getId());\n\t\t}\n\n\n\t\t$this->aSerial = $v;\n\t}", "public function setTransactionId($value)\n {\n return $this->set(self::TRANSACTION_ID, $value);\n }", "public function setHexSerialNumber($var)\n {\n GPBUtil::checkString($var, True);\n $this->hex_serial_number = $var;\n\n return $this;\n }", "public function setNumber(int $number)\n {\n $this->number = $number;\n\n return $this;\n }", "public function setSeatNumber($seatNumber)\n {\n $this->seatNumber = $seatNumber;\n\n return $this;\n }", "public function setSerial(int $serial = 1) : CNabuDataObject\n {\n if ($serial === null) {\n throw new ENabuCoreException(\n ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,\n array(\"\\$serial\")\n );\n }\n $this->setValue('nb_domain_zone_serial', $serial);\n \n return $this;\n }", "public function setNumber(/*int*/ $value) /*: this*/ {\n $this->number = $value;\n return $this;\n }", "public function getSerialId()\n\t{\n\n\t\treturn $this->serial_id;\n\t}", "public function setTimestamp($timestamp = 0)\n\t\t\t{\n\t\t\t\t$this->timestamp = intval($timestamp);\n\n\t\t\t\treturn $this;\n\t\t\t}", "public function setTransactionIndex($transactionIndex)\n {\n $this->transactionIndex = $transactionIndex;\n\n return $this;\n }", "public function setTicketNumber(?string $ticketNumber): Card {\n $this->ticketNumber = $ticketNumber;\n return $this;\n }", "public function setTxSerialHardware($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->tx_serial_hardware !== $v) {\n\t\t\t$this->tx_serial_hardware = $v;\n\t\t\t$this->modifiedColumns[] = C060InventarioPeer::TX_SERIAL_HARDWARE;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function withTransactionAmount($value)\n {\n $this->setTransactionAmount($value);\n return $this;\n }", "public function setTransactionDetail(TransactionDetail $transactionDetail)\n {\n $this->TransactionDetail = $transactionDetail;\n return $this;\n }", "public function setTransactioncode($transactioncode = null)\n {\n // validation for constraint: string\n if (!is_null($transactioncode) && !is_string($transactioncode)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value, please provide a string, \"%s\" given', gettype($transactioncode)), __LINE__);\n }\n if (is_null($transactioncode) || (is_array($transactioncode) && empty($transactioncode))) {\n unset($this->Transactioncode);\n } else {\n $this->Transactioncode = $transactioncode;\n }\n return $this;\n }", "public function getTransactionNumber();", "public function setTransaction(Transaction $transaction)\n {\n $this->transaction = $transaction;\n }", "public function setTransaction(Transaction $transaction)\n {\n $this->transaction = $transaction;\n }", "public function setTypeTransaction($typeTransaction)\n {\n $this->typeTransaction = $typeTransaction;\n\n return $this;\n }", "public function setNumIdentification($numIdentification)\n {\n $this->numIdentification = $numIdentification;\n\n return $this;\n }", "public function setSequenceNumeric(\\horstoeko\\ubl\\entities\\cbc\\SequenceNumeric $sequenceNumeric)\n {\n $this->sequenceNumeric = $sequenceNumeric;\n return $this;\n }", "public function setVersionNo($versionNo)\n {\n $this->versionNo = $versionNo;\n\n return $this;\n }", "public function withPurchaseOrderNo($no)\n {\n $this->_model['purchaseOrderNo'] = $no;\n return $this;\n }", "public function setSequence($value)\n {\n $this->sequence = (string) $value;\n\n return $this;\n }", "function setSubjectsNumber($subjectsNumber) {\n\t\treturn $this->setData('subjectsNumber', $subjectsNumber);\n\t}", "public function setTransactionDetail(TransactionDetail $transactionDetail)\n {\n $this->values['TransactionDetail'] = $transactionDetail;\n return $this;\n }", "public function setTransactionDetail(TransactionDetail $transactionDetail)\n {\n $this->values['TransactionDetail'] = $transactionDetail;\n return $this;\n }", "public function getSerial()\n {\n if (isset($this->serial)) {\n return $this->serial;\n }\n\n throw new RuntimeException(\"Unable to create Invoice: serial not set.\");\n }", "public function getTransactionId() { return $this->transactionId; }", "public function setQuantity(?int $quantity): self\n {\n $this->quantity = $quantity;\n\n return $this;\n }", "public function setQuantity(?int $quantity): self\n {\n $this->quantity = $quantity;\n\n return $this;\n }", "public function store(CASerialNumberRequest $request)\n\t{\n\t\t//\n if(count(CASerialNumber::all()) > 0)\n {\n\n\n $csaerialNumber=CASerialNumber::all()->first();\n $csaerialNumber->startno= $request->serial_no;\n $csaerialNumber->save();\n }\n else\n {\n $csaerialNumber=new CASerialNumber;;\n $csaerialNumber->startno= 1;\n $csaerialNumber->save();\n }\n\n\n\n return redirect('serialno');\n\t}", "public function setNumber($number)\n {\n return $this->setData(self::NUMBER, $number);\n }", "public function setTransactions($transactions)\r\n {\r\n $this->transactions = $transactions;\r\n\r\n return $this;\r\n }", "public function setTransactions($transactions)\r\n {\r\n $this->transactions = $transactions;\r\n\r\n return $this;\r\n }", "public function _set($number) {\n\t\t$this->number = $number;\n\t\t$this->id = $this->id_base . '-' . $number;\n\t}", "public function setTransactions($transactions)\r\n {\r\n $this->transactions = $transactions;\r\n return $this;\r\n }", "public function setTelephoneNumber(string $telephoneNumber)\n {\n $this->telephoneNumber = $telephoneNumber;\n\n return $this;\n }", "public function getSequenceNumber()\n {\n return $this->sequenceNumber;\n }", "public function getSequenceNumber()\n {\n return $this->sequenceNumber;\n }", "public function setOrderNumber(string $OrderNumber)\n {\n $this::validateLength(self::ORDER_NUMBER, $OrderNumber, 15);\n\n $this->OrderNumber = $OrderNumber;\n\n return $this;\n }", "protected function setTransactionKey()\n {\n $payment = $this->order->getPayment();\n $originalKey = AbstractMethod::BUCKAROO_ORIGINAL_TRANSACTION_KEY_KEY;\n $transactionKey = $this->getTransactionKey();\n\n if (!$payment->getAdditionalInformation($originalKey) && strlen($transactionKey) > 0) {\n $payment->setAdditionalInformation($originalKey, $transactionKey);\n }\n }", "public function getSequenceNumber()\n {\n return $this->sequence_number;\n }", "public function getSequenceNumber()\n {\n return $this->sequence_number;\n }", "public function setSequence($val)\n {\n $this->_propDict[\"sequence\"] = intval($val);\n return $this;\n }", "public function setTransactionStatus($value) \n {\n $this->_fields['TransactionStatus']['FieldValue'] = $value;\n return $this;\n }" ]
[ "0.868964", "0.72709066", "0.70224476", "0.67633784", "0.6526414", "0.63606894", "0.62040895", "0.62040895", "0.60557324", "0.6014345", "0.5876965", "0.5850318", "0.57726574", "0.57658195", "0.5714459", "0.5632368", "0.562899", "0.5597167", "0.5593427", "0.55563664", "0.5522197", "0.5515556", "0.5472938", "0.54454327", "0.5361947", "0.5335918", "0.5306548", "0.53056616", "0.5290726", "0.527147", "0.527147", "0.52644783", "0.52644783", "0.52644783", "0.52644783", "0.524369", "0.522848", "0.5218097", "0.52174616", "0.5199386", "0.51984215", "0.51887923", "0.5120898", "0.51034534", "0.50787085", "0.5078646", "0.5078082", "0.505892", "0.5055142", "0.504116", "0.50346184", "0.5029503", "0.5026824", "0.50228065", "0.50077313", "0.4978326", "0.49729452", "0.49701253", "0.4957208", "0.49484706", "0.4941181", "0.49365973", "0.49362716", "0.49145958", "0.48839396", "0.48823214", "0.48653442", "0.4836661", "0.48365617", "0.4818678", "0.4807058", "0.4807058", "0.47867295", "0.47842103", "0.47776154", "0.47605175", "0.47440094", "0.47392842", "0.47385558", "0.473418", "0.473418", "0.47331518", "0.47227097", "0.47130907", "0.47130907", "0.47123277", "0.47090355", "0.47048628", "0.47048628", "0.46687543", "0.4668054", "0.46641418", "0.4660334", "0.4660334", "0.46600118", "0.46542615", "0.46520045", "0.46520045", "0.46499923", "0.46498954" ]
0.8291969
1
Checks if TransactionSerialNumber is set
public function isSetTransactionSerialNumber() { return !is_null($this->_fields['TransactionSerialNumber']['FieldValue']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setTransactionSerialNumber($value) \n {\n $this->_fields['TransactionSerialNumber']['FieldValue'] = $value;\n return $this;\n }", "function isValidSerialNumber($serialNumber) {\n\tunset($serialNumber);\n\treturn true;\n}", "public function getTransactionSerialNumber() \n {\n return $this->_fields['TransactionSerialNumber']['FieldValue'];\n }", "public function isSetTransactionAmount()\n {\n return !is_null($this->_fields['TransactionAmount']['FieldValue']);\n\n }", "public function isSetTransactionId()\n {\n return !is_null($this->_fields['TransactionId']['FieldValue']);\n }", "public function verifyUnicitySerialNumber($attribute,$params)\n\t{\n $verifIdentity = VerifIdentity::model()->findByPk($this->serialNumber);\n if($verifIdentity != null)\n {\n if(!($verifIdentity->idUser === null))\n $this->addError('serialNumber','This serial Number is already used.');\n }\n \n }", "public function setSerialNumber($value) {\n\t\tself::$_serialNumber = $value;\n\t}", "public function setTransactionNumber($transaction_number);", "public function withTransactionSerialNumber($value)\n {\n $this->setTransactionSerialNumber($value);\n return $this;\n }", "public function isTransactionPart()\n {\n return $this->_transaction != null;\n }", "public function getSerialNumber()\n {\n return $this->serialNumber;\n }", "public function getSerialNumber() {\n\t\treturn self::$_serialNumber;\n\t}", "public function setDeviceSerialNumber($deviceSerialNumber)\n {\n $this->deviceSerialNumber = $deviceSerialNumber;\n }", "protected function get_is_serial(): bool\n\t{\n\t\treturn $this->type == self::TYPE_INTEGER && !$this->null && $this->auto_increment && $this->primary;\n\t}", "public function validate(): bool\n {\n // exact pin and serial number look like\n return $this->validateAmount();\n }", "public function in_transaction() {\r\n return isset($this->sem_id) && $this->sem_id;\r\n }", "public function issetPaymentAmount(): bool\n {\n return isset($this->paymentAmount);\n }", "function checkTransaction_exist($jm_txnid)\n\t{\n\t\t$query = null;\n\t\t$query = $this->db->get_where('jm_membership_payment', array(//making selection\n\t\t\t'jm_txnid' => $jm_txnid\n\t\t));\t\t\n\t\t\n\t\tif ($query->num_rows() > 0) {\n\t\t\treturn 0;\t\t\t\n\t\t} else {\n\t\t\treturn 1;\t\t\t\n\t\t}\n\t}", "public function isSetTransactionDate()\n {\n return !is_null($this->_fields['TransactionDate']['FieldValue']);\n }", "public function issetProductNumberCode(): bool\n {\n return isset($this->productNumberCode);\n }", "public function serialNumber($serialNumber)\n {\n return $this->setProperty('serialNumber', $serialNumber);\n }", "public function hasInitialQuantity()\n {\n return $this->initial_quantity !== null;\n }", "public function is_transaction_exist() {\n\n $transaction = $this->ci->generic_model->retrieve_one(\n \"transaction_general\",\n array(\n \"package_id\" => $this->ci->input->post(\"package_id\"),\n \"package_type\" => $this->ci->input->post(\"package_type\")\n )\n );\n\n if ($transaction) { // there exists an object.\n return TRUE;\n } else { // object is not found.\n $this->ci->form_validation->set_message(\"is_transaction_exist\", \"Paket belum dibeli.\");\n return FALSE;\n }\n }", "public function isSetSellerOrderId()\n {\n return !is_null($this->_fields['SellerOrderId']['FieldValue']);\n }", "public function getSerialNumber() {\n if ($this->serial) {\n return $this->serial;\n }\n if (is_array($this->rawData)) {\n $this->serial = $this->rawData[\"serial number\"];\n if (!$this->serial) { \n $this->serial = $this->rawData[\"серийный номер\"];\n }\n if (!$this->serial) { \n $this->serial = $this->rawData[12]; // CP-3911\n }\n }\n return $this->serial;\n }", "public function isValid( $Transaction ): bool\n\t{\n\t\t$Items = $Transaction->getLedger();\n\n\t\t$Total = 0;\n\n\t\tforeach( $Items as $Item )\n\t\t{\n\t\t\t$Total += $Item->getAmount();\n\t\t}\n\n\t\t$Result = true;\n\n\t\tif( $Transaction->getTotal() != $Total )\n\t\t{\n\t\t\t$Message = \"Ledger discrepancy for transaction_key: \".$Transaction->getKey();\n\n\t\t\tLog::error( $Message );\n\n\t\t\t$this->addViolation( $Message );\n\t\t\t$Result = false;\n\t\t}\n\n\t\tif( !$Transaction->getKey() )\n\t\t{\n\t\t\t$Message = \"Transaction {$Transaction->getIdentifier()} missing transaction_key: \";\n\n\t\t\tLog::error( $Message );\n\n\t\t\t$this->addViolation( $Message );\n\n\t\t\t$Result = false;\n\t\t}\n\n\t\treturn $Result;\n\t}", "public function issetQuantity(): bool\n {\n return isset($this->quantity);\n }", "public function isSetTdsOrderId()\n {\n return !is_null($this->_fields['TdsOrderId']['FieldValue']);\n }", "final private function __isTransaction()\n\t{\n\t\tif( ! $this->transaction )\n\t\t{\n\t\t\tthrow new \\Exception('Do not using transaction.', 421);\n\t\t}\n\t}", "public function issetDocumentNumber(): bool\n {\n return isset($this->documentNumber);\n }", "public function hasAmount(): bool\n {\n return isset($this->amount);\n }", "public function check_tarnsaction($transaction_number) {\n\t\t$data = [\n\t\t\t'user' => config('Abkash.username'),\n\t\t\t'pass' => config('Abkash.password'),\n\t\t\t'msisdn' => config('Abkash.mobile'),\n\t\t\t'trxid' => $transaction_number,\n\t\t];\n\n\t\t//run curl and get return\n\n\t\t$this->validate_response($this->curlinit($data));\n\t}", "public function setSequenceNumber($var)\n {\n GPBUtil::checkInt64($var);\n $this->sequence_number = $var;\n }", "public function hasAmount()\n {\n return isset($this->amount);\n }", "public function reserved(){\n\n return $this->attributes['status'] == 1;\n\n }", "function transaction_check(){\n }", "public function getTransactionNumber();", "function checkTxnid($txnid) {\n\tglobal $db;\n\n\t$txnid = $db->real_escape_string($txnid);\n\t$results = $db->query('SELECT * FROM `payments` WHERE txnid = \\'' . $txnid . '\\'');\n\n\treturn ! $results->num_rows;\n}", "public function transaction(): bool\r\n {\r\n return $this->instance->inTransaction() === true;\r\n }", "public function hasLotserials() {\n\t\t$q = SalesHistoryLotserialQuery::create();\n\t\t$q->filterByOrdernumber($this->oehhnbr);\n\t\treturn boolval($q->count());\n\t}", "private function set_serial($serial) {\n\t\t$this->set_region(substr($serial, 0, 2));\n\t\t$this->serial = $serial;\n\t}", "public function setSerialNumber(?string $value): void {\n $this->getBackingStore()->set('serialNumber', $value);\n }", "protected function setTransactionKey()\n {\n $payment = $this->order->getPayment();\n $originalKey = AbstractMethod::BUCKAROO_ORIGINAL_TRANSACTION_KEY_KEY;\n $transactionKey = $this->getTransactionKey();\n\n if (!$payment->getAdditionalInformation($originalKey) && strlen($transactionKey) > 0) {\n $payment->setAdditionalInformation($originalKey, $transactionKey);\n }\n }", "public function isSetAmazonOrderId()\n {\n return !is_null($this->_fields['AmazonOrderId']['FieldValue']);\n }", "public function isTransaction(): bool\n {\n return $this->inTransaction();\n }", "public function isInTransaction()\n {\n return $this->_getWriteAdapter()->getTransactionLevel() > 0;\n }", "public function valid()\n {\n\n if ($this->container['sku'] === null) {\n return false;\n }\n return true;\n }", "function checkMandatoryArguments()\n \t{\n \t\tif($this->mStrAdGUID == \"\" || $this->mStrAdGUID == null)\n \t\t\treturn false;\n \t\telse if($this->mStrQuantity == \"\" || $this->mStrQuantity == null)\n \t\t\treturn false;\n \t\telse\n \t\t\treturn true;\n \t}", "public function hasUuid()\n {\n return !empty($this->getUuid());\n }", "function barcodeNumberExists($number) {\n return ProductUnit::where('barcode',$number)->exists();\n }", "public function setSerialNumber(string $serialNumber)\n {\n $this->serialNumber = $serialNumber;\n\n return $this;\n }", "public function getDeviceSerialNumber()\n {\n return $this->deviceSerialNumber;\n }", "public function issetReservationID($index)\n {\n return isset($this->reservationID[$index]);\n }", "public function hasTransactions();", "function check_txnid($tnxid){\n\t\t\t\tglobal $link;\n\t\t\t\t// $dbName= 'EventAdvisors';\n\t\t\t\t// $link = mysqli_connect($host, $user, $pass,$dbName);\n\t\t\t\t// mysql_select_db($db_name);\n\n\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t\t$valid_txnid = true;\n\t\t\t\t//get result set\n\t\t\t\t$sql = mysqli_query( $con, \"SELECT * FROM payments WHERE txnid = '\".$tnxid.\"' \");\t\t\n\t\t\t\t\n\t\t\t\tif($row = mysqli_fetch_array($sql)) {\n\t\t\t\t\t$valid_txnid = false;\n\t\t\t\t}\n\t\t\t\treturn $valid_txnid;\n\t\t\t}", "public function hasX509CertificateChainParameter(): bool\n {\n return $this->has(Parameter\\JWKParameter::P_X5C);\n }", "public function isTransactionActive()\n {\n return $this->transactionNestingLevel > 0;\n }", "public function isPublicKeySet ()\n {\n return $this->paymillOptionHelperHelper->getPublicKey() !== \"\";\n }", "protected function transactionIDExists(&$record) {\n \n $trxn_id = $record['transmission_number'] . '-' . $record['transaction_number'];\n\n $dao = CRM_Core_DAO::executeQuery(\n \"SELECT id, contact_id FROM civicrm_contribution WHERE trxn_id = %1\",\n array(\n 1 => array($trxn_id, 'String')\n )\n );\n\n if ($dao->fetch()) {\n $message = ts(\n \"Duplicate transaction number (%1) - already exists for contribution id %2 (%3) - KID number '%4' at line %5. %6\",\n array(\n 1 => $record['transaction_number'],\n 2 => $dao->id,\n 3 => $this->getDisplayName($dao->contact_id),\n 4 => $record['kid'],\n 5 => $record['line_no'],\n 6 => $this->test ? ts('Record will not be imported.') : ts('Record was not imported.')\n )\n );\n $this->addReportLine('warning', $message);\n if (!$this->test)\n $this->createFailureTableEntry($record, $message);\n return true;\n }\n \n return false; \n \n }", "public function getSerial()\n {\n if (isset($this->serial)) {\n return $this->serial;\n }\n\n throw new RuntimeException(\"Unable to create Invoice: serial not set.\");\n }", "public function hasPayment($vendorTxCode)\n {\n return in_array($vendorTxCode, array_keys($this->getPayments()));\n }", "public function setSerialNumber($serialNumber) {\r\n $this->_input->getCertificate->setSerialNumber($serialNumber);\r\n return $this;\r\n }", "public function hasAmountsInc()\n {\n return $this->AmountsInc !== null;\n }", "public function isTransaction()\n {\n return $this->_isTransaction;\n }", "public function CheckTransactionUser() {\n\t\t\t\t\t\tif (isset ( $_SESSION ['UserSession'] )) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t}", "public function testLockSsn()\n\t{\n\t\t$this->assertTrue($this->store->lockSsn('123456789'));\n\t}", "private function searchTransactionID()\r\n {\r\n if ($this->transactionID > 0 && $this->transactionID < 100000000000000000000)\r\n {\r\n // retrieve product, supplier, repair agent details from database\r\n $result = mysql_query(\"SELECT TransactionID, PurchaseDate, PurchasePrice\r\n FROM TransactionProducts_VIEW\r\n WHERE TransactionID = $this->transactionID AND Keycode = $this->keycode\");\r\n \r\n // store transaction results for use later\r\n $this->transactionResult = mysql_fetch_array($result);\r\n \r\n \r\n \r\n }\r\n }", "public function checkResetCode()\n {\n return $this->resetCode()->isValid();\n }", "public function getSerialNumber(): ?string {\n $val = $this->getBackingStore()->get('serialNumber');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'serialNumber'\");\n }", "public function isSetQuantity()\n {\n return !is_null($this->_fields['Quantity']['FieldValue']);\n }", "public function isSetTransactionStatus()\n {\n return !is_null($this->_fields['TransactionStatus']['FieldValue']);\n }", "public function isSetTransactionStatus()\n {\n return !is_null($this->_fields['TransactionStatus']['FieldValue']);\n }", "public function getSerialNo(): ?string {\n return $this->serialNo;\n }", "public function validateMinimumAmount()\n {\n return !(Mage::getStoreConfigFlag('sales/minimum_order/active')\n && Mage::getStoreConfigFlag('sales/minimum_order/multi_address')\n && !$this->getQuote()->validateMinimumAmount());\n }", "public function setDatabaseTransaction($databaseTransaction) {\n\t\t\ttry {\n\t\t\t\t$this->databaseTransaction = $databaseTransaction;\n\t\t\t\treturn true;\n\t\t\t}catch(Exception $e) {\n\t\t\t\tif(ambiente == 'DEV') { echo $e->getMessage(); }\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function setDatabaseTransaction($databaseTransaction) {\n\t\t\ttry {\n\t\t\t\t$this->databaseTransaction = $databaseTransaction;\n\t\t\t\treturn true;\n\t\t\t}catch(Exception $e) {\n\t\t\t\tif(ambiente == 'DEV') { echo $e->getMessage(); }\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function store(CASerialNumberRequest $request)\n\t{\n\t\t//\n if(count(CASerialNumber::all()) > 0)\n {\n\n\n $csaerialNumber=CASerialNumber::all()->first();\n $csaerialNumber->startno= $request->serial_no;\n $csaerialNumber->save();\n }\n else\n {\n $csaerialNumber=new CASerialNumber;;\n $csaerialNumber->startno= 1;\n $csaerialNumber->save();\n }\n\n\n\n return redirect('serialno');\n\t}", "public function isIdentifierValid()\n {\n return (request('identifier') == $this->identifier) ? true : false;\n }", "public function getTransactionXID()\n {\n return $this->transactionXID;\n }", "public function hasModulusParameter(): bool\n {\n return $this->has(Parameter\\JWKParameter::P_N);\n }", "public function isMandatory() {\n\t\t$this->getMandatory();\n\t}", "public function getIsTransaction()\n {\n return $this->isTransaction;\n }", "public function valid()\n {\n return $this->key === 0;\n }", "public function validate() {\r\n\t\tif( $this->_debug ) Mage::log('validate()', null, 'authnetcim.log');\r\n\t\t\r\n\t\t$post = Mage::app()->getRequest()->getParam('payment');\r\n\t\t\r\n\t\tif( empty($post['payment_id']) || !empty($post['cc_number']) ) {\r\n\t\t\ttry {\r\n\t\t\t\treturn parent::validate();\r\n\t\t\t}\r\n\t\t\tcatch(Exception $e) {\r\n\t\t\t\treturn $e->getMessage();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public function isInTransaction(): bool;", "public function testSuccessfulResponseDataFormatForConfirmProcessWithValidTransactionId(): void\n {\n $this->tryTestWithRequest();\n $this->assertIsNumeric($this->response->getTransactionId());\n }", "public function getSerialId()\n\t{\n\n\t\treturn $this->serial_id;\n\t}", "public function isInTransaction();", "public function hasLockTime()\n {\n return $this->lock_time !== null;\n }", "public function verify($transaction)\n {\n }", "public function inTransaction(): bool\n {\n return $this->inTransaction;\n }", "public function isSetNonPartneredSmallParcelData()\n {\n return !is_null($this->_fields['NonPartneredSmallParcelData']['FieldValue']);\n }", "public function transaction_approved() {\n\n\t\t$errors = $this->get_errors()->get_error_codes();\n\n\t\treturn empty( $errors );\n\t}", "function CheckSequence()\n\t{\n\t\treturn true;\n\t}", "public function issetMovementStartTime(): bool\n {\n return isset($this->movementStartTime);\n }", "public function isSomeAmountMissing(): bool\n {\n if ( $this->getAmountMissing() > 0 )\n return true;\n return false;\n }", "public function getHexSerialNumber()\n {\n return $this->hex_serial_number;\n }", "public function getHasPaymentIssueAttribute()\n {\n return $this->active && $this->lastTransaction &&\n $this->lastTransaction->status != Factory::getClass(TransactionStatus::class)::SUCCESS;\n }", "private function validate()\n {\n if (!$this->user->hasPermission('modify', 'payment/pmt')) {\n $this->error['warning'] = $this->language->get('error_permission');\n }\n\n if (empty($this->request->post['pmt_test_customer_code'])) {\n $this->error['pmt_test_customer_code'] = $this->language->get('error_pmt_test_customer_code');\n }\n\n if (empty($this->request->post['pmt_test_customer_key'])) {\n $this->error['pmt_test_customer_key'] = $this->language->get('pmt_test_customer_key');\n }\n\n if (!$this->error) {\n return true;\n } else {\n return false;\n }\n }", "public function getTransactionCCNumber()\n {\n if (empty($this->transactionId)) {\n throw new MerchantException('Transaction ID must be set to use this method.');\n }\n\n $result = $this->getMTRInfo();\n if ($result === false) {\n return false;\n }\n\n if (!isset($result['authorizing_pfp_index'])\n || !isset($result['pfp_transactions'][$result['authorizing_pfp_index']])) {\n throw new MerchantException(\"Transaction $transactionId no cc log authorizing trans found\");\n }\n\n $authorizingPFPTransaction = $result['pfp_transactions'][$result['authorizing_pfp_index']];\n\n $requestData = json_decode($authorizingPFPTransaction['raw_request'], true);\n return $requestData['ACCT'];\n }" ]
[ "0.67066044", "0.64383197", "0.6247677", "0.5766729", "0.57062525", "0.567914", "0.56780404", "0.56637037", "0.56022024", "0.55418015", "0.5421898", "0.5371307", "0.52489585", "0.52266604", "0.51632077", "0.51622605", "0.51546293", "0.5148135", "0.5095377", "0.50729585", "0.5062764", "0.5053766", "0.5035364", "0.5034791", "0.5021859", "0.49977332", "0.49745098", "0.4902765", "0.4887211", "0.48849332", "0.48583812", "0.48312622", "0.48276454", "0.4822396", "0.48172504", "0.481595", "0.48055407", "0.4802755", "0.47980595", "0.4796274", "0.47805664", "0.475499", "0.4753467", "0.47527704", "0.47438648", "0.47416788", "0.47178236", "0.47109902", "0.47097263", "0.4708661", "0.47008482", "0.4699237", "0.46989202", "0.4696424", "0.46960336", "0.46779516", "0.467642", "0.46722034", "0.46657008", "0.4665007", "0.46563992", "0.465639", "0.4651468", "0.46492657", "0.46484363", "0.4637478", "0.46291807", "0.4619741", "0.46137866", "0.46097726", "0.4601347", "0.4601347", "0.45956022", "0.45795658", "0.45749152", "0.45749152", "0.45728922", "0.45707935", "0.456694", "0.4553694", "0.45513314", "0.45451704", "0.45422605", "0.4540096", "0.4534551", "0.4528992", "0.4528559", "0.45249546", "0.4518406", "0.45182455", "0.45170078", "0.45056838", "0.45003268", "0.44948515", "0.44899958", "0.44891003", "0.4486545", "0.4475635", "0.4473948", "0.446365" ]
0.7930128
0
Gets the value of the TransactionAmount.
public function getTransactionAmount() { return $this->_fields['TransactionAmount']['FieldValue']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTransactionAmount()\n {\n return $this->transactionAmount;\n }", "public function getAmount()\r\n\t{\r\n\t\treturn $this->getTransaction()->getAmount();\r\n\t}", "public function getAmount()\n {\n return $this->get(self::_AMOUNT);\n }", "public function getAmount()\n {\n return $this->get(self::_AMOUNT);\n }", "public function getAmount()\n {\n return $this->get(self::_AMOUNT);\n }", "public function getAmount()\n {\n return $this->get(self::_AMOUNT);\n }", "public function getAmount()\n {\n return $this->get(self::_AMOUNT);\n }", "public function getAmount()\n {\n return $this->_fields['Amount']['FieldValue'];\n }", "public function getAmount() \n {\n return $this->_fields['Amount']['FieldValue'];\n }", "public function getAmount()\n {\n return $this->getData(self::AMOUNT);\n }", "public function getAmount()\n {\n return $this->MoneyAmount;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function getamount()\n {\n return $this->amount;\n }", "public function getAmount()\r\n {\r\n return $this->amount;\r\n }", "public function getAmount()\r\n {\r\n return $this->amount;\r\n }", "public function getAmount()\r\n {\r\n return $this->amount;\r\n }", "public function getAmount()\r\n {\r\n return $this->amount;\r\n }", "public function getAmount()\n\t{\n\t\treturn $this->amount;\n\t}", "public function getAmount()\n {\n return $this->_amount;\n }", "public function getAmount()\n {\n return $this->_amount;\n }", "public function getAmount()\n\t{\n\t\treturn $this->get('Amount');\n\t}", "public function getAmount()\n {\n return $this->amount;\n }", "public function amount() {\r\n\t\treturn $this->amount;\r\n\t}", "public function getAmount(): Money\n {\n return $this->amount;\n }", "public function getAmount(): string\n {\n return $this->amount;\n }", "public function getAmount(): int\n {\n return $this->amount;\n }", "public function getValue()\n {\n return $this->value instanceof TypedMoneyBuilder ? $this->value->build() : $this->value;\n }", "public function getAmount() {\n return $this->attributes['amount'];\n }", "public function getAmount(): float\n {\n return $this->_amount;\n }", "public function getTransactionValue() {\n return $this->mutation_amount * $this->mutation_price;\n }", "public function getAmount();", "public function getAmount();", "public function getAmount();", "public function getAmount();", "function getSystemMoneyValue()\n\t\t{\n\t\t\t$system_value = $this->_BLL_obj->manage_content->getLastValue('system_money_info', '*', 1, 1, 'id');\n\t\t\treturn $system_value[0]['system_balance'];\n\t\t}", "public function getValue()\n {\n return $this->value instanceof MoneyBuilder ? $this->value->build() : $this->value;\n }", "public function getValue()\n {\n return $this->value instanceof MoneyBuilder ? $this->value->build() : $this->value;\n }", "public function getAmountMoney(): Money\n {\n return $this->amountMoney;\n }", "public function getAmount()\n {\n return $this->getSource()->getDataUsingMethod($this->getSourceField());\n }", "public function amount(): float\n {\n return $this->amount;\n }", "public function getAmount()\n\t{\n\t\treturn Config::get('paypal.amount');\n\t}", "public function getSum()\n {\n return $this->amount;\n }", "public function getMoney()\n {\n return $this->get(self::_MONEY);\n }", "public function getMoney()\n {\n return $this->get(self::_MONEY);\n }", "public function getMoney()\n {\n return $this->get(self::_MONEY);\n }", "public function getMoney()\n {\n return $this->get(self::_MONEY);\n }", "public function getMoney()\n {\n return $this->get(self::_MONEY);\n }", "public function getMoney()\n {\n return $this->get(self::_MONEY);\n }", "public function getBaseAmount()\n {\n return $this->amount;\n }", "public function getMoney()\n {\n return $this->Money;\n }", "public function getBaseAmount() {\r\n return $this->baseAmount;\r\n }", "public function getDepositAmount()\n {\n return $this->depositAmount;\n }", "public function getAmount(): string;", "public function getAmountTotal()\n {\n return $this->amountTotal;\n }", "public function getMoney()\n {\n return $this->money;\n }", "public function getMoney()\n {\n return $this->money;\n }", "public function getMoney()\n {\n return $this->money;\n }", "public function getMoney()\n {\n return $this->money;\n }", "public function getAmountTotal()\n {\n return $this->getIfSet('total', $this->data->amount);\n }", "public function getTransactionAmountInCents()\n {\n return $this->transactionAmount * 100;\n }", "public function getTransactionFee()\n {\n return $this->transaction_fee;\n }", "public function getTransactionFee()\n {\n return $this->transaction_fee;\n }", "public function getRetMoneyTransferReqAmount() {\n return $this->_retMoneyTransferReqAmount;\n }", "public function getTransactionCurrency()\n {\n return $this->transactionCurrency;\n }", "public function getValue()\n {\n if ($this->value == null) {\n return '0';\n }\n\n return $this->value;\n }", "public function getValue()\n {\n if ($this->value == null) {\n return '0';\n }\n\n return $this->value;\n }", "public function getAmountArticle(){\n return $this->amountArticle;\n }", "public function getBalanceAmount()\n {\n return $this->balanceAmount;\n }", "function get_transaction_amount()\n {\n // payment_gross depreciated: https://www.x.com/message/168279;jsessionid=194758CBB355AB9E942D506519951253.node0\n //return $this->platnosci_post_vars['payment_gross'];\n return $this->platnosci_post_vars['mc_gross'];\n }", "public function getAmount(): float;", "public function get_amountCustomer() {\n return $this->amountCustomer;\n }", "protected function getAmount()\n {\n return AmountFormatter::format(\n $this->checkoutSession->getLastRealOrder()->getGrandTotal(),\n $this->getCurrency()\n );\n }", "public function setTransactionAmount($value) \n {\n $this->_fields['TransactionAmount']['FieldValue'] = $value;\n return;\n }", "public function obtenerValor() {\n return $this->valor;\n }", "public function getConvertedAmount() {\n\t\t$money = new Money($this->getAmount(), new Currency($this->getCurrency()));\n\t\treturn $money->getConvertedAmount();\n\t}", "public function getTransactionId() \n {\n return $this->_fields['TransactionId']['FieldValue'];\n }", "public function getToAmount() {\n return $this->_to_amount;\n }", "public function get_value() {\n return $this->value;\n }", "public function getAmountDescription()\n {\n return $this->_fields['AmountDescription']['FieldValue'];\n }", "public function get_value()\n {\n return $this->value;\n }", "public function getChargeValueModifier()\n {\n $value = 0;\n\n if ($this->isCompleted() || $this->isPending()) {\n $value += $this->getValue();\n }\n\n if ($this->getBackendTransactions()) {\n foreach ($this->getBackendTransactions() as $transaction) {\n if ($transaction->isRefund() && $transaction->isSucceed()) {\n $value -= abs($transaction->getValue());\n }\n }\n }\n\n return max(0, $value);\n }", "public function getFeeSettlementAmount()\n {\n return $this->feeSettlementAmount;\n }", "public function getTargetAmount()\n {\n return $this->target_amount;\n }", "public function get_value()\n\t{\n\t\treturn $this->value;\n\t}", "public function GetValue() {\n\t\treturn $this->_value;\n\t}" ]
[ "0.82374847", "0.79092526", "0.784267", "0.784267", "0.784267", "0.784267", "0.784267", "0.777276", "0.7733916", "0.77337676", "0.7674311", "0.76671994", "0.76671994", "0.76671994", "0.76671994", "0.76671994", "0.76671994", "0.76671994", "0.76671994", "0.76671994", "0.76671994", "0.76671994", "0.76671994", "0.76671994", "0.76671994", "0.76671994", "0.76671994", "0.764278", "0.7631997", "0.7631997", "0.7631997", "0.7631997", "0.75874406", "0.75461984", "0.75461984", "0.7530077", "0.7523352", "0.7353084", "0.72649616", "0.719476", "0.71840066", "0.7164212", "0.7163038", "0.7137756", "0.71250916", "0.6984368", "0.6984368", "0.6984368", "0.6984368", "0.6983448", "0.6982027", "0.6982027", "0.6971808", "0.6958451", "0.69538105", "0.69177485", "0.684328", "0.6836424", "0.6836424", "0.6836424", "0.6836424", "0.6836424", "0.6836424", "0.67960554", "0.6755153", "0.6694597", "0.6686153", "0.6665535", "0.66528", "0.66259027", "0.66259027", "0.66259027", "0.66259027", "0.66250324", "0.661463", "0.6614", "0.6614", "0.6605398", "0.65870106", "0.6561802", "0.6561802", "0.65516555", "0.65393656", "0.6531389", "0.65312594", "0.65254974", "0.6468721", "0.64462066", "0.64379376", "0.6433713", "0.6423536", "0.6410062", "0.63595253", "0.6336919", "0.6333135", "0.63276356", "0.6323605", "0.631131", "0.62949073", "0.6293709" ]
0.85203886
0
Sets the value of the TransactionAmount.
public function setTransactionAmount($value) { $this->_fields['TransactionAmount']['FieldValue'] = $value; return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setAmount($amount)\n {\n $this->amount = $amount;\n }", "public function setAmount($amount)\n {\n $this->amount = $amount;\n }", "public function setAmount($amount){\n\n $this->amount = $amount;\n\n }", "public function setAmount($amount)\n {\n $this->amount = Checker::int($amount, self::AMOUNT_MIN, self::AMOUNT_MAX, \"amount\");\n }", "public function setAmount($value)\n\t{\n\t\treturn $this->set('Amount', $value);\n\t}", "public function setAmount($value) \n {\n $this->_fields['Amount']['FieldValue'] = $value;\n return $this;\n }", "public function withTransactionAmount($value)\n {\n $this->setTransactionAmount($value);\n return $this;\n }", "public function setAmount($amount);", "protected function setAmount()\n {\n if ( ! isset( $_POST['amount'] ) ) {\n $this->error = true;\n $this->data['error']['amount'] = 'Please enter a donation amount.';\n return;\n }\n \n $amount = trim( $_POST['amount'] );\n\n // Remove illegal characters\n $regex = '/[[^0-9.]]/';\n $value = preg_replace( $regex, '', $amount );\n \n \tif ( $value && is_numeric( $value ) && $value > 0 ) {\n $value = floor( $value * 100 ); // Set the amount in cents.\n \t\t$this->data['amount'] = $value;\n \t} else {\n \t\t$this->data['amount'] = 0;\n \t}\n }", "public function setAmount($value)\n {\n $this->_fields['Amount']['FieldValue'] = $value;\n return $this;\n }", "public function setAmount($amount)\n {\n return $this->setData(self::AMOUNT, $amount);\n }", "public function setAmount($value)\n {\n return $this->set(self::_AMOUNT, $value);\n }", "public function setAmount($value)\n {\n return $this->set(self::_AMOUNT, $value);\n }", "public function setAmount($value)\n {\n return $this->set(self::_AMOUNT, $value);\n }", "public function setAmount($value)\n {\n return $this->set(self::_AMOUNT, $value);\n }", "public function setAmount($value)\n {\n return $this->set(self::_AMOUNT, $value);\n }", "public function setTransactionAmount($transactionAmount)\n {\n $this->transactionAmount = $transactionAmount;\n\n return $this;\n }", "public function setAmount($intAmount);", "public function setAmount($var)\n {\n GPBUtil::checkString($var, True);\n $this->amount = $var;\n\n return $this;\n }", "public function setAmount($balance)\n {\n $this->amount = (int) $balance;\n }", "public function setAmount(\\horstoeko\\ubl\\entities\\cbc\\Amount $amount)\n {\n $this->amount = $amount;\n return $this;\n }", "public function setAmount()\n {\n $exact = $this->getOriginalPurgeValue('amount_exact');\n $percentage = $this->getOriginalPurgeValue('amount_percentage');\n\n $this->amount = $this->is_percentage\n ? $percentage\n : $exact;\n }", "public function setAmount($amount)\n {\n $this->_amount = (int) $amount;\n return $this;\n }", "public function setAmountMoney(Money $amountMoney): void\n {\n $this->amountMoney = $amountMoney;\n }", "public function setAmount(string $amount)\r\n {\r\n $this->amount = $amount;\r\n\r\n return $this;\r\n }", "public function setAmount(Amount $amount)\n {\n $this->amount = $amount;\n return $this;\n }", "protected function setSettlementAmount(array $data)\n {\n $this->settlementAmount = CurrencyAndAmount::fromArray($data);\n }", "public function setAmount($amount)\n {\n $this->amount = $amount;\n\n return $this;\n }", "public function setAmount(Money $amount): self\n {\n $this->initialized['amount'] = true;\n $this->amount = $amount;\n\n return $this;\n }", "public function setAmount($var)\n {\n GPBUtil::checkInt64($var);\n $this->amount = $var;\n\n return $this;\n }", "public function setAmount($amount)\n {\n $this->_amount = $amount;\n return $this;\n }", "public function amount($value) {\n $this->annotations['amount'] = $value;\n return $this;\n }", "public function setTransactionDate($value) {\n\t\tself::$_transactionDate = $value;\n\t}", "public function setAmount($amount)\r\n {\r\n $this->amount = $amount;\r\n\r\n return $this;\r\n }", "public function setTransactionId($value) \n {\n $this->_fields['TransactionId']['FieldValue'] = $value;\n return $this;\n }", "public function set_amountCustomer($amountCustomer) {\n $this->amountCustomer = (double)$amountCustomer;\n }", "public function setAmountAttribute($input)\n {\n $this->attributes['amount'] = $input ? $input : null;\n }", "public function setUnitAmount(float $unit_amount): void\n {\n $this->_unit_amount = $unit_amount;\n }", "public function setTaxAmount($amount);", "public function setAmount(Money $amount) {\n\t\t$this->amount = $amount;\n\t\treturn $this;\n\t}", "public function setAmount($amount)\n {\n $this->amount = $amount;\n return $this;\n }", "public function setAmount($amount)\n {\n $this->amount = $amount;\n return $this;\n }", "public function setAmount($amount)\n {\n $this->amount = $amount;\n return $this;\n }", "public function setAmount($amount)\n {\n $this->amount = $amount;\n return $this;\n }", "public function set_amountInvoice($amountInvoice) {\n $this->amountInvoice = (double)$amountInvoice;\n }", "public function setAmount($amount)\n {\n if ($amount instanceof DBMoney) {\n $this->setField('Money', $amount);\n } elseif ($this->Status == 'Created' && is_numeric($amount)) {\n $this->MoneyAmount = $amount;\n }\n return $this;\n }", "public function setAmountArticle($amountArticle){\n $this->amountArticle = $amountArticle;\n }", "public function setTransaction(Transaction $transaction)\n {\n $this->transaction = $transaction;\n }", "public function setTransaction(Transaction $transaction)\n {\n $this->transaction = $transaction;\n }", "public function deposit($amount)\n {\n $this->balance += $amount;\n $this->save();\n }", "public function setTaxAmount($amount) {\r\n $this->taxAmount = NumberDataTypeHelper::truncate(floatval($amount), 2);\r\n }", "public function setAmount($var)\n {\n GPBUtil::checkFloat($var);\n $this->amount = $var;\n\n return $this;\n }", "public function settxfee($amount){\n return $this->bitcoin->settxfee($amount);\n }", "function deposit($amount) {\n $this->balance += $amount;\n }", "public final function setTransaction(iTransaction $transaction) {\n $this->_transaction = $transaction;\n }", "public function setAmount($amount)\n {\n $amount = floatval(str_replace(' ','',$amount));\n\n if (!Amount::validate($amount)) {\n throw new AmountException($amount);\n }\n $this->amount = $amount;\n\n return $this;\n }", "public function setAmountAttribute($input)\n {\n if ($input != '') {\n $this->attributes['amount'] = $input;\n } else {\n $this->attributes['amount'] = null;\n }\n }", "public function setAmountAttribute($input)\n { \n $this->attributes['amount'] = $input ? $input : null;\n }", "public function setAmount($amount)\n\t{\n\t\t$this->amount = $amount;\n\n\t\treturn $this;\n\t}", "public function getTransactionAmount() \n {\n return $this->_fields['TransactionAmount']['FieldValue'];\n }", "public function setAmount($amount)\n {\n if (!empty($amount)) {\n $this->amount = $amount;\n }\n\n return $this;\n }", "public function withAmount($value)\n {\n $this->setAmount($value);\n return $this;\n }", "public function withAmount($value)\n {\n $this->setAmount($value);\n return $this;\n }", "public function setamount($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (double) $v;\n }\n\n if ($this->amount !== $v) {\n $this->amount = $v;\n $this->modifiedColumns[] = ActionTypePeer::AMOUNT;\n }\n\n\n return $this;\n }", "public function setBaseAmount($amount) {\r\n $this->baseAmount = NumberDataTypeHelper::truncate(floatval($amount), 2);\r\n }", "public function setAmount($amount)\n {\n try {\n $this->amount = Validation::getProperAmount($amount);\n return $this;\n } catch (\\InvalidArgumentException $iae) {\n throw $iae; // rethrow the exception to handle further up in the stack.\n }\n }", "public function setBaseTaxAmount($amount);", "public function getTransactionAmount()\n {\n return $this->transactionAmount;\n }", "public function setAmount($amount = 0, $wholeAmt) {\n $amt = array(\n 'x_amount'=>$this->cleanAmt($amount, $wholeAmt),\n );\n $this->NVP = array_merge($this->NVP, $amt); \n }", "protected function amount($amount)\n {\n return $this->setAmount($amount);\n }", "public function setBtcAmount($amount)\n {\n if (!empty($amount)) {\n $this->btc = $amount;\n }\n\n return $this;\n }", "public function deposit($amount)\n {\n $this->increase($amount);\n \n return;\n }", "public function setTransactionNumber($transaction_number);", "public function setTxnID($value)\n\t{\n\t\treturn $this->set('TxnID', $value);\n\t}", "public function setTransactionId($value)\n {\n return $this->set(self::TRANSACTION_ID, $value);\n }", "function SetAmountSoldOutside ($amount = 0) {\n\t\n}", "public function setAmountTotal($amountTotal)\n {\n $this->amountTotal = (float) $amountTotal;\n }", "public function setAmount($value) {\n if(strlen($value) > 8 ){\n throw new ValueException(\"Value \".$value.\" is higher than 8\");\n }\n $this->Importe = number_format($value,$this->Exponente,'','');\n }", "public function update($amount)\n {\n $currentBalance = auth()->user()->balance->amount;\n $newAmount = $currentBalance + $amount;\n auth()->user()->balance()->update(['amount' => $newAmount]);\n }", "function set_transaction_value($id, $value){\n $str_query=\"update pos_transaction set value = $value where transaction_id='$id'\";\n return $this->query($str_query);\n }", "public function setInvoiceAmount($val)\n {\n $this->_propDict[\"invoiceAmount\"] = floatval($val);\n return $this;\n }", "public function setAmountCredit(float $amountCredit): TransactionRequest\n {\n $this->amountCredit = $amountCredit;\n return $this;\n }", "public function setDepositAmount($value){\n return $this->setParameter('deposit_amount', $value);\n }", "public function setTransactionId($id)\n {\n $this->_data['trx_id'] = $id;\n }", "public function setPaymentAmountType($value)\n {\n $this->_fields['PaymentAmountType']['FieldValue'] = $value;\n return $this;\n }", "public function setFreeAfterAmountAttribute($amount)\n {\n $this->attributes['free_after_amount'] = formatAmount($amount);\n }", "protected function setTargetAmountAttribute($value)\n {\n $this->attributes['target_amount'] = preg_replace('/[,]/', '', $value);\n }", "public function setTransactionDate($value) \n {\n $this->_fields['TransactionDate']['FieldValue'] = $value;\n return $this;\n }", "public function set_value($value) {\n\t\t$this->_value = $value + 0;\n\t}", "public function setAmountDebit(float $amountDebit): TransactionRequest\n {\n $this->amountDebit = $amountDebit;\n return $this;\n }", "public function setStoneAmount($value)\n {\n return $this->set(self::_STONE_AMOUNT, $value);\n }", "public function setCustomGiftcardAmount($value);", "public function setBaseDiscountTaxCompensationAmount($amount);", "public function Amount($amount) {\n\t\t$this->Param('amount', $amount);\n\n\t\treturn true;\n\t}", "public function Amount($amount) {\n\t\t$this->Param('amount', $amount);\n\n\t\treturn true;\n\t}", "public function set_total_outstanding_amount( $value ) {\n\t\tif ( ! is_numeric( $value ) ) {\n\t\t\tthrow new Exception( esc_html__( 'Invalid total outstanding amount.', 'credits-for-woocommerce' ) ) ;\n\t\t}\n\n\t\t$this->set_prop( 'total_outstanding_amount', wc_format_decimal( $value ) ) ;\n\t}", "public function setGiftcardAmount($value);", "function setPay( $value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->Pay = $value;\n }", "public function setFeeSettlementAmount(\\Nogrod\\eBaySDK\\MerchantData\\AmountType $feeSettlementAmount)\n {\n $this->feeSettlementAmount = $feeSettlementAmount;\n return $this;\n }", "public function setPaymentAmount(float $paymentAmount): bool\n {\n if ($paymentAmount < 0.0) {\n $msg = \"PaymentAmount can not be negative\";\n \\Logger::getLogger(\\get_class($this))\n ->error(\\sprintf(__METHOD__.\" '%s'\", $msg));\n $return = false;\n $this->getErrorRegistor()->addOnSetValue(\"PaymentAmount_not_valid\");\n } else {\n $return = true;\n }\n $this->paymentAmount = $paymentAmount;\n \\Logger::getLogger(\\get_class($this))\n ->debug(\n \\sprintf(\n __METHOD__.\" set to '%s'\",\n \\strval($this->paymentAmount)\n )\n );\n return $return;\n }" ]
[ "0.7185124", "0.7185124", "0.7093307", "0.69473004", "0.68589866", "0.68386364", "0.6837922", "0.682921", "0.67454344", "0.67162365", "0.65061307", "0.6404021", "0.64025396", "0.64025396", "0.64025396", "0.64025396", "0.6392744", "0.6290554", "0.62542206", "0.6233823", "0.6199975", "0.6163746", "0.61516714", "0.61329406", "0.61072624", "0.60959446", "0.60828555", "0.60445523", "0.60400605", "0.5952895", "0.5934583", "0.59336925", "0.59135926", "0.58963495", "0.58881855", "0.5873979", "0.58573824", "0.58490825", "0.5848201", "0.5838316", "0.5829251", "0.5829251", "0.5829251", "0.5829251", "0.58046293", "0.57955456", "0.5770241", "0.57502216", "0.57502216", "0.57444674", "0.573909", "0.57318157", "0.5726223", "0.5719585", "0.5709073", "0.5683774", "0.5665015", "0.5658995", "0.56562626", "0.56380224", "0.56162333", "0.55900913", "0.55900913", "0.5531151", "0.5524829", "0.5521875", "0.55166644", "0.55146277", "0.5482359", "0.5475584", "0.5470554", "0.5432024", "0.5431499", "0.5424226", "0.54206175", "0.54170585", "0.54089963", "0.5402338", "0.5377627", "0.53263044", "0.5316371", "0.5251054", "0.52310973", "0.5229112", "0.52226824", "0.5215857", "0.51990885", "0.51989466", "0.5196212", "0.51920867", "0.51901084", "0.51875895", "0.51823723", "0.5173543", "0.5173543", "0.5156896", "0.51521057", "0.5147333", "0.5146922", "0.5143202" ]
0.84026784
0
Sets the value of the TransactionAmount and returns this instance
public function withTransactionAmount($value) { $this->setTransactionAmount($value); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setTransactionAmount($transactionAmount)\n {\n $this->transactionAmount = $transactionAmount;\n\n return $this;\n }", "public function setTransactionAmount($value) \n {\n $this->_fields['TransactionAmount']['FieldValue'] = $value;\n return;\n }", "public function setAmount($amount)\n {\n $this->amount = $amount;\n\n return $this;\n }", "public function setAmount($amount)\r\n {\r\n $this->amount = $amount;\r\n\r\n return $this;\r\n }", "public function setAmount($amount)\n {\n $this->_amount = $amount;\n return $this;\n }", "public function setAmount($amount)\n {\n $this->amount = $amount;\n return $this;\n }", "public function setAmount($amount)\n {\n $this->amount = $amount;\n return $this;\n }", "public function setAmount($amount)\n {\n $this->amount = $amount;\n return $this;\n }", "public function setAmount($amount)\n {\n $this->amount = $amount;\n return $this;\n }", "public function setAmount($value) \n {\n $this->_fields['Amount']['FieldValue'] = $value;\n return $this;\n }", "public function setAmount($amount)\n {\n $this->_amount = (int) $amount;\n return $this;\n }", "public function setAmount(Amount $amount)\n {\n $this->amount = $amount;\n return $this;\n }", "public function setAmount(string $amount)\r\n {\r\n $this->amount = $amount;\r\n\r\n return $this;\r\n }", "public function setAmount($value)\n {\n $this->_fields['Amount']['FieldValue'] = $value;\n return $this;\n }", "public function setAmount($amount)\n\t{\n\t\t$this->amount = $amount;\n\n\t\treturn $this;\n\t}", "public function setAmount($amount)\n {\n if (!empty($amount)) {\n $this->amount = $amount;\n }\n\n return $this;\n }", "public function setTransactionId($value) \n {\n $this->_fields['TransactionId']['FieldValue'] = $value;\n return $this;\n }", "public function setAmount($amount)\n {\n if ($amount instanceof DBMoney) {\n $this->setField('Money', $amount);\n } elseif ($this->Status == 'Created' && is_numeric($amount)) {\n $this->MoneyAmount = $amount;\n }\n return $this;\n }", "public function withAmount($value)\n {\n $this->setAmount($value);\n return $this;\n }", "public function withAmount($value)\n {\n $this->setAmount($value);\n return $this;\n }", "public function setAmount(Money $amount): self\n {\n $this->initialized['amount'] = true;\n $this->amount = $amount;\n\n return $this;\n }", "public function setAmount($value)\n\t{\n\t\treturn $this->set('Amount', $value);\n\t}", "public function setAmount($amount)\n {\n return $this->setData(self::AMOUNT, $amount);\n }", "protected function amount($amount)\n {\n return $this->setAmount($amount);\n }", "public function setAmount(\\horstoeko\\ubl\\entities\\cbc\\Amount $amount)\n {\n $this->amount = $amount;\n return $this;\n }", "public function setTransactionId($transactionId)\n {\n $this->transactionId = $transactionId;\n return $this;\n }", "public function setAmount(Money $amount) {\n\t\t$this->amount = $amount;\n\t\treturn $this;\n\t}", "public function withTransactionId($value)\n {\n $this->setTransactionId($value);\n return $this;\n }", "public function setAmount($var)\n {\n GPBUtil::checkString($var, True);\n $this->amount = $var;\n\n return $this;\n }", "public function setBtcAmount($amount)\n {\n if (!empty($amount)) {\n $this->btc = $amount;\n }\n\n return $this;\n }", "public function setAmount($amount);", "public function setAmount($amount){\n\n $this->amount = $amount;\n\n }", "public function setTransactionFee($transaction_fee)\n {\n $this->transaction_fee = $transaction_fee;\n return $this;\n }", "public function setTransactionFee($transaction_fee)\n {\n $this->transaction_fee = $transaction_fee;\n return $this;\n }", "public function setAmount($value)\n {\n return $this->set(self::_AMOUNT, $value);\n }", "public function setAmount($value)\n {\n return $this->set(self::_AMOUNT, $value);\n }", "public function setAmount($value)\n {\n return $this->set(self::_AMOUNT, $value);\n }", "public function setAmount($value)\n {\n return $this->set(self::_AMOUNT, $value);\n }", "public function setAmount($value)\n {\n return $this->set(self::_AMOUNT, $value);\n }", "public function amount($value) {\n $this->annotations['amount'] = $value;\n return $this;\n }", "public function setAmount($amount)\n {\n try {\n $this->amount = Validation::getProperAmount($amount);\n return $this;\n } catch (\\InvalidArgumentException $iae) {\n throw $iae; // rethrow the exception to handle further up in the stack.\n }\n }", "public function setAmount($amount)\n {\n $this->amount = $amount;\n }", "public function setAmount($amount)\n {\n $this->amount = $amount;\n }", "public function setAmount($var)\n {\n GPBUtil::checkInt64($var);\n $this->amount = $var;\n\n return $this;\n }", "public function setAmount($amount)\n {\n $amount = floatval(str_replace(' ','',$amount));\n\n if (!Amount::validate($amount)) {\n throw new AmountException($amount);\n }\n $this->amount = $amount;\n\n return $this;\n }", "public function withTransactionDate($value)\n {\n $this->setTransactionDate($value);\n return $this;\n }", "public function setTransaction($var)\n {\n GPBUtil::checkString($var, False);\n $this->transaction = $var;\n\n return $this;\n }", "public function withTransactionSerialNumber($value)\n {\n $this->setTransactionSerialNumber($value);\n return $this;\n }", "public function setTransactions($transactions)\r\n {\r\n $this->transactions = $transactions;\r\n\r\n return $this;\r\n }", "public function setTransactions($transactions)\r\n {\r\n $this->transactions = $transactions;\r\n\r\n return $this;\r\n }", "public function withTransactionStatus($value)\n {\n $this->setTransactionStatus($value);\n return $this;\n }", "public function withTransactionStatus($value)\n {\n $this->setTransactionStatus($value);\n return $this;\n }", "public function setTransactions($transactions)\r\n {\r\n $this->transactions = $transactions;\r\n return $this;\r\n }", "public function times($amount)\n {\n $this->amount = $amount;\n\n return $this;\n }", "public function getTransactionAmount()\n {\n return $this->transactionAmount;\n }", "public function setTransactionRequest(\\DesolatorMagno\\AuthorizePhp\\Api\\Contract\\V1\\TransactionRequestType $transactionRequest)\n {\n $this->transactionRequest = $transactionRequest;\n return $this;\n }", "public function getTransactionAmount() \n {\n return $this->_fields['TransactionAmount']['FieldValue'];\n }", "public function transactionNum($value) {\n $this->annotations['transaction_num'] = $value;\n return $this;\n }", "public function setTransactionId($value)\n {\n return $this->set(self::TRANSACTION_ID, $value);\n }", "public function request($amount)\n {\n if (!\\is_numeric($amount)) {\n throw new \\InvalidArgumentException('The amount must be numeric');\n }\n\n $this->amount = $amount;\n\n return $this;\n }", "public function request($amount)\n {\n if (!\\is_numeric($amount)) {\n throw new \\InvalidArgumentException('The amount must be numeric');\n }\n\n $this->amount = $amount;\n\n return $this;\n }", "public function setTransactionDate($value) \n {\n $this->_fields['TransactionDate']['FieldValue'] = $value;\n return $this;\n }", "public function setTransactionCurrency($transactionCurrency)\n {\n $this->transactionCurrency = $transactionCurrency;\n\n return $this;\n }", "public function setVatAmount(string $vatAmount)\r\n {\r\n $this->vatAmount = $vatAmount;\r\n\r\n return $this;\r\n }", "public function setAmount($var)\n {\n GPBUtil::checkFloat($var);\n $this->amount = $var;\n\n return $this;\n }", "public function setTypeTransaction($typeTransaction)\n {\n $this->typeTransaction = $typeTransaction;\n\n return $this;\n }", "public function setTransactionXID($transactionXID)\n {\n $this->transactionXID = $transactionXID;\n\n return $this;\n }", "protected function setAmount()\n {\n if ( ! isset( $_POST['amount'] ) ) {\n $this->error = true;\n $this->data['error']['amount'] = 'Please enter a donation amount.';\n return;\n }\n \n $amount = trim( $_POST['amount'] );\n\n // Remove illegal characters\n $regex = '/[[^0-9.]]/';\n $value = preg_replace( $regex, '', $amount );\n \n \tif ( $value && is_numeric( $value ) && $value > 0 ) {\n $value = floor( $value * 100 ); // Set the amount in cents.\n \t\t$this->data['amount'] = $value;\n \t} else {\n \t\t$this->data['amount'] = 0;\n \t}\n }", "public function setamount($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (double) $v;\n }\n\n if ($this->amount !== $v) {\n $this->amount = $v;\n $this->modifiedColumns[] = ActionTypePeer::AMOUNT;\n }\n\n\n return $this;\n }", "public function setTransactionStatus($value) \n {\n $this->_fields['TransactionStatus']['FieldValue'] = $value;\n return $this;\n }", "public function setTransactionStatus($value) \n {\n $this->_fields['TransactionStatus']['FieldValue'] = $value;\n return $this;\n }", "public function settxfee($amount){\n return $this->bitcoin->settxfee($amount);\n }", "public function setTransactionIndex($transactionIndex)\n {\n $this->transactionIndex = $transactionIndex;\n\n return $this;\n }", "public function setAmount($intAmount);", "public function trans(){\n\t\t$this->is_transaction = true;\n\t\treturn $this;\n\t}", "public function withPaymentAmountType($value)\n {\n $this->setPaymentAmountType($value);\n return $this;\n }", "public function setAmount(float $amount): InitAbstract\n\t{\n\t\tparent::setAmount($amount);\n\n\t\t$this->setData(null, 'minimumAmount');\n\t\t$this->setData(null, 'maximumAmount');\n\n\t\treturn $this;\n\t}", "public function setTxnID($value)\n\t{\n\t\treturn $this->set('TxnID', $value);\n\t}", "public function setTransId($transId)\n {\n $this->transId = $transId;\n return $this;\n }", "public function setAmount($amount)\n {\n $this->amount = Checker::int($amount, self::AMOUNT_MIN, self::AMOUNT_MAX, \"amount\");\n }", "public function setTransactionRecord($transactionRecord)\n {\n $this->transactionRecord = $transactionRecord;\n return $this;\n }", "public function setBalance( $balance)\n {\n $this->balance = (int) $balance;\n\n return $this;\n }", "public function revert($amount)\n {\n $amount = (double)$amount;\n\n if ($amount > 0 && $this->isValid(true, true, false, false)) {\n $this->setBalanceDelta(\n $amount\n )->setBalance(\n $this->getBalance() + $amount\n )->setHistoryAction(\n \\Magento\\GiftCardAccount\\Model\\History::ACTION_UPDATED\n );\n }\n\n return $this;\n }", "public function setDateTransaction($dateTransaction)\n {\n $this->dateTransaction = $dateTransaction;\n\n return $this;\n }", "public function setTransactionSignature($transactionSignature)\n {\n $this->transactionSignature = $transactionSignature;\n\n return $this;\n }", "public function setTransactionSerialNumber($value) \n {\n $this->_fields['TransactionSerialNumber']['FieldValue'] = $value;\n return $this;\n }", "public function withAmountDescription($value)\n {\n $this->setAmountDescription($value);\n return $this;\n }", "public function setExtraAmount($extraAmount)\n {\n $this->extraAmount = $extraAmount;\n return $this;\n }", "public function setAmountCredit(float $amountCredit): TransactionRequest\n {\n $this->amountCredit = $amountCredit;\n return $this;\n }", "public function withTransactionCode($code)\n {\n $this->_model['code'] = $code;\n return $this;\n }", "public function setTransactions(?Transactions $transactions): self\n {\n if ($transactions === null && $this->transactions !== null) {\n $this->transactions->setBonus(null);\n }\n\n // set the owning side of the relation if necessary\n if ($transactions !== null && $transactions->getBonus() !== $this) {\n $transactions->setBonus($this);\n }\n\n $this->transactions = $transactions;\n\n return $this;\n }", "public function compileAmount($compileAmount){\n\n if(is_integer($compileAmount)){\n $this->compileAmount = $compileAmount;\n }\n\n return $this;\n }", "public function setAmountWithVat(string $amountWithVat)\r\n {\r\n $this->amountWithVat = $amountWithVat;\r\n\r\n return $this;\r\n }", "public function setTaxAmount(array $taxAmount)\n {\n $this->taxAmount = $taxAmount;\n return $this;\n }", "public function setTransaction(Transaction $transaction)\n {\n $this->transaction = $transaction;\n }", "public function setTransaction(Transaction $transaction)\n {\n $this->transaction = $transaction;\n }", "public function charge($amount)\n {\n if ($this->isValid(false, false, false, $amount)) {\n $this->setBalanceDelta(\n -$amount\n )->setBalance(\n $this->getBalance() - $amount\n )->setHistoryAction(\n \\Magento\\GiftCardAccount\\Model\\History::ACTION_USED\n );\n }\n\n return $this;\n }", "public function setBalance($balance)\n {\n $this->balance = $balance;\n\n return $this;\n }", "public function setTransactionNumber($transaction_number);", "public function setAmount(Money $amount): PricingTier\n {\n $this->offsetSet(self::AMOUNT, $amount);\n return $this;\n }" ]
[ "0.78807884", "0.749916", "0.7292957", "0.7219336", "0.72088444", "0.7125251", "0.7125251", "0.7125251", "0.7125251", "0.7098724", "0.7091187", "0.70649517", "0.7045191", "0.6979068", "0.69522476", "0.6917814", "0.68864", "0.6825232", "0.67293394", "0.67293394", "0.67250955", "0.67028385", "0.6679909", "0.6677347", "0.6672951", "0.65951383", "0.65710276", "0.65674675", "0.6404735", "0.6402875", "0.63346165", "0.6294364", "0.62734455", "0.62734455", "0.6257359", "0.62541294", "0.62541294", "0.62541294", "0.62541294", "0.62290615", "0.62133574", "0.6150788", "0.6150788", "0.6140117", "0.6131607", "0.6128502", "0.6125825", "0.6072943", "0.60278463", "0.60278463", "0.60103756", "0.60103756", "0.6001966", "0.59949493", "0.5957057", "0.58978707", "0.58818316", "0.58730686", "0.5871396", "0.58713865", "0.58713865", "0.58548516", "0.5818339", "0.5754244", "0.57434666", "0.5739198", "0.57359326", "0.57177687", "0.57011735", "0.57006085", "0.57006085", "0.56709695", "0.56703955", "0.56625366", "0.56613123", "0.5653641", "0.5634624", "0.558648", "0.5568244", "0.5564288", "0.5559731", "0.5547221", "0.55329365", "0.5512574", "0.5480305", "0.54761916", "0.5468822", "0.54676133", "0.5457158", "0.54561317", "0.54538476", "0.5452725", "0.5442941", "0.54394937", "0.54208136", "0.54208136", "0.54110867", "0.54074293", "0.54073256", "0.5401018" ]
0.81374246
0
Checks if TransactionAmount is set
public function isSetTransactionAmount() { return !is_null($this->_fields['TransactionAmount']['FieldValue']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSetAmount()\n {\n return !is_null($this->_fields['Amount']['FieldValue']);\n }", "public function isSetAmount()\n {\n return !is_null($this->_fields['Amount']['FieldValue']);\n }", "public function hasAmount()\n {\n return isset($this->amount);\n }", "public function hasAmount(): bool\n {\n return isset($this->amount);\n }", "public function issetPaymentAmount(): bool\n {\n return isset($this->paymentAmount);\n }", "public function isEmptyAmount()\n {\n if ($this->amount == 0) {\n return true;\n }\n return false;\n }", "public function Amount($amount) {\n\t\t$this->Param('amount', $amount);\n\n\t\treturn true;\n\t}", "public function Amount($amount) {\n\t\t$this->Param('amount', $amount);\n\n\t\treturn true;\n\t}", "public function setTransactionAmount($value) \n {\n $this->_fields['TransactionAmount']['FieldValue'] = $value;\n return;\n }", "protected function setAmount()\n {\n if ( ! isset( $_POST['amount'] ) ) {\n $this->error = true;\n $this->data['error']['amount'] = 'Please enter a donation amount.';\n return;\n }\n \n $amount = trim( $_POST['amount'] );\n\n // Remove illegal characters\n $regex = '/[[^0-9.]]/';\n $value = preg_replace( $regex, '', $amount );\n \n \tif ( $value && is_numeric( $value ) && $value > 0 ) {\n $value = floor( $value * 100 ); // Set the amount in cents.\n \t\t$this->data['amount'] = $value;\n \t} else {\n \t\t$this->data['amount'] = 0;\n \t}\n }", "public function isSetTransactionId()\n {\n return !is_null($this->_fields['TransactionId']['FieldValue']);\n }", "public function isAmountAllowed()\n {\n $totalAmount = $this->getTotalAmount();\n $isCurrencyEuro = $this->isCurrencyEuro();\n\n if ($isCurrencyEuro && $totalAmount >=200 && $totalAmount <=5000) {\n return true;\n }\n\n return false;\n }", "public function isSetPaymentAmountType()\n {\n return !is_null($this->_fields['PaymentAmountType']['FieldValue']);\n }", "public function isAmountValid(TdbShopArticle $product, $requestedAmount);", "public function checkAmount(int $amount): void\n {\n if ($amount < 0) {\n throw new AmountInvalid(trans('wallet::errors.price_positive'));\n }\n }", "public function isSomeAmountMissing(): bool\n {\n if ( $this->getAmountMissing() > 0 )\n return true;\n return false;\n }", "public function validateMinimumAmount()\n {\n return !(Mage::getStoreConfigFlag('sales/minimum_order/active')\n && Mage::getStoreConfigFlag('sales/minimum_order/multi_address')\n && !$this->getQuote()->validateMinimumAmount());\n }", "public function hasAmountsInc()\n {\n return $this->AmountsInc !== null;\n }", "public function getTransactionAmount()\n {\n return $this->transactionAmount;\n }", "public function isSetAmountDescription()\n {\n return !is_null($this->_fields['AmountDescription']['FieldValue']);\n }", "public function setAmount($amount);", "public function isSetReimbursedAmount()\n {\n return !is_null($this->_fields['ReimbursedAmount']['FieldValue']);\n }", "public function getTransactionAmount() \n {\n return $this->_fields['TransactionAmount']['FieldValue'];\n }", "public function setAmount($amount)\n {\n $this->amount = Checker::int($amount, self::AMOUNT_MIN, self::AMOUNT_MAX, \"amount\");\n }", "public function setAmount($amount){\n\n $this->amount = $amount;\n\n }", "public function isTransactionPart()\n {\n return $this->_transaction != null;\n }", "public function test_validate_amount()\n {\n $amount = 50;\n $amt = $this->obj->validate_amount($amount);\n $this->assertTrue(is_numeric($amount));\n $this->assertNotNull($amount);\n $this->assertGreaterThan(0,$amount);\n $this->assertTrue($amt);\n }", "public function setAmount($amount)\n {\n $this->amount = $amount;\n }", "public function setAmount($amount)\n {\n $this->amount = $amount;\n }", "public function hasMoneytype(){\n return $this->_has(15);\n }", "public function issetTaxAmount($index)\n {\n return isset($this->taxAmount[$index]);\n }", "public function beforeValidate()\n {\n $this->amount = str_replace(',', '.', $this->amount);\n if (strlen(substr(strrchr($this->amount, \".\"), 1)) > 4) {\n $this->addError('amount', Yii::t('XcoinModule.base', 'Maximum 4 decimal places.'));\n }\n $this->amount = round($this->amount, 4);\n\n if ($this->transaction_type === self::TRANSACTION_TYPE_TRANSFER) {\n\n // Check Issue Account Asset Type\n if ($this->toAccount->account_type == Account::TYPE_ISSUE) {\n $asset = AssetHelper::getSpaceAsset($this->toAccount->space);\n if ($asset->id != $this->asset_id) {\n $this->addError('asset_id', Yii::t('XcoinModule.base', 'You cannot transfer this type of asset.'));\n }\n }\n\n // Check sender account balance\n if ($this->fromAccount->getAssetBalance($this->asset) < $this->amount) {\n $this->addError('asset_id', Yii::t('XcoinModule.base', 'Insuffient funds.'));\n }\n }\n\n if ($this->from_account_id == $this->to_account_id) {\n $this->addError('from_account_id', Yii::t('XcoinModule.base', 'Please select an different account!'));\n $this->addError('to_account_id', Yii::t('XcoinModule.base', 'Please select an different account!'));\n }\n\n\n return parent::beforeValidate();\n }", "public function setAmount()\n {\n $exact = $this->getOriginalPurgeValue('amount_exact');\n $percentage = $this->getOriginalPurgeValue('amount_percentage');\n\n $this->amount = $this->is_percentage\n ? $percentage\n : $exact;\n }", "public function isSetTransactionSerialNumber()\n {\n return !is_null($this->_fields['TransactionSerialNumber']['FieldValue']);\n }", "private static function validateAmount($amount): bool\n {\n $floatAmount = (float) $amount;\n\n return $floatAmount > 0;\n }", "public function isSetTransactionDate()\n {\n return !is_null($this->_fields['TransactionDate']['FieldValue']);\n }", "public function isValid( $Transaction ): bool\n\t{\n\t\t$Items = $Transaction->getLedger();\n\n\t\t$Total = 0;\n\n\t\tforeach( $Items as $Item )\n\t\t{\n\t\t\t$Total += $Item->getAmount();\n\t\t}\n\n\t\t$Result = true;\n\n\t\tif( $Transaction->getTotal() != $Total )\n\t\t{\n\t\t\t$Message = \"Ledger discrepancy for transaction_key: \".$Transaction->getKey();\n\n\t\t\tLog::error( $Message );\n\n\t\t\t$this->addViolation( $Message );\n\t\t\t$Result = false;\n\t\t}\n\n\t\tif( !$Transaction->getKey() )\n\t\t{\n\t\t\t$Message = \"Transaction {$Transaction->getIdentifier()} missing transaction_key: \";\n\n\t\t\tLog::error( $Message );\n\n\t\t\t$this->addViolation( $Message );\n\n\t\t\t$Result = false;\n\t\t}\n\n\t\treturn $Result;\n\t}", "public function isByAmount(): bool\n {\n return $this -> charging_type == ChargingTypeEnum :: BY_AMOUNT;\n }", "public function setAmount($intAmount);", "public static function isDeposit($amount){\n\t\tif($amount > 0)\n\t\t\treturn self::formatAmount($amount);\n\t}", "public function test_validate_deposit_limit()\n {\n $amount = 0; // zero works best here\n $deposit = $this->obj->validate_deposit_limit($amount);\n $this->assertTrue($deposit);\n }", "public static function isWithdrawal($amount){\n\t\tif($amount < 0)\n\t\t\treturn self::formatAmount($amount);\n\t}", "public function hasTransactions();", "function SetAmountSoldOutside ($amount = 0) {\n\t\n}", "public function hasAmountsDec()\n {\n return $this->AmountsDec !== null;\n }", "function validateAmount($amount)\n{ \n return is_numeric($amount) && $amount > 0;\n}", "function cf_cashbank_valid_amount($params)\n\t{\n\t\t/* Update: (grand_total - sum(plan_amount except current id)) < new_amount => error */\n\t\t$params = is_array($params) ? (object) $params : $params;\n\t\t// debug($params);\n\t\t\n\t\t$id = isset($params->id) && $params->id ? 'and t2.id <> '.$params->id : '';\n\t\t$invoice_id = $params->invoice_id;\n\t\t$str = \"SELECT (net_amount - (select coalesce(sum(amount),0) from cf_cashbank_line t2 where t2.is_active = '1' and t2.is_deleted = '0' and t2.invoice_id = t1.id $id)) as amount \n\t\t\tfrom cf_invoice t1 where t1.id = $invoice_id\";\n\t\t$row = $this->db->query($str)->row();\n\t\tif ($row->amount - $params->amount < 0) {\n\t\t\t$this->session->set_flashdata('message', $row->amount);\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}", "public function setAmount()\n\t {\n\t \tthrow new OutOfBoundsException(\"Reversal request does not support amount parameter\");\n\t }", "public function testAddAmount() {\n $amount = 1000;\n $date = '3/10/2015';\n $this->assertNull( $this->tranche->addAmount($amount, $date));\n }", "public function testCantSendNegativeAmount()\n {\n $this->model = new \\app\\models\\SendForm([\n 'receiverName' => 'demo',\n 'amount' => -100\n ]);\n $this->loginSender();\n expect_not($this->model->makeTransfer());\n expect($this->model->errors)->hasKey('amount');\n }", "public function testShouldReturnAmountDecimalNull(): void\n {\n $transaction = new Transaction();\n\n self::assertNull($transaction->getAmountDecimal());\n }", "public function get_amount_requested()\n {\n }", "protected function amount_transition_status() {\n\t\t$amount_transition_status = $this->amount_transition_status ;\n\n\t\t// Reset status transition variable.\n\t\t$this->amount_transition_status = false ;\n\n\t\tif ( ! $amount_transition_status ) {\n\t\t\treturn ;\n\t\t}\n\n\t\tdo_action( 'wc_cs_admin_funds_txn_amount_status_' . $amount_transition_status, $this ) ;\n\t}", "public function setAmountAttribute($input)\n { \n $this->attributes['amount'] = $input ? $input : null;\n }", "public function validate(): bool\n {\n throw_if(\n is_null($amount = $this->get('amount'))\n || ! is_numeric($amount),\n new Exception(\"Invalid amount, '{$amount}' given instead of float.\")\n );\n\n return true;\n }", "public function valid()\n {\n\n if ($this->container['amount'] === null) {\n return false;\n }\n if ($this->container['unit_relation'] === null) {\n return false;\n }\n return true;\n }", "function needs_payment() {\n\t\t\tif ( $this->total > 0 ) return true; else return false;\n\t\t}", "public function issetQuantity(): bool\n {\n return isset($this->quantity);\n }", "public function getamount()\n {\n return $this->amount;\n }", "public function isPositive()\n {\n return $this->amount->isPositive();\n }", "public function issetAdditionalGuestAmount($index)\n {\n return isset($this->additionalGuestAmount[$index]);\n }", "public function setAmount($value)\n\t{\n\t\treturn $this->set('Amount', $value);\n\t}", "function transaction_check(){\n }", "public function test_validate_deposit()\n {\n $amount = 5000;\n $deposit = $this->obj->validate_deposit($amount);\n $this->assertLessThanOrEqual(40000,$amount);\n $this->assertTrue($deposit);\n }", "public function testAmountValidator()\n {\n $this->assertTrue(Validators\\AmountValidator::validateAmount(452.36));\n $this->assertTrue(Validators\\AmountValidator::validateAmount(0.36, 0.1));\n $this->assertFalse(Validators\\AmountValidator::validateAmount(-23.5));\n }", "public function setAmountAttribute($input)\n {\n $this->attributes['amount'] = $input ? $input : null;\n }", "public function testGetBalanceAmount()\n {\n $amount = rand(1, 1000);\n $this->_helperMock->expects($this->once())->method('isEnabled')->will($this->returnValue(true));\n $this->_balanceInstance->expects($this->once())->method('getAmount')->will($this->returnValue($amount));\n $result = $this->_className->getBalance();\n $this->assertEquals($amount, $result);\n }", "public function buyDecimalAmount()\n\t{\n\t\treturn false;\n\t}", "public function setAmountAttribute($input)\n {\n if ($input != '') {\n $this->attributes['amount'] = $input;\n } else {\n $this->attributes['amount'] = null;\n }\n }", "public function setPaymentAmount(float $paymentAmount): bool\n {\n if ($paymentAmount < 0.0) {\n $msg = \"PaymentAmount can not be negative\";\n \\Logger::getLogger(\\get_class($this))\n ->error(\\sprintf(__METHOD__.\" '%s'\", $msg));\n $return = false;\n $this->getErrorRegistor()->addOnSetValue(\"PaymentAmount_not_valid\");\n } else {\n $return = true;\n }\n $this->paymentAmount = $paymentAmount;\n \\Logger::getLogger(\\get_class($this))\n ->debug(\n \\sprintf(\n __METHOD__.\" set to '%s'\",\n \\strval($this->paymentAmount)\n )\n );\n return $return;\n }", "public function test_validate_withdraw()\n {\n $amount = 5000;\n $withdraw = $this->obj->validate_withdraw($amount);\n $this->assertLessThanOrEqual(20000,$amount);\n $this->assertTrue($withdraw);\n }", "public function hasBalance()\n {\n return $this->balance !== null;\n }", "public function setAmount($var)\n {\n GPBUtil::checkString($var, True);\n $this->amount = $var;\n\n return $this;\n }", "public function testCantSendFromLowBalance()\n {\n $this->model = new \\app\\models\\SendForm([\n 'receiverName' => 'demo',\n 'amount' => 0.02\n ]);\n $this->loginSender('no-money');\n expect_not($this->model->makeTransfer());\n expect($this->model->errors)->hasKey('amount');\n }", "public function getAmount()\r\n {\r\n return $this->amount;\r\n }", "public function getAmount()\r\n {\r\n return $this->amount;\r\n }", "public function getAmount()\r\n {\r\n return $this->amount;\r\n }", "public function getAmount()\r\n {\r\n return $this->amount;\r\n }", "public function issetUnitPrice(): bool\n {\n return isset($this->unitPrice);\n }", "public function isSetQuantity()\n {\n return !is_null($this->_fields['Quantity']['FieldValue']);\n }", "public function isNotEnoughBalance() {\n return ($this->getFailedReason() == 'BALANCE_NOT_ENOUGH');\n }", "public function getAmount()\r\n\t{\r\n\t\treturn $this->getTransaction()->getAmount();\r\n\t}", "public function tellNotEnoughMoneyInAccount()\n {\n }", "public function isInTransaction()\n {\n return $this->_getWriteAdapter()->getTransactionLevel() > 0;\n }", "public function getIsDepositSufficient()\n {\n return $this->isDepositSufficient;\n }", "public function isZero()\n {\n return $this->amount->isZero();\n }", "public function isPositiveOrZero()\n {\n return $this->amount->isPositiveOrZero();\n }", "protected function setHideAmount()\n {\n \tif (isset($_POST['hide_amount']) && !empty($_POST['hide_amount'])) {\n \t\t$this->data['hide_amount'] = 1;\n \t} else {\n \t\t$this->data['hide_amount'] = 0;\n \t}\n }", "public function getAmount()\n {\n return $this->amount;\n }", "public function isUnderTransaction();", "public function getFeeSettlementAmount()\n {\n return $this->feeSettlementAmount;\n }", "public function setTransactionNumber($transaction_number);", "final private function __isTransaction()\n\t{\n\t\tif( ! $this->transaction )\n\t\t{\n\t\t\tthrow new \\Exception('Do not using transaction.', 421);\n\t\t}\n\t}", "public function isInTransaction();", "public function hasMoneycount(){\n return $this->_has(4);\n }", "public function isTransaction()\n {\n return $this->_isTransaction;\n }", "public function getAmount()\n\t{\n\t\treturn $this->amount;\n\t}", "public function isnumeric($amount){\n\t\tif(!empty($amount) && !is_numeric($amount)){ \n\t\t\treturn true;\n\t\t}\n\t}", "public function transaction_approved() {\n\n\t\t$errors = $this->get_errors()->get_error_codes();\n\n\t\treturn empty( $errors );\n\t}", "public function isInTransaction(): bool;" ]
[ "0.7200391", "0.7200391", "0.71448827", "0.70392334", "0.67845094", "0.6452792", "0.6353175", "0.6353175", "0.6347598", "0.61995703", "0.61812884", "0.60843307", "0.6049576", "0.6014087", "0.59796804", "0.5966889", "0.59611595", "0.5929776", "0.58868456", "0.588004", "0.5829384", "0.57962656", "0.57865644", "0.57829905", "0.5763075", "0.5748214", "0.57476133", "0.57300484", "0.57300484", "0.5714253", "0.565637", "0.5649227", "0.56390077", "0.56215644", "0.5607151", "0.55742663", "0.55471456", "0.55339473", "0.5533934", "0.55227476", "0.550618", "0.5505123", "0.55030614", "0.54929566", "0.54798007", "0.5474008", "0.54135996", "0.54023814", "0.539055", "0.5378661", "0.5371882", "0.5370105", "0.53604317", "0.5354064", "0.5354032", "0.5351151", "0.53384954", "0.53270054", "0.5323438", "0.5308875", "0.5306597", "0.5305212", "0.52952963", "0.5288463", "0.528527", "0.52830297", "0.5282285", "0.52806616", "0.52764404", "0.52739275", "0.52667373", "0.5260106", "0.5254131", "0.52530956", "0.52405196", "0.52405196", "0.52405196", "0.52405196", "0.52376354", "0.5237193", "0.5236015", "0.52302504", "0.5226693", "0.5225219", "0.52193797", "0.5195836", "0.51949567", "0.5187578", "0.51769865", "0.51764643", "0.51743835", "0.51732856", "0.5173158", "0.517159", "0.5169385", "0.5163749", "0.5163718", "0.5161988", "0.51544493", "0.5150027" ]
0.7910636
0
Gets the value of the Description property.
public function getDescription() { return $this->_fields['Description']['FieldValue']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDescription()\n {\n return $this->_Description;\n }", "public function getDescription()\n {\n return $this->Description;\n }", "public function getDescription()\n {\n return $this->Description;\n }", "public function getDescription()\n {\n return $this->Description;\n }", "public function getDescription()\r\n {\r\n return $this->description;\r\n }", "public function getDescription()\r\n {\r\n return $this->m_description;\r\n }", "public function getDescription()\r\n {\r\n return $this->description;\r\n }", "public function getDescription()\r\n {\r\n return $this->description;\r\n }", "public function getDescription()\r\n {\r\n return $this->_description;\r\n }", "public function getDescription()\r\n {\r\n return $this->_description;\r\n }", "public function getDescription() {\r\n return $this->description;\r\n }", "public function getDescription() {\n return $this->_get( 'description' );\n }", "public function getDescription() {\r\n\t\treturn $this->description;\r\n\t}", "public function getDescription() {\r\n\t\treturn $this->description;\r\n\t}", "public function getDescription() {\r\n\t\treturn $this->description;\r\n\t}", "public function getDescription() {\n return $this->desc;\n }", "public function getDescription() {\n return $this->_description;\n }", "public function getDescription() {\n return $this->_description;\n }", "public function getDescription()\r\n {\r\n return $this->description;\r\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }" ]
[ "0.8674368", "0.8655266", "0.8655266", "0.8655266", "0.8627769", "0.8616051", "0.8612501", "0.8612501", "0.8602562", "0.8602562", "0.8592361", "0.85911113", "0.8588051", "0.8588051", "0.8588051", "0.85775054", "0.85694647", "0.85694647", "0.8562985", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007", "0.8555007" ]
0.0
-1
Sets the value of the Description property.
public function setDescription($value) { $this->_fields['Description']['FieldValue'] = $value; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDesciption($description);", "protected function setDescription($description) {\r\n $this->description = $description;\r\n }", "public function setDescription($description) {\n $this->_description = $description;\n }", "public function setDescription($description)\n {\n $this->_description = $description;\n }", "public function set_description ($description) {\n $this->description = $description;\n }", "function set_description($description)\r\n {\r\n $this->set_default_property(self :: PROPERTY_DESCRIPTION, $description);\r\n }", "public function setDescription($description)\r\n {\r\n $this->description = $description;\r\n }", "function setDescription($description) {\n\t\t$this->description = $description;\n\t}", "function setDescription( $value )\r\n {\r\n $this->Description = $value;\r\n }", "function setDescription( $value )\r\n {\r\n $this->Description = $value;\r\n }", "public function setDescription($description) {\n $this->description = $description;\n }", "public function setDescription($description)\n {\n $this->_description = $description;\n }", "function set_description($description)\n {\n $this->set_default_property(self :: PROPERTY_DESCRIPTION, $description);\n }", "public function setDescription( $description )\r\n\t{\r\n\t\t$this->description = $description;\r\n\t}", "public function setDescription($description) {\n\t\t$this->description = $description;\n\t}", "public function setDescription(string $description)\n {\n $this->description = $description;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n }", "public function setDescription($description){\n\t\t$this->description = $description;\n\t}", "public function setDescription($description)\n\t{\n\t\t$this->_description = $description;\n\t}", "public function setDescription($desc) {\n\t\t$this->description = $desc;\n\t}", "public function set_description($description)\n {\n $this->set_default_property(self::PROPERTY_DESCRIPTION, $description);\n }", "public function setDescription($desc)\n {\n $this->description = $desc;\n }", "public function setDescription(string $description)\n {\n $this->description = $description;\n }", "function setDescription($description) {\n $this->checkChange();\n\n $this->description = $description;\n return $this;\n }", "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "public function setDescription($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\StringValue::class);\n $this->description = $var;\n\n return $this;\n }", "public function setDescription($value)\n {\n $this->setItemValue('description', (string)$value);\n }", "public function setDescription($description);", "public function setDescription($description);", "public function setDescription($description);", "public function setDescription($description);", "public function setDescription($description);", "public function setDescription($description);", "public function setDescription($description) \n\t{\n \n $this->description = empty($description) ? \"\" : $description;\t\n\t}", "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n }", "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "public function setSetDescription($description) {\r\n\t\t$this -> setdescription = $description;\r\n\t}", "public function setDescription($value)\n {\n return $this->set('Description', $value);\n }", "public function setDescription($value)\n {\n return $this->set('Description', $value);\n }", "public function setDescription($value)\n {\n return $this->set('Description', $value);\n }", "public function setDescription($value)\n {\n return $this->set('Description', $value);\n }", "public function setDescription($value)\n {\n return $this->set('Description', $value);\n }", "public function setDescription($value)\n {\n return $this->set('Description', $value);\n }", "public function setDescription($value)\n {\n return $this->set('Description', $value);\n }", "public function setDescription($value)\n {\n return $this->set('Description', $value);\n }", "public function setDescription($value)\n {\n return $this->set('Description', $value);\n }", "public function setDescription($value)\n {\n return $this->set('Description', $value);\n }", "public function setDescription($value)\n {\n return $this->set('Description', $value);\n }", "public function setDescription(?string $description): void\n {\n $this->description['value'] = $description;\n }", "protected function assignDescription()\n {\n $this->description = '';\n }", "public function setDescription($description)\n {\n parent::setDescription($this->replaceType($description));\n }", "public function set_description($desciption){\n\t\t$this->set_channel_element('description', $desciption);\n\t}", "public function setDescription($newDescription)\n {\n $this->description = $newDescription;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n \n return $this;\n }" ]
[ "0.8369968", "0.8347932", "0.8298954", "0.8296914", "0.8288551", "0.82698596", "0.8261974", "0.824226", "0.82360035", "0.82360035", "0.82344484", "0.8229721", "0.82235324", "0.82129765", "0.8205581", "0.81937397", "0.81833684", "0.81833684", "0.81833684", "0.81833684", "0.81833684", "0.81833684", "0.81833684", "0.81833684", "0.81833684", "0.81833684", "0.81833684", "0.81833684", "0.81833684", "0.81819534", "0.8168672", "0.81377673", "0.80949", "0.80671406", "0.8044384", "0.80116624", "0.7950145", "0.7950145", "0.7950145", "0.7950145", "0.7950145", "0.7950145", "0.7950145", "0.7950145", "0.7950145", "0.7950145", "0.7950145", "0.7950145", "0.7950145", "0.7950145", "0.7950145", "0.7950145", "0.7950145", "0.7950145", "0.7950145", "0.7950145", "0.7950145", "0.7950145", "0.7950145", "0.7950145", "0.794533", "0.7910755", "0.7909244", "0.7909244", "0.7909244", "0.7909244", "0.7909244", "0.7909244", "0.7904302", "0.7900529", "0.7879776", "0.7879776", "0.7879776", "0.7879776", "0.7879776", "0.7879776", "0.7879776", "0.7879776", "0.7879776", "0.7879776", "0.7879776", "0.7879776", "0.7879776", "0.7841209", "0.78230345", "0.78230345", "0.78230345", "0.78230345", "0.78230345", "0.78218454", "0.78218454", "0.78218454", "0.78218454", "0.78218454", "0.78218454", "0.7805012", "0.7798035", "0.77524704", "0.77373743", "0.7734583", "0.77331287" ]
0.0
-1
Sets the value of the Description and returns this instance
public function withDescription($value) { $this->setDescription($value); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDescription($description)\n {\n $this->description = $description;\n \n return $this;\n }", "function setDescription($description) {\n $this->checkChange();\n\n $this->description = $description;\n return $this;\n }", "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "public function setDescription($value) \n {\n $this->_fields['Description']['FieldValue'] = $value;\n return $this;\n }", "public function setDescription($description)\r\n {\r\n $this->description = $description;\r\n\r\n return $this;\r\n }", "public function setDescription($description){\n $this->description = $description;\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description) {\n $this->_description = $description;\n return $this;\n }", "public function setDescription($descr) {\n $this->_description = (string) $descr;\n return $this;\n }", "public function setDescription($Description)\n {\n $this->Description = $Description;\n\n return $this;\n }", "public function setDescription($description)\r\n {\r\n $this->description = $description;\r\n\r\n return $this;\r\n }", "public function setDescription($description)\n {\n $this->values['Description'] = $description;\n return $this;\n }", "public function setDescription($description)\n {\n $this->values['Description'] = $description;\n return $this;\n }", "public function setDescription($description)\n {\n $this->values['Description'] = $description;\n return $this;\n }", "public function setDescription($description) {\n $this->description = $description;\n return $this;\n }", "public function setDescription($description) {\n $this->description = $description;\n return $this;\n }", "public function setDescription($description)\n {\n $this->_description = $description;\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n return $this;\n }", "public function description( string $description ) : self\n {\n $this->description = $description;\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n\t{\n\t\t$this->description = $description;\n\t\treturn $this;\n\t}", "public function setDescription(string $description) : self\n {\n $this->description = $description;\n return $this;\n }", "public function setDescription($description): self\r\n {\r\n $this->extras['description'] = $description;\r\n return $this;\r\n }", "public function setDescription($description) {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($p_desc)\n {\n $this->description = $p_desc;\n return $this;\n }", "public function setDescription(string $description)\r\n {\r\n $this->description = $description;\r\n\r\n return $this;\r\n }", "public function _setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function _setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n \n $this->__set(self::FIELD_DESCRIPTION,$description);\n \n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($description)\n {\n $this->description = (string) $description;\n\n return $this;\n }", "public function setDescription($description)\n\t{\n\t\t$this->description = $description;\n\n\t\treturn $this;\n\t}", "public function setDescription($description): self\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription(string $description): self\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription(string $description): self\n {\n $this->description = $description;\n\n return $this;\n }", "public function setDescription($value)\n {\n return $this->set('Description', $value);\n }", "public function setDescription($value)\n {\n return $this->set('Description', $value);\n }", "public function setDescription($value)\n {\n return $this->set('Description', $value);\n }", "public function setDescription($value)\n {\n return $this->set('Description', $value);\n }", "public function setDescription($value)\n {\n return $this->set('Description', $value);\n }" ]
[ "0.8145275", "0.8142418", "0.81168616", "0.81168616", "0.81168616", "0.81168616", "0.81168616", "0.81168616", "0.81168616", "0.81168616", "0.81168616", "0.81168616", "0.81168616", "0.81168616", "0.81168616", "0.8105258", "0.80708355", "0.8048417", "0.80425495", "0.80221486", "0.80192333", "0.80091715", "0.7985055", "0.79787374", "0.79787374", "0.79787374", "0.7968431", "0.7968431", "0.79639274", "0.7927484", "0.7927484", "0.7927484", "0.7927484", "0.7927484", "0.7927484", "0.7927484", "0.7927484", "0.7927484", "0.7927484", "0.7927484", "0.7927484", "0.7903813", "0.79018307", "0.79018307", "0.7881479", "0.78772956", "0.7865188", "0.7842507", "0.7840831", "0.78386056", "0.7830244", "0.7824725", "0.7824725", "0.7797867", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.77922267", "0.7789319", "0.7786652", "0.7779426", "0.7773729", "0.7773729", "0.77410203", "0.77410203", "0.77410203", "0.77410203", "0.77410203" ]
0.782893
51
Checks if Description is set
public function isSetDescription() { return !is_null($this->_fields['Description']['FieldValue']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function canSetDescription();", "public function issetDescription(): bool\n {\n return isset($this->description);\n }", "function hasDescription()\n {\n return !empty($this->description);\n }", "public function hasDescription()\n {\n return !empty($this->description);\n }", "public function validateDescription()\n {\n if (empty($this->_cleanData['description'])) {\n $this->_addErrorMessage(\"Your description was missing\");\n\n return false;\n }\n\n return true;\n }", "public function canSetDescription()\n {\n return $this->canSetDescription;\n }", "public function hasDescription(){\n return $this->_has(1);\n }", "public function has_description(){\n\t\treturn 0 < strlen($this->_description);\n\t}", "public function __validate_description() {\n if (isset($this->initial_data['description'])) {\n $this->validated_data[\"description\"] = $this->initial_data['description'];\n } else {\n $this->validated_data[\"description\"] = \"\";\n }\n }", "public function hasDescription() {\n return $this->_has(4);\n }", "public function hasDescription() {\n return $this->_has(4);\n }", "public function hasDescription() {\n return $this->_has(3);\n }", "public function hasDescription() {\n return $this->_has(3);\n }", "public function hasDescription(){\n return $this->_has(5);\n }", "public function hasDescription() {\n return $this->_has(7);\n }", "protected function checkDescription(&$inMessage = '') {\n\t\t$isValid = true;\n\t\tif ( !is_string($this->_Description) && $this->_Description !== '' ) {\n\t\t\t$inMessage .= \"{$this->_Description} is not a valid value for Description\";\n\t\t\t$isValid = false;\n\t\t}\t\t\n\t\t\t\t\n\t\treturn $isValid;\n\t}", "public function issetProductDescription(): bool\n {\n return isset($this->productDescription);\n }", "public function issetProductDescription(): bool\n {\n return isset($this->productDescription);\n }", "public function canStoreDescription();", "public function testSetGetDescription()\n {\n $this->item->setDescription('A fine javelin, suitable for throwing at retreating enemies.');\n $this->assertEquals($this->item->getDescription(), 'A fine javelin, suitable for throwing at retreating enemies.');\n }", "public function setDesciption($description);", "public function setDescription($description) \n\t{\n \n $this->description = empty($description) ? \"\" : $description;\t\n\t}", "protected function checkDescription(&$inMessage = '') {\n\t\t$isValid = true;\n\t\tif ( !is_string($this->_Description) && $this->_Description !== '' ) {\n\t\t\t$inMessage .= \"{$this->_Description} is not a valid value for Description\";\n\t\t\t$isValid = false;\n\t\t}\t\t\n\t\tif ( $isValid && strlen($this->_Description) > 30 ) {\n\t\t\t$inMessage .= \"Description cannot be more than 30 characters\";\n\t\t\t$isValid = false;\n\t\t}\n\t\tif ( $isValid && strlen($this->_Description) <= 1 ) {\n\t\t\t$inMessage .= \"Description must be more than 1 character\";\n\t\t\t$isValid = false;\n\t\t}\t\t\n\t\t\t\t\n\t\treturn $isValid;\n\t}", "public function testSetDescription(): void\n {\n $set = $this->class->setDescription($this->value);\n\n self::assertTrue($set instanceof Command);\n }", "public function testAssignDescription()\n {\n $this->markTestIncomplete(\n 'This test has not been implemented yet.'\n );\n }", "public function isDescriptionVisible()\n {\n return (\n $this->isInformationVisible() && \n Mage::getStoreConfigFlag(self::XML_PATH_OPTIONS_DISPLAY_DESCRIPTION)\n ) ? true : false;\n }", "public function setDescription($description);", "public function setDescription($description);", "public function setDescription($description);", "public function setDescription($description);", "public function setDescription($description);", "public function setDescription($description);", "public function shouldHaveDescription()\n {\n // Arrange\n $attributes = factory(Project::class)->raw([\n 'description' => ''\n ]);\n\n // Action\n $response = $this->post('/projects', $attributes);\n\n // Assert\n $response->assertSessionHasErrors('description');\n }", "function setDescription( $value )\r\n {\r\n $this->Description = $value;\r\n }", "function setDescription( $value )\r\n {\r\n $this->Description = $value;\r\n }", "public function hasDescription($item)\n {\n return trim($item->getDescription()) != '';\n }", "function setDescription($description) {\n\t\t$this->description = $description;\n\t}", "public function testSetAndGetDescription()\r\n {\r\n $testObj = $this->_createMockModel();\r\n $baseObj = $this->_createMockModel();\r\n\r\n // Set the Description\r\n $testObj->setDescription('Test Test Test Test');\r\n\r\n // Assert that a change occurred in the test object\r\n $this->assertNotEquals($testObj, $baseObj);\r\n\r\n // Assert that the Description field was updated\r\n $this->assertEquals('Test Test Test Test', $testObj->getDescription());\r\n\r\n // Assert that no other return values were affected\r\n $this->_assertModelsSameExcept($testObj, $baseObj, 'Description');\r\n }", "public function hasFileDescription()\n {\n return $this->file_description !== null;\n }", "public function setDescription(string $description): bool\n {\n try {\n $this->description = $this->valTextMandMaxCar(\n $description, 200, __METHOD__\n );\n $return = true;\n } catch (AuditFileException $e) {\n $this->description = $description;\n \\Logger::getLogger(\\get_class($this))\n ->error(\\sprintf(__METHOD__.\" '%s'\", $e->getMessage()));\n $this->getErrorRegistor()->addOnSetValue(\"ProductCode_not_valid\");\n $return = false;\n }\n \\Logger::getLogger(\\get_class($this))\n ->debug(\\sprintf(__METHOD__.\" set to '%s'\", $this->description));\n return $return;\n }", "public function issetDescription($index)\n {\n return isset($this->description[$index]);\n }", "public function issetDescription($index)\n {\n return isset($this->description[$index]);\n }", "public function issetDescription($index)\n {\n return isset($this->description[$index]);\n }", "public function issetDescription($index)\n {\n return isset($this->description[$index]);\n }", "protected function assignDescription()\n {\n $this->description = '';\n }", "function set_description($description)\r\n {\r\n $this->set_default_property(self :: PROPERTY_DESCRIPTION, $description);\r\n }", "public function testCommandHasADescription()\n {\n self::assertNotEmpty($this->command->getDescription());\n }", "public function testSetGetDescription()\n {\n $charge = new Charge();\n $charge->setDescription('Centurion Guarded Delivery via Horse');\n $this->assertEquals($charge->getDescription(), 'Centurion Guarded Delivery via Horse');\n unset($charge);\n }", "public function setDescription($description){\n\t\t$this->description = $description;\n\t}", "public function setDescription(string $desc) : bool {\n $trimmed = trim($desc);\n\n if (strlen($trimmed) > 0) {\n $this->taskDesc = $trimmed;\n\n return true;\n }\n\n return false;\n }", "protected function setDescription($description) {\r\n $this->description = $description;\r\n }", "public function setDescription ($value) {\n\t\t$this->setData(\"pageDescription\", $value);\n\t\treturn true;\n\t}", "public function setBlankDesc($value)\n {\n $this->internalEmptyDescription = $value;\n }", "public function setDescription($value) {\n\t\tif($value == \"\") { $value = \"None\"; }\n\t\tself::$_description = $value;\n\t}", "public function setDesc($val){ return $this->setField('desc',$val); }", "public function set_description ($description) {\n $this->description = $description;\n }", "public function isSetAmountDescription()\n {\n return !is_null($this->_fields['AmountDescription']['FieldValue']);\n }", "function set_description($description)\n {\n $this->set_default_property(self :: PROPERTY_DESCRIPTION, $description);\n }", "public function setDescription($description)\n {\n $this->_description = $description;\n }", "public function getHasDescriptionAttribute($has_description)\n {\n return $has_description == 1 ? true : false;\n }", "public function setDescription($str) {\n $trimmed = trim($str);\n\n if (strlen($trimmed) > 0) {\n $this->description = $trimmed;\n\n return true;\n }\n\n return false;\n }", "public function setDescription($description)\r\n {\r\n $this->description = $description;\r\n }", "public function setDescription( $description )\r\n\t{\r\n\t\t$this->description = $description;\r\n\t}", "public function testDescription()\n {\n $description_original = \"This is the original \\\"description\\\".\";\n $description_received =\n MetaTags::setDescription($description_original,0)\n ->getDescription();\n\n // Make sure what we got back is what we put in. (not truncated)\n $this->assertEquals(\n $description_original,\n $description_received,\"The original description was not a match\"\n );\n\n // Do the same test, but with truncation turned on.\n $description_received =\n MetaTags::setDescription($description_original,10)\n ->getDescription();\n\n // Test to make sure truncation is working.\n $this->assertEquals(\n $description_received,\n MetaTags::truncateAtWord($description_original,10)\n );\n\n $tag_text = MetaTags::renderDescription(true)->__toString();\n $this->assertStringStartsWith(\"<meta \",$tag_text);\n $this->assertStringEndsWith(\">\",$tag_text);\n }", "public function testGetDescription(): void\n {\n $this->class->setDescription($this->value);\n\n self::assertSame($this->value, $this->class->getDescription());\n }", "protected function setDescription() {\r\n\t\t$descriptionCrop = intval($this->settings['news']['semantic']['general']['description']['crop']);\r\n\t\t$descriptionAction = $this->settings['news']['semantic']['general']['description']['action'];\r\n\t\t$descriptionText = $this->newsItem->getTeaser();\r\n\t\tif (empty($descriptionText)) {\r\n\t\t\t$descriptionText = $this->newsItem->getBodytext();\r\n\t\t}\r\n\t\tif (!empty($descriptionText) && !empty($descriptionAction)) {\r\n\t\t\tif (!empty($GLOBALS['TSFE']->page['description'])) {\r\n\t\t\t\tswitch ($descriptionAction) {\r\n\t\t\t\t\tcase 'prepend':\r\n\t\t\t\t\t\t$descriptionText .= ': ' . $GLOBALS['TSFE']->page['description'];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'append':\r\n\t\t\t\t\t\t$descriptionText = $GLOBALS['TSFE']->page['description'] . ': ' . $descriptionText;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$this->description = $this->contentObject->crop($descriptionText, $descriptionCrop . '|...|' . TRUE);\r\n\t\t}\r\n\t}", "public function setDescription($description) {\n\t\t$this->description = $description;\n\t}", "public function setDescription($value);", "public function testSetDescriptionNull(): void\n {\n $set = $this->class->setDescription(null);\n\n self::assertTrue($set instanceof Command);\n }", "public function setDescription($description)\n\t{\n\t\t$this->_description = $description;\n\t}", "public function setDescription($desc) {\n\t\t$this->description = $desc;\n\t}", "public function setDescription($description) {\n $this->description = $description;\n }", "public function hasDescInfo(){\n return $this->_has(5);\n }", "public function setDescription($description)\n {\n $this->description = $description;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n }", "public function setDescription($description)\n {\n $this->description = $description;\n }", "public function setDescription($description)\n {\n $this->_description = $description;\n }", "public function setDescription($description) {\n $this->_description = $description;\n }", "public function setSetDescription($description) {\r\n\t\t$this -> setdescription = $description;\r\n\t}", "public function testSetAndGetIsDescriptionHTML()\r\n {\r\n $testObj = $this->_createMockModel();\r\n $baseObj = $this->_createMockModel();\r\n\r\n // Set the Description to not HTML\r\n $testObj->setIsDescriptionHTML(false);\r\n\r\n // Assert that a change occurred in the test object\r\n $this->assertNotEquals($testObj, $baseObj);\r\n\r\n // Assert that the Description field was updated\r\n $this->assertFalse($testObj->isDescriptionHTML());\r\n\r\n // Assert that no other return values were affected\r\n $this->_assertModelsSameExcept($testObj, $baseObj, 'IsDescriptionHTML');\r\n \r\n $testObj->setIsDescriptionHTML(true);\r\n $this->assertTrue($testObj->isDescriptionHTML());\r\n }", "public function setDescription(/*string*/ $description);", "public function hasDescriptions() {\n return $this->_has(3);\n }", "public function setDescription(string $description)\n {\n $this->description = $description;\n }", "public function setDescription($desc)\n {\n $this->description = $desc;\n }", "public function testSetGetDescription()\n {\n $description = 'Description';\n $event = (new Event())->setDescription($description);\n $this->assertEquals($description, $event->getDescription());\n }", "function setDescription( &$value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->Description = $value;\n }", "public function description()\r\n {\r\n }", "function setItem_description($description){\n $this->item_description = $description;\n }", "public function getSetDescription() {\r\n\t\treturn $this -> setdescription;\r\n\t}", "public function set_description($description)\n {\n $this->set_default_property(self::PROPERTY_DESCRIPTION, $description);\n }" ]
[ "0.82300854", "0.8134343", "0.81005615", "0.79533756", "0.7952228", "0.784712", "0.77610886", "0.7739381", "0.7680391", "0.75904995", "0.75904995", "0.75484365", "0.75484365", "0.751256", "0.7493658", "0.7315125", "0.72400516", "0.72400516", "0.72284156", "0.72259915", "0.7203213", "0.7138827", "0.70390624", "0.70158684", "0.698497", "0.69770193", "0.69704807", "0.69704807", "0.69704807", "0.69704807", "0.69704807", "0.69704807", "0.69366693", "0.68812853", "0.68812853", "0.6846186", "0.68367153", "0.6810672", "0.6795496", "0.6790624", "0.67835355", "0.67835355", "0.67835355", "0.67835355", "0.6781394", "0.67793834", "0.6778242", "0.67775893", "0.6770499", "0.6767831", "0.6761065", "0.67486584", "0.67429656", "0.67424", "0.67365277", "0.67270005", "0.672158", "0.6705742", "0.6703947", "0.6690806", "0.6681062", "0.6677008", "0.6676892", "0.66750544", "0.6640574", "0.66374284", "0.6633477", "0.6624539", "0.6617973", "0.66075677", "0.6577098", "0.6572983", "0.6570494", "0.65652776", "0.65652776", "0.65652776", "0.65652776", "0.65652776", "0.65652776", "0.65652776", "0.65652776", "0.65652776", "0.65652776", "0.65652776", "0.65652776", "0.65652776", "0.6563587", "0.65383524", "0.6530583", "0.653044", "0.6522249", "0.65166277", "0.6489804", "0.64883983", "0.64275354", "0.64166963", "0.640422", "0.6402172", "0.6394215", "0.636523" ]
0.8014825
3
Gets the value of the TransactionStatus property.
public function getTransactionStatus() { return $this->_fields['TransactionStatus']['FieldValue']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTxStatus()\n {\n return $this->tx_status;\n }", "public function getTransactionStatus()\n {\n if (isset($this->data['vnp_TransactionStatus'])) {\n return $this->data['vnp_TransactionStatus'];\n }\n\n return null;\n }", "public function getTransactionStatus()\n {\n return $this->data['payment_status'];\n }", "abstract public function getTransactionStatus();", "function trans_status()\r\n\t{\r\n\t\treturn $this->_trans_status;\r\n\t}", "public function getStateStatus()\n {\n return isset($this->transaction['stateStatus']) ? $this->transaction['stateStatus'] : '';\n }", "public function getTransactionStatus(TransactionEntity $transaction);", "public function getTransactionStatus($transactionId)\n {\n $this->suppressLibraryErrors();\n\n return $this->service->tranzakcioStatuszLekerdezes(\n $this->configurator->getPosId(),\n $transactionId,\n 1,\n time() - 60*60*24,\n time() + 60*60*24\n );\n\n $this->restoreErrorReporting();\n }", "function getGatewayTransactionStatus()\n\t\t{\n\t\t\tif (is_object($this->Gateway)) {\n\t\t\t\treturn $this->Gateway->getTransactionStatus( $this );\n\t\t\t}\n\t\t}", "private function transactionStatus(){\n $data = [\n 'Initiator' => ' ',\n 'SecurityCredential' => ' ',\n 'CommandID' => 'TransactionStatusQuery',\n 'TransactionID' => ' ',\n 'PartyA' => ' ',\n 'IdentifierType' => '1',\n 'QueueTimeOutURL' => $this->apiBaseUrl.'/mobilepay/tran_status/time_out',\n 'ResultURL' => $this->apiBaseUrl.'/mobilepay/tran_status/result',\n 'Remarks' => ' ',\n 'Occasion' => ' '\n ];\n return $this->remotePostCall('mpesa/transactionstatus/v1/query', $data);\n }", "public function getStatusSettlement()\n {\n return $this->statusSettlement;\n }", "public function setTxStatus($var)\n {\n GPBUtil::checkUint32($var);\n $this->tx_status = $var;\n\n return $this;\n }", "public function getStatus()\n\t{\n\t\treturn $this->_sStatus;\n\t}", "public function getTransactionStatusInfos() {\n return $this->transactionStatusInfos;\n }", "public function get_status() {\n return $this->status;\n }", "public function getIsTransaction()\n {\n return $this->isTransaction;\n }", "public function getTransactionType()\n {\n return $this->transactionType;\n }", "public function getStatus() {\n\t\treturn $this->status;\n\t}", "public function getStatus() {\n\t\treturn $this->status;\n\t}", "public function getStatus()\r\n\t\t{\r\n\t\t\treturn $this->status;\r\n\t\t}", "public function transactionLevel()\n {\n return $this->transactionCount;\n }", "public function getStatus() {\n return $this->_status;\n }", "public function getStatus()\n {\n \n return $this->status;\n }", "public function getStatus() {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->getIfSet('status');\n }", "public function getStatus()\r\n\t{\r\n\t\treturn $this->_status;\r\n\t}", "public function getStatus() {\n\n return $this->status;\n\n }", "public function getStatus()\n\t{\n\t\treturn $this->status;\n\t}", "public function getStatus()\n\t{\n\t\treturn $this->status;\n\t}", "public function getStatus()\n\t{\n\t\treturn $this->status;\n\t}", "public function getStatus()\n\t{\n\t\treturn $this->status;\n\t}", "public function getStatus()\n {\n return $this->_Status;\n }", "public function getStatus()\n {\n return $this->_status;\n }", "public function getStatus()\n {\n return $this->_status;\n }", "public function getStatus()\n {\n return $this->_status;\n }", "public function getStatus() \n\t{\n\t\treturn $this->status;\n\t}", "public function getStatus() \n\t{\n\t\treturn $this->status;\n\t}", "public function getStatus()\n {\n return $this->getProperty(self::STATUS);\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function get_status() {\n return $this->_status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }" ]
[ "0.8398796", "0.8267087", "0.8183328", "0.77334756", "0.7494258", "0.7341797", "0.7225201", "0.7058572", "0.70496655", "0.6931564", "0.69078606", "0.6877705", "0.68589807", "0.68368936", "0.6832583", "0.6812616", "0.6801818", "0.67812693", "0.67812693", "0.67802167", "0.6772984", "0.67609656", "0.6756303", "0.6743538", "0.6739014", "0.6734449", "0.6727853", "0.6708654", "0.6708654", "0.6708654", "0.6708654", "0.6690011", "0.6684084", "0.6684084", "0.6684084", "0.6681664", "0.6681664", "0.6676668", "0.66728055", "0.66728055", "0.6669954", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166", "0.6665166" ]
0.87361765
1
Sets the value of the TransactionStatus property.
public function setTransactionStatus($value) { $this->_fields['TransactionStatus']['FieldValue'] = $value; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setIsTransaction($status)\n {\n $this->isTransaction = $status;\n }", "public function setTxStatus($var)\n {\n GPBUtil::checkUint32($var);\n $this->tx_status = $var;\n\n return $this;\n }", "public function setTransactionStatus($orderId, string $status);", "public function withTransactionStatus($value)\n {\n $this->setTransactionStatus($value);\n return $this;\n }", "public function withTransactionStatus($value)\n {\n $this->setTransactionStatus($value);\n return $this;\n }", "public function _setStatus($status) {\n\t\t$this->_status = $status;\n\t}", "public function setStatus($status)\n {\n \n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this->_status = $status;\n }", "public function setGroupTransactionsStatus(string $groupTransactionId, string $status)\n {\n $this->resourceModel\n ->getConnection()\n ->update(\n $this->resourceModel->getTable('buckaroo_magento2_group_transaction'),\n [\n 'status' => $status\n ],\n [\n 'relatedtransaction = ?' => $groupTransactionId\n ]\n );\n }", "public function setStatus($status)\r\n {\r\n $this->status = $status;\r\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "public function setStatus( $status ) {\n\t\t$this->status = $status;\n\t}", "public function set_status ($status) {\n $this->status = $status;\n }", "public function setStatus($status)\n\t{\n\t\t$this->status = $status;\n\t}", "public function setStatus(int $status)\n {\n $this->status = $status;\n }", "function setStatus($bstatus = 'f')\n {\n $this->bstatus = $bstatus;\n }", "function setStatus($bstatus = 'f')\n {\n $this->bstatus = $bstatus;\n }", "private function setStatus($status)\n {\n $this->status = $status;\n }", "public function setOrderStatus($transactionId, $statusId)\n {\n\n /**\n * TODO creates config for sending email\n */\n// $config = Shopware()->Plugins()->Frontend()->PilibabaPilipaySystem()->Config();\n// $sendStatusMail = (bool)$config->paymentStatusMail;\n\n $order = Shopware()->Modules()->Order();\n\n $sql = 'SELECT id\n FROM s_order\n WHERE transactionID=?\n AND status>=0';\n $orderId = Shopware()->Db()->fetchOne($sql, array(\n $transactionId\n ));\n\n $order = Shopware()->Modules()->Order();\n// $order->setOrderStatus($orderId, $statusId, $sendStatusMail);\n $order->setOrderStatus($orderId, $statusId);\n }", "final public function setStatus(Int $status)\n\t{\n\t\t$this->_status = $status;\n\t}", "public function setStatus( int $status ) : void\n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n if (!is_null($status))\n $this->status = $status;\n }", "function setStatus($status) {\n $this->checkChange();\n\n // Check allowed values.\n if (!in_array($status, array(UserpointsTransaction::STATUS_APPROVED, UserpointsTransaction::STATUS_DECLINED, UserpointsTransaction::STATUS_PENDING))) {\n $this->abort();\n throw new UserpointsChangeException(t('Invalid status'));\n }\n\n if ($this->txn_id > 0) {\n // Preserve the original status to be able to check if changes in this\n // transaction are still allowed.\n $this->orig_status = $this->getStatus();\n }\n\n $this->status = $status;\n return $this;\n }", "function setStatus( $status )\n {\n if ( $status instanceof eZOrderStatus )\n $this->StatusID = $status->attribute( 'id' );\n else\n $this->StatusID = $status;\n $this->setStatusModified( time() );\n }", "public function setStatus(string $status)\n {\n $this->status = $status;\n }", "public function set_transaction_status($host_obj, $order, $transaction_id, $transaction_status_code, $new_transaction_status_code)\n\t\t{\n\t\t\t$this->init_braintree_environment($host_obj);\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$override_status_name = false;\n\t\t\t\t\n\t\t\t\tswitch ($new_transaction_status_code)\n\t\t\t\t{\n\t\t\t\t\tcase 'settle' : \n\t\t\t\t\t\t$submitResult = Braintree_Transaction::submitForSettlement($transaction_id);\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'void' : \n\t\t\t\t\t\t$submitResult = Braintree_Transaction::void($transaction_id);\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'refund' : \n\t\t\t\t\t\t$submitResult = Braintree_Transaction::refund($transaction_id);\n\t\t\t\t\t\t$override_status_name = 'Refund/Submitted for settlement';\n\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthrow new Phpr_ApplicationException('Unknown transaction status code: '.$new_transaction_status_code);\n\t\t\t\t}\n\n\t\t\t\tif (!$submitResult->success)\n\t\t\t\t{\n\t\t\t\t\t$errors = $submitResult->errors->deepAll();\n\t\t\t\t\t$error_str = array();\n\t\t\t\t\tforeach ($errors as $error)\n\t\t\t\t\t\t$error_str[] = $error->message;\n\n\t\t\t\t\t$error_str = implode(' ', $error_str);\n\n\t\t\t\t\tif ($error_str)\n\t\t\t\t\t\tthrow new Phpr_ApplicationException($error_str);\n\t\t\t\t\telse\n\t\t\t\t\t\tthrow new Phpr_ApplicationException('Error updating transaction status.');\n\t\t\t\t} else {\n\t\t\t\t\t$transaction = $submitResult->transaction;\n\t\t\t\t\t$status_name = $override_status_name ? $override_status_name : $this->get_status_name($transaction->status);\n\t\t\t\t\treturn new Shop_TransactionUpdate(\n\t\t\t\t\t\t$transaction->status,\n\t\t\t\t\t\t$status_name\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} catch (Exception $ex)\n\t\t\t{\n\t\t\t\tthrow new Phpr_ApplicationException($this->get_exception_description($ex));\n\t\t\t}\n\t\t}", "function set_status($status)\r\n {\r\n $this->set_default_property(self :: PROPERTY_STATUS, $status);\r\n }", "public function updateTransactionStatus($transaction, $status) {\n $this->__createLog('Entering into class [SixthContinent\\SixthContinentConnectBundle\\Services\\SixthcontinentOfferTransactionService] and function [updateTransactionStatus]');\n $id = $transaction->getId();\n $em = $this->em;\n\n $transaction = $em->getRepository(\"SixthContinentConnectBundle:Sixthcontinentconnecttransaction\")\n ->findOneBy(array( 'id'=>$id));\n try {\n $transaction->setStatus($status);\n $em->persist($transaction);\n $em->flush();\n $this->__createLog('Transaction is updated with id:'.$id. ' and status:'.$status);\n } catch (\\Exception $ex) {\n $this->__createLog('Some error occured when transaction updated with status:'.$status .' Error is: '.$ex->getMessage());\n }\n $this->__createLog('Exiting from class [SixthContinent\\SixthContinentConnectBundle\\Services\\SixthcontinentOfferTransactionService] and function [updateTransactionStatus]');\n return true;\n }", "public function setStatus(Status $status);", "public function setStatus($var)\n {\n GPBUtil::checkInt32($var);\n $this->status = $var;\n\n return $this;\n }", "public function setStatus($status);", "public function setStatus($status);", "public function setStatus($status)\n {\n $this['status'] = $status;\n }", "function setStatus($new_status)\n {\n $this->status = $new_status;\n }", "public function SetStatus( $a )\r\n\t{\r\n\t\t$this->_status = $a;\r\n\t}", "public function getTransactionStatus() \n {\n return $this->_fields['TransactionStatus']['FieldValue'];\n }", "public function getTransactionStatus() \n {\n return $this->_fields['TransactionStatus']['FieldValue'];\n }", "public function transactionStatus(ESL_Buckaroo_Request_TransactionStatus $oRequest)\n\t{\n\t\t$aData = $oRequest->getData();\n\t\t$aRequestData = $this->completeRequest($aData);\n\t\treturn $this->communicate('/nvp/?op=transactionstatus', $aRequestData);\n\t}", "public function set_status( $status ) {\n\t\t$this->ryte_option[ self::STATUS ] = $status;\n\t}", "public function getTxStatus()\n {\n return $this->tx_status;\n }", "public function set_status($status) {\n if (!is_integer($status)) { return false; }\n $this->_status = $status;\n return true;\n }", "protected function setStatus($status)\n {\n $this->file->set('status', $status);\n }", "public function setStatus($var)\n {\n GPBUtil::checkString($var, True);\n $this->status = $var;\n\n return $this;\n }", "public function setStatus($var)\n {\n GPBUtil::checkString($var, True);\n $this->status = $var;\n\n return $this;\n }", "public function setStatus(bool $status);", "public function updateTransactionSystemStatus($transaction, $status) {\n \n $this->__createLog('Entering into class [SixthContinent\\SixthContinentConnectBundle\\Services\\SixthcontinentOfferTransactionService] and function [updateTransactionSystemStatus]');\n// $applane_service = $this->container->get('appalne_integration.callapplaneservice');\n $em = $this->em;\n $data[\"ci_used\"]= $transaction->getUsedCi();\n $data[\"buyer_id\"] = $transaction->getUserId();\n $SixcTransactionId = $em->getRepository('WalletBundle:WalletCitizen')\n ->increaseWalletCitizenIncome($data);\n \n $this->__createLog('Exiting from class [SixthContinent\\SixthContinentConnectBundle\\Services\\SixthcontinentOfferTransactionService] and function [updateTransactionSystemStatus]');\n return true;\n }", "function setStatus($cod_status){\n\n\t\t$this->status = $cod_status;\n\t\n\t}", "public function getTransactionStatus()\n {\n if (isset($this->data['vnp_TransactionStatus'])) {\n return $this->data['vnp_TransactionStatus'];\n }\n\n return null;\n }", "public function setPaymentStatus($transactionId, $paymentStatusId)\n {\n $sql = 'SELECT id\n FROM s_order\n WHERE transactionID=?\n AND status!=-1';\n $orderId = Shopware()->Db()->fetchOne($sql, array(\n $transactionId\n ));\n//\n /**\n * TODO creates config for sending email\n */\n\n// $config = Shopware()->Plugins()->Frontend()->PilibabaPilipaySystem()->Config();\n// $sendStatusMail = (bool)$config->paymentStatusMail;\n\n $order = Shopware()->Modules()->Order();\n\n// $order->setPaymentStatus($orderId, $paymentStatusId, $sendStatusMail);\n $order->setPaymentStatus($orderId, $paymentStatusId);\n }", "public function setStatusCode($status);", "public function setStatus(TaskRunnerStatus $status)\n {\n $this->checkTaskRunnerStatusChangeAvailability($status);\n $this->getConfigService()->setTaskRunnerStatus($status->getGuid(), $status->getAliveSinceTimestamp());\n }", "protected static function set_status()\n {\n }", "function setStatus($status) {\n\t\treturn $this->setData('status', $status);\n\t}", "public function setStatus(string $status) : void;", "abstract public function setStatus($status);", "public function setStatus($var)\n {\n GPBUtil::checkBool($var);\n $this->status = $var;\n\n return $this;\n }", "public function setStatus(string $status): void;", "private function setLock($status) {\n $this->status->is_locked = $status;\n $this->status->save();\n }", "public function set_contract_status_updates_contract_status_with_passed_status_id()\n {\n $this->assertEquals(\n self::$contract->set_contract_status(self::$contract, $status_id = 2),\n self::$contract->update(['contract_status_id' => $status_id])\n );\n }", "public function setStatus($status)\n {\n $this->feedbackFields['status'] = $status;\n }", "public function getTransactionStatus()\n {\n return $this->data['payment_status'];\n }", "public function setStatus($v)\n {\n if ($v !== null) {\n $v = (int) $v;\n }\n\n if ($this->status !== $v) {\n $this->status = $v;\n $this->modifiedColumns[AliMemberTableMap::COL_STATUS] = true;\n }\n\n return $this;\n }", "public function SetProgressStatus(SetProgressStatus $parameters)\n {\n return $this->__soapCall('SetProgressStatus', array($parameters));\n }", "private function setStatus($status)\n {\n $this->status = $status;\n\n $hash = spl_object_hash($this);\n $name = TaskStatus::getName($status);\n // echo \"task [$hash] -> $name\\n\"; // TODO\n }", "public function setSessionStatus($sessionStatus)\n {\n $this->m_sessionStatus = (int) $sessionStatus;\n }", "public function setStatus($status)\r\n {\r\n $this->status = $status;\r\n\r\n return $this;\r\n }", "public function setStatus(\\Dhl\\DataTypes\\StatusType $status)\n {\n $this->status = $status;\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "abstract public function getTransactionStatus();", "public function set_status($status)\n {\n $this->status = $status;\n Session::instance()->set(\"hana_status\", $this->status);\n }", "public function setStatus($status) {\n\n if (!($this->status = filter_var($status, FILTER_VALIDATE_INT))) {\n\n $this->status = filter_var($status, FILTER_SANITIZE_NUMBER_INT);\n $this->valid = false;\n\n }\n\n }", "public function suspend($status = false)\n {\n if ($this->storedStatus === null) {\n $this->storedStatus = $this->isEnabled;\n $this->isEnabled = $status;\n }\n }", "protected function amount_transition_status() {\n\t\t$amount_transition_status = $this->amount_transition_status ;\n\n\t\t// Reset status transition variable.\n\t\t$this->amount_transition_status = false ;\n\n\t\tif ( ! $amount_transition_status ) {\n\t\t\treturn ;\n\t\t}\n\n\t\tdo_action( 'wc_cs_admin_funds_txn_amount_status_' . $amount_transition_status, $this ) ;\n\t}", "public function _setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status) {\n $this->status = $status;\n return $this;\n }", "public function set_state(string $field_name, string $status)\n {\n $this->write_status($field_name, $status);\n }", "public function setStatus($status) \n\t{\n\t\t$this->status = $status;\n\t\treturn $this;\n\t}", "public function setStatus($status) \n\t{\n\t\t$this->status = $status;\n\t\treturn $this;\n\t}", "public function setStatus($status)\n {\n $this->status = $status;\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n return $this;\n }", "public function setOrderStatus($orderStatus){\n return $this->setData(self::ORDER_STATUS, $orderStatus);\n }", "public function _transaction_status_check()\n {\n if (!$this->_transaction_in_progress) {\n return;\n }\n $this->rollback();\n }", "function setStatus( $status )\n {\n\t if (is_int($status)) {\n\t\t \n\t\t switch ( $status ) {\n\t\t\t \n\t\t\t case RowManager_RegistrationManager::STATUS_REGISTERED:\n\t\t\t \t$this->setValueByFieldName( 'registration_status', $status );\n\t\t\t \tbreak;\t\t\t \t\n\t\t\t case RowManager_RegistrationManager::STATUS_INCOMPLETE:\n\t\t\t \t$this->setValueByFieldName( 'registration_status', $status );\n\t\t\t \tbreak;\t\t\t \t\n\t\t\t case RowManager_RegistrationManager::STATUS_CANCELLED:\n\t\t\t \t$this->setValueByFieldName( 'registration_status', $status );\n\t\t\t \tbreak;\n\t\t\t case RowManager_RegistrationManager::STATUS_UNASSIGNED:\n\t\t\t \t$this->setValueByFieldName( 'registration_status', $status );\n\t\t\t \tbreak;\n\t\t }\n\n\t\t}\n\t}", "public static function twispay_tw_updateTransactionStatus( $id, $status ) {\n global $wpdb;\n\n $already = $wpdb->get_row( $wpdb->prepare( \"SELECT * FROM \" . $wpdb->prefix . \"twispay_tw_transactions WHERE id_cart = '%d'\", $id) );\n\n if ( $already ) {\n /* Update the DB with the transaction data. */\n $wpdb->query( $wpdb->prepare( \"UPDATE \" . $wpdb->prefix . \"twispay_tw_transactions SET status = '%s' WHERE id_cart = '%d'\", $status, $id ) );\n }\n }", "protected function setReceivedTransactionStatuses(): void\n {\n $txId = $this->postData['brq_transactions'];\n $statusCode = $this->postData['brq_statuscode'];\n\n if (empty($txId) || empty($statusCode)) {\n return;\n }\n\n $payment = $this->order->getPayment();\n\n $receivedTxStatuses = $payment->getAdditionalInformation(self::BUCKAROO_RECEIVED_TRANSACTIONS_STATUSES) ?? [];\n $receivedTxStatuses[$txId] = $statusCode;\n\n $payment->setAdditionalInformation(self::BUCKAROO_RECEIVED_TRANSACTIONS_STATUSES, $receivedTxStatuses);\n }", "public function setStatus(?OperationStatus $value): void {\n $this->getBackingStore()->set('status', $value);\n }", "public function setStatus($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->status !== $v) {\n $this->status = $v;\n $this->modifiedColumns[OrdrhedTableMap::COL_STATUS] = true;\n }\n\n return $this;\n }", "function setStatus($inStatus) {\n\t\tif ( $inStatus !== $this->_Status ) {\n\t\t\t$this->_Status = $inStatus;\n\t\t\t$this->setModified();\n\t\t}\n\t\treturn $this;\n\t}", "public function setStatus($status) {\n\t\t$this->_setStatus($status);\n\t\treturn $this;\n\t}" ]
[ "0.75081867", "0.7449571", "0.65930194", "0.6336991", "0.6336991", "0.6291813", "0.62873846", "0.6260752", "0.625411", "0.62540656", "0.62396157", "0.62396157", "0.62396157", "0.62396157", "0.61854595", "0.6177082", "0.6121016", "0.6094178", "0.6083474", "0.6083474", "0.6042506", "0.603473", "0.60096866", "0.5989629", "0.59836036", "0.59477913", "0.5946293", "0.59323263", "0.59173274", "0.5877681", "0.5868902", "0.5841575", "0.58185583", "0.5802401", "0.5802401", "0.5783866", "0.5728072", "0.5725753", "0.57195306", "0.57195306", "0.5716485", "0.56980747", "0.56855565", "0.5672514", "0.56547207", "0.56546843", "0.56546843", "0.5643548", "0.56165975", "0.5605825", "0.56045806", "0.5603403", "0.55710906", "0.5554639", "0.5543906", "0.5521224", "0.5515102", "0.55141294", "0.5505184", "0.5495262", "0.5474984", "0.5447969", "0.5424409", "0.542265", "0.54046166", "0.54039526", "0.5399662", "0.53852236", "0.5379845", "0.53658754", "0.53478754", "0.534242", "0.5334444", "0.53283805", "0.53276366", "0.5322196", "0.53126824", "0.52950865", "0.5291838", "0.5291231", "0.5291231", "0.5288553", "0.5288553", "0.5288553", "0.5288553", "0.5288553", "0.5288553", "0.5288553", "0.5288553", "0.5288553", "0.5282857", "0.5274636", "0.527172", "0.5269204", "0.52676886", "0.5256774", "0.52496845", "0.5247782", "0.52450114" ]
0.7378196
3
Sets the value of the TransactionStatus and returns this instance
public function withTransactionStatus($value) { $this->setTransactionStatus($value); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setTransactionStatus($value) \n {\n $this->_fields['TransactionStatus']['FieldValue'] = $value;\n return $this;\n }", "public function setTransactionStatus($value) \n {\n $this->_fields['TransactionStatus']['FieldValue'] = $value;\n return $this;\n }", "public function setTxStatus($var)\n {\n GPBUtil::checkUint32($var);\n $this->tx_status = $var;\n\n return $this;\n }", "public function _setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status)\r\n {\r\n $this->status = $status;\r\n\r\n return $this;\r\n }", "public function setStatus($status)\n {\n $this->status = $status;\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n return $this;\n }", "public function setIsTransaction($status)\n {\n $this->isTransaction = $status;\n }", "public function setStatus($status) {\n $this->status = $status;\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status) \n\t{\n\t\t$this->status = $status;\n\t\treturn $this;\n\t}", "public function setStatus($status) \n\t{\n\t\t$this->status = $status;\n\t\treturn $this;\n\t}", "public function setStatus($status): self\n {\n $this->status = $status;\n\n return $this;\n }", "public function status($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function status($status)\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($status) {\n\t\t$this->_setStatus($status);\n\t\treturn $this;\n\t}", "public function setStatus(\\Dhl\\DataTypes\\StatusType $status)\n {\n $this->status = $status;\n return $this;\n }", "public function setStatus($Status = null)\n {\n $this->Status = $Status;\n return $this;\n }", "public function setStatus(?string $status) : self\n {\n $this->status = $status;\n return $this;\n }", "public function setStatus(?string $status) : self\n {\n $this->status = $status;\n return $this;\n }", "function setStatus($status) {\n $this->checkChange();\n\n // Check allowed values.\n if (!in_array($status, array(UserpointsTransaction::STATUS_APPROVED, UserpointsTransaction::STATUS_DECLINED, UserpointsTransaction::STATUS_PENDING))) {\n $this->abort();\n throw new UserpointsChangeException(t('Invalid status'));\n }\n\n if ($this->txn_id > 0) {\n // Preserve the original status to be able to check if changes in this\n // transaction are still allowed.\n $this->orig_status = $this->getStatus();\n }\n\n $this->status = $status;\n return $this;\n }", "public function setStatus($newStatus)\n\t{\n\t\t$this->status = $newStatus;\n\n\t\treturn $this;\n\t}", "public function status(int $status): self\n {\n $this->status = $status;\n return $this;\n }", "public function setStatus(string $status): self\n {\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($var)\n {\n GPBUtil::checkInt32($var);\n $this->status = $var;\n\n return $this;\n }", "function setStatus($inStatus) {\n\t\tif ( $inStatus !== $this->_Status ) {\n\t\t\t$this->_Status = $inStatus;\n\t\t\t$this->setModified();\n\t\t}\n\t\treturn $this;\n\t}", "public function setStatus(?string $status): self\n {\n $this->status = $status;\n\n return $this;\n }", "protected function processStatus()\r\n {\r\n if (!in_array(\r\n $this->getStatus(),\r\n [Status::STATUS_PENDING, Status::STATUS_INACTIVE, Status::STATUS_EXPIRED, Status::STATUS_CANCELLED]\r\n )) {\r\n if ($this->getBalance() > 0) {\r\n $this->setStatus(Status::STATUS_ACTIVE);\r\n } else {\r\n $this->setStatus(Status::STATUS_USED);\r\n }\r\n }\r\n\r\n return $this;\r\n }", "public function setStatus($status)\n\t{\n\t\tif (in_array($status, AdFox::getConstants('OBJECT_STATUS')))\n\t\t{\n\t\t\t$this->status = $status;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function getTransactionStatus() \n {\n return $this->_fields['TransactionStatus']['FieldValue'];\n }", "public function getTransactionStatus() \n {\n return $this->_fields['TransactionStatus']['FieldValue'];\n }", "public function getTxStatus()\n {\n return $this->tx_status;\n }", "public function setStatus($val)\n {\n $this->_propDict[\"status\"] = $val;\n return $this;\n }", "public function setStatus($val)\n {\n $this->_propDict[\"status\"] = $val;\n return $this;\n }", "public function setStatus($val)\n {\n $this->_propDict[\"status\"] = $val;\n return $this;\n }", "public function setStatus($val)\n {\n $this->_propDict[\"status\"] = $val;\n return $this;\n }", "function setStatus($status) \n {\n return $this->instance->setStatus($status);\n }", "public function transactionStatus(ESL_Buckaroo_Request_TransactionStatus $oRequest)\n\t{\n\t\t$aData = $oRequest->getData();\n\t\t$aRequestData = $this->completeRequest($aData);\n\t\treturn $this->communicate('/nvp/?op=transactionstatus', $aRequestData);\n\t}", "public function setActiveStatus($status)\n {\n $this->getEntity()->setActiveStatus($status);\n return $this;\n }", "public function setStatus(string $status): self\n {\n $this->initialized['status'] = true;\n $this->status = $status;\n\n return $this;\n }", "public function setStatus($val)\n {\n $this->_propDict[\"status\"] = $val;\n return $this;\n }", "public function setStatus($val)\n {\n $this->_propDict[\"status\"] = $val;\n return $this;\n }", "public function setStatus($val)\n {\n $this->_propDict[\"status\"] = $val;\n return $this;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n $message = null;\n switch ($status) {\n case 400:\n $message = self::MESSAGE_BAD_REQUEST;\n break;\n case 500:\n $message = self::MESSAGE_ERROR_SYSTEM;\n break;\n default:\n break;\n }\n $this->setMessage($message);\n return $this;\n }", "public function setStatus($status) {\n if (is_string($status) && in_array($status, $this->_headers)) {\n $headers = array_flip($this->_headers);\n $this->_status = $headers[$status];\n } else if (is_int($status) && array_key_exists($status, $this->_headers)) {\n $this->_status = $status;\n }\n\n return $this;\n }", "public function setStatus($value) {\n$allowed = ['complete', 'in progress'];\nif (!in_array($value, $allowed))\n throw new Exception('A status must be either complete or in progress');\n$this->status = $value;\nreturn $this;\n}", "public function getTransactionStatus()\n {\n if (isset($this->data['vnp_TransactionStatus'])) {\n return $this->data['vnp_TransactionStatus'];\n }\n\n return null;\n }", "public function setStatusValue($status)\n {\n if (!(is_null($status) || is_string($status))) {\n $this->setDataError(\"Invalid status value\");\n } else {\n $this->status = $status;\n }\n\n return $this;\n }", "public function setStatus(string $status): self\n {\n $this->options['status'] = $status;\n return $this;\n }", "public function setStatus($var)\n {\n GPBUtil::checkBool($var);\n $this->status = $var;\n\n return $this;\n }", "public function setStatus($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (int) $v;\n\t\t}\n\n\t\tif ($this->status !== $v) {\n\t\t\t$this->status = $v;\n\t\t\t$this->modifiedColumns[] = CampaignPeer::STATUS;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function setStatus($v)\n {\n if ($v !== null) {\n $v = (int) $v;\n }\n\n if ($this->status !== $v) {\n $this->status = $v;\n $this->modifiedColumns[AliMemberTableMap::COL_STATUS] = true;\n }\n\n return $this;\n }", "public function setTransactionType($transactionType)\n {\n $this->transactionType = $transactionType;\n\n return $this;\n }", "public function setStatus($status)\n {\n if (!empty($status) && ctype_print($status)) {\n $this->status = trim($status);\n }\n\n return $this;\n }", "public function setStatus($var)\n {\n GPBUtil::checkString($var, True);\n $this->status = $var;\n\n return $this;\n }", "public function setStatus($var)\n {\n GPBUtil::checkString($var, True);\n $this->status = $var;\n\n return $this;\n }", "public function setStatusPending()\n {\n $this->status = 'PENDING';\n\n return $this;\n }", "public function getTransactionStatus()\n {\n return $this->data['payment_status'];\n }", "public function setTransactionId($transactionId)\n {\n $this->transactionId = $transactionId;\n return $this;\n }", "public function set_transaction_status($host_obj, $order, $transaction_id, $transaction_status_code, $new_transaction_status_code)\n\t\t{\n\t\t\t$this->init_braintree_environment($host_obj);\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$override_status_name = false;\n\t\t\t\t\n\t\t\t\tswitch ($new_transaction_status_code)\n\t\t\t\t{\n\t\t\t\t\tcase 'settle' : \n\t\t\t\t\t\t$submitResult = Braintree_Transaction::submitForSettlement($transaction_id);\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'void' : \n\t\t\t\t\t\t$submitResult = Braintree_Transaction::void($transaction_id);\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'refund' : \n\t\t\t\t\t\t$submitResult = Braintree_Transaction::refund($transaction_id);\n\t\t\t\t\t\t$override_status_name = 'Refund/Submitted for settlement';\n\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthrow new Phpr_ApplicationException('Unknown transaction status code: '.$new_transaction_status_code);\n\t\t\t\t}\n\n\t\t\t\tif (!$submitResult->success)\n\t\t\t\t{\n\t\t\t\t\t$errors = $submitResult->errors->deepAll();\n\t\t\t\t\t$error_str = array();\n\t\t\t\t\tforeach ($errors as $error)\n\t\t\t\t\t\t$error_str[] = $error->message;\n\n\t\t\t\t\t$error_str = implode(' ', $error_str);\n\n\t\t\t\t\tif ($error_str)\n\t\t\t\t\t\tthrow new Phpr_ApplicationException($error_str);\n\t\t\t\t\telse\n\t\t\t\t\t\tthrow new Phpr_ApplicationException('Error updating transaction status.');\n\t\t\t\t} else {\n\t\t\t\t\t$transaction = $submitResult->transaction;\n\t\t\t\t\t$status_name = $override_status_name ? $override_status_name : $this->get_status_name($transaction->status);\n\t\t\t\t\treturn new Shop_TransactionUpdate(\n\t\t\t\t\t\t$transaction->status,\n\t\t\t\t\t\t$status_name\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} catch (Exception $ex)\n\t\t\t{\n\t\t\t\tthrow new Phpr_ApplicationException($this->get_exception_description($ex));\n\t\t\t}\n\t\t}", "private function setStatusConnection($statusConnection)\n {\n if (is_string($statusConnection)) {\n $this->statusConnection = $statusConnection;\n }\n\n return $this;\n }", "abstract public function getTransactionStatus();", "public function setStatus($status)\n {\n if (is_null($status)) {\n throw new \\InvalidArgumentException('non-nullable status cannot be null');\n }\n $this->container['status'] = $status;\n\n return $this;\n }", "public function setTransactionId($value) \n {\n $this->_fields['TransactionId']['FieldValue'] = $value;\n return $this;\n }" ]
[ "0.81935203", "0.81935203", "0.72910774", "0.6794184", "0.66818446", "0.6662966", "0.6639949", "0.6639949", "0.6639949", "0.6639949", "0.6639949", "0.6639949", "0.6639949", "0.6639949", "0.6639949", "0.6636072", "0.6609809", "0.66004133", "0.66004133", "0.66004133", "0.66004133", "0.66004133", "0.66004133", "0.66004133", "0.66004133", "0.66004133", "0.66004133", "0.66004133", "0.66004133", "0.66004133", "0.66004133", "0.66004133", "0.66004133", "0.66004133", "0.66004133", "0.66004133", "0.66004133", "0.66004133", "0.66004133", "0.66004133", "0.66004133", "0.66004133", "0.66004133", "0.66004133", "0.66004133", "0.6563537", "0.6563537", "0.6527024", "0.65207833", "0.65207833", "0.6458719", "0.6395302", "0.6337789", "0.62815505", "0.62815505", "0.6273874", "0.6240129", "0.6221309", "0.621776", "0.61913097", "0.6158534", "0.61387426", "0.61002517", "0.60968393", "0.6095617", "0.6095617", "0.6090466", "0.602716", "0.602716", "0.602716", "0.602716", "0.6020161", "0.601067", "0.6003651", "0.5995697", "0.5993211", "0.5993211", "0.5993211", "0.5968498", "0.5924588", "0.5883433", "0.5883287", "0.58813685", "0.5875709", "0.5866926", "0.58626777", "0.58424807", "0.583551", "0.58279204", "0.58096176", "0.58096176", "0.5790644", "0.57838744", "0.5782257", "0.5778966", "0.5775216", "0.5757386", "0.5750986", "0.57504934" ]
0.78903663
3
Checks if TransactionStatus is set
public function isSetTransactionStatus() { return !is_null($this->_fields['TransactionStatus']['FieldValue']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function _transaction_status_check()\n {\n if (!$this->_transaction_in_progress) {\n return;\n }\n $this->rollback();\n }", "abstract public function getTransactionStatus();", "public function isTransactionActive()\n {\n return $this->conn->isTransactionActive();\n }", "public function isTransactionActive()\n {\n return $this->transactionNestingLevel > 0;\n }", "public function isInTransaction();", "public function isInTransaction()\n {\n return $this->_getWriteAdapter()->getTransactionLevel() > 0;\n }", "public function getTransactionStatus()\n {\n if (isset($this->data['vnp_TransactionStatus'])) {\n return $this->data['vnp_TransactionStatus'];\n }\n\n return null;\n }", "public function getTxStatus()\n {\n return $this->tx_status;\n }", "public function isTransaction(): bool\n {\n return $this->inTransaction();\n }", "public function getTransactionStatus() \n {\n return $this->_fields['TransactionStatus']['FieldValue'];\n }", "public function getTransactionStatus() \n {\n return $this->_fields['TransactionStatus']['FieldValue'];\n }", "public function isInTransaction(): bool;", "public function supports_transaction_status_query()\n\t\t{\n\t\t\treturn true;\n\t\t}", "public function inTransaction(): bool\n {\n return $this->inTransaction;\n }", "public function isTransaction()\n {\n return $this->_isTransaction;\n }", "public function isSetTransactionId()\n {\n return !is_null($this->_fields['TransactionId']['FieldValue']);\n }", "public function setIsTransaction($status)\n {\n $this->isTransaction = $status;\n }", "public function inTransaction(): bool\n {\n return $this->getConnection()->isTransactionActive();\n }", "public function validateStatus() {\n\t\tswitch ($this->request->get('ok_txn_status')) {\n\t\t\tcase 'completed':\n\t\t\t\t$this->invoice->addPayment($this);\n\t\t\t\tif ($this->invoice->first_total <= 0 && $this->invoice->status == Invoice::PENDING) {\n\t\t\t\t\t$this->invoice->addAccessPeriod($this); // add first trial period\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t\tbreak;\n\t\t\tcase 'reversed':\n\t\t\t\tif($this->request->get('ok_txn_reversal_reason') == 'refund' || $this->request->get('ok_txn_reversal_reason') == 'chargeback') {\n\t\t\t\t\t$this->invoice->addRefund($this, $this->request->get('ok_txn_id'), $this->request->get('ok_txn_gross'));\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Am_Exception_Paysystem_TransactionInvalid(\"Unknown method\");\n\t\t\t\tbreak;\n\t\t}\n\t\treturn false;\n\t}", "public function getTransactionStatus()\n {\n return $this->data['payment_status'];\n }", "public function getTransactionStatus(TransactionEntity $transaction);", "public function hasTransactions();", "public function transaction(): bool\r\n {\r\n return $this->instance->inTransaction() === true;\r\n }", "function verify_transaction($trans_status)\n {\n //Lets Check what is the status\n switch($trans_status)\n {\n case \"Subscription-Payment-Failed\":\n case \"Subscription-Canceled\":\n {\n $this->status = 'cancelled';\n $this->gatewayStatus = $trans_status;\n }\n break;\n \n case \"Success\":\n case \"Subscription-Payment-Success\":\n\n {\n $this->status = 'ok';\n $this->gatewayStatus = 'Completed';\n return true;\n }\n break;\n \n case \"Subscription-Expired\":\n { \n $this->status = 'failed';\n $this->gatewayStatus = $trans_status;\n }\n break;\n \n default:\n {\n $this->status = 'other';\n $this->gatewayStatus = $trans_status;\n }\n }\n \n return false;\n }", "public function isTransactionPart()\n {\n return $this->_transaction != null;\n }", "public function isUnderTransaction();", "private function transactionStatus(){\n $data = [\n 'Initiator' => ' ',\n 'SecurityCredential' => ' ',\n 'CommandID' => 'TransactionStatusQuery',\n 'TransactionID' => ' ',\n 'PartyA' => ' ',\n 'IdentifierType' => '1',\n 'QueueTimeOutURL' => $this->apiBaseUrl.'/mobilepay/tran_status/time_out',\n 'ResultURL' => $this->apiBaseUrl.'/mobilepay/tran_status/result',\n 'Remarks' => ' ',\n 'Occasion' => ' '\n ];\n return $this->remotePostCall('mpesa/transactionstatus/v1/query', $data);\n }", "public function getIsTransaction()\n {\n return $this->isTransaction;\n }", "public function transaction_approved() {\n\n\t\t$errors = $this->get_errors()->get_error_codes();\n\n\t\treturn empty( $errors );\n\t}", "public function hasActiveTransaction()\n {\n return $this->hasActiveTransaction;\n }", "public function setTxStatus($var)\n {\n GPBUtil::checkUint32($var);\n $this->tx_status = $var;\n\n return $this;\n }", "public function inTransaction(): bool\n\t{\n\t\treturn $this->connection->inTransaction();\n\t}", "final private function __isTransaction()\n\t{\n\t\tif( ! $this->transaction )\n\t\t{\n\t\t\tthrow new \\Exception('Do not using transaction.', 421);\n\t\t}\n\t}", "public function inTransaction(): bool;", "function trans_status()\r\n\t{\r\n\t\treturn $this->_trans_status;\r\n\t}", "public function isSetTransactionAmount()\n {\n return !is_null($this->_fields['TransactionAmount']['FieldValue']);\n\n }", "public function in_transaction() {\r\n return isset($this->sem_id) && $this->sem_id;\r\n }", "function transaction_check(){\n }", "public function isTransactionEnabled()\n {\n return $this->getRepository() instanceof TransactionAwareInterface;\n }", "public function transactionStatus(ESL_Buckaroo_Request_TransactionStatus $oRequest)\n\t{\n\t\t$aData = $oRequest->getData();\n\t\t$aRequestData = $this->completeRequest($aData);\n\t\treturn $this->communicate('/nvp/?op=transactionstatus', $aRequestData);\n\t}", "protected function is_transaction_active( TransactionSummary $details ) {\n\t\treturn false;\n\t}", "public function setTransactionStatus($value) \n {\n $this->_fields['TransactionStatus']['FieldValue'] = $value;\n return $this;\n }", "public function setTransactionStatus($value) \n {\n $this->_fields['TransactionStatus']['FieldValue'] = $value;\n return $this;\n }", "public function hasStatus()\n {\n return $this->status !== null;\n }", "public function transaction_approved() {\n\n\t\treturn 1 === $this->transaction_approved && 0 === $this->transaction_error;\n\t}", "function isPending() {\n return $this->getStatus() == UserpointsTransaction::STATUS_PENDING;\n }", "public function hasStatus()\n {\n return $this->get(self::STATUS) !== null;\n }", "public function hasStatus()\n {\n return $this->get(self::STATUS) !== null;\n }", "public function getUseTransactionFlag()\n\t\t{\n\t\t\treturn $this->use_transaction;\n\t\t}", "function getGatewayTransactionStatus()\n\t\t{\n\t\t\tif (is_object($this->Gateway)) {\n\t\t\t\treturn $this->Gateway->getTransactionStatus( $this );\n\t\t\t}\n\t\t}", "public function supportsTransaction(): bool;", "public function hasStatus(){\n return $this->_has(19);\n }", "function HasFailedTrans() {}", "public function isRollbackOnly()\n {\n if ($this->transactionNestingLevel === 0) {\n throw ConnectionException::noActiveTransaction();\n }\n\n return $this->isRollbackOnly;\n }", "protected function checkOrderStatus()\n {\n $orderItem = $this->getOrderItemObjectByIdOrUuid($this->getRequestParameter('order_item_id'));\n \n if ($orderItem->getStatusId() != OrderStatusPeer::STATUS_PENDING) {\n $this->redirect('@order_checkoutFinished');\n }\n }", "public function CheckTransactionUser() {\n\t\t\t\t\t\tif (isset ( $_SESSION ['UserSession'] )) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t}", "protected function amount_transition_status() {\n\t\t$amount_transition_status = $this->amount_transition_status ;\n\n\t\t// Reset status transition variable.\n\t\t$this->amount_transition_status = false ;\n\n\t\tif ( ! $amount_transition_status ) {\n\t\t\treturn ;\n\t\t}\n\n\t\tdo_action( 'wc_cs_admin_funds_txn_amount_status_' . $amount_transition_status, $this ) ;\n\t}", "public function hasStatus(): bool\n {\n return isset($this->status);\n }", "public function getTransactionStatusInfos() {\n return $this->transactionStatusInfos;\n }", "public function getTransactionStatus($transactionId)\n {\n $this->suppressLibraryErrors();\n\n return $this->service->tranzakcioStatuszLekerdezes(\n $this->configurator->getPosId(),\n $transactionId,\n 1,\n time() - 60*60*24,\n time() + 60*60*24\n );\n\n $this->restoreErrorReporting();\n }", "public function isActive(): bool\n {\n return $this->pdo->inTransaction();\n }", "public function isTransactionAllowed(\\XLite\\Model\\Payment\\Transaction $transaction, $transactionType)\n {\n $result = false;\n\n if (\\XLite\\Core\\Request::getInstance()->trn_id) {\n $transaction = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Payment\\Transaction')->find(\\XLite\\Core\\Request::getInstance()->trn_id);\n }\n\n if (\\XLite\\Model\\Payment\\BackendTransaction::TRAN_TYPE_CAPTURE == $transactionType) {\n\n if (\n $transaction->getXpcDataCell('xpc_can_do_capture')\n && $transaction->getXpcDataCell('xpc_can_capture')\n ) {\n $result = ($transaction->getXpcDataCell('xpc_can_capture')->getValue() > 0);\n }\n\n } elseif (\\XLite\\Model\\Payment\\BackendTransaction::TRAN_TYPE_VOID == $transactionType) {\n\n if (\n $transaction->getXpcDataCell('xpc_can_do_void')\n && $transaction->getXpcDataCell('xpc_can_void')\n ) {\n $result = ($transaction->getXpcDataCell('xpc_can_void')->getValue() > 0);\n }\n\n } elseif (\\XLite\\Model\\Payment\\BackendTransaction::TRAN_TYPE_REFUND == $transactionType) {\n\n if (\n $transaction->getXpcDataCell('xpc_can_do_refund')\n && $transaction->getXpcDataCell('xpc_can_refund')\n ) {\n $result = ($transaction->getXpcDataCell('xpc_can_refund')->getValue() > 0);\n }\n\n } elseif (\n \\XLite\\Model\\Payment\\BackendTransaction::TRAN_TYPE_ACCEPT == $transactionType\n || \\XLite\\Model\\Payment\\BackendTransaction::TRAN_TYPE_DECLINE == $transactionType\n ) {\n\n if (\n $transaction->getXpcDataCell('xpc_is_fraud_status')\n && $transaction->getXpcDataCell('xpc_is_fraud_status')->getValue()\n ) {\n $result = true;\n }\n }\n\n return $result;\n }", "public function is_transaction_exist() {\n\n $transaction = $this->ci->generic_model->retrieve_one(\n \"transaction_general\",\n array(\n \"package_id\" => $this->ci->input->post(\"package_id\"),\n \"package_type\" => $this->ci->input->post(\"package_type\")\n )\n );\n\n if ($transaction) { // there exists an object.\n return TRUE;\n } else { // object is not found.\n $this->ci->form_validation->set_message(\"is_transaction_exist\", \"Paket belum dibeli.\");\n return FALSE;\n }\n }", "public function CheckTransactionUser() {\n\t\ttry{\n\t\t\tif (isset ( $_SESSION ['UserSession'] )) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\t}catch(ErrorException $ex){\n\t\techo \"Message\".$ex->getMessage();\n\t\t}\n\t}", "public function updateTransactionSystemStatus($transaction, $status) {\n \n $this->__createLog('Entering into class [SixthContinent\\SixthContinentConnectBundle\\Services\\SixthcontinentOfferTransactionService] and function [updateTransactionSystemStatus]');\n// $applane_service = $this->container->get('appalne_integration.callapplaneservice');\n $em = $this->em;\n $data[\"ci_used\"]= $transaction->getUsedCi();\n $data[\"buyer_id\"] = $transaction->getUserId();\n $SixcTransactionId = $em->getRepository('WalletBundle:WalletCitizen')\n ->increaseWalletCitizenIncome($data);\n \n $this->__createLog('Exiting from class [SixthContinent\\SixthContinentConnectBundle\\Services\\SixthcontinentOfferTransactionService] and function [updateTransactionSystemStatus]');\n return true;\n }", "private function _checkTXNTableExists() {\n $curTable = readSetting( $this->settings['DataFile'], 'txnTable' );\n $txnTable = $this->settings['txnTable'];\n $rVal = false;\n\n // If the Transaction Table is Not the Same as Expected, then Create It\n if ( $curTable != $txnTable ) {\n $sqlStr = $this->_readTXNTableDefinitions();\n if ( $sqlStr ) {\n $rslt = doSQLExecute( $sqlStr );\n }\n\n // Confirm the Table Exists, and Save the TXN Name if Appropriate\n if ( $this->_confirmTXNTables() ) {\n $rVal = saveSetting( $this->settings['DataFile'], 'txnTable', $txnTable );\n writeNote( \"Saved Transaction Table Record: \" . BoolYN($rVal) );\n }\n }\n\n // Return the Boolean Response\n return $rVal;\n }", "public function isPending()\n {\n return $this->isSuccessfulQuery() && $this->isPendingTransaction();\n }", "public function hasEstatus()\n {\n return $this->estatus !== null;\n }", "public function reserved(){\n\n return $this->attributes['status'] == 1;\n\n }", "public function getStateStatus()\n {\n return isset($this->transaction['stateStatus']) ? $this->transaction['stateStatus'] : '';\n }", "public static function transactionLevel()\n {\n }", "public function getStatusSettlement()\n {\n return $this->statusSettlement;\n }", "public function hasStatus(){\n return $this->_has(10);\n }", "private function isPendingInStore($orderStatus){\r\n return $orderStatus == 'pending';\r\n }", "protected function _initStatus()\n {\n $statusCode = $this->getRequest()->getParam('status');\n if ($statusCode) {\n $status = $this->_objectManager->create(\\Magento\\Sales\\Model\\Order\\Status::class)->load($statusCode);\n } else {\n $status = false;\n }\n return $status;\n }", "public function isSetTransactionDate()\n {\n return !is_null($this->_fields['TransactionDate']['FieldValue']);\n }", "public function beginTransaction()\n {\n $ret = (bool)$this->PDO->beginTransaction();\n $ret == false && MyErrorHandler::exceptionLogger('beginTransaction() error', fileName);\n return (bool)$ret;\n }", "protected function checkStatus()\n {\n $status = $this->autoTestController->checkStatus(Tools::getValue('queueItemId', 0));\n\n if ($status['finished']) {\n $this->autoTestController->stop(\n function () {\n return LoggerService::getInstance();\n }\n );\n }\n\n PacklinkPrestaShopUtility::dieJson($status);\n }", "public function hasStatuses()\n\t{\n\t\treturn true;\n\t}", "public function isSuccessful()\n\t{\n\t\t$data = $this->getData();\n\n\t\treturn isset($data['gettransactionResult']);\n\t}", "public function isStatusUploading()\n\t{\n\t\treturn $this->status == self::STATUS_UPLOADING;\n\t}", "function convert_transaction_status( &$obj )\n\t{\n\n\t}", "public function isStatus()\n {\n return $this->getStatus();\n }", "public function getStatus() {\r\n if ($this->status === \"error\") {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }", "function isApproved() {\n return $this->getStatus() == UserpointsTransaction::STATUS_APPROVED;\n }", "private function isPendingInFlow($status){\r\n return $status == 1;\r\n }", "public function beginTransaction(): bool\n {\n if ($this->hasActiveTransaction === true) {\n return false;\n }\n $this->hasActiveTransaction = $this->db->beginTransaction();\n\n return $this->hasActiveTransaction;\n }", "public function isPending()\n {\n if (!isset($this->data['error']) && $this->data['transactionResponse']['state'] === 'PENDING') {\n return true;\n }\n return false;\n }", "public function updateTransactionStatus($transaction, $status) {\n $this->__createLog('Entering into class [SixthContinent\\SixthContinentConnectBundle\\Services\\SixthcontinentOfferTransactionService] and function [updateTransactionStatus]');\n $id = $transaction->getId();\n $em = $this->em;\n\n $transaction = $em->getRepository(\"SixthContinentConnectBundle:Sixthcontinentconnecttransaction\")\n ->findOneBy(array( 'id'=>$id));\n try {\n $transaction->setStatus($status);\n $em->persist($transaction);\n $em->flush();\n $this->__createLog('Transaction is updated with id:'.$id. ' and status:'.$status);\n } catch (\\Exception $ex) {\n $this->__createLog('Some error occured when transaction updated with status:'.$status .' Error is: '.$ex->getMessage());\n }\n $this->__createLog('Exiting from class [SixthContinent\\SixthContinentConnectBundle\\Services\\SixthcontinentOfferTransactionService] and function [updateTransactionStatus]');\n return true;\n }", "public function isSuccessful()\n {\n return $this->isSuccessfulQuery() && $this->isSuccessfulTransaction();\n }", "public function isSent() {\n\treturn $this->status != self::$WAITING;\n }", "public function setTransactionStatus($orderId, string $status);", "function status($status)\n {\n switch($status) {\n case \"Active\":\n case \"Suspended\":\n break;\n default:\n return false;\n }\n\n if ($status != $this->status)\n $this->update['status'] = $status;\n\n $this->status = $status;\n\n return true;\n }", "protected static function set_status()\n {\n }", "public function request_transaction_status($host_obj, $transaction_id)\n\t\t{\n\t\t\t$this->init_braintree_environment($host_obj);\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$transaction = Braintree_Transaction::find($transaction_id);\n\t\t\t\tif (!$transaction)\n\t\t\t\t\tthrow new Phpr_ApplicationException('Transaction not found');\n\n\t\t\t\treturn new Shop_TransactionUpdate(\n\t\t\t\t\t$transaction->status,\n\t\t\t\t\t$this->get_status_name($transaction->status)\n\t\t\t\t);\n\t\t\t} catch (Exception $ex)\n\t\t\t{\n\t\t\t\tthrow new Phpr_ApplicationException($this->get_exception_description($ex));\n\t\t\t}\n\t\t}", "public function isSetTransactionSerialNumber()\n {\n return !is_null($this->_fields['TransactionSerialNumber']['FieldValue']);\n }", "public function status()\n {\n if (!$this->config->get('onego_status') || !$this->user->hasPermission('modify', 'sale/order')) {\n $this->response->setOutput('');\n return;\n }\n \n $this->language->load('total/onego');\n \n $orderId = (int) $this->request->get['order_id'];\n $operations = OneGoTransactionsLog::getListForOrder($orderId);\n foreach ($operations as $row) {\n if ($row['success'] && empty($statusSuccess)) {\n $statusSuccess = $row;\n break;\n } else if (!$row['success'] && empty($statusFailure)) {\n $statusFailure = $row;\n }\n }\n if (!empty($statusSuccess)) {\n if ($statusSuccess['operation'] == OneGoSDK_DTO_TransactionEndDto::STATUS_DELAY) {\n // delayed transaction\n $expiresOn = strtotime($statusSuccess['inserted_on']) + $statusSuccess['expires_in'];\n if ($expiresOn <= time()) {\n // transaction expired\n $this->data['onego_status_success'] = sprintf(\n $this->language->get('transaction_status_expired'), date('Y-m-d H:i:s', $expiresOn));\n } else {\n // transaction delayed\n $this->data['onego_status_success'] = sprintf(\n $this->language->get('transaction_status_delayed'), \n date('Y-m-d H:i', strtotime($statusSuccess['inserted_on'])),\n date('Y-m-d H:i:s', $expiresOn));\n \n // enable transaction completion actions\n $this->data['onego_allow_status_change'] = true;\n $confirmStatuses = OneGoConfig::getArray('confirmOnOrderStatus');\n $cancelStatuses = OneGoConfig::getArray('cancelOnOrderStatus');\n $this->data['confirm_statuses'] = $confirmStatuses;\n $this->data['cancel_statuses'] = $cancelStatuses;\n $this->data['onego_btn_confirm'] = $this->language->get('button_confirm_transaction');\n $this->data['onego_btn_cancel'] = $this->language->get('button_cancel_transaction');\n $this->data['onego_btn_delay'] = $this->language->get('button_delay_transaction');\n\n }\n } else {\n $this->data['onego_status_success'] = sprintf(\n $this->language->get('transaction_status_'.strtolower($statusSuccess['operation'])),\n date('Y-m-d H:i', strtotime($statusSuccess['inserted_on'])));\n }\n } \n if (!empty($statusFailure)) {\n $this->data['onego_status_failure'] = sprintf(\n $this->language->get('transaction_operation_failed'),\n date('Y-m-d H:i', strtotime($statusFailure['inserted_on'])),\n $statusFailure['operation'],\n $statusFailure['error_message']);\n } else if (empty($statusSuccess)) {\n $this->data['onego_status_undefined'] = $this->language->get('transaction_status_undefined');\n }\n $this->data['onego_status'] = $this->language->get('onego_status');\n $this->data['order_id'] = $orderId;\n $this->data['token'] = $this->session->data['token'];\n\n $this->data['confirm_confirm'] = $this->language->get('confirm_transaction_confirm');\n $this->data['confirm_cancel'] = $this->language->get('confirm_transaction_cancel');\n $this->data['delay_periods'] = $this->language->get('delay_period');\n $this->data['delay_for_period'] = $this->language->get('delay_for_period');\n $this->data['confirm_delay'] = $this->language->get('confirm_transaction_delay');\n $this->data['status_will_confirm'] = $this->language->get('transaction_will_confirm');\n $this->data['status_will_cancel'] = $this->language->get('transaction_will_cancel');\n \n $this->template = 'total/onego_status.tpl';\n $this->response->setOutput($this->render());\n }", "public function isSent(): bool\n {\n return $this->status === static::STATUS_QUEUED || $this->status === static::STATUS_COMPLETE;\n }", "function checkOrderStatus($orderNum ,$status)\n\t\t{\n\t\t\t$db = dbConnect::getInstance();\n \t\t $mysqli = $db->getConnection();\n\t\t\t$query = \" select * from check_tb where id= '\".$orderNum.\"' and status ='\".$status.\"' \"; \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}" ]
[ "0.7663412", "0.740672", "0.7025853", "0.69612014", "0.6917286", "0.68576574", "0.6821006", "0.6818238", "0.6816993", "0.6804201", "0.6804201", "0.67854434", "0.67733717", "0.66492033", "0.66448724", "0.6610371", "0.6589649", "0.6581168", "0.6577444", "0.6566916", "0.6544694", "0.6534354", "0.65267706", "0.6522666", "0.64962846", "0.6488259", "0.6466502", "0.646522", "0.64440817", "0.6432501", "0.62782365", "0.6277187", "0.62639195", "0.6224138", "0.61768043", "0.6154798", "0.61302793", "0.60943353", "0.6083355", "0.6057106", "0.6054294", "0.6044631", "0.6044631", "0.6006951", "0.59779036", "0.59748244", "0.59497654", "0.59497654", "0.5909634", "0.59020114", "0.58819646", "0.5871701", "0.58429796", "0.5836519", "0.58164525", "0.5793083", "0.5790586", "0.57886225", "0.5767571", "0.57619745", "0.57558984", "0.57551944", "0.5724759", "0.5706507", "0.56902254", "0.56893283", "0.5679331", "0.5678754", "0.5667398", "0.5640553", "0.5631759", "0.5615912", "0.5614886", "0.56130105", "0.56113243", "0.5594318", "0.5578032", "0.55686855", "0.55614287", "0.55470806", "0.5546925", "0.5543295", "0.5542976", "0.55341375", "0.55048454", "0.5496719", "0.54929316", "0.5492206", "0.5474819", "0.54721606", "0.545991", "0.5456591", "0.5441702", "0.5434814", "0.54244244", "0.5418737", "0.54177916", "0.54148966", "0.5413139" ]
0.7207129
3
Retrieves the value from the data attribute of the owner that contains the json data.
public function getData($key) { return ArrayHelper::getValue($this->owner->{$this->dataAttribute}, $key); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getValue() {\n\t\treturn $this->data[\"value\"];\n\t}", "public function getValue(){\n return $this->getData();\n }", "public function getValue()\n {\n return $this->getOriginData('value');\n }", "public function getValue()\n\t{\n\t\treturn $this->data['value'];\n\t}", "public function get_data() {\n return $this->data;\n }", "function get_data() {\r\n return $this->data;\r\n }", "public function get_data() {\n\t\treturn $this->data;\n\t}", "public function getOwner()\n {\n return $this->data['owner'];\n }", "public function get_data()\n {\n return $this->_data;\n }", "public function getData() {\r\n return $this->modx->fromJSON($this->getProperty('data'));\r\n }", "public function get_data() {\r\n return $this->data;\r\n }", "public function getDataUnwrapped()\n {\n return $this->readWrapperValue(\"data\");\n }", "public function get_data() {\r\n\t\treturn $this->data;\r\n\t}", "public function data()\n {\n return $this->data;\n }", "public function get_data() {\n $data = parent::get_data();\n if ($data !== null) {\n }\n return $data;\n }", "public function getData() {\n return $this->parse()['data'];\n }", "public function value(array $data, $owner = null);", "public function getData()\n {\n return $this->data;\n }", "function getData()\n {\n return $this->_data;\n }", "public function getData() {\n return $this->data;\n }", "public function getData()\n {\n return $this->teamMember;\n }", "public function value ()\n {\n return $this->context->storage->value ($this->name);\n }", "protected function getData()\n {\n return $this->data;\n }", "function getData() {\n\t\treturn $this->data;\n\t}", "public function getValue() {\n\t\t$db = Loader::db();\n\t\t$value = $db->GetOne('select value from atDefault where avID = ?', array($this->getAttributeValueID()));\n\t\t\n\t\t$jsonHelper = Loader::helper('json');\n\t\treturn $jsonHelper->decode($value);\n\t}", "public function getData() {\n\t\treturn $this->_data;\n\t}", "public function getData() {\n\t\treturn $this->_data;\n\t}", "public function getData() {\n\t\treturn $this->_data;\n\t}", "public function getData() {\n\t\treturn $this->_data;\n\t}", "public function getData() {\n\t\treturn $this->_data;\n\t}", "public function data ()\n {\n return $this->_data;\n }", "public function getData()\n {\n return $this->_data;\n }", "public function getData()\n {\n return $this->_data;\n }", "public function getData()\n {\n return $this->_data;\n }", "public function getData()\n {\n return $this->_data;\n }", "public function getData()\n {\n return $this->_data;\n }", "public function getData()\n {\n return $this->_data;\n }", "public function data()\n {\n return $this->data;\n }", "public function data()\n {\n return $this->data;\n }", "public function data()\n {\n return $this->data;\n }", "public function data()\n {\n return $this->data;\n }", "public function data()\n {\n return $this->data;\n }", "public function data()\n {\n return $this->data;\n }", "public function getData()\r\n {\r\n return $this->data;\r\n }", "public function getData()\n {\n return $this->_objData;\n }", "public function getData() {\n return $this->_data;\n }", "public function getData() {\n return $this->_data;\n }", "public function data()\n {\n return $this->_data;\n }", "public function data()\n {\n \tif (!isset($this->data)) {\n \t\t$this->setData();\n \t}\n \t\n \treturn $this->data->data();\n }", "public function getData () {\n return $this->data;\n }", "protected function getObjectData() {\n return $this->data;\n }", "function getData($data = null){\r\n\t\treturn $this->fields->getData($data);\r\n\t}", "public function getData()\n\t{\n\t\treturn $this->_data;\n\t}", "public function getData() {\n return $this::$data;\n }", "public function getData() {\r\n return $this->data;\r\n }", "public function getData() {\n\t\treturn $this->data;\n\t}", "public function getData() {\n\t\treturn $this->data;\n\t}", "public function data()\n {\n return $this->data; \n }", "public final function getData(){\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }" ]
[ "0.63759", "0.6260205", "0.6256041", "0.6175896", "0.60385555", "0.6038527", "0.60280085", "0.60212064", "0.6011236", "0.60098493", "0.6004536", "0.5982341", "0.59819233", "0.5981154", "0.59721005", "0.59717286", "0.59668285", "0.5963967", "0.5949288", "0.5942025", "0.59318054", "0.5918127", "0.59025073", "0.58989924", "0.589262", "0.586429", "0.586429", "0.586429", "0.586429", "0.586429", "0.5855299", "0.58509433", "0.58509433", "0.58509433", "0.58509433", "0.58509433", "0.58509433", "0.58449876", "0.58449876", "0.58449876", "0.58449876", "0.58449876", "0.58449876", "0.5843761", "0.5839561", "0.58370656", "0.58370656", "0.5834974", "0.5834254", "0.5831489", "0.58065856", "0.58016557", "0.5799328", "0.5798964", "0.57988995", "0.57985973", "0.57985973", "0.5788887", "0.5783431", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085", "0.57805085" ]
0.61901444
3
Add or replace data into the data attribute of the owner that contains the json data.
public function setData($key, $value) { $this->owner->{$this->dataAttribute} = ArrayHelper::merge($this->owner->{$this->dataAttribute}, [$key => $value]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function appendData($data)\n {\n $this->sha1 = null;\n $this->data.=$data;\n }", "public function addData($data)\n {\n $data = $this->hydrateIfJsonToArray($data);\n $this->data[] = $data;\n }", "public function setData($data){\n\t\t$this->_storage = $data;\n\t\t\n\t\t// set update flag\n\t\t$this->_isModified = true;\n\t\t\n\t\t// new data available\n\t\t$this->_dataAvailable = true;\n\t}", "public function setJson($key, $data)\n {\n \n $this->synchronized = false;\n $this->data[$key] = json_encode($data);\n \n }", "protected function setData($data)\n {\n $this->sha1 = null;\n $this->data = $data;\n }", "public function setJSON($data) {\n\t\t$this->json = $data;\n\t}", "public static function setData($data) {}", "public function setData($data)\n {\n $resultData = $this->hydrateIfJsonToArray($data);\n if (!empty($resultData)) {\n $this->data = $resultData;\n }\n else {\n $this->data = [];\n }\n }", "public static function setData($data)\n {\n self::$rawData = $data;\n }", "protected function processData($data)\n {\n $this->data = array_replace_recursive($this->data, $data);\n }", "final public function setData($data) {\n $this->data = $data;\n }", "public function setData($data)\n {\n $this->_data = $data;\n }", "public function setData($_data)\n {\n $this->_data = $_data;\n }", "public function setData($data) {\n $this->data = $data;\n }", "public function setData($data)\r\n {\r\n }", "private function setData($data)\n {\n \t$this->data = $data;\n }", "function setData ($data) {\n if ($data !== ($oldData = $this->data)) {\n $this->data = $data;\n if ($this->resetCacheOnDataChange($oldData, $data)) \n $this->resetCache();\n }\n }", "public function encodeData($event)\n {\n $this->owner->{$this->dataAttribute} = Json::encode($this->owner->{$this->dataAttribute});\n }", "public function setData($data)\n {\n return $this->set('data', $data);\n }", "protected function setData($data) {\n $this->data = collect($data);\n }", "public function set_data($data)\n {\n $this->data = $data;\n }", "public function setData($data)\r\n\t{\r\n\t\t$this->data = $data;\r\n\t}", "public function setData($data): void\n {\n $this->data = $data;\n }", "public function setData($data)\n {\n $this->data = $data;\n }", "public function setData($data)\n {\n $this->data = $data;\n }", "public function setData( $data )\n {\n $this->data = $data;\n }", "public function setData($data)\n\t{\n\t\t$this->data = $data;\n\t}", "public function setData($data);", "public function setData($data);", "public function setData($data);", "public function setData($data);", "public function setData($data);", "public function set_data($data)\n {\n }", "public function set_data($data)\n {\n }", "function setData($data)\n {\n $this->data = $data;\n }", "public function setData($data) \n\t{\n $this->data = $data;\n }", "function setData($data)\n\t{\n\t\t$this->data = $data;\n\t}", "function setData($data)\n\t{\n\t\t$this->data = $data;\n\t}", "function setData($data)\n\t{\n\t\t$this->data = $data;\n\t}", "public function setInternalData($data): void\n {\n $this->internal_data = $data;\n }", "protected function setData(array $data)\n\t{\n\t\t$this->json_data = $data;\n\t}", "abstract public function updateData();", "public function decodeData($event)\n {\n $this->owner->{$this->dataAttribute} = Json::decode($this->owner->{$this->dataAttribute});\n }", "protected function addOtherData(array $data) : void\n {\n $this->otherData += $data;\n }", "public function set_all_data($data)\n\t{\n\t\t$this->_data = $data;\n\t}", "public function setData($data) { \n $this->data = $data; \n }", "public function setData($data = array())\n {\n $this->data = (string) $data;\n\n $this->update();\n }", "public function put($data)\n {\n global $_PM_;\n $api = 'handler_'.$this->handler.'_api';\n $this->api = new $api($_PM_, PHM_API_UID, $this->principalId);\n $this->api->update_item_content($this->item['id'], $data);\n }", "public static function setData(Data $data)\n {\n self::$data = $data;\n }", "public function update($data) { \n\n\t\tif ($data['name'] != $this->name) { \n\t\t\t$this->update_name($data['name']); \n\t\t} \n\t\tif ($data['pl_type'] != $this->type) { \n\t\t\t$this->update_type($data['pl_type']); \n\t\t} \n\n\t}", "public function setDataByKey($key, $data)\n {\n $data = $this->hydrateIfJsonToArray($data);\n $this->data[$key] = $data;\n }", "public function setData($data, $key = null);", "public function setData($data) {\n $this->data = (string) $data;\n }", "public function set_data($key, $data)\n\t{\n\t\t$this->_data[$key] = $data;\n\t}", "public function setData($data)\n\t{\n\t\t$this->_data = unserialize($data);\n\t\t$this->_hashFunc = $this->_data['hashFunc'];\n\t}", "public function data(array $data)\n\t{\n\t\tself::$__data = array_merge(self::$__data, $data);\n\t}", "public function addData(string $data);", "public function set_raw_data($data)\n {\n }", "public function add_data($data)\n {\n }", "public function set($data);", "final public function add_data($data = array())\n\t{\n\t\t$data = !is_array($data) ? (array)$data: $data;\n\t\t$this->data = array_merge($this->data, $data);\n\t}", "public function addExtra($data)\n {\n $data = $this->hydrateIfJsonToArray($data);\n $this->extra[] = $data;\n }", "function setAllData(&$data) {\n\t\t$this->_data =& $data;\n\t}", "public function handleData($data)\n {\n $data['members'] = array_merge($data['members'], array('steamid'));\n\n /* Return */\n return $data;\n }", "public function setData($data = null)\n {\n if ($data instanceof Model) {\n $data = [snake_case(class_basename($data)) => $this->convertObjectToArray($data)];\n } elseif (is_object($data)) {\n $data = $this->convertObjectToArray($data);\n } elseif (is_null($data)) {\n $data = [];\n } elseif (is_string($data)) {\n $data = [static::messageKey() => $data];\n }\n\n if (! is_array($data)) {\n $data = [static::messageKey() => json_encode($data)];\n }\n\n if (! array_key_exists(static::codeKey(), $data)) {\n $data[static::codeKey()] = $this->getCode();\n }\n\n if (! is_null($this->cleanKeys)) {\n $data = $this->cleanArray($data, $this->cleanKeys);\n }\n\n return parent::setData($data);\n }", "protected function setData(string $data):void {\n $this->data = $data;\n }", "public function putAll($data)\n\t{\n\t\t$this->data = array_merge($this->data, $data);\n\n\t\tif ($this->autosave) $this->write();\n\t}", "public function setJsonData($jsonData) {\n $this->jsonData = $jsonData;\n }", "public function update(array $data)\n {\n parent::update($data);\n if (array_key_exists('data', $data)) {\n $this->setData($data['data']);\n }\n }", "public function setData( $data ) {\n\t\t$this->data = $data;\n\t\t$this->addField( new ACHRecordField([4,83], $data) );\n\t}", "public function setData(tx_imagemapwizard_model_dataObject $data) {\n\t\t$this->data = $data;\n\t}", "public function update($data) {}", "public function update($data) {}", "public function setDataAttribute($value)\n {\n $this->attributes['data'] = json_encode($value);\n }", "public function add($data)\n {\n // this method can be overloaded\n foreach (func_get_args() as $data) {\n // redefine var\n $data = (string) $data;\n\n // load data\n $value = $this->load($data);\n $key = ($data != $value) ? $data : 0;\n\n // initialize key\n if(!array_key_exists($key, $this->data)) $this->data[$key] = '';\n\n // store data\n $this->data[$key] .= $value;\n }\n }", "public function appendData($name, array $data) {\n $this->data[$name] = array_merge($this->data[$name], $data);\n }", "public static function setRawData($data)\n {\n self::$rawData = $data;\n }", "private static function saveDataToNode($data) {\r\n file_put_contents(static::getFilePath(), json_encode($data));\r\n }", "public function set($data, $override = true, $disable_auto_save = false) {\n\t\tif ($override) {\n\t\t\t$this->new_data = $data + $this->new_data;\n\t\t}\n\t\telse {\n\t\t\t$this->new_data += $data;\n\t\t}\n\n\t\tif (!$disable_auto_save && $this->attr('auto_save')) {\n\t\t\t$this->save();\n\t\t}\n\t}", "public function setJson($data)\n {\n $this->data['json'] = $data;\n return $this;\n }", "public function setData($data)\n {\n $this->data = $data;\n $this->normalizedData = $this->normalize($data);\n $this->transformedData = $this->transform($this->normalizedData);\n }", "protected function bindData(&$parent, $data)\n {\n if (is_object($data))\n $data = get_object_vars($data);\n else\n $data = (array)$data;\n\n foreach ($data as $k => $v)\n {\n if (is_array($v) || is_object($v))\n {\n $parent->$k = new stdClass;\n $this->bindData($parent->$k, $v);\n }\n else\n $parent->$k = $v;\n }\n }", "public function set_fields($data)\n\t{\n\t\tforeach ($data as $key => $value)\n\t\t{\n\t\t\tif (isset($this->aliases[$key]))\n\t\t\t\t$key = $this->aliases[$key];\n\n\t\t\tif (array_key_exists($key, $this->data))\n\t\t\t\t$this->data[$key] = $value;\n\t\t}\n\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}", "public function addData(array $data)\n {\n $this->data->setData($data);\n }", "public function setJsonData($data)\n {\n foreach ($data as $key => $datum) {\n $this->setData($this->_underscore($key), $datum);\n }\n\n return $this;\n }", "public function setShopifyData(stdClass $data) {\n if (isset($data->{static::getResourceSingularName()})) {\n /*\n * If we received data in the form:\n * {\n * \"product\": {\n * ...\n * }\n * }\n * we'll extract the resource object (in this example, product)\n */\n $this->shopifyData = $data->{static::getResourceSingularName()};\n } else {\n // otherwise let's assume we got the resource object directly\n $this->shopifyData = $data;\n }\n $this->populateChildren();\n }", "public function usrSetData($data) {\n\t\tparent::usrSetData(!!$data);\n\t}", "public function append($data)\n {\n $this->data .= $data;\n }", "public function setData($data)\n\t{\n\t\t$this->_pageData['data'] = $data;\n\t}", "protected function bindData($parent, $data)\n {\n if (is_object($data))\n $data = get_object_vars($data);\n else\n $data = (array)$data;\n\n foreach ($data as $k => $v)\n {\n if (is_array($v) || is_object($v))\n {\n $parent->$k = new stdClass;\n $this->bindData($parent->$k, $v);\n }\n else\n $parent->$k = $v;\n }\n }", "public function setData($value)\n {\n $this->validateString('Data', $value);\n $this->validateNotNull('Data', $value);\n\n if ($this->data['data'] === $value) {\n return;\n }\n\n $this->data['data'] = $value;\n $this->setModified('data');\n }", "public function setData($data, $encodeoptions = JSON_FORCE_OBJECT){\n\t\t$this->data = $data;\n\t\t$this->options = $encodeoptions;\n\t}", "abstract public function put($data);", "public function setObjectData(&$data)\n {\n $objVarNames = array_keys(get_object_vars($this));\n $theData = $data;\n if (is_object($theData)) $theData = get_object_vars($data);\n foreach($theData as $propertyName => &$propertyValue)\n {\n foreach ($objVarNames as &$varName)\n {\n if (strcasecmp($varName, $propertyName) == 0)\n {\n $this->$varName = $propertyValue;\n }\n }\n }\n }", "public function add_data($data)\n {\n $this->builder->insert($data);\n }", "protected function setData($data)\n\t{\n\t\t$this->originalData = $data;\n\t\treturn $this;\n\t}", "public function _setData($data = []){\n \t$this->dataredis\t= $data;\n \tunset($this->dataredis['clientId']);\n \tunset($this->dataredis['clientToken']);\n \t$this->dataredis\t= $this->common->arraySortByKey($this->dataredis, \"ASC\");\n \t$temp\t\t\t\t= \"\";\n \tforeach($this->dataredis as $k => $v){\n \t\tif(is_array($v)) $v = json_encode($v);\n \t\t$temp\t.= urlencode($k).\"=\".urlencode($v).\"&\";\n \t}\n \t$this->dataredis\t= substr($temp,0,strlen($temp)-1);\n \tif(strlen($this->dataredis)==0) $this->dataredis\t= \"null\";\n }", "public function beforeSave()\n {\n foreach ($this->fields as $f) {\n\n $post = !yii::$app->request->isConsoleRequest ? yii::$app->request->post($this->owner->shortClassName) : null;\n if ($post && isset($post[$f])) {\n if (is_array($post[$f])) {\n $this->owner->{$f} = ArrayHelper::merge((is_array($this->owner->{$f}) ? $this->owner->{$f} : []), $post[$f]);\n } else {\n $this->owner->{$f} = $post[$f];\n }\n }\n\n $data = $this->owner->{$f};\n if ($f == 'additional_data') {\n if (yii::$app->request->isConsoleRequest) {\n $defaultData['info'] = [\n 'triggered by console application'\n ];\n } else {\n $defaultData['info'] = [\n 'user' => (yii::$app->user->isGuest ? 'guest' : yii::$app->user->id),\n 'ip' => yii::$app->request->userIP,\n ];\n }\n $data = is_array($data) ? array_merge($defaultData, $data) : $defaultData;\n }\n $this->owner->{$f} = Json::encode($data);\n }\n }", "function set_data($name, $value) {\n $this->data[$name] = $value;\n }", "private function setData() { \n $Avatar = $this->Data['avatar'];\n $Depoimento = $this->Data['depoimento'];\n unset($this->Data['avatar'], $this->Data['depoimento']);\n \n $this->Data = array_map('strip_tags', $this->Data);\n $this->Data = array_map('trim', $this->Data);\n \n $this->Data['data'] = Check::Data($this->Data['data']); \n $this->Data['avatar'] = $Avatar;\n $this->Data['depoimento'] = $Depoimento;\n }" ]
[ "0.65419877", "0.6495022", "0.63402015", "0.63267744", "0.6279147", "0.6258371", "0.6240555", "0.6199845", "0.6153221", "0.61444426", "0.61417437", "0.61406994", "0.6123292", "0.6098155", "0.60960984", "0.60939264", "0.6091255", "0.60849684", "0.6081072", "0.6080545", "0.60756", "0.60661966", "0.60487086", "0.60456276", "0.60456276", "0.6024951", "0.6019863", "0.6015746", "0.6015746", "0.6015746", "0.6015746", "0.6015746", "0.600186", "0.60016555", "0.59991735", "0.59807587", "0.59682024", "0.59682024", "0.59682024", "0.59511167", "0.59143716", "0.59097886", "0.59087837", "0.5900754", "0.5894799", "0.5892528", "0.5878947", "0.5841971", "0.58303535", "0.5809427", "0.5784794", "0.57757294", "0.57756275", "0.5773945", "0.5765483", "0.57570714", "0.5736217", "0.5731914", "0.5725343", "0.57239693", "0.5717422", "0.57152116", "0.5694782", "0.56947196", "0.56909126", "0.5686687", "0.56828624", "0.566477", "0.5661621", "0.56597984", "0.5637368", "0.56346714", "0.56346714", "0.561878", "0.56162435", "0.55770355", "0.55747", "0.557143", "0.55712", "0.5568022", "0.55641264", "0.5557711", "0.5552743", "0.5549191", "0.55409974", "0.5538338", "0.5528849", "0.55280846", "0.55239856", "0.5520902", "0.5514855", "0.55139905", "0.5511423", "0.5508601", "0.55015886", "0.5493682", "0.54930335", "0.54874057", "0.54808855", "0.54650444", "0.54645455" ]
0.0
-1
Encodes the data of [[dataAttribute]] of the owner
public function encodeData($event) { $this->owner->{$this->dataAttribute} = Json::encode($this->owner->{$this->dataAttribute}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __toString()\n {\n return 'data:' . htmlspecialchars($this->type) .\n ($this->base64\n ? ';base64,' . base64_encode($this->data)\n : ',' . rawurlencode($this->data));\n }", "public function setDataAttribute($value)\n {\n $this->attributes['data'] = json_encode($value);\n }", "abstract protected function serializeData();", "public function encode($data) {}", "public function encode($data) {}", "public function encode($data) {}", "public function encode($data) {}", "public function encode($data) {}", "public function __toString(){\r\n\t\t$data = serialize($this->_data);\r\n\t\t// Obfuscate the data with base64 encoding\r\n\t\t$data = base64_encode($data);\r\n\t\treturn $data;\r\n\t}", "public function encode($data);", "public function encode($data);", "public function encode($data);", "abstract public function encode($data);", "public function decodeData($event)\n {\n $this->owner->{$this->dataAttribute} = Json::decode($this->owner->{$this->dataAttribute});\n }", "public function value(array $data, $owner = null);", "public function __toString() {\n\t\treturn json_encode($this->data);\n\t}", "abstract protected function serializeData($unSerializedData);", "protected function setDataAttribute($value)\n\t{\n\t\t$this->attributes['data'] = is_array($value) ? json_encode($value):$value;\n\t}", "abstract function encode($data);", "public function to_wire()\n {\n return json_encode($this->data);\n }", "public function __toString()\n\t{\n\t\treturn \"{$this->data}\";\n\t}", "public function __toString()\n {\n return $this->dataString;\n }", "public function encode($data) {\n return serialize($data);\n }", "function __toString(){\n\treturn serialize($this->__data);\n\t}", "public function Encode()\r\n {\r\n if (!is_array($this->data))\r\n {\r\n $this->data = array();\r\n }\r\n return json_encode($this->data);\r\n }", "public function serialize()\n {\n return serialize($this->data);\n }", "public function serialize()\n {\n return serialize($this->data);\n }", "public function __toString()\n {\n return strval($this->_data);\n }", "public function __toString() {\n return (string)$this->rawData;\n }", "public function getSerializableData()\n {\n return [\n 'id' => $this->getId(),\n 'name' => $this->getName(),\n 'description' => $this->getDescription(),\n 'profile' => $this->getProfile(),\n 'salt' => $this->getSalt(),\n 'type' => $this->getType(),\n 'value' => $this->getValue(),\n ];\n }", "public function serialize(PropertyHolder $data);", "public function encode($key, $data);", "public function encode($data) {\n\t\treturn CJSON::encode($data);\n\t}", "public function serialize()\n {\n $data = parent::serialize();\n $crypt = $this->getCrypt();\n $data = $crypt->encrypt($data);\n $data = base64_encode($data);\n return ($data);\n }", "public function __toString() {\n\t\t$str = parent::__toString();\n\t\treturn $str . \"\\nData:\" . var_export($this->data, true);\n\t}", "public function getData() : string\n {\n return $this->data;\n }", "abstract protected function data();", "public function encode() {\n\t\treturn CJSON::encode($this);\n\t}", "public function __toString() {\n return $this->toJson($this->data);\n }", "public function encode()\n {\n /**\n * 4a - value tag\n * 00 00 - name length\n * 00 0c - value length\n * 6d 65 64 69 61 2d 73 6f 75 72 63 65 - media-source (12 bytes)\n * 44 - member value tag\n * 00 00 - name length\n * 00 08 - member-value-length\n * 65 6e 76 65 6c 6f 70 65 - member value (8 bytes) \n */\n // value tag\n $binary = pack('c', $this->valueTag);\n // name-length 0x0000\n $binary .= $this->nameLength->encode();\n // value-length (value is w)\n $binary .= $this->valueLength->encode();\n // value (member-name)\n $binary .= $this->value->encode();\n // member-value-tag\n $binary .= pack('c', $this->memberValueTag);\n // name-length (value is 0x0000)\n $binary .= $this->nameLength->encode();\n // member-value-length (value is x)\n $binary .= $this->memberValueLength->encode();\n // member-value\n $binary .= $this->memberValue->encode();\n return $binary;\n }", "protected function serializeData($data) {\n return $data;\n }", "private function setAttributeFieldValue()\n {\n // Get all our attribute objects\n $proxiedAttrs = $this->getAttributes();\n \n $data = [];\n foreach ($proxiedAttrs as $attrObjArr) {\n foreach ($attrObjArr as $attrObj) {\n $dataKey = $attrObj->getFieldName();\n $dataVal = $this->getRequest()->postVar($dataKey);\n $data[$dataKey] = $dataVal;\n }\n }\n \n $json = $this->dbObject('AttributeData')->toJson($data);\n $this->setField('AttributeData', $json);\n }", "public function getData()\n {\n return $this->raw;\n }", "public function data($value) {\n return $this->setProperty('data', $value);\n }", "public function data($value) {\n return $this->setProperty('data', $value);\n }", "public function serialize($data);", "function networkSerialize() : string{\n\t\treturn \"\\x00\" . $this->ids . $this->data . $this->skyLight . $this->blockLight;\n\t}", "public function stdWrap_encodeForJavaScriptValueDataProvider() {}", "public function set_raw_data($data)\n {\n }", "function encodeData($data)\n {\n if (is_array($data)) {\n /*\n * Traitement des tableaux\n */\n foreach ($data as $key => $value) {\n $data[$key] = $this->encodeData($value);\n }\n } else {\n /*\n * Traitement des chaines individuelles\n */\n if ($this->typeDatabase == 'pgsql') {\n if ($this->UTF8 && mb_detect_encoding($data) != \"UTF-8\") {\n $data = mb_convert_encoding($data, 'UTF-8');\n }\n $data = pg_escape_string($data);\n } else {\n $data = addslashes($data);\n }\n }\n return $data;\n }", "protected function encodeData($data)\n {\n if ($this->base64encode) {\n $data = base64_encode(serialize($data));\n }\n return $data;\n }", "public function serialize($data)\n {\n }", "abstract public function serialize($data);", "function DataContainer($datarow) {\n $this->x=utf8_encode($datarow['measured_at']);\n $this->y=utf8_encode($datarow['data']);\n }", "public function encodedValue()\n\t{\n\t\treturn $this->definition\n\t\t\t? $this->definition->encode($this->value)\n\t\t\t: $this->value;\n\t}", "public function data ()\n {\n return $this->_data;\n }", "public function setData($data) {\n $this->data = (string) $data;\n }", "public function setData($data = null)\n {\n if ($data instanceof Model) {\n $data = [snake_case(class_basename($data)) => $this->convertObjectToArray($data)];\n } elseif (is_object($data)) {\n $data = $this->convertObjectToArray($data);\n } elseif (is_null($data)) {\n $data = [];\n } elseif (is_string($data)) {\n $data = [static::messageKey() => $data];\n }\n\n if (! is_array($data)) {\n $data = [static::messageKey() => json_encode($data)];\n }\n\n if (! array_key_exists(static::codeKey(), $data)) {\n $data[static::codeKey()] = $this->getCode();\n }\n\n if (! is_null($this->cleanKeys)) {\n $data = $this->cleanArray($data, $this->cleanKeys);\n }\n\n return parent::setData($data);\n }", "public function getDataAttribute($data)\n {\n $data = unserialize($data);\n\n return $data;\n }", "public function func_json_builder () {\n return json_encode ($this -> raw_data);\n }", "public function data(){\r\n\t\treturn $this->_data;\r\n\t}", "public function getData(): string\n\t{\n\t\treturn $this->sData;\n\t}", "public function jsQuoteEscapeDataAttribute($data)\r\n\t{\r\n\t\treturn str_replace(array(chr(34), chr(39)),array('&quot;','&apos;'),$data);\r\n\t}", "function getData()\n {\n return $this->_data;\n }", "public function getData()\n {\n return $this->_objData;\n }", "public function serialize()\n\t{\n\t\treturn json_encode(array(\n\t\t\t'data' => $this->data,\n\t\t\t'this' => $this->getArrayCopy(),\n\t\t\t'name' => $this->name,\n\t\t\t'merged' => $this->merged,\n\t\t));\n\t}", "public function aim_encode($data)\r\n\t{\r\n\t\treturn '\"' . preg_replace(\"/([\\\\\\}\\{\\(\\)\\[\\]\\$\\\"])/\", \"\\\\\\\\\\\\1\", $data) . '\"';\r\n\t}", "public function getDataInterface()\n\t{\n\t\treturn $this->data;\n\t}", "protected function jsonEncode($data) : string {\r\n return $this->getServicingSqlInstance()->jsonEncode($data);\r\n }", "public function data()\n {\n return $this->_data;\n }", "public function raw(): string\n {\n return $this->data;\n }", "public function data ($data = null) {\r\n\t\t\r\n\t\tif (!isset($data)) return $this[0]->attributes;\r\n\t\t\r\n\t\tforeach ($this as $node) {\r\n\t\t\t\t\r\n\t\t\tforeach ($data as $name => $value) {\r\n\t\t\t\t\r\n\t\t\t\t$attrNode = $node->ownerDocument->createAttribute($name);\r\n\t\t\t\t$attrNode->value = $value;\r\n\t\t\t\t$node->appendChild($attrNode);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function enc($data)\n {\n return base64_encode($data);\n }", "public function serialize()\n {\n $data = [\n 'uid' => $this->getIdentifier()\n ];\n return serialize($data);\n }", "public function packData($data) {\n return json_encode($data);\n }", "public function setData() \n {\n // Empty, to be overridden \n }", "public function serialize(){\n return serialize([\n 'data' => $this->data,\n 'table' => $this->table,\n 'key' => $this->key,\n ]);\n }", "function getDataField() {return $this->_datafield;}", "public function toJSON() {\n return json_encode($this->data);\n }", "public function toData() {\n\t\treturn array($this->_alias => $this->toArray());\n\t}", "public function setData($data, $encapsulationName = 'db')\n {\n $this->_data[$encapsulationName] = $data;\n }", "public function getData() {\n return $this->Data;\n }", "public function data(){\n\n\t\treturn $this->_data;\n\n\t}", "public /*String*/ function __toString()\n\t{\n\t\treturn to_json($this->_data);\n\t}", "abstract public static function encode($data): string;", "public function encode($data, $leaveEOD = false) {}", "public function get_data()\n {\n return $this->_data;\n }", "public function serialize():String {\n\n\t\treturn json_encode($this->data);\n\n\t}", "function publicData()\r\n {\r\n return [\r\n 'id' => $this->id,\r\n 'name' => $this->name,\r\n 'level' => $this->level,\r\n 'avatar' => $this->avatar->representation(),\r\n ];\r\n }", "public function getDataUnwrapped()\n {\n return $this->readWrapperValue(\"data\");\n }", "abstract public function encode();", "protected function createPayload()\n {\n if ($this->data instanceof Closure) {\n $closure = serialize(new Helpers\\SerializableClosure($this->data));\n $data = compact('closure');\n } else {\n $data = $this->data;\n }\n\n return json_encode(array('id' => $this->id, 'class' => $this->class, 'data' => $data));\n }", "public function getData() {\n\t\treturn $this->_data;\n\t}", "public function getData() {\n\t\treturn $this->_data;\n\t}", "public function getData() {\n\t\treturn $this->_data;\n\t}", "public function getData() {\n\t\treturn $this->_data;\n\t}", "public function getData() {\n\t\treturn $this->_data;\n\t}", "protected function prep_data_before_save($data) {\n return serialize($data);\n }", "public function serialize($data)\n {\n return Base64Native::serialize($data);\n }", "public function setData()\n {\n }" ]
[ "0.61738855", "0.6072694", "0.60346025", "0.5997208", "0.5997051", "0.5997051", "0.5997051", "0.5997051", "0.596856", "0.58531106", "0.58531106", "0.58531106", "0.57226956", "0.5692222", "0.56712216", "0.5651261", "0.56419885", "0.5641182", "0.5637049", "0.5621782", "0.56097305", "0.5609114", "0.5606593", "0.5604952", "0.5599437", "0.55703527", "0.55703527", "0.55555874", "0.5552801", "0.5498542", "0.5491715", "0.5473064", "0.5464469", "0.54612964", "0.54523534", "0.54475063", "0.5421786", "0.54182285", "0.54030424", "0.5400318", "0.5394665", "0.53848326", "0.53593594", "0.5350892", "0.5350892", "0.5349823", "0.534287", "0.5335786", "0.5334673", "0.53269005", "0.5303728", "0.527583", "0.52641505", "0.5261926", "0.52557385", "0.5253833", "0.52398497", "0.52330506", "0.5229955", "0.52143145", "0.5207637", "0.52023333", "0.5199417", "0.51913697", "0.5179005", "0.51739234", "0.5171601", "0.5167363", "0.51570946", "0.515658", "0.51480156", "0.51458055", "0.5144994", "0.5144643", "0.5142488", "0.5141638", "0.51313734", "0.5128235", "0.51280624", "0.5126171", "0.5114733", "0.5114595", "0.51058304", "0.50925547", "0.5090849", "0.5081455", "0.50749207", "0.5071464", "0.50702477", "0.50643384", "0.5061212", "0.5059888", "0.5053395", "0.5053395", "0.5053395", "0.5053395", "0.5053395", "0.5052184", "0.50484705", "0.50480205" ]
0.7223854
0
Decodes the data of [[dataAttribute]] of the owner
public function decodeData($event) { $this->owner->{$this->dataAttribute} = Json::decode($this->owner->{$this->dataAttribute}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function get_decoded_data() {\n return json_decode($this->get_data());\n }", "public function decode($data) {}", "public function decode($data) {}", "public function decode($data) {}", "public function decode($data) {}", "public function decode($data) {}", "public function getDataUnwrapped()\n {\n return $this->readWrapperValue(\"data\");\n }", "public function decode($data);", "abstract public function decode($data);", "public function getInternalValueAttribute()\n {\n $value = $this->data->get($this->localKey);\n if (!$this->is_serialized) {\n return $value;\n }\n \n return (@unserialize($value) ?: []);\n }", "public function getDataAttribute($data)\n {\n $data = unserialize($data);\n\n return $data;\n }", "private function unpackData()\n {\n return json_decode($this->packedData, true);\n }", "public function getData()\n {\n return $this->_objData;\n }", "function getData(){ \n return json_decode($this->data); \n }", "public function getData(){ \n return json_decode($this->data); \n }", "abstract protected function unSerializeData();", "protected function getData()\n {\n return $this->mixed;\n }", "public function getData() {\n return $this->parse()['data'];\n }", "public function getData()\n {\n return $this->raw;\n }", "public function getDataInterface()\n\t{\n\t\treturn $this->data;\n\t}", "public function getData() {\n\t\treturn $this->_data;\n\t}", "public function getData() {\n\t\treturn $this->_data;\n\t}", "public function getData() {\n\t\treturn $this->_data;\n\t}", "public function getData() {\n\t\treturn $this->_data;\n\t}", "public function getData() {\n\t\treturn $this->_data;\n\t}", "function getData()\n {\n return $this->_data;\n }", "public function getDataAttribute($value)\n {\n return json_decode($value, true);\n }", "public function getData() {\r\n\t\treturn $this->_data;\r\n\t}", "public function deserialize($data);", "public function getData() {\n return $this->_data;\n }", "public function getData() {\n return $this->_data;\n }", "public function getData()\n\t{\n\t\treturn $this->_data;\n\t}", "public function getData()\n {\n return $this->_data;\n }", "public function getData()\n {\n return $this->_data;\n }", "public function getData()\n {\n return $this->_data;\n }", "public function getData()\n {\n return $this->_data;\n }", "public function getData()\n {\n return $this->_data;\n }", "public function getData()\n {\n return $this->_data;\n }", "public function data ()\n {\n return $this->_data;\n }", "public function get_data()\n {\n return $this->_data;\n }", "public function getData() {\r\n return $this->modx->fromJSON($this->getProperty('data'));\r\n }", "public function decode()\n {\n return ($this->claim)?$this->claim:null;\n }", "public function toObject()\r\n\t{\r\n\t\treturn (object)$this->m_data;\r\n\t}", "protected function getData()\n {\n if($this->jsonData === null)\n {\n $rawData = parent::getData();\n $this->jsonData = json_decode($rawData, true); // the second parameter turns JSON-objects into associative arrays which makes extracting the record fields easier\n if ($this->jsonData === null)\n {\n $error = json_last_error();\n // In case of an error 500, FF 6.6 does not return valid JSON; try to fix it\n $this->jsonData = json_decode('{'.$rawData.'}', true);\n if ($this->jsonData === null)\n throw new InvalidArgumentException('json_decode() raised error '.$error);\n }\n }\n return $this->jsonData;\n }", "public function getData() {\n return $this->Data;\n }", "public function data(){\r\n\t\treturn $this->_data;\r\n\t}", "public function getData()\n\t\t{\n\t\t\treturn $this->_data;\n\t\t}", "protected function decodeData($value) {\n\t\treturn wireDecodeJSON($value);\n\t}", "public function getData() {\n\t\treturn $this->Data;\n\t}", "public function data()\n {\n return $this->_data;\n }", "public function getInternalData()\n {\n return $this->internal_data;\n }", "public function data(){\n\n\t\treturn $this->_data;\n\n\t}", "public function getData()\n {\n return (object) $this->_response;\n }", "public function Data()\n {\n return $this->parseobject($this->content);\n }", "function getData() {\n\t\treturn $this->data;\n\t}", "public function __invoke() {\n return (object) $this->data;\n }", "function readDataField() {return $this->_datafield;}", "public function getData() {\n return $this->data;\n }", "public function getData() {\n\t\treturn $this->data;\n\t}", "public function getData() {\n\t\treturn $this->data;\n\t}", "public function decode($key, $data);", "public function get_data() {\n\t\treturn $this->data;\n\t}", "public function getData()\n {\n return $this->data;\n }", "public function getTypedData();", "public function getData()\n {\n return $this->Data;\n }", "public function deserialize($data)\n {\n }", "protected function decodeData($data)\n {\n if ($this->base64encode) {\n if (is_string($data)) {\n if (($data = base64_decode($data)) !== false) {\n $data = unserialize($data);\n } else {\n $data = null;\n }\n } else {\n $data = null;\n }\n }\n return $data;\n }", "protected function getObjectData() {\n return $this->data;\n }", "public function get_data() {\r\n\t\treturn $this->data;\r\n\t}", "public function getData()\n {\n return self::$_arData;\n }", "public function getData () {\n return $this->data;\n }", "public function getData()\r\n {\r\n return $this->data;\r\n }", "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "public function getJsonData() {\n\t\treturn FormatJson::decode( $this->getNativeData(), true );\n\t}", "public final function getData(){\n return $this->data;\n }", "public function getData() {\r\n return $this->data;\r\n }", "public function getDecodedJsonData()\n {\n return $this->decodedJsonData;\n }", "public function data()\n {\n \tif (!isset($this->data)) {\n \t\t$this->setData();\n \t}\n \t\n \treturn $this->data->data();\n }", "public function unserialize($data) {}", "public function get_data() {\n $data = parent::get_data();\n if ($data !== null) {\n }\n return $data;\n }", "abstract protected function data();", "public function data()\n {\n return $this->data;\n }", "public function get_data() {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }", "public function getData()\n {\n return $this->data;\n }" ]
[ "0.6856502", "0.6436015", "0.6436015", "0.6436015", "0.6436015", "0.6436015", "0.62921715", "0.6274611", "0.6170652", "0.61630946", "0.6126862", "0.60786825", "0.604672", "0.60413855", "0.601584", "0.5971527", "0.59484684", "0.58979553", "0.5894961", "0.5845057", "0.5841234", "0.5841234", "0.5841234", "0.5841234", "0.5841234", "0.5803569", "0.5783792", "0.5780451", "0.57773584", "0.5768779", "0.5768779", "0.57671547", "0.5763523", "0.5763523", "0.5763523", "0.5763523", "0.5763523", "0.5763523", "0.57610846", "0.575712", "0.57461226", "0.5733793", "0.57269144", "0.57256085", "0.5723796", "0.5720598", "0.57152784", "0.56992424", "0.5687321", "0.5685239", "0.56825614", "0.5681476", "0.56738704", "0.56733084", "0.56540585", "0.5649772", "0.5638057", "0.56160104", "0.5612383", "0.5612383", "0.5603819", "0.5601576", "0.55955815", "0.5592081", "0.5590975", "0.55780137", "0.5574794", "0.55711246", "0.5567721", "0.5554861", "0.55532855", "0.5549607", "0.5547978", "0.5547978", "0.5547978", "0.5547978", "0.55359507", "0.55248976", "0.55232465", "0.5519062", "0.5509242", "0.550439", "0.55042386", "0.55027914", "0.5499548", "0.5499256", "0.5489367", "0.5489367", "0.5489367", "0.5489367", "0.5489367", "0.5489367", "0.5489367", "0.5489367", "0.5489367", "0.5489367", "0.5489367", "0.5489367", "0.5489367", "0.5489367" ]
0.6739497
1
EXPLANATION: We are creating a fake "result" structure to enable us to have sourcelevel equivalent syntax to a query executed via mysqli_query(). $stmt = mysqli_prepare($conn, ""); mysqli_bind_param($stmt, "types", ...); $param1 = 0; $param2 = 'foo'; $param3 = 'bar'; mysqli_execute($stmt); $result _mysqli_stmt_get_result($stmt); [ $arr = _mysqli_result_fetch_array($result); || $assoc = _mysqli_result_fetch_assoc($result); ] mysqli_stmt_close($stmt); mysqli_close($conn); At the source level, there is no difference between this and mysqlnd.
function iimysqli_stmt_get_result($stmt) { $metadata = mysqli_stmt_result_metadata($stmt); $ret = new iimysqli_result; if (!$ret) return NULL; $ret->cols = array();//mysqli_num_fields($metadata); while ($field = $metadata->fetch_field()) { $ret->cols[] = $field->name; } $ret->stmt = $stmt; mysqli_free_result($metadata); return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fetch($result)\n{ \n// This function will turn mysqli results into an array\n\n $array = array();\n\n if($result instanceof mysqli_stmt)\n {\n $result->store_result();\n\n $variables = array();\n $data = array();\n $meta = $result->result_metadata();\n\n while($field = $meta->fetch_field())\n $variables[] = &$data[$field->name];\n\n call_user_func_array(array($result, 'bind_result'), $variables);\n\n $i=0;\n while($result->fetch())\n {\n $array[$i] = array();\n foreach($data as $k=>$v)\n $array[$i][$k] = $v;\n $i++;\n }\n }\n elseif($result instanceof mysqli_result)\n {\n while($row = $result->fetch_assoc())\n $array[] = $row;\n }\n\n return $array;\n}", "function fetch($result, $type = 'array')\n\t{\n\t\tswitch($type)\n\t\t{\n\t\t\tcase \"array\":\n\t\t\t\treturn ($result) ? @mysqli_fetch_array($result) : false;\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"row\":\n\t\t\t\treturn ($result) ? @mysqli_fetch_row($result) : false;\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"assoc\":\n\t\t\t\treturn ($result) ? @mysqli_fetch_assoc($result) : false;\n\t\t\tbreak;\n\t\t}\n\t}", "function getSingleResult($stmt) {\n $result = $stmt->get_result();\n return mysqli_fetch_assoc($result);\n}", "function fetch_array($result)\n{\n\treturn mysqli_fetch_assoc($result);\n}", "function db_fetch($query) {\n return mysqli_fetch_assoc($query);\n}", "public function fetch_array($result_query='', $opt=''){\n\t\tif($opt==='') {\n\t\t\t$opt = db::DB_BOTH;\n\t\t}\n\t\tif(!$this->id_connection){\n\t\t\treturn false;\n\t\t}\n\t\tif(!$result_query){\n\t\t\t$result_query = $this->last_result_query;\n\t\t\tif(!$result_query){\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t}\n\t\tif($opt==db::DB_BOTH){\n\t\t\t$fetch = ibase_fetch_assoc($result_query);\n\t\t\t$result = array();\n\t\t\t$i = 0;\n\t\t\tforeach($fetch as $key => $value){\n\t\t\t\t$result[$key] = $value;\n\t\t\t\t$result[$i++] = $value;\n\t\t\t}\n\t\t\treturn $result;\n\t\t}\n\t\tif($opt==db::DB_ASSOC){\n\t\t\treturn ibase_fetch_assoc($result_query);\n\t\t}\n\t\tif($opt==db::DB_NUM){\n\t\t\treturn ibase_fetch_row($result_query);\n\t\t}\n\t\treturn $result;\n\t}", "function db_fetch($query){\n return mysqli_fetch_array($query);\n}", "public function fetchAll($query, $resulttype = MYSQLI_ASSOC)\n {\n if (func_num_args() > 2) {\n $args = func_get_args();\n unset($args[1]);\n $query = call_user_func_array(array(get_class(), 'bind'), array_values($args));\n }\n\n $result = $query instanceof \\mysqli_result ? $query : $this->query($query);\n\n // Using mysqlnd :)\n if (function_exists('mysqli_fetch_all') && is_int($resulttype)) {\n return $result->fetch_all($resulttype);\n }\n\n // We don't have it :( or we're fetching objects\n $rows = array();\n if (is_string($resulttype)) {\n while ($row = $result->fetch_object($resulttype)) $rows[] = $row;\n } else {\n while ($row = $result->fetch_array($resulttype)) $rows[] = $row;\n }\n\n return $rows;\n }", "function stmt_bind_assoc (&$stmt, &$out) {\n //$resultrow = array();\n //stmt_bind_assoc($stmt, $resultrow);\n\n $data = mysqli_stmt_result_metadata($stmt);\n $fields = array();\n $out = array();\n\n $fields[0] = $stmt;\n $count = 1;\n\n while($field = mysqli_fetch_field($data)) {\n $fields[$count] = &$out[$field->name];\n $count++;\n }\n call_user_func_array(mysqli_stmt_bind_result, $fields);\n}", "function mysql_fetch_array($result, $result_type = false)\n{\n}", "function fetch_array($result){\n return mysqli_fetch_array($result);\n}", "function fetch($query_str, $array_format = null) {\r\n if($array_format !== MYSQLI_ASSOC\r\n && $array_format !== MYSQLI_NUM\r\n && $array_format !== MYSQLI_BOTH\r\n ) {$array_format = null;}\r\n global $con;\r\n $query = mysqli_query($con, $query_str) or die (\"Error: could not send query, \" . mysqli_error($con));\r\n if(is_null($array_format)) {\r\n $array_format = MYSQLI_NUM;\r\n } else {\r\n $array_format = MYSQLI_ASSOC;\r\n }\r\n $rows = [];\r\n while($row = mysqli_fetch_array($query, $array_format)) {\r\n $rows[] = $row;\r\n }\r\n //print_r($rows);\r\n return $rows;\r\n }", "function mysqli_result($res, $row, $field=0) {\n $res->data_seek($row);\n $datarow = $res->fetch_array();\n return $datarow[$field];\n}", "function mysqli_result($result, $row, $field = 0) {\n // Adjust the result pointer to that specific row\n $result->data_seek($row);\n // Fetch result array\n $data = $result->fetch_array();\n \n return $data[$field];\n}", "public function fetchOne($query, $resulttype = MYSQLI_ASSOC)\n {\n if (func_num_args() > 2) {\n $args = func_get_args();\n unset($args[1]);\n $query = call_user_func_array(array(get_class(), 'bind'), array_values($args));\n }\n\n $result = $query instanceof \\mysqli_result ? $query : $this->query($query);\n\n return is_string($resulttype) ? $result->fetch_object($resulttype) : $result->fetch_array($resulttype);\n }", "function dbfetch($result, $option) {\n return mysql_fetch_array($result, $option);\n}", "function mysqli_result($result, $row, $field = 0) {\r\n $result->data_seek($row);\r\n // Fetch result array\r\n $data = $result->fetch_array();\r\n \r\n return $data[$field];\r\n}", "function raw_db_fetch_array($result, $type = SQLITE_BOTH)\r\n{\r\n return sqlite_fetch_array($result, $type);\r\n}", "function fetch_array($result)\n {\n $row = mysqli_fetch_array($result);\n // return the array $row or false if none found\n return $row;\n }", "function pdo_fetch_array($stmt, $type=3) {\r\n \r\n $map = array(\r\n MYSQL_ASSOC/*1*/ => PDO::FETCH_ASSOC/*2*/,\r\n MYSQL_NUM/*2*/ => PDO::FETCH_NUM/*3*/,\r\n MYSQL_BOTH/*3*/ => PDO::FETCH_BOTH/*4*/,\r\n // no consistency so far, so let's embrace and extend it:\r\n 0=>4, \"assoc\"=>2, \"num\"=>3, \"both\"=>4, \"ASSOC\"=>2, \"NUM\"=>3, \"BOTH\"=>4, \"MYSQL_ASSOC\"=>2, \"MYSQL_NUM\"=>3, \"MYSQL_BOTH\"=>4,\r\n );\r\n \r\n return pdo_stmt($stmt)->fetch(isset($map[$type]) ? $map[$type] : $type);\r\n }", "function mysqli_result($res, $row, $field=0) { \n $res->data_seek($row); \n $datarow = $res->fetch_array(); \n return $datarow[$field]; \n }", "function mysqlQuery($query, $type, $key = null, $key2 = null){\r\n\r\n\tif($query == null){\r\n\t\treturn false;\r\n\t}\r\n\r\n\t$retVal = null;\r\n\t$res = mysqli_query($GLOBALS[\"___mysqli_ston\"], $query);\r\n\r\n\tcheckMySQL();\r\n\tswitch($type){\r\n\r\n\t\t// SEND\r\n\t\tcase 0:\t// Return success only\r\n\t\t\t$retVal = true;\r\n\t\t\tbreak;\r\n\r\n\t\t// INDEX\r\n\t\tcase 1:\t// Return the new index (For inserts);\r\n\t\t\t$retVal = ((is_null($___mysqli_res = mysqli_insert_id($GLOBALS[\"___mysqli_ston\"]))) ? false : $___mysqli_res);\r\n\t\t\tbreak;\r\n\r\n\t\t// RAW\r\n\t\tcase 2:\t// Return the result objet\r\n\t\t\t$retVal = $res;\r\n\t\t\tbreak;\r\n\r\n\t\t// ROWS\r\n\t\tcase 3: // Return the number of rows in the select statement\r\n\t\t\t$retVal = mysqli_num_rows($res);\r\n\t\t\tbreak;\r\n\r\n\t\t// ASSOC\r\n\t\tcase 4: // Return an associated array of results\r\n\t\t\t$x = 0;\r\n\t\t\t$retVal = array();\r\n\t\t\twhile($result = mysqli_fetch_assoc($res)){\r\n\t\t\t\t$retVal[$x++] = $result;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t// SINGLE\r\n\t\tcase 5: // Return the first value queried\r\n\t\t\tif(is_bool($res)){ // There were no values\r\n\t\t\t\t$retVal = null;\r\n\t\t\t} else {\r\n\t\t\t\t$result = mysqli_fetch_assoc($res);\r\n\t\t\t\tif($key == null || $result == null){\r\n\t\t\t\t\t$retVal = $result;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$retVal = $result[$key];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t// KEY\r\n\t\tcase 6: // Return an associated array of results indexed by a field\r\n\t\t\tif($key == null){return false;}\r\n\t\t\t$retVal = array();\r\n\t\t\twhile($result = mysqli_fetch_assoc($res)){\r\n\t\t\t\t$keyValue = $result[$key];\r\n\t\t\t\tforeach($result as $field => $data){\r\n\t\t\t\t\tif($field == $key){continue;}\r\n\t\t\t\t\t$retVal[$keyValue][$field] = $data;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t// KEY_SINGLES\r\n\t\tcase 7: // Return an array of single values indexed by a key\r\n\t\t\tif($key == null || $key2 == null){return false;}\r\n\t\t\t$retVal = array();\r\n\t\t\twhile($result = mysqli_fetch_assoc($res)){\r\n\t\t\t\t$retVal[$result[$key]] = $result[$key2];\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\t// SINGLES\r\n\t\tcase 8: // Return an array of single values indexed by their order in the query\r\n\t\t\t$retVal = array();\r\n\t\t\twhile($result = mysqli_fetch_assoc($res)){\r\n\t\t\t\t$retVal[] = array_values($result)[0];\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\techo(\"mysqlQuery type paramater is out of bounds on query \\n \" . $querry);\r\n\t\t\tbreak;\r\n\t}\r\n\tcheckMySQL();\r\n\treturn $retVal;\r\n}", "function fetch_row($result)\n{\n\treturn mysqli_fetch_row($result); \n}", "function db_get_row($query)\n{\n\t$args = func_get_args();\n\n\tif ($_result = call_user_func_array('db_query', $args)) {\n\n\t\t$result = driver_db_fetch_array($_result);\n\n\t\tdriver_db_free_result($_result);\n\n\t}\n\n\treturn is_array($result) ? $result : array();\n}", "function fetch_array($result)\r\n{\r\n // global $dataBaseConnection;\r\n return mysqli_fetch_array($result);\r\n}", "public function fetchBoth($result)\n {\n return @mysqli_fetch_array($result, mysqli_BOTH);\n }", "function fetch_array($resultQuery='', $opt=''){\n\t\tif($opt==='') $opt = db::DB_BOTH;\n\t\tif(!$this->id_connection){\n\t\t\treturn false;\n\t\t}\n\t\tif(!$resultQuery){\n\t\t\t$resultQuery = $this->last_result_query;\n\t\t\tif(!$resultQuery){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn pg_fetch_array($resultQuery, NULL, $opt);\n\t}", "function mysqli_result($res,$row=0,$col=0){ \n $numrows = mysqli_num_rows($res); \n if ($numrows && $row <= ($numrows-1) && $row >=0){\n mysqli_data_seek($res,$row);\n $resrow = (is_numeric($col)) ? mysqli_fetch_row($res) : mysqli_fetch_assoc($res);\n if (isset($resrow[$col])){\n return $resrow[$col];\n }\n }\n return false;\n}", "function mysqli_result($result, $row, $field = 0) {\n $result->data_seek($row);\n // Fetch result array\n $data = $result->fetch_array();\n \n return $data[$field];\n }", "function fetchAll($result, $resultType = MYSQLI_ASSOC)\n {\n return $result->fetch_all($resultType);\n }", "public function fetchResultAsObject(\\mysqli_result $result): MysqlResultCollection;", "function fetch_array($resultQuery='', $opt=''){\n\t\tif($opt==='') $opt = db::DB_BOTH;\n\t\tif(!$this->Id_Connection){\n\t\t\treturn false;\n\t\t}\n\t\tif(!$resultQuery){\n\t\t\t$resultQuery = $this->lastResultQuery;\n\t\t\tif(!$resultQuery){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn pg_fetch_array($resultQuery, NULL, $opt);\n\t}", "function bind_array($stmt, &$row) {\n\t$md = $stmt->result_metadata();\n\t$params = array();\n\twhile($field = $md->fetch_field()) {\n\t\t$params[] = &$row[$field->name];\n\t}\n\n\tcall_user_func_array(array($stmt, 'bind_result'), $params);\n}", "function next_result ($result, $resulttype = MYSQLI_ASSOC) {\n\t\treturn mysqli_fetch_array($result, $resulttype);\n\t}", "function dbgetrow() {\n\t$output = array();\n\n\t$args = func_get_args();\n\t$result = call_user_func_array('dbquery', $args);\n\t$query = array_shift($args);\n\n\t// this only applies to SELECT queries!\n\tif (preg_match('/^SELECT/i', $query) && $result) {\n\t\t$output = dbfetch($result, DB_ASSOC);\n\t\t\n\t\tdbfree($result);\n\t} else {\n\t\tEWarning(EC_REALS_DATABASE, \"dbgetrow called with non-SELECT query!\", \"Non-select query\");\n\t}\n\n\treturn $output;\n}", "public function fetch(string $query, $values = [], $binds = '', bool $openConnection = true) : ?MysqlResultCollection;", "public function fetch($singleResult = false, $type = 'array')\n {\n $result = null;\n\n $this->execute();\n $mysqlResult = $this->preparedQuery->get_result();\n\n if (isset($mysqlResult))\n {\n switch ($type)\n {\n case 'array':\n\n // If our query is aimed at selecting a single result (select by id)\n if ($singleResult)\n {\n $result = $mysqlResult->fetch_assoc();\n }\n else // Fetch a row as an array\n {\n while ($row = $mysqlResult->fetch_assoc())\n {\n $result[] = $row;\n }\n }\n\n break;\n\n case 'object':\n\n if ($singleResult)\n {\n $result = $mysqlResult->fetch_object();\n }\n else // Fetch a row as an array\n {\n while ($row = $mysqlResult->fetch_object())\n {\n $result[] = $row;\n }\n }\n\n break;\n }\n }\n\n return $result;\n }", "function dbgetarray() {\n\t$output = array();\n\t\n\t$args = func_get_args();\n\t$result = call_user_func_array('dbquery', $args);\n\t$query = array_shift($args);\n\n\t// this only applies to SELECT queries!\n\tif (preg_match('/^SELECT/i', $query)) {\n\t\twhile ($result && $row = dbfetch($result, DB_NUM)) {\n\t\t\tif (count($row) == 1) { // use integer keys\n\t\t\t\t$output[] = $row[0];\n\t\t\t} else if (count($row) == 2) { // use first column keys\n\t\t\t\t$output[$row[0]] = $row[1];\n\t\t\t} else { // use integer keys and array values\n\t\t\t\t$output[] = $row;\n\t\t\t}\n\t\t}\n\t\tdbfree($result);\n\t} else {\n\t\tEWarning(EC_REALS_DATABASE, \"dbgetarray called with non-SELECT query!\", \"Non-select query\");\n\t}\n\n\treturn $output;\n}", "function query($q, $resultset) {\n\n\t\t\tif (!($stmt = $this->mysqli->prepare($q))) {\n\n\t\t\t\techo(\"Sql Error: \" . $q . ' Sql error #: ' . $this->mysqli->errno . ' - ' . $this->mysqli->error);\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\n\t\n\n\t\t\t/* execute query */\n\n\t\t\t$stmt->execute();\n\n\t\n\n\t\t\tif ($stmt->errno) {\n\n\t\t\t\techo(\"Sql Error: \" . $q . ' Sql error #: ' . $stmt->errno . ' - ' . $stmt->error);\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\n\t\t\tif ($resultset) {\n\n\t\t\t\t$result = $stmt->get_result();\n\n\t\t\t\tfor ($set = array(); $row = $result->fetch_assoc();) {\n\n\t\t\t\t$set[] = $row;\n\n\t\t\t\t}\n\n\t\t\t\t$stmt->close();\n\n\t\t\t\treturn $set;\n\n\t\t\t}\n\n\t\t}", "function database_fetch_array($database_result)\n {\n if( !is_resource($database_result) ) return FALSE;\n\t return mysql_fetch_array($database_result, MYSQL_NUM);\n\t}", "function db_get_array($query)\n{\n\t$args = func_get_args();\n\n\tif ($_result = call_user_func_array('db_query', $args)) {\n\n\t\twhile ($arr = driver_db_fetch_array($_result)) {\n\t\t\t$result[] = $arr;\n\t\t}\n\n\t\tdriver_db_free_result($_result);\n\t}\n\n\treturn !empty($result) ? $result : array();\n}", "function getOne($query, array $binds = [], $conn)\n{\n $statement = $conn->prepare($query);\n foreach($binds as $key => $value) {\n $statement->bindValue($key, $value);\n }\n $statement->execute();\n $result = $statement->fetch();\n $statement->closeCursor();\n return $result;\n}", "function fetch($result) {\n\t\n\t$row = mysql_fetch_array($result);\n\t\n\treturn $row;\n}", "public function fetch_row()\r\n{\r\n\t$tmp2 = $this->_result->fetch_row();\r\n\t$this->type = 1; // MYSQLI_ASSOC = 0, MYSQLI_NUM = 1, or MYSQLI_BOTH (To implement). \r\n\t$this->push_in($tmp2);\r\n\t\r\n\treturn $tmp2;\r\n}", "public function resultset($bind_array=array());", "public function fetch($resultset = \"NONEE\"){\n\t\tif($resultset === \"NONEE\")\n\t\t\t$resultset = $this->resultset;\n\t\treturn $resultset = $this->showErrors ? mysqli_fetch_array($resultset) : @mysqli_fetch_array($resultset); \n\t}", "function pdo_result($stmt, $row, $field=0) {\r\n \r\n // Scroll to and retrieve the given $row (maybe it's buffered even)\r\n if (PDO_SEEKABLE) {\r\n $rows = array(\r\n $row => pdo_stmt($stmt)->fetch(PDO::FETCH_BOTH, PDO::FETCH_ORI_ABS, $row)\r\n );\r\n }\r\n \r\n // workaround: fetch everything, works just once\r\n else {\r\n pdo_trigger_error(\"pdo_result() Can currently only be used once, for fetching a value from the first \\$row. Scrolling only works with PDO_SEEKABLE enabled.\", E_USER_WARNING);\r\n\r\n $rows = pdo_stmt($stmt)->fetchAll(PDO::FETCH_BOTH);\r\n #static $rows[hash(stmt)]; //would otherwise bind the result set here\r\n }\r\n \r\n // check if found\r\n if (isset($rows[$row][$field])) {\r\n return $rows[$row][$field];\r\n }\r\n else {\r\n pdo_trigger_error(\"pdo_result() Couldn't find row [$row] and column `$field`.\", E_USER_NOTICE);\r\n }\r\n \r\n }", "function db_select($query) {\n $rows = array();\n $result = db_query($query);\n\n if(!$result) {\n return false;\n }\n\n // Build new array with results\n while($row = $result->fetch_assoc()) {\n $rows[] = $row;\n }\n return $rows;\n}", "function execute_prepared_query($prep_q, $bound_vars, $bound_var_types, $result_expected = false)\n{\n\tglobal $spebs_db;\n\t$pstmt = $spebs_db -> prepare($prep_q);\t\n\tif($spebs_db->errno != 0)\n\t{\n\t\terror_log(\"PREPARE STATEMENT error \".$spebs_db->errno.\": \".$spebs_db->error.\" (Q = \\\"$prep_q\\\")\");\n\t\treturn false;\n\t}\n\t\n\t$bound_varrefs = array();\n\t$bound_varrefs[0] = $bound_var_types;\n\t$i=1;\n\tforeach($bound_vars AS $thisvar)\n\t{\t\n\t\t${\"x$i\"} = $thisvar;\n\t\t$bound_varrefs[$i] = &${\"x$i\"};\n\t\t$i++;\n\t}\n\t$bind_action = call_user_func_array(array($pstmt, 'bind_param'), $bound_varrefs);\n\tif(!$bind_action)\n\t{\t\n\t\terror_log(\"CALL_USER_FUNC_ARRAY error \");\n\t\treturn false;\n\t}\n\tif($pstmt->errno != 0)\n\t{\n\t\terror_log(\"PREPARED QUERY BIND error \".$pstmt->errno.\": \".$pstmt->error);\n\t\treturn false;\n\t}\t\n\tif($pstmt -> execute())\n\t{\n\t\tif(!$result_expected)\n\t\t{\n\t\t\tif(isset($pstmt -> insert_id) && is_int($pstmt -> insert_id) && $pstmt -> insert_id > 0)\n\t\t\t\t$res = $pstmt -> insert_id;\n\t\t\telse\n\t\t\t\t$res = true;\n\t\t\t\t\n\t\t\t$pstmt -> close();\n\t\t\treturn $res;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$results = array();\n\t\t\t$row = array();\n\t\t\t$metadata = $pstmt -> result_metadata();\n\t\t\tforeach($metadata -> fetch_fields() AS $field)\n\t\t\t{\t\n\t\t\t\t$row[$field -> name] = NULL;\n\t\t\t\t$bound_resrefs[] = &$row[$field -> name];\n\t\t\t}\n\t\t\t$bind_action = call_user_func_array(array($pstmt, 'bind_result'), $bound_resrefs);\n\t\t\t$i = 0;\n\t\t\twhile($pstmt -> fetch())\n\t\t\t{\t\n\t\t\t\tforeach($row AS $k => $v)\n\t\t\t\t$results[$i][$k] = $v;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t\n\t\t\t$pstmt -> close();\n\t\t\treturn $results;\n\t\t}\n\t\t\n\t}\n\telse\n\t{\n\t\terror_log($pstmt->errno.\": \".$pstmt->error);\n\t\t$pstmt -> close();\t\n\t\treturn false;\n\t}\n}", "function fetch_assoc($result)\n {\n $row = mysqli_fetch_assoc($result);\n // return the array $row or false if none found\n return $row;\n }", "function db_select($query) {\n $rows = array();\n $result = db_query($query);\n\n // If query failed, return `false`\n if($result === false) {\n return false;\n }\n\n // If query was successful, retrieve all the rows into an array\n while ($row = mysqli_fetch_assoc($result)) {\n $rows[] = $row;\n }\n return $rows;\n}", "function fetch_array($query, $resulttype=PDO::FETCH_BOTH)\n\t{\n\t\tif(!is_object($query))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tswitch($resulttype)\n\t\t{\n\t\t\tcase PDO::FETCH_ASSOC:\n\t\t\tcase PDO::FETCH_BOUND:\n\t\t\tcase PDO::FETCH_CLASS:\n\t\t\tcase PDO::FETCH_INTO:\n\t\t\tcase PDO::FETCH_LAZY:\n\t\t\tcase PDO::FETCH_NAMED:\n\t\t\tcase PDO::FETCH_NUM:\n\t\t\tcase PDO::FETCH_OBJ:\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$resulttype = PDO::FETCH_BOTH;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif($this->seek_array[$query->guid])\n\t\t{\n\t\t\t$array = $query->fetch($resulttype, $this->seek[$query->guid]['offset'], $this->seek[$query->guid]['row']);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$array = $query->fetch($resulttype);\n\t\t}\n\n\t\treturn $array;\n\t}", "function perform_query_one_param($query, $types, $param) {\n //If the query is null we throw and exeption\n if ($query == null) {\n throw new Exception(\"Error query null\");\n }\n $stmt = mysqli_prepare($this->database_manager, $query);\n if ($stmt) {\n $stmt->bind_param($types, $param);\n $stmt->execute();\n echo mysqli_error($this->database_manager);\n $results = $stmt->get_result();\n $stmt->free_result();\n $stmt->close();\n return $results;\n }\n else {\n throw new Exception(mysqli_error($this->database_manager));\n }\n }", "function db_select($query)\n{\n // run query adn return query.\n $results = db_query($query);\n $ret = array();\n\n if ($results) {\n while($fetched = mysqli_fetch_array($results, MYSQLI_ASSOC)) {\n $ret[] = $fetched;\n }\n }\n\n return $ret;\n}", "public function get_results() {\n\t\t//Begin actual functon\n\t\t$arg_check = $this->query_arg_check();\n\t\t\n\t\t//Check for matching number of arguments in query and arg array\n\t\tif (!$arg_check) {\n\t\t\t$this->except( MYSQLI_ERR_ARG_NUM_MISMATCH , $this->QUERY);\n\t\t} else {\n\t\t\t//Begin running the query\n\t\t\tif ($stmt = $this->connection->prepare($this->QUERY)) {\n\t\t\t\t\n\t\t\t\t$bind_values = array();\n\t\t\t\t$bind_types = '';\n\t\t\t\t$i=0;\n\t\t\n\t\t\t\t//NEW::change made to be able to run queries without having to pass arguments\n\t\t\t\tif(is_array($this->QUERY_ARGS))\n\t\t\t\t{\n\t\t\t\t\tforeach ($this->QUERY_ARGS as $id=>$value) \n\t\t\t\t\t{\n\t\t\t\t\t\t//NEW::change made to be able to run queries without having to pass arguments\n\t\t\t\t\t\tif ($value)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$bind_values[$i] = $value['value'];\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t$bind_types .= $value['type'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\tcall_user_func_array('mysqli_stmt_bind_param',\n\t\t\t\t\t\t\t\t\t array_merge ( array($stmt,$bind_types),\n\t\t\t\t\t\t\t\t\t $this->ref_values($bind_values)\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t$count = $stmt->execute();\n\t\t\t\t\n\t\t\t\t//Get sql result based on query type\n\t\t\t\tswitch ($this->QUERY_TYPE) {\n\t\t\t\t\tcase 'SELECT';\n\t\t\t\t\t\t$result_class_object = $this->fetch_data($stmt);\n\t\t\t\t\t\t$result = $this->std_class_object_to_array($result_class_object);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'INSERT';\n\t\t\t\t\t\t$result = $stmt->insert_id;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault; // UPDATE and others\n\t\t\t\t\t\t$result = $count;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$stmt->close();\n\t\t\t\t\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t}\n\t}", "public function fetch_array($result_set) {\n\t\treturn mysqli_fetch_array($result_set);\n\t}", "public function fetch($type = 'object') {\r\n\t\tif (isset ( $this->result )) {\r\n\t\t\tswitch ($type) {\r\n\t\t\t\tcase 'array' :\r\n\t\t\t\t\t\r\n\t\t\t\t\t// fetch a row as array\r\n\t\t\t\t\t$datarows = array ();\r\n\t\t\t\t\twhile ( $row = mysqli_fetch_array ( $this->result ) ) {\r\n\t\t\t\t\t\t$datarows [] = $row;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase 'assoc' :\r\n\t\t\t\t\t$datarows = array ();\r\n\t\t\t\t\twhile ( $row = mysqli_fetch_assoc ( $this->result ) ) {\r\n\t\t\t\t\t\t$datarows [] = $row;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase 'object' :\r\n\t\t\t\t\r\n\t\t\t\t// fall through...\r\n\t\t\t\t\r\n\t\t\t\tdefault :\r\n\t\t\t\t\t// fetch a row as object\r\n\t\t\t\t\t$row = mysqli_fetch_object ( $this->result );\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $datarows;\r\n\t\t}\r\n\t\t\r\n\t\treturn FALSE;\r\n\t}", "public function fetch($stmt = false) {\r\n\t$results = array();\r\n\t\r\n\t//$stmt->store_result();\r\n\r\n\tif ($stmt) {\r\n\t $fields = $stmt->result_metadata()->fetch_fields();\r\n\t $args = array();\r\n\t foreach ($fields AS $field) {\r\n\t\t$key = str_replace(' ', '_', $field->name); // space may be valid SQL, but not PHP\r\n\t\t$args[$key] = &$field->name; // this way the array key is also preserved\r\n\t }\r\n\t call_user_func_array(array($stmt, \"bind_result\"), $args);\r\n\t if ($stmt->fetch()) {\r\n\t\t$results = array_map(\"copy_value\", $args);\r\n\t } else if($stmt->errno != 0) {\r\n\t\t $this->oops($stmt->error);\r\n\t } else {\r\n\t\treturn null;\r\n\t }\r\n\t} else {\r\n\t $this->oops(\"Invalid statement. Records could not be fetched.\");\r\n\t}\r\n\r\n\treturn $results;\r\n }", "public function fetch_array()\n\t{\n\t\tif($this->num_rows() < 1)\n\t\t\treturn false;\n\n\t\t$data = $this->result_metadata();\n\t\t$fields = array();\n\t\t$out = array();\n\n\t\t$fields[0] = &$this;\n\t\t$count = 0;\n\n\t\twhile($field = $data->fetch_field()) {\n\t\t\t$fields[$count] = &$out[$field->name];\n\t\t\t$count++;\n\t\t}\n\n\t\tcall_user_func_array(array($this, 'bind_result'), $fields);\n\n\t\treturn ($this->fetch()) ? $out : false;\n }", "function db_fetch_array($db_query) {\n\treturn mysql_fetch_array($db_query, MYSQL_ASSOC);\n}", "function perform_query_two_param($query, $types, $paramOne, $paramTwo) {\n //If the query is null we throw and exeption\n if ($query == null) {\n throw new Exception(\"Error query null\");\n }\n $stmt = mysqli_prepare($this->database_manager, $query);\n if ($stmt) {\n $stmt->bind_param($types, $paramOne, $paramTwo);\n $stmt->execute();\n $results = $stmt->get_result();\n $stmt->free_result();\n $stmt->close();\n return $results;\n }\n else {\n throw new Exception(mysqli_error($this->database_manager));\n }\n }", "function query($query)\n{\n global $conn;\n $result = mysqli_query($conn, $query);\n $rows = [];\n while ($row = mysqli_fetch_assoc($result)) {\n $rows[] = $row;\n }\n\n return $rows;\n}", "function fetch_array($risultato){\n return mysqli_fetch_array($risultato);\n}", "function db_get_row($result)\n{\n\treturn $result->fetch_assoc();\n}", "function multiquery ($mysqli, $query){\r\n\t\r\n\t\t$res = $mysqli->query($query);\r\n\t\treturn $res;//Devuelve los resultados de la consulta.\r\n\t\t\r\n}", "function getArrayOfRows($dbQuery) {\n return mysqli_fetch_array($dbQuery, MYSQL_ASSOC);\n}", "private function fetch_data($stmt) {\n\t\n\t\t$result = array();\n\t\n\t\tif ($stmt) {\n\t\n\t\t\t$metadata = $stmt->result_metadata();\n\t\t\t$fields = $metadata->fetch_fields();\n\t\n\t\t\tfor (;;) {\n\t\t\t\t$pointers = array();\n\t\t\t\t$row = new stdClass();\n\t\t\t\t$pointers[] = $stmt;\n\t\n\t\t\t\tforeach ($fields as $field) {\n\t\t\t\t\t$fieldname = $field->name;\n\t\t\t\t\t$pointers[] = &$row->$fieldname;\n\t\t\t\t}\n\t\n\t\t\t\tcall_user_func_array('mysqli_stmt_bind_result', $pointers);\n\t\n\t\t\t\tif ( !$stmt->fetch() ) { \n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$result[] = $row;\n\t\t\t}\n\t\n\t\t\t$metadata->free();\n\t\t\t\n\t\t} else {\n\t\t\t$this->except( MYSQLI_ERR_FETCH_FAIL );\n\t\t}\n\t\n\t\treturn $result;\n\t\n\t}", "function fetch($query, $resultType = MYSQLI_NUM){\r\n\r\n\t\tif($result = $this->query($query)) return $result->fetch_all($resultType);\r\n\t\treturn null;\r\n\t}", "function fetch_assoc($sql,$type){\n\t\tif ($this->conn) {\n\t\t\t$query = mysqli_query($this->conn,$sql);\n\t\t\tif($type==0){\n\t\t\t\twhile($row = mysqli_fetch_assoc($query)){\n\t\t\t\t\t$data[] = $row;\n\t\t\t\t}\n\t\t\t\treturn $data;\n\t\t\t}\n\t\t\telse if ($type==1) {\n\t\t\t\t$data = mysqli_fetch_assoc($query);\n\t\t\t\treturn $data;\n\t\t\t}\n\t\t}\n\t}", "public function fetchArray($result)\n\t{\n\t\treturn mysqli_fetch_array($result);\n\t}", "public function fetch_array($result_set) {\n\n if (get_class($result_set) != 'mysqli_result') {\n $msg = \"DBO_ERROR: fetch_array requires on parameter of type: mysqli_result.\\n\"\n . \"Actual type submitted was: '\" .get_class($result_set) .\"'.\";\n throw new \\Exception($msg);\n } \n $rec = mysqli_fetch_assoc($result_set);\n $metas = mysqli_fetch_fields($result_set);\n $rec = $this->_castFields($rec, $metas);\n return $rec;\n }", "public function fetch($stmt_string, $types, $array_of_bindings) {\n\t\tif (!($conn = $this->connect())) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!($stmt = $conn->prepare($stmt_string))) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor ($i = 0; $i < count($array_of_bindings); $i++) {\n\t\t\t$bind_name = 'bind' . $i;\n\t\t\t$$bind_name = $array_of_bindings[$i];\n\t\t\t$bind_names[] = &$$bind_name;\n\t\t}\n\n\t\tif (!call_user_func_array(array($stmt, \"bind_param\"), array_merge(array($types), $bind_names))) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!($stmt->execute())) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$result = $stmt->get_result();\n\t\tif (!$result) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\t$rows = [];\n\t\t\twhile ($row = $result->fetch_assoc()) {\n\t\t\t\t$rows[] = $row;\n\t\t\t}\n\t\t}\n\n\t\t$stmt->close();\n\t\treturn $rows;\n\t}", "function getResultOfPreparedStatement($result){\n try {\n if($result->num_rows > 0){\n $DbResult = $result->fetch_all(MYSQLI_ASSOC);\n return $DbResult;\n }\n } catch (Exception $e) {\n echo $e->getMessage();\n }\n}", "function sql_result($res, $row = 0, $col = 0)\n {\n $results = array();\n if (intval($row) < 1) {\n $results = $res->fetch(PDO::FETCH_BOTH);\n return $results[$col];\n }\n else {\n for ($i = 0; $i < intval($row); $i++) {\n $results = $res->fetch(PDO::FETCH_BOTH);\n }\n $results = $res->fetch(PDO::FETCH_BOTH);\n return $results[$col];\n }\n }", "private function fetch_array($query_id = \"\", $type = \"assoc\") {\r\n\t\tif ($query_id == \"\") {\r\n\t\t\t$query_id = $this->last_link;\r\n\t\t}\r\n\t\tif ($type == \"assoc\") {\r\n\t\t\t$const = MYSQL_ASSOC;\r\n\t\t} elseif ($type == \"num\") {\r\n\t\t\t$const = MYSQL_NUM;\r\n\t\t} else {\r\n\t\t\t$const = MYSQL_BOTH;\r\n\t\t}\r\n\t\t$row = mysql_fetch_array ( $query_id, $const );\r\n\t\treturn $row;\r\n\t}", "public function sql_fetch_array($result) {\n return @mysql_fetch_array($result);\n }", "function my_one($query)\n{\nglobal $dbserver,$dbuser,$dbpassword,$dbname;\n$connection_id=mysqli_connect($dbserver,$dbuser,$dbpassword,$dbname) or die(\"connection failed\");\n//mysqli_select_db($dbname,$connection_id);\n$recieve=mysqli_query($connection_id,$query);\n$row=mysqli_fetch_array($recieve);\nmysqli_close($connection_id);\nreturn $row;\n}", "function my_result($query){\r\n\t\t$objQuery = my_query($query);\r\n\t\t$row = $objQuery->fetch_array(MYSQLI_ASSOC); \r\n\t\treturn $row[0]; \r\n\t}", "public static function fetch_data($result){\r\n $output = mysqli_fetch_assoc($result);\r\n return $output;\r\n }", "private function stmt_bind_assoc (&$stmt, &$out) {\n\t $data = mysqli_stmt_result_metadata($stmt);\n\t $fields = array();\n\t $out = array();\n\t\n\t $fields[0] = $stmt;\n\t $count = 1;\n\t\n\t while($field = mysqli_fetch_field($data)) {\n\t $fields[$count] = &$out[$field->name];\n\t $count++;\n\t } \n\t mysqli_free_result($data);\n\t call_user_func_array('mysqli_stmt_bind_result', $fields);\n\t}", "function select($sql, $rettype = 1) {\n //RetType will return the type of rwo return\n // 1 for array, 2 for assoc, 3 for id\n $sql = trim($sql);\n\n $result = mysqli_query($this->link, $sql);\n if (!$result) {\n\n echo 'MySQL Error: ' . mysqli_error($this->link);\n exit;\n }\n switch ($rettype) {\n case 1:\n //return array\n while ($row = mysqli_fetch_array($result)) {\n foreach ($row as $key => $value) {\n $v[$key] = html_entity_decode(htmlspecialchars_decode(stripslashes($value)));\n }\n $data[] = $v;\n }\n break;\n case 2:\n //return assoc\n while ($row = mysqli_fetch_assoc($result)) {\n foreach ($row as $key => $value) {\n $v[$key] = html_entity_decode(htmlspecialchars_decode(stripslashes($value)));\n }\n $data[] = $v;\n }\n break;\n case 3:\n //return row\n while ($row = mysqli_fetch_row($result)) {\n foreach ($row as $key => $value) {\n $v[$key] = html_entity_decode(htmlspecialchars_decode(stripslashes($value)));\n }\n $data[] = $v;\n }\n break;\n default:\n //return array\n while ($row = mysqli_fetch_array($result)) {\n foreach ($row as $key => $value) {\n $v[$key] = html_entity_decode(htmlspecialchars_decode(stripslashes($value)));\n }\n $data[] = $v;\n }\n break;\n }\n mysqli_free_result($result);\n if (isset($data)) {\n return $data;\n }\n }", "public function fetch($fetch_style = PDO::FETCH_BOTH, $cursor_orientation = PDO::FETCH_ORI_NEXT, $cursor_offset = 0) {\n //not sure how to resolve this functionality.\n //This function relies on us having called PDOStatement::execute which has functionality more similar to odbc_execute,\n //but we are interacting with the results from what seems to be odbc_exec. The key thing here being the bound parameters\n //UPDATE::Looks like this has been resolved ^^. Still testing\n if (!isset($fetch_style)) $fetch_style = isset($this->fetch_mode) ? $this->fetch_mode : PDO::FETCH_BOTH;\n $result = false;\n if (!$this->success) return false;\n ob_start();\n switch ($fetch_style) {\n case (PDO::FETCH_NAMED):\n //todo\n //not sure how to emulate 1:1\n case (PDO::FETCH_ASSOC):\n $result = odbc_fetch_array($this->stmt);\n break;\n case (PDO::FETCH_BOTH):\n $result = odbc_fetch_array($this->stmt) ?: [];\n if (is_array($result))\n $result = array_merge($result, array_values($result ?: []));\n break;\n case (PDO::FETCH_BOUND):\n //todo link with the bindColumn function\n return true;\n break;\n case (PDO::FETCH_CLASS):\n //todo use the splat operator to unpack the arguments instead of using a reflection class\n $reflect = new ReflectionClass($this->fetch_receptacle);\n $fetch_receptacle = $reflect->newInstanceArgs($this->ctor_args ?: []);\n case (PDO::FETCH_INTO):\n $fetch_receptacle = isset($fetch_receptacle) ? $fetch_receptacle : $this->fetch_receptacle ?: new stdClass();\n $result = [];\n odbc_fetch_into($this->stmt, $result);\n #Assume that the fetch_receptacle is either an object or an array\n $r_is_array = is_array($fetch_receptacle);\n foreach ($result as $index => $item) {\n if ($r_is_array) $fetch_receptacle[$index] = $item;\n else $fetch_receptacle->{$index} = $item;\n }\n $result = $fetch_receptacle;\n break;\n case (PDO::FETCH_LAZY):\n $obj = new PDORow;\n $result = odbc_fetch_array($this->stmt);\n foreach ($result as $index => $item) {\n $obj->{$index} = $item;\n }\n $result = $obj;\n break;\n case (PDO::FETCH_NUM):\n $result = odbc_fetch_array($this->stmt);\n if ($result)\n $result = array_values($result);\n break;\n case (PDO::FETCH_OBJ):\n #todo, not 1:1\n $result = odbc_fetch_object($this->stmt);\n break;\n }\n $error = ob_get_clean();\n if (!$result) $this->throw_error($error);\n return $result;\n }", "function fetch($result)\n\t{\n\t\treturn mysql_fetch_assoc($result);\n\t}", "private function createAssocArrayOfResult(mysqli_stmt $statement)\r\n\t{\r\n\t\t$statement->store_result();\r\n\t\t\r\n\t\tif($statement->num_rows <= 0)\r\n\t\t{\r\n\t\t\treturn array();\r\n\t\t}\r\n\t\t\r\n\t\t$meta = $statement->result_metadata();\r\n\r\n\t\twhile ($field = $meta->fetch_field()) { \r\n\t\t\t$params[] = &$row[$field->name]; \r\n\t\t}\r\n\t\t\r\n\t\tcall_user_func_array(array($statement, 'bind_result'), $params); \r\n\t\t\r\n\t\tif($statement->num_rows === 1)\r\n\t\t{\r\n\t\t\t$statement->fetch();\r\n\t\t\tforeach($row as $key => $val) \r\n\t\t\t{ \r\n\t\t\t\t$result[$key] = $val; \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\twhile ($statement->fetch()) { \r\n\t\t\tforeach($row as $key => $val) \r\n\t\t\t{ \r\n\t\t\t\t$c[$key] = $val; \r\n\t\t\t} \r\n\t\t\t$result[] = $c; \r\n\t\t}\r\n\t\t\r\n\t\treturn $result;\r\n\t}", "public function select($query, $type='assoc') {\n\t\t$rows = array();\n\t\t$result = $this -> query($query);\n\t\tif($result === false) {\n\t\t\treturn false;\n\t\t}\n\t\tif ($type=='assoc') {\n\t\t\twhile ($row = $result -> fetch_assoc()) {\n\t\t\t\t$rows[] = $row;\n\t\t\t}\n\t\t} else {\n\t\t\twhile ($row = $result -> fetch_array()) {\n\t\t\t\t$rows[] = $row;\n\t\t\t}\n\t\t}\n\t\treturn $rows;\n\t}", "function sql_fetch_array($res)\n {\n $results = array();\n if ($res)\n $results = $res->fetch(PDO::FETCH_BOTH);\n return $results;\n }", "function db_fetch($results) {\r\n\r\n\treturn mysql_fetch_array($results);\r\n\t\r\n}", "public function dbarray($result) {\n \t$row = $result->fetch_assoc();\n \treturn $row;\n }", "function db_query() {\n global $con; \n\n $query = db_build_query(func_get_args());\n $result = mysqli_query($con,$query);\n \n if (!$result) {\n die('Error: ' . mysqli_error($con) . ' in ' . $query);\n }\n return $result;\n}", "function db_get_fields($query)\n{\n\t$args = func_get_args();\n\t//$__result = call_user_func_array('db_query', $args);\n\n//echo 'args:<br>';\n//echo var_dump($args);\t\n\n\tif ($__result = call_user_func_array('db_query', $args)) {\n\n\t\t$_result = array();\n\t\twhile ($arr = driver_db_fetch_array($__result)) {\n\t\t\t$_result[] = $arr;\n\t\t}\n\n\t\tdriver_db_free_result($__result);\n\n\t\tif (is_array($_result)) {\n\t\t\t$result = array();\n\t\t\tforeach ($_result as $k => $v) {\n\t\t\t\tarray_push($result, reset($v));\n\t\t\t}\n\t\t}\n\n\t}\n\n\treturn is_array($result) ? $result : array();\n}", "function in_query($sql, $type=db::DB_BOTH){\t\t\n\t\t$q = $this->query($sql);\t\t\n\t\t$results = array();\n\t\tif($q){\n\t\t\twhile($row=$this->fetch_array($q, $type)){\n\t\t\t\t$results[] = $row;\n\t\t\t}\n\t\t}\n\t\treturn $results;\n\t}", "function db_fetch($data) {\n\n $rows = array();\n\n if ($data) {\n while ($fetched = mysqli_fetch_assoc($data)) {\n $rows[] = $fetched;\n }\n mysqli_free_result($data);\n }\n\n return $rows;\n}", "function fetch_all($res)\n {\n $rows=array();\n while($row=mysqli_fetch_row($res))\n {\n $rows[]=$row;\n }\n if(!$rows)\n {\n die(\"database error:\".mysqli_error($res));\n }\n return $rows;\n }", "public function fetchArray($result)\n {\n return @mysqli_fetch_assoc($result);\n }", "function db_fetch_array($db_query) {\n return mysql_fetch_array($db_query, MYSQL_ASSOC);\n }", "function fetch_all_assoc($result)\r\n{\r\n return mysqli_fetch_assoc($result);\r\n # AUTHENTICATIONS \r\n}", "function fetch_assoc($result) {\n\t\tif ($result === false) {\n\t\t\treturn array(); // Return an empty array, causing any subsequent foreach to fail gracefully.\n\t\t}\n\t\treturn $result->fetch_array(MYSQLI_ASSOC);\n\t}", "function getMany($query, array $binds = [], $conn)\n{\n $statement = $conn->prepare($query);\n foreach($binds as $key => $value) {\n $statement->bindValue($key, $value);\n }\n $statement->execute();\n $results = $statement->fetchAll();\n $statement->closeCursor();\n return $results;\n}", "public function get_query_result()\n\t{\n\t\t$sql = \"select * from test_db\";\n\t\t$query = $this->db->query($sql);\n\n\t\t//Complete array result\n\t\t$result = $query->result_array();\n\n\t\t//result of first row\n\t\t$firsts_row = $query->first_row();\n\t}", "abstract public function GetRow($query, $type = DBA::ASSOC);" ]
[ "0.7067054", "0.68512857", "0.66407526", "0.6548197", "0.6438824", "0.64226514", "0.6377546", "0.6370342", "0.63173866", "0.6311727", "0.62500453", "0.62096375", "0.6196134", "0.61815435", "0.61753", "0.6174514", "0.6174134", "0.6155934", "0.612532", "0.6120871", "0.61155635", "0.61097556", "0.6101415", "0.60600376", "0.60508704", "0.602727", "0.60057503", "0.5995835", "0.5947455", "0.5935215", "0.5934725", "0.59313524", "0.5925328", "0.5924919", "0.5912505", "0.58851665", "0.58836186", "0.587665", "0.5871764", "0.58648425", "0.5860257", "0.5848542", "0.5842844", "0.58256984", "0.5820546", "0.58190274", "0.5815024", "0.5814917", "0.5795002", "0.5787185", "0.5767741", "0.5766178", "0.57647735", "0.57609195", "0.57579553", "0.5742342", "0.57331675", "0.5707111", "0.5702984", "0.5694721", "0.5692415", "0.56875825", "0.5686963", "0.568382", "0.5682768", "0.5673205", "0.56652635", "0.5654905", "0.5653554", "0.5650025", "0.56371075", "0.5621492", "0.5612465", "0.56089705", "0.5602982", "0.56012386", "0.5595242", "0.55881315", "0.5587988", "0.5581517", "0.55778486", "0.55759424", "0.5575514", "0.55754197", "0.5573577", "0.5571253", "0.5570901", "0.556843", "0.5567705", "0.55662555", "0.55649334", "0.55631554", "0.5562134", "0.55611205", "0.555865", "0.55519605", "0.553672", "0.5532396", "0.5523006", "0.5518753" ]
0.65209544
4
Bounce user to public page or to error page.
protected function bounce() { if (get_class($this)=='HomePageController') { $controller = new HomePageController(true); return $controller->go(); } else { $config = Config::getInstance(); throw new Exception('You must <a href="'.$config->getValue('site_root_path'). 'session/login.php">log in</a> to do this.'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 handleBounceEvent(object $message): void;", "public static function publicPage(){\n\t\tif(self::isAdmin()){\n\t\t\theader(\"Location: admin_users.php\");\n\t\t\texit;\n\t\t}\n\t}", "public function sendRedirect() {}", "protected function warn()\r\n {\r\n// header('Location: '.$this->warning_url);\r\n $this->send_header($this->warning_url);\r\n exit;\r\n }", "protected function redirect_protected()\n {\n }", "public function renderErrorNotAdmin(): void\n {\n header('HTTP/1.1 301 Not Found');\n header('Location: /error/notAdmin');\n die();\n }", "public function send()\n {\n if($this->status == self::STATUS_REDIRECT && \n $this->allow_redirect === false)\n {\n unsetHeader('Location');\n $this->setBody(((string) null));\n $this->status = self::STATUS_ERROR;\n }\n\n $this->sendHeaders();\n $this->sendBody();\n }", "private function redirect()\n\t\t{\n\t\t\tif(isUserLoggedIn())\n\t\t\t{\n\t\t\t\theader(\"Location: \" . APPROOT);\n\t\t\t}\n\t\t}", "public function redirectToForum()\n {\n header('Location: ' . $this->config['flarum_url']);\n die();\n }", "public function callbackFail()\n {\n $this->di->get(\"response\")->redirect(\"user\")->send();\n }", "function redirect() {\n\n\t\tif ($this->redirectUrl) {\n\t\t\tif ($this->message) {\n\t\t\t\tKenedoPlatform::p()->sendSystemMessage($this->message, $this->messageType);\n\t\t\t}\n\t\t\tKenedoPlatform::p()->redirect($this->redirectUrl);\n\t\t}\n\n\t}", "public static function anonymousPage(){\n\t\tif(self::isLogged()){\n\t\t\theader(\"Location: index.php\");\n\t\t\texit;\n\t\t}\n\t}", "public function request(): void\n {\n if ($this->checkAccess()) {\n $this->realSubject->request();\n $this->logAccess();\n }\n }", "function beforeroute() {\r\n \r\n }", "public function actionBounce($campaign_uid)\n {\n $campaign = $this->loadCampaignModel($campaign_uid);\n $request = Yii::app()->request;\n\n $bounceLogs = new CampaignBounceLog('customer-search');\n $bounceLogs->unsetAttributes();\n $bounceLogs->attributes = (array)$request->getQuery($bounceLogs->modelName, array());\n $bounceLogs->campaign_id = (int)$campaign->campaign_id;\n\n $subscriber = new ListSubscriber();\n $bulkActions = $subscriber->getBulkActionsList();\n foreach ($bulkActions as $value => $name) {\n if (!empty($value) && $value != ListSubscriber::BULK_DELETE) {\n unset($bulkActions[$value]);\n }\n }\n\n $this->setData(array(\n 'pageMetaTitle' => $this->data->pageMetaTitle . ' | ' . Yii::t('campaign_reports', 'Bounce report'),\n 'pageHeading' => Yii::t('campaign_reports', 'Bounce report'),\n 'pageBreadcrumbs' => array(\n Yii::t('campaigns', 'Campaigns') => $this->campaignsListUrl,\n $campaign->name => $this->createUrl($this->campaignOverviewRoute, array('campaign_uid' => $campaign_uid)),\n Yii::t('campaign_reports', 'Bounce report'),\n ),\n ));\n\n // 1.3.5.9\n $this->setData('canExportStats', ($campaign->customer->getGroupOption('campaigns.can_export_stats', 'yes') == 'yes'));\n\n $this->render($this->actionView['bounce'], compact('campaign', 'bounceLogs', 'bulkActions'));\n }", "private function checkPageAllowed() {\n\n if (!$this->user->isPersonnalManager()) {\n\n header('Location: ./index.php');\n exit();\n }\n }", "public function redirectUser($err = '', $url = 'user/', $delay = '2'){\n\t\theader('Refresh: '.$delay.'; url='.BASEPATH.$url);\n\t\tdie($err);\n\t}", "function RedirectPage($page_name) {\n\t\theader( sprintf('Location: %s', $page_name));\n\t\tdie(\"You don't belong here.\");\n\t}", "public function onDispatch()\n {\n Router::getInstance()->redirectIf(!User::getInstance()->hasAccess('manager') && Router::getInstance()->getModule()->getName() != 'Login', '/Manager/Login');\n }", "public function renderNotLog(): void\n {\n header('HTTP/1.1 301 Not Found');\n header('Location: /user/login');\n die();\n }", "public function bounceUsers() \n {\n\t $connect_to = '{imap.gmail.com:993/imap/ssl/novalidate-cert}bounces';\n\t $user_email = '[email protected]';\n\t $pass = env('MAIL_PASSWORD');\n\t if($inbox = imap_open($connect_to, $user_email, $pass)){\n\t\t /* grab emails */\n\t\t $emails = imap_search($inbox,'ALL');\n\n\t\t /* if emails are returned, cycle through each... */\n\t\t if($emails) {\n\t\t\t\n\t\t\t/* begin output var */\n\t\t\t$output = '';\n\t \t\n\t\t/* put the newest emails on top */\n\t\trsort($emails);\n\t\t\n\t\t/* for every email... */\n\t\tforeach($emails as $email_number) {\n\t\t\t\n\t\t\t/* get information specific to this email */\n\t\t\t$overview = imap_fetch_overview($inbox,$email_number,0);\n\t\t\tLog::info(print_r($overview,true));\n\t\t\tbreak;\n\t\t}\n\t\n\t\t } \t\t\n\t \n\t }else{\n\t\t Log::error(\"Can't connect to '$connect_to': \" . imap_last_error());\n\t }\n \n\n }", "private function _signUpPageRequested()\n {\n $this->utility->redirect('signup');\n }", "private function _userLoggedIn()\n {\n $this->utility->redirect('write');\n }", "public function bmo_no_user_redirect(){\n\t\t$this->set_requested_url_cookie();\n\t\t// Build the google_client (it won't be built yet if we are here)\n\t\t$this->google_client = new bmo_google_client( $this->bmo_options );\n\t\t$this->google_client->init();\n\t\t// Get the official $auth_url from the google_client\n\t\t$auth_url = $this->google_client->get_auth_url();\n\t\t// Redirect the user to Google\n\t\twp_redirect( filter_var( $auth_url, FILTER_SANITIZE_URL ) );\n\t\texit();\n\t}", "public function authDoView(){\n if(!$this->authUser()){\n echo '{\"status\":-1,\"result\":\"/user/login?prePage='.$_SERVER['HTTP_REFERER'].'\"}';\n exit();\n }\n }", "function admEnforceAccess()\n{\n if( !admCheckAccess() ) {\n // no access. stop right now.\n\n // should print error message, but hey. let's just dump back to homepage\n header( \"Location: /\" ); \n exit;\n }\n}", "public static function banned()\n {\n // Set the \"forbidden\" status code\n Http::setHeadersByCode(403);\n\n // Inclusion of the HTML IP Banned page\n include PH7_PATH_SYS . 'global/views/' . PH7_DEFAULT_THEME . '/other/banned.html.php';\n\n // Stop script\n exit;\n }", "public function send()\n\t{\n\t\t$this->page->generatePage();\n\t\texit;\n\t}", "function thank_you()\n\t{\n\t\tlog_message('debug', 'Account/thank_you');\n\t\t$data = filter_forwarded_data($this);\n\n\t\tif($this->native_session->get('__direct_invitation_count') && $this->native_session->get('__direct_invitation_count') >= MINIMUM_INVITE_COUNT)\n\t\t{\n\t\t\t# if a new default view has been set, go to that instead\n\t\t\tif($this->native_session->get('__default_view')\n\t\t\t\t&& $this->native_session->get('__default_view') != 'account/thank_you'\n\t\t\t) {\n\t\t\t\tredirect(base_url().$this->native_session->get('__default_view'));\n\t\t\t}\n\t\t\t# else show the current page\n\t\t\telse {\n\t\t\t\t$data = load_page_labels('invite_five', $data);\n\t\t\t\t$this->load->view('account/thank_you', $data);\n\t\t\t}\n\t\t}\n\t\t# otherwise take the user back to enter more invites\n\t\telse redirect(base_url().'network/invite');\n\t}", "public function mustRedirect();", "public function aloAction()\n\t{\n\t\t$this->flashMessenger()->addInfoMessage('You are now logged in.');\n// \t $this->redirect()->toRoute('imessage');\n\t\t$this->redirect()->toRoute(null, array(\n\t\t\t\t'controller' => 'index',\n\t\t\t\t'action' => 'message',\n\t\t));\n\t}", "public static function renderErrorPage(): void\n {\n\t\tob_start();\n\t\theader('Location: /page/error');\n\t\tob_end_flush();\n }", "public function forbiddenError() {\n sfContext::getInstance()->getController()->redirect('errores/forbidden');\n\t}", "function errorPage($error){\n switch($error){\n case 401:\n header('HTTP/1.1 401 Unauthorized');\n break;\n case 403:\n header('HTTP/1.1 403 Forbidden');;\n break;\n case 404:\n header('HTTP/1.1 404 Not Found');\n break;\n }\n global $Controller;\n if($p = $Controller->alias('error_'.$error)) {\n internalRedirect($p);\n } else {\n //@ob_end_clean();\n print($error);\n }\n die();\n}", "public function index() {\n header('Location: ' . URLROOT . '/errors/page_not_found');\n }", "public function redirect() : void\n {\n $controller = $this->getNamespace() . $this->params['controller'];\n $action = $this->capitalizeAction($this->params['action']);\n\n if (class_exists($controller)) \n {\n $controller = new $controller;\n unset($this->params['controller']);\n\n if (is_callable([$controller, $action])) \n {\n unset($this->params['action']);\n unset($this->params['namespace']);\n }\n else\n {\n die('Page not found.');\n }\n }\n else \n {\n header('location: ' . URLROOT);\n }\n\n call_user_func_array([$controller, $action], [$this->params]);\n }", "function error($params = array()) {\n header('location: /');\n }", "abstract protected function redirectTo();", "function respond($message) {\n // else redirect to main page\n\n $ajax = isset($_POST['ajax']) ? true : false;\n\n if (!$ajax) {\n\n // lets try to determinate where the request is coming from\n if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER']) {\n $redirect_to = $_SERVER['HTTP_REFERER'];\n } else {\n $redirect_to = 'index.html'; // otherwise use default location\n }\n\n ob_end_clean();\n header('Location: ' . $redirect_to);\n\n } else {\n\n ob_end_clean();\n die($message);\n\n }\n\n}", "public function performAction()\n {\n if (isset($_SESSION['user_id'])) {\n $this->_userLoggedIn();\n } else if (isset($_POST['signin'])) {\n $this->_signInRequested();\n } else if (isset ($_POST['signup'])) {\n $this->_signUpPageRequested();\n } else {\n $this->_noActionTaken();\n }\n }", "public function dispatchEmailIfUserAuth($user)\n\t{\n\t\t$code_verification = rand(1000, 9999);\n\t\tSession::set('code_verification', $code_verification);\n\n\t\t$mail = new PHPMailer();\n\t\t$mail->IsSMTP();\n\t\t$mail->Mailer = 'smtp';\n\n\t\t$mail->SMTPDebug = 1; \n\t\t$mail->SMTPAuth = TRUE;\n\t\t$mail->SMTPSecure = \"tls\";\n\t\t$mail->Port = 587;\n\t\t$mail->Host = 'smtp.gmail.com';\n\t\t$mail->Username = GMAIL_ADDRESS;\n\t\t$mail->Password = GMAIL_PASSWORD;\n\n\t\t$mail->IsHTML(true);\n\t\t$mail->AddAddress($user->email);\n\t\t$mail->SetFrom(GMAIL_ADDRESS, 'PHP-developer');\n\n\t\t$mail->Subject = 'Confirm your registration with a code.';\n\t\t$content = '<b>Secret code: <h1>' . $code_verification . '</h1></b>';\n\n\t\t$mail->MsgHTML($content); \n\t\tif(!$mail->Send()) {\n\t\t // error\n\t\t Session::set('email_sended_failed', 'Email was not send to you. Try again.');\n\t\t\treturn header(\"Location: /confirm_email\");\n\t\t} else {\n\t\t // success\n\t\t\tSession::set('email_sended_success', 'Email was send. Check your email box.');\n\t\t\treturn header(\"Location: /confirm_email\");\n\t\t}\n\t}", "public function bewerkAction()\n\t\t{\n\t\t\t$this->requireUserType(array(CT_User::Directie));\n\n\t\t\t/* Haal de te bewerken gegevens op uit de database */\n\t\t\ttry {\n\t\t\t\t$table = new CT_Db_EmailTemplates();\n\t\t\t\t$emailtemplate = array_pop($table->find($this->_getParam('id'))->toArray());\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$this->showErrorAndExit($e->getMessage());\n\t\t\t}\n\n\t\t\t/* Laat het bewerk formulier voor de eerste keer zien */\n\t\t\t$this->_smarty->assign('emailtemplate', $emailtemplate);\n\n\t\t\t$this->getResponse()->appendBody(\n\t\t\t\t$this->_smarty->fetch('emailtemplate/bewerk.tpl'));\n\t\t}", "public function redirectToPersonalPage() {\n $response = new RedirectResponse(Url::fromRoute('<front>')->toString());\n if (\\Drupal::moduleHandler()->moduleExists('iish_conference_personalpage')) {\n $response = new RedirectResponse(Url::fromRoute('iish_conference_personalpage.index')->toString());\n }\n $response->send();\n }", "public function denyLink()\n {\n }", "public function index()\n {\n abort(403,'MAAF POSTINGAN ANDA TUJU TIDAK ADA');\n }", "private function goHomeIfNotPost()\n {\n if($_SERVER[\"REQUEST_METHOD\"] != \"POST\") {\n // Unauthorized GET request\n header(\"Location: /Cinema\");\n exit();\n }\n }", "static function adminGateKeeper() {\n if (!loggedIn() || !adminLoggedIn()) {\n new SystemMessage(translate(\"system_message:not_allowed_to_view\"));\n forward(\"home\");\n }\n }", "public function index()\n {\n if($this->session->groep === 'Dispatcher' AND $this->session->status === 'Actief')\n {\n redirect('Members');\n }\n else\n {\n\t\t\tredirect('Restricted');\n }\n }", "function index() {\n ConfigOptions::setValueFor('fmn_last_visited', $this->logged_user, new DateTimeValue());\n\t \n // Popup\n if($this->request->isAsyncCall()) {\n $this->setView(array(\n 'template' => 'popup',\n 'controller' => 'frosso_mail_notify',\n 'module' => FROSSO_MAILN_MODULE,\n ));\n\t\t\n\t\t// $this->response->assign(array(\n // 'mail_updates' => time(),\n // ));\n\n\t } else {\n\t \t// $this->response->forbidden();\n } // if\n }", "public function redirect404()\n\t{\n\t\t$this->page = new Page($this->app);\n\t\t$this->page->setView('404.php');\n\t\t$this->addHeader('HTTP/1.0 404 Not Found');\n \t$this->send();\n\t}", "public function send() {\n header('HTTP/1.0 404 Not Found');\n \n echo $this->getHtml();\n }", "public static function GotoAddress($address)\n {\n header('Location: '.$address);\n die();\n }", "function auth_redirect() {\n\n\t\tauth_redirect();\n\n\t}", "private function redirectAndDie() {\n header('Location: ' . $_SERVER['PHP_SELF']);\n die;\n }", "protected function expulsaVisitante()\n {\n header( \"Location: \".self::index );\n }", "public function checkPermission()\n\t{\n\t\tif ($this->User->isAdmin)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$this->redirect('contao/main.php?act=error');\n\t}", "public function index()\n\t{\n\t\tif ( $this->auth->check() )\n\t\t{\t\t\n\t\t\t// MUESTRA LA PAGINA\n\t\t\t$this->show_page();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tredirect ( $this->_base_url );\n\t\t}\n\t}", "function upgrade_check_running($message, $timeout) {\n if (!empty($_SESSION['upgraderunning'])) {\n print_header();\n redirect(me(), $message, $timeout);\n }\n}", "protected function _redirectToError()\n {\n $this->_redirect(self::ZIPMONEY_ERROR_ROUTE);\n }", "public function linkNotification() {\n\n\n /*\n * \tWithin this function you should request the status of the transaction to get all transaction details, based on that information you should update the order and respond with a link\t\n */\n\n $return_url = substr(BASE_URL, 0, -12) . 'index.php';\n\n echo '<a href=\"' . $return_url . '\">Click here to return to the store.</a>';\n }", "function mailgun_page_handler($page) {\n\n\tswitch ($page[0]) {\n\n\t\tcase 'test':\n\t\t\techo elgg_view_resource('mailgun/test');\n\t\t\tbreak;\n\n\t\tcase 'messages':\n\t\t\tmailgun_client()->processIncomingMessage($_POST);\n\t\t\tbreak;\n\n\t\tcase 'webhooks':\n\t\t\tmailgun_webhooks_page_handler();\n\t\t\tbreak;\n\t}\n\n\treturn true;\n}", "public function actionCheckUserMode() {\n $this->redirect(array('blogTaskInboxView'));\n }", "abstract protected function redirect();", "public function notify()\n {\n // @TODO: Needs to handle the various types of bounces: References, Recommendations, and general bounces that should be purged\n }", "private function _redirect_to_homepage()\n {\n header(\"Location: /\");\n die();\n }", "public function banUser(){\n if($this->adminVerify()){\n\n }else{\n echo \"Vous devez avoir les droits administrateur pour accéder à cette page\";\n }\n }", "function success_page($msg, $redirect_to = \"\", $redirect_time = 0)\n{\n page_header($redirect_to, $redirect_time);\n echo ' <div class=\"success\">'.$msg.'</div>';\n page_footer();\n exit;\n}", "function badRequest() {\n header(\"Location: http://<base_url>\");\n}", "function preDispatch()\r\n {\r\n // The parent preDispatch check that a user is connected\r\n parent::preDispatch();\r\n\r\n // Now, check the role\r\n if (!$this->user->isReviewer()) {\r\n // Forward to the \"access denied\" action\r\n $this->_forward (\"accessdenied\", \"index\", \"default\");\r\n }\r\n\r\n }", "protected function _forwardDenied()\n {\n $this->_forward('denied', 'error', 'index');\n }", "function show_404() {\n\t\tredirect( 'users', 'location' );\n\t\texit();\n\t}", "function apologize($message)\n {\n $return_msg = \"back\";\n\t\t$type = \"Sorry!\";\n\t\t// require template\n require_once(\"apology.php\");\n\n // exit immediately since we're apologizing\n exit;\n }", "public static function dispatch()\n {\n self::runDispatcher();\n if (!self::$halts && !self::$groupHalt) {\n Debugger::report(404);\n }\n }", "public function redirectAction() {\n \n $this->getResponse()->setBody($this->getLayout()->createBlock('CardstreamHosted/standard_redirect')->toHtml());\n \n }", "function sendMessage($message, $path) {\n $_SESSION['message'] = $message;\n if (headers_sent()) {\n die(\"Redirect failed. Please notify an admin on Slack.\n For now, click <a href='{$path}'>this link</a>.\");\n }\n header('Location: ' . $path);\n }", "function beforeroute(){\n }", "function beforeroute(){\n }", "function error_redirect($message)\n{\n global $_PAGE;\n\n header(\"Location: /post.php?error_message=\". urlencode($message));\n\n $_PAGE['content'] = \"<p>Post failed. You are being redirected.</p>\";\n\n require('template.php');\n die();\n}", "protected function showForgot() {}", "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 send(){\n\t\t\n\t\texit($this->page->generate());\n\t}", "public static function accessDenied() {\r\n self::redirectTo(self::urlFor('includes/shared/access_denied.php'));\r\n }", "static function gateKeeper() {\n if (!loggedIn()) {\n new SystemMessage(translate(\"system_message:must_be_logged_in\"));\n forward(\"home\");\n }\n return true;\n }", "public function index() {\n if(!$this->user){\n die('Members Only <a href=\"/users/login\">Login</a>');\n } \n echo \"This is the index page\";\n }", "public function index(){\n \tdump('You are not allowed to access this server resource.');\n }", "protected function checkRedirect() {}", "private function notAdmin() : void\n {\n if( intval($this->law) === self::CREATOR_LAW_LEVEL)\n {\n (new Session())->set('user','error','Impossible d\\'effectuer cette action');\n header('Location:' . self::REDIRECT_HOME);\n die();\n }\n }", "public function maybe_redirect_after_activation() {\n\n\t\tif ( ! get_transient( 'croco_ik_redirect' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( wp_doing_ajax() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdelete_transient( 'croco_ik_redirect' );\n\n\t\tif ( is_network_admin() || isset( $_GET['activate-multi'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( $this->is_dashboard_page() ) {\n\t\t\treturn;\n\t\t}\n\n\t\twp_safe_redirect( $this->page_url( $this->get_initial_page() ) );\n\t\tdie();\n\n\t}", "function post () {\n //OU SALVA NO\n header(\"location: /\");\n }", "public function send500Action()\n {\n throw new ZFDemo_Exception_Reroute(_('Example action to test sending a HTTP 500 response'), 500);\n }", "function boinkIt($url){\r\n\t\t// Ensure &amp;s are taken care of\r\n\t\tif($url == ''){\r\n\t\t\t$url = '/';\r\n\t\t}else{\r\n\t\t\t$url = str_replace( \"&amp;\", \"&\", $url );\r\n\t\t}\r\n\t\tif($this->vars['redirect'] == 'location'){\r\n\t\t\t@header(\"Location: \".$url);\r\n\t\t}elseif($this->vars['redirect'] == 'refresh'){\r\n\t\t\t@header(\"Refresh: 0;url=\".$url);\r\n\t\t}elseif($this->vars['header_redirect'] == 'html'){\r\n\t\t\techo(\"<html><head><meta http-equiv='refresh' content='0; url=$url'></head><body></body></html>\");\r\n\t\t}\r\n\t\texit();\r\n\t}", "function activate ()\n\t{\n\t\tswitch ($this->getAction ())\n\t\t{\n\t\t\tcase 'modifyUser':\n\t\t\t\tif ($this->getUserName () == 'test')\n\t\t\t\t{\n\t\t\t\t\tdie ('not allowed for test user');\n\t\t\t\t}\n\t\t\t\t$checkPasswd = true;\n\t\t\t\t$user = $this->itemFactory->requestToUser ($checkPasswd);\n\t\t\t\t$this->operations->modifyUser ($this->getUserName(), $user);\n\t\t\t\tHeader (\"Location: index.php\");\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tHeader (\"Location: index.php\");\n\t\t\t\tbreak;\n\t\t}\n\t}", "private function ipFail() {\n\n if (!$this->redirect_on_ip_fail) {\n echo <<<EOT\n <h2>{$this->ip_fail_text}</h2>\nEOT;\n exit();\n } else {\n echo <<<EOF\n <html>\n <meta http-equiv=\"refresh\" content=\"0; url={$this->redirect_on_ip_fail_url}\" />\n <body><h2>{$this->ip_fail_text}</h2></body>\n </html>\nEOF;\n }\n }", "function warning_page($msg, $redirect_to = \"\", $redirect_time = 0)\n{\n page_header($redirect_to, $redirect_time);\n echo ' <div class=\"warning\">'.$msg.'</div>';\n page_footer();\n exit;\n}", "function redirect_to_action($action_name) {\n $page = Router::$page_name;\n header(\"location:\" . SITE_ADDR . $page . \"/\" . $action_name);\n}", "public function sendActivation()\n\t{\n\t}", "public function seller_thanx() {\n\t\tLog::info ( 'Seller has been successfully redirected to Payment Page:' . $this->user_pk, array (\n\t\t\t\t'c' => '1' \n\t\t) );\n\t\tDB::table('users')->where('id',$this->user_pk)->update(['is_business'=>1]);\n\t\treturn view ( 'thankyou.seller_pay' );\n\t}", "public static function protect(){\n\t\tif(!(isset($_SESSION[\"user\"]) && isset($_SESSION[\"user\"]['userId']))){\n\t\t\theader(\"location: \".$GLOBALS['web_root']);\n\t\t\texit();\n\t\t}\n\n\t}", "public function notAllowedDeliverHook()\n {\n if (CHAMELEON_CHECK_VALID_USER_SESSION_ON_PROTECTED_DOWNLOADS) {\n throw new AccessDeniedHttpException('Access denied.');\n }\n }" ]
[ "0.59189034", "0.5831648", "0.57221603", "0.5709116", "0.5467563", "0.5462037", "0.54536444", "0.5437065", "0.5370331", "0.5362743", "0.5352335", "0.5319451", "0.5317437", "0.5308784", "0.5300667", "0.5293686", "0.5286525", "0.5275444", "0.525163", "0.5243685", "0.52400464", "0.52352136", "0.5230026", "0.5212393", "0.520278", "0.52023995", "0.5196674", "0.5169196", "0.5163271", "0.51626676", "0.51605535", "0.515381", "0.5144575", "0.51417106", "0.5119507", "0.5117975", "0.5112278", "0.5112238", "0.5109123", "0.5102926", "0.5094082", "0.50835824", "0.5083033", "0.5068804", "0.5067035", "0.5065281", "0.50625384", "0.5061338", "0.5056806", "0.50567967", "0.5049823", "0.5019014", "0.50153", "0.50144887", "0.5013306", "0.50112784", "0.500961", "0.50069475", "0.50045836", "0.50039333", "0.49999243", "0.4994133", "0.49929154", "0.49918988", "0.49890757", "0.4988231", "0.4987637", "0.49832836", "0.49826285", "0.49784017", "0.49753046", "0.4974684", "0.4974646", "0.49739242", "0.49729165", "0.49703526", "0.49671033", "0.49671033", "0.4966495", "0.4952774", "0.49453968", "0.49452543", "0.49421233", "0.49412405", "0.49360165", "0.49354246", "0.49337322", "0.49214247", "0.4914495", "0.49142462", "0.49130884", "0.49130455", "0.49032262", "0.49029943", "0.48967916", "0.48932022", "0.48876235", "0.48869178", "0.48786503", "0.48785615" ]
0.58543587
1
Determine if the user is authorized to make this request.
public function authorize() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() != null;\n }", "public function authorize(): bool\n {\n return $this->user() !== null;\n }", "public function authorize(): bool\n {\n return $this->isUserAuthorised();\n }", "public function authorize()\n {\n return !is_null($this->user());\n }", "public function authorize()\n {\n return request()->user() != null;\n }", "public function authorize()\n\t{\n\t\t// if user is updating his profile or a user is an admin\n\t\tif( $this->user()->isSuperAdmin() || !$this->route('user') ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }", "public function isAuthorized()\n {\n return $this->cookieHelper->requestCookieExists('auth');\n }", "public function authorize()\n {\n return !empty(Auth::user()) && ($this->user()->isAnAdmin() || $this->user()->hasRole('user'));\n }", "public function authorize()\n {\n $originAccount = Account::find($this->get('origin_account_id'));\n return $originAccount->user_id == auth()->id();\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default:\n return $this->user()->type == 'App\\\\Staff' ? true : false;\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n if($this->user()->role == \"admin\" || $this->user()->id == $this->request->get('author_id')) return true;\n else return false;\n }", "public function authorize()\n {\n if(\\Auth::guest())\n {\n return false;\n } else {\n // Action 1 - Check if authenticated user is a superadmin\n if(\\Auth::User()->hasRole('superadmin'))\n return true;\n\n // Action 2 - Find UUID from request and compare to authenticated user\n $user = User::where('uuid', $this->user_uuid)->firstOrFail();\n if($user->id == \\Auth::User()->id)\n return true;\n\n // Action 3 - Fail request\n return false;\n }\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function isAuthorized(): bool\n {\n // TODO: implement authorization check\n\n return true;\n }", "public function isAuthorized() {}", "public function authorize()\n {\n return request()->loggedin_role === 1;\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n if ($this->isEdit() && !is_null($this->model)) {\n if (!user()->hasPermissionTo('Administrations::admin.user') && $this->model->id != user()->id) {\n return false;\n }\n }\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }", "public function authorize()\n {\n switch (true) {\n case $this->wantsToList():\n case $this->wantsToShow():\n if ($this->hasRoles(['owner', 'administrator'])) {\n return true;\n }\n break;\n case $this->wantsToStore():\n case $this->wantsToUpdate():\n case $this->wantsToDestroy():\n if ($this->hasRoles(['owner'])) {\n return true;\n }\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n $user = JWTAuth::parseToken()->authenticate();\n $organisation = Organization::findOrFail($this->route('organizations'));\n return $organisation->admin_id == $user->id;\n }", "public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }", "function isAuthorized()\n {\n $authorized = parent::isAuthorized();\n return $authorized;\n }", "public function authorize()\n {\n $user = auth('web')->user();\n if ($user && $user->active) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }", "public function authorize()\n {\n $this->user = User::query()->find($this->route()->parameter('user'));\n $this->merge(['verified' => $this->get('verified') ? 1 : 0]);\n\n return true;\n }", "public function authorize()\n {\n return is_client_or_staff();\n }", "public function isAuthorized() {\n\t\treturn true;\n\t}", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin'])) {\n return true;\n } else {\n return false;\n }\n }", "public function isAuthorized()\n\t{\n\t\t$sessionVal = Yii::$app->session->get($this->sessionParam);\n\t\treturn (!empty($sessionVal));\n\t}", "public function authorize() {\n\n return auth()->user() && auth()->user()->username === $this->user->username;\n }", "public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }", "public function authorize()\n {\n if ($this->user()->isAdmin($this->route('organization'))) {\n return true;\n }\n\n return false;\n\n }", "public function authorize()\n {\n return $this->user() && $this->user()->role === Constants::USER_ROLE_ADMIN;\n }", "public function authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }", "public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }", "public function hasAuthorized() {\n return $this->_has(1);\n }", "public function authorize()\n {\n $resource = Resource::find($this->route('id'));\n\n if (!$resource) {\n return true;\n }\n\n return $resource && $this->user()->can('access', $resource);\n }", "public function authorize()\n {\n /*\n if ($this->loan_id && is_numeric($this->loan_id) && $loan = Loan::whereId($this->loan_id)->first()) {\n // loan_id belongs to requesting user\n return $loan && $this->user()->id == $loan->user_id;\n }\n */\n return true; // let rules handle it\n }", "public function authorize()\n {\n //TODO Authorice Request (without Controller)\n return auth()->user()->role_id === 1;\n }", "public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }", "public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }", "public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }", "public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser'])) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n return \\Auth::check() ? true : false;\n }", "public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t}", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return !empty(Auth::user());\n }", "public function authorize()\n {\n return $this->groupHasUser() || $this->hasSeller();\n }", "public function isAuthorized() {\n\t\t\n\t}", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }", "public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }", "public function authorize()\n {\n if (auth()->user()->is_admin) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n if ($this->user()->is_admin){\n return true;\n }\n else if ($this->method == \"PUT\"){\n if ($this->user()->id == $this->input('id')){\n return true;\n }\n }\n return false;\n }", "public function authorize(): bool\n {\n return parent::authorize() && (int)$this->playList->user_id === auth()->user()->id;\n }", "public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}", "public function authorize()\n {\n if (Auth::check()) {\n \n return true;\n \n }\n return false;\n }", "public function authorize()\n {\n $user = Auth::user();\n return $user && $user->rol == 'admin';\n }", "public function authorize()\n\t{\n\t\t// Nutzern akzeptiert werden\n\t\tif(Auth::check())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }", "public function authorize()\n {\n return $this->auth->check();\n }", "public function authorize()\n {\n if (auth()->check() && auth()->user()->isAdmin()) {\n return true;\n }\n\n return false;\n }", "public function authorize() {\n\t\t$user = \\Auth::user();\n\n\t\tif ( $user->isAdmin() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function authorize()\n {\n if (auth()->user()->isAdmin() || auth()->user()->isCustomer()) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->container['auth']->check();\n }", "function isAuthorized($request) {\n return true;\n }", "public function authorize()\n {\n return Auth::guest() || isMember();\n }", "public function authorize()\n {\n return auth()->user() && auth()->user()->isCeo();\n }", "public function authorize(): bool\n {\n $deckId = $this->request->get('deck_id');\n $userId = Deck::whereKey($deckId)->value('user_id');\n\n return $userId === user()->id;\n }", "public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }", "public function authorize()\n {\n return TRUE;\n }", "public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }", "public function authorize()\n {\n # if it's false, it will rejected\n return true;\n }", "public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }", "public function authorize()\n {\n $user = Auth::user();\n\n return ($user->getRole() == 'admin');\n }", "public function is_authorized() {\n\t\t$authorized = true;\n\t\tif ( $this->is_access_token_expired() ) {\n\t\t\t$authorized = false;\n\t\t}\n\n\t\treturn $authorized;\n\t}", "public function authorize()\n {\n $user = User::findOrFail($this->route('id'));\n\n return $user->hasRole('admin') || $user->hasRole('teacher');\n }", "public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}", "public function authorize()\n {\n $project = \\App\\Project::find($this->request->get('project'));\n return $project && $project->isManager($this->user()->name);\n }", "public function authorize()\n {\n // User system not implemented\n return true;\n }", "public function authorize()\n {\n $idExpense = $this->input('expense');\n $expense = Expense::find($idExpense);\n\n return $expense && $this->user()->id == $expense->user_id;\n }", "public function authorize() : bool\n {\n // TODO check request to xhr in middleware\n return true;\n }", "public function authorize()\n {\n $organizationId = (string) $this->route('id');\n\n $this->organization = Organization::findByUuidOrFail($organizationId);\n\n return $this->user()->can('show', [Organization::class, $this->organization]);\n }", "public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }", "public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n $current_user = auth()->user();\n $convention = Convention::find($this->route('convention_id'));\n\n // Use ClientPolicy here to authorize before checking the fields\n return $current_user->can('store', Convention::class)\n || $current_user->can('update', $convention);\n }", "public function authorize()\n {\n if (session()->has('user'))\n {\n $participantController = new ParticipantController();\n\n return !$participantController->isParticipating($this->input('id_user'), $this->input('id_event'));\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }" ]
[ "0.8401075", "0.8377201", "0.8377201", "0.8344036", "0.8253612", "0.824826", "0.8212931", "0.8146173", "0.81110245", "0.80821866", "0.7991871", "0.7990792", "0.79829323", "0.7959539", "0.79514205", "0.7949228", "0.7925649", "0.7915602", "0.7900597", "0.789401", "0.78905416", "0.78900814", "0.7860653", "0.784153", "0.784153", "0.7837333", "0.7824408", "0.7811713", "0.7809475", "0.77930796", "0.7786932", "0.77811307", "0.7781027", "0.7762589", "0.7754874", "0.771782", "0.771782", "0.7716963", "0.77135783", "0.7704182", "0.76933175", "0.7692517", "0.76914805", "0.7690911", "0.7674092", "0.7667445", "0.76653653", "0.7655474", "0.7650134", "0.76432997", "0.7643136", "0.76426333", "0.7634668", "0.7631141", "0.7629124", "0.76274264", "0.7620046", "0.7620046", "0.76134425", "0.7604216", "0.7603608", "0.76030916", "0.76030916", "0.7602084", "0.7600515", "0.75968313", "0.7587718", "0.7585746", "0.7581106", "0.7563173", "0.7554152", "0.7552851", "0.75510716", "0.7544145", "0.7543556", "0.75401926", "0.75379413", "0.7529233", "0.75155455", "0.75145584", "0.7499859", "0.7495578", "0.74946797", "0.7491706", "0.74881786", "0.7486718", "0.74794", "0.7478064", "0.7472763", "0.74716425", "0.7464693", "0.74643433", "0.7462231", "0.7462003", "0.74613416", "0.7449114", "0.74394757", "0.7434772", "0.7433077", "0.7431579", "0.7424624" ]
0.0
-1
Get the validation rules that apply to the request.
public function rules() { return [ 'title' => ['required', 'string', 'max:25'], 'body' => ['required', 'string'], 'is_open' => ['nullable'], 'pict' => ['image', 'max:5000'], //画像挿入の場合サイズ指定(キロバイト) ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\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 rules()\n {\n return $this->validationRules;\n }", "public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }", "public static function getRules()\n {\n return (new static)->getValidationRules();\n }", "public function getRules()\n {\n return $this->validation_rules;\n }", "public function getValidationRules()\n {\n return [];\n }", "public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }", "public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }", "public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }", "protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }", "public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }", "public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }", "public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }", "protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }", "public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }", "public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }", "protected function getValidRules()\n {\n return $this->validRules;\n }", "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }", "public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }", "public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n { \n return $this->rules;\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 getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }", "public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }", "public function validationRules()\n {\n return [];\n }", "public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }", "public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n return static::$rules;\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 static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }", "public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }", "protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }", "public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }", "public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }", "public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }", "public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }", "abstract protected function getValidationRules();", "public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }", "public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }", "public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }", "public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }", "public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }", "public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }", "public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }", "public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }", "public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }", "public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }", "public function getValidationRules() : array;", "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }", "public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }", "public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }", "public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }", "public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}", "public function rules()\n {\n $rules = array();\n return $rules;\n }", "public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }", "public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }", "protected function get_validation_rules()\n {\n }", "public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }", "public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }", "public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }", "public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }", "public function defineValidationRules()\n {\n return [];\n }", "public function rules(Request $request)\n {\n return Qc::$rules;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }", "public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }" ]
[ "0.8342703", "0.80143493", "0.7937251", "0.79264987", "0.79233825", "0.79048395", "0.78603816", "0.7790699", "0.77842164", "0.77628785", "0.7737272", "0.7733618", "0.7710535", "0.7691693", "0.76849866", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7675849", "0.76724476", "0.76665044", "0.7657698", "0.7641827", "0.7630892", "0.76293766", "0.7617708", "0.76102096", "0.7607475", "0.7602442", "0.7598732", "0.7597544", "0.75924", "0.75915384", "0.7588146", "0.7581354", "0.7555758", "0.755526", "0.7551423", "0.7546329", "0.7541439", "0.75366044", "0.75363225", "0.7530296", "0.7517988", "0.75155175", "0.7508439", "0.75069886", "0.7505724", "0.749979", "0.7495976", "0.74949056", "0.7492888", "0.7491117", "0.74901396", "0.7489651", "0.7486808", "0.7486108", "0.7479687", "0.7478561", "0.7469412", "0.74635684", "0.74619836", "0.7461325", "0.74591017", "0.7455279", "0.745352", "0.7453257", "0.7449877", "0.74486", "0.7441391", "0.7440429", "0.7435489", "0.7435326", "0.74341524", "0.7430354", "0.7429103", "0.7423808", "0.741936", "0.74152505", "0.7414828", "0.741382", "0.74126065", "0.74105227", "0.740555", "0.7404385", "0.74040926", "0.74015605", "0.73905706", "0.73837525", "0.73732615", "0.7371123", "0.7369176", "0.73619753", "0.73554605", "0.73448825", "0.7344659", "0.73427117", "0.73357755" ]
0.0
-1
npm Display a listing of the resource.
public function index() { $Visit = DB::table('tb_farmacia as f') ->join('sis_usuario as u', 'f.cd_representante', '=', 'u.cdusuario') ->join('sis_usuario as ua', 'f.cd_anjo', '=', 'ua.cdusuario') ->join('tb_cidade as c', 'f.cd_cidade', '=', 'c.cdcidade') ->select('f.cd_farmacia', 'nm_fantasia', 'razao_social', 'cnpj', 'u.nmusuario as representante', 'ua.nmusuario as anjo', 'nm_cidade') ->get(); return response()->json($Visit); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listing();", "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 actionList() {\r\n\t\t$response = new AJSONResponse();\r\n\r\n\t\t$response->packages = new CAttributeCollection();\r\n\t\tforeach(Yii::app()->packageManager->packages as $package) {\r\n\t\t\t$response->packages[$package->name] = $package;\r\n\t\t}\r\n\t\t$response->packages = $response->packages->toArray();\r\n\t\t$response->render();\r\n\t}", "public function index() {\n\t\t$data = $this->load_module_info ();\n\t\t\n\t\t$this->layout->display_admin ( $this->folder . $this->module . \"-list\", $data );\n\t}", "function listing() {\r\n\r\n }", "function index() {\n\t\t$this->show_list();\n\t}", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "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 listCommand() {\n\t\t/** @var Image $image */\n\t\t$totalCount = 0;\n\t\t$totalSize = 0;\n\t\t$totalSizeOfImageVariants = 0;\n\t\t$totalVariantsCount = 0;\n\n\t\tforeach ($this->imageRepository->findAll() as $image) {\n\t\t\t$totalCount++;\n\t\t\tlist($variantsCount, $variantsSize) = $this->getVariantsCount($image);\n\t\t\t$totalSizeOfImageVariants += $variantsSize;\n\t\t\t$this->outputLine(\"%s\\t%s (%dx%d) [%d variant(s)]\", [\n\t\t\t\t$image->getIdentifier(),\n\t\t\t\t$image->getLabel(),\n\t\t\t\t$image->getWidth(),\n\t\t\t\t$image->getHeight(),\n\t\t\t\t$variantsCount\n\t\t\t]);\n\t\t\t$totalSize += $image->getResource()->getFileSize();\n\t\t\t$totalVariantsCount += $variantsCount;\n\t\t}\n\t\t$this->outputLine('# %d assets (%d variants) Total size in MB: %.1f (Original Images: %.1f, Variants: %.1f)', [\n\t\t\t$totalCount,\n\t\t\t$totalVariantsCount,\n\t\t\t($totalSize + $totalSizeOfImageVariants) / 1024 / 1024,\n\t\t\t$totalSize / 1024 / 1024,\n\t\t\t$totalSizeOfImageVariants / 1024 / 1024\n\t\t]);\n\t}", "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}", "public function documentation() {\n\t\t$this->display(API_VIEWS_BASE.'/backend/documentation/index'); \n }", "public function indexAction()\n {\n $active = Pi::registry('modulelist')->read('active');\n $inactive = Pi::registry('modulelist')->read('inactive');\n\n $modules = array_merge($active, $inactive);\n foreach ($modules as $name => &$data) {\n $meta = Pi::service('module')->loadMeta(\n $data['directory'],\n 'meta'\n );\n $author = Pi::service('module')->loadMeta(\n $data['directory'],\n 'author'\n );\n $data['description'] = $meta['description'];\n $data['author'] = $author;\n $data['active'] = isset($active[$name]) ? true : false;\n if (empty($meta['logo'])) {\n $data['logo'] = Pi::url('static/image/module.png');\n } elseif (empty($data['active'])) {\n $data['logo'] = Pi::url('script/browse.php') . '?' . sprintf(\n 'module/%s/asset/%s',\n $data['directory'],\n $meta['logo']\n );\n } else {\n $data['logo'] = Pi::service('asset')->getModuleAsset(\n $meta['logo'],\n $data['name']\n );\n }\n if (empty($data['update'])) {\n $data['update'] = __('Never updated.');\n } else {\n $data['update'] = _date($data['update']);\n }\n }\n $this->view()->assign('modules', $modules);\n //$this->view()->setTemplate('module-list');\n $this->view()->assign('title', __('Installed modules'));\n }", "public function show()\n {\n $service = Config::get(\"ProjectLister::service\");\n $method = \"fetch_$service\";\n // Fetch\n $projects = self::$method();\n // Sort the list\n $projects = Project::sort( $projects );\n\n $output = '';\n foreach($projects as $project)\n {\n $template = ( Config::get(\"ProjectLister::template\") ) ? Config::get(\"ProjectLister::template\") : Project::getProjectTemplate();\n\n $template = str_replace('{{PROJECT_URL}}', $project->url, $template);\n $template = str_replace('{{PROJECT_NAME}}', htmlentities($project->name), $template);\n $template = str_replace('{{PROJECT_WATCHER_COUNT}}', $project->watchers, $template);\n $template = str_replace('{{PROJECT_DESCRIPTION}}', htmlentities($project->description), $template);\n $template = str_replace('{{PROJECT_SOURCE}}', $project->source, $template);\n $template = str_replace('{{PROJECT_WATCHER_NOUN}}', $project->watcher_noun, $template);\n\n $output .= $template . \"\\n\";\n }\n return $output;\n }", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listCommand() {\n\t\t$iterator = new DirectoryIterator(UploadManager::UPLOAD_FOLDER);\n\n\t\t$counter = 0;\n\t\tforeach ($iterator as $file) {\n\t\t\tif ($file->isFile()) {\n\t\t\t\t$counter++;\n\t\t\t\t$this->outputLine($file->getFilename());\n\t\t\t}\n\t\t}\n\n\t\t$this->outputLine();\n\t\t$this->outputLine(sprintf('%s temporary file(s).', $counter));\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 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 index()\n {\n $packages = Package::latest()->paginate(10);\n return view('admin.packages.index',compact('packages'));\n }", "public function index()\n {\n $Package = Package::lists('id', 'name');\n return view('admin.package.index', [\n 'Package' => $Package\n ]);\n }", "public function indexAction()\n {\n /** @var array $config */\n $config = $this->di->get('swagger');\n $options = DocsService::getOptions($config);\n $swagger = \\Swagger\\scan($config['path'], $options);\n $swagger->host = $config['host'];\n $swagger->schemes = $config['schemes'];\n $swagger->basePath = $config['basePath'];\n $swagger->info->version = $config['version'];\n $swagger->info->title = $config['title'];\n $swagger->info->description = $config['description'];\n $swagger->info->contact->email = $config['email'];\n\n return $swagger->__toString();\n }", "function showResources() {\n $output = $this->outputBoilerplate('resources.html');\n return $output;\n }", "function list( $args, $assoc_args ) {\n $options = $this->_set_option_params( $assoc_args );\n $this->_create_client( $options['profile'], $options['access_key'], $options['secret_key'] );\n $result = $this->client->listDistributions();\n echo json_encode($result->get('DistributionList'));\n //@TODO Support another format like YAML / table / csv and more\n }", "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 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 indexAction()\n {\n $versions = Mage::helper('iparcel')->gatherExtensionVersions();\n\n foreach ($versions as $key => $version) {\n print \"<b>$key</b>: $version<br />\";\n }\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function index()\n {\n return 'list of all projects';\n }", "public function listAction()\n {\n $dashboardApi = $this->objectManager->get('Eww\\\\SubhhOaDashboard\\\\Service\\\\DashboardApi');\n $repositories = json_decode($dashboardApi->listRepos());\n $this->view->assign('repositories', $repositories);\n }", "public function actionList() {\n $this->_getList();\n }", "public function actionIndex()\n {\n $this->stdout(\"\\n Example Module Base Command: \" . date('d.m.y h:i:s') . \" Done!\\n\");\n }", "public function list()\n {\n $plugins = Plugin::orderBy('name', 'asc')->where('vsrepo', 0)->where('vs_included', 0)->with('categories')->get();\n\t\treturn view('vsrepo.list', compact('plugins'));\n }", "public function indexAction() {\n // Get list of all computers\n\n $this->context->render(\"Ajaxplorer/pages/SharedFoldersList.twig\", array());\n }", "public function index()\n {\n $downloads = $this->downloadsModel->getAllDownloads();\n $sections = $this->downloadsModel->getAllSections();\n $recommendedDownload = $this->downloadsModel->getRecommendedDownload();\n return $this->renderPage(\n array(\n 'title' => $this->getConfigVars('downloadsTitle'),\n 'content_title' => $this->getConfigVars('downloadsContentTitle'),\n 'downloads' => $downloads,\n 'sections' => $sections,\n 'release_tools' => RELEASE_TOOLS,\n 'release' => RELEASE,\n 'recommendedDownload' => $recommendedDownload\n )\n );\n }", "public function docsAction()\n {\n $view = new Simple();\n return $view->render(__DIR__ . '/../views/Docs/docs', [\n 'url' => $this->di->get('swagger')['jsonUri'],\n ]);\n }", "public function index()\n {\n $repostories = Repostory::all();\n \n return view('repos.lists', compact('repostories'));\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function indexAction()\n {\n\n $manager = $this->container->get('app_manager_listkdo');\n $data = array(\n 'manager' => $manager,\n 'dir' => 'AppBundle:ListKdo',\n 'show' => 'appbundle_listkdo_show',\n 'edit' => 'appbundle_listkdo_edit'\n );\n\n return $this->gridList($data);\n }", "public function index()\n {\n $packages = Package::all();\n return view('admin.packages.index',compact('packages'));\n }", "public function index()\n {\n $data['title'] = \"packages\";\n $data['packages'] = Packages::orderby('id', 'DESC')->get();\n return view('/admin/packages/index', $data)->render();\n }", "public function index()\n\t{\n\t\treturn 'Aqui mostramos las listas';\n\t}", "public function index()\n {\n $title = $this->title;\n $module_name = $this->module_name;\n $module_icon = $this->module_icon;\n\n $page_heading = \"All \" . $module_name;\n\n $$module_name = Permission::paginate(5);\n\n return view(\"backend.$module_name.index\", compact('title', 'page_heading', 'module_icon', \"module_name\", \"$module_name\"));\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function action_index()\n\t{\n\t\t$bundles = Listing::where_active('y')\n\t\t\t->order_by('created_at', 'desc')\n\t\t\t->take(10)\n\t\t\t->get();\n\n\t\treturn View::make('rss.default')\n\t\t\t->with('bundles', $bundles);\n\t}", "public function index(){\n \n $this->display();\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "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}", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AppAdminBundle:FileManager')->findAll();\n if(empty($entities)) {\n if(!$this->container->getParameter('filemanager_path')) {\n $this->indexation($this->$this->get('kernel')->getRootDir() . '/../web');\n } else {\n $this->indexation($this->container->getParameter('filemanager_path'));\n }\n\n }\n\n $htmlTree = $em->getRepository('AppAdminBundle:FileManager')->childrenHierarchy(\n null, /* starting from root nodes */\n false, /* true: load all children, false: only direct */\n array(\n 'decorate' => true,\n 'representationField' => 'title',\n 'html' => true,\n 'rootOpen' => '<ul>',\n 'rootClose' => '</ul>',\n 'childOpen' => function($child) {\n return '<li id=\"'.$child['id'].'\">';\n },\n 'childClose' => '</li>'\n )\n );\n return array(\n 'htmlTree' => $htmlTree,\n );\n }", "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 availableAction()\n {\n $modules = array();\n //$modulesInstalled = $this->installedModules();\n $iterator = new \\DirectoryIterator(Pi::path('module'));\n foreach ($iterator as $fileinfo) {\n if (!$fileinfo->isDir() || $fileinfo->isDot()) {\n continue;\n }\n $directory = $fileinfo->getFilename();\n if (preg_match('/[^a-z0-9_]/i', $directory)) {\n continue;\n }\n $meta = Pi::service('module')->loadMeta($directory, 'meta');\n if (empty($meta)) {\n continue;\n }\n $author = Pi::service('module')->loadMeta($directory, 'author');\n //$clonable = isset($meta['clonable']) ? $meta['clonable'] : false;\n //$meta['installed'] = in_array($directory, $modulesInstalled);\n $meta['installed'] = Pi::registry('module')\n ->read($directory) ? true : false;\n if (empty($meta['clonable']) && $meta['installed']) {\n continue;\n }\n $meta['logo'] = !empty($meta['logo'])\n ? Pi::url('script/browse.php') . '?'\n . sprintf('module/%s/asset/%s', $directory, $meta['logo'])\n : Pi::url('static/image/module.png');\n $modules[$directory] = array(\n 'meta' => $meta,\n 'author' => $author,\n );\n }\n\n $this->view()->assign('modules', $modules);\n $this->view()->assign('title', __('Modules ready for installation'));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $ressources = $em->getRepository('AppBundle:Ressource')->findAll();\n\n return $this->render('ressource/index.html.twig', array(\n 'ressources' => $ressources,\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 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 listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "function sd_sc_list_dir($atts) {\n\tglobal $sd_error_msg;\n\n\t$dir = sd_sc_get_path($atts);\n\tif (!$dir) { return 'Fehler: Ungültiges Verzeichnis.'; }\n\n\t// ensure that $dir starts and ends with a slash.\n\t$dir = trailingslashit( $dir );\n\tif ('/' != $dir{0}) { $dir = '/' . $dir; }\n\n\t$absdir = untrailingslashit(SD_DL_ROOT) . $dir;\n\tif (!is_dir($absdir)) { return 'Fehler: Kein Verzeichnis.'.$absdir; };\n\tif (!is_readable($absdir)) { return 'Fehler: Unlesbares Verzeichnis.'; };\n\n\t$access = sd_check_permissions($absdir);\n\tif (!$access) { return $sd_error_msg; }\n\t\n\t$list = '';\n\t$urlpath = untrailingslashit(SD_DL_BASEURL) . $dir;\n\t$baseurl = home_url() . (('/' == $urlpath{0}) ? '' : '/') . $urlpath;\n\t$d = dir($absdir);\n\twhile (false !== ($entry = $d->read())) {\n\t\tif ('.' == $entry{0}) { continue; }\n\t\t$link = $baseurl . $entry;\n\t\t$list .= '<a href=\"' . $link . '\">' . $entry . '</a> ('.$link.')<br />';\n\t}\n\t$d->close();\n\n\treturn $list;\n}", "public function listCommand()\n {\n $this->console->writeLn('list: ' . implode(' ', $this->_getEnvTypes()));\n }", "public function index()\n {\n\t // here we use MY_Model's get_all() method to fetch everything\n\t $items = $this->ramstrg_sites_m->get_all();\n\n\n\t // Build the view with ramstrg/views/admin/items.php\n\t $this->template\n\t\t ->title($this->module_details['name'])\n\t\t ->set('items', $items)\n\t\t ->build('admin/items');\n }", "public function show_list()\n {\n $this->output('Workstatus/v_workstatus_ajax');\n }", "public function listAction() {}", "public function actionIndex(){ \n echo 'REST API';\n //echo \\admin\\components\\GoogleURLShortner::widget([\"url\" => \"http://www.google.com\"]);\n }", "public function indexAction(){\n \n $this->_view->display('device_list.tpl');\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 indexAction() {\n $em = $this->getDoctrine()->getManager();\n $advertisingPackages = $em->getRepository('AppBundle:AdvertisingPackage')->findBy(\n array(),\n array('createdAt' => 'DESC')\n );\n\n return $this->render('AdminBundle:AdvertisingPackage:index.html.twig', array(\n 'advertisingPackages' => $advertisingPackages\n ));\n }", "public function overview() {\n\t\treturn $this->template->append_css('module::admin/docs.css')->build('admin/overview');\n\t}", "public function index()\n {\n $programs = Program::all();\n return $this->showAll($programs);\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 $specs = Specification::paginate(config('globalSettings.entries-per-page'));\n return view('admin.specs.specs',\n [\n 'specs' => $specs\n ]\n );\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 indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $subtasks = $em->getRepository('AppBundle:Subtask')->findAll();\n\n return $this->render('@App/private/subtask/list_subtask.html.twig', array(\n 'subtasks' => $subtasks,\n ));\n }", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "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 index()\n {\n $packages = Package::all();\n return view('backend.pages.packages.index', compact('packages'));\n }", "public function index()\n {\n $list_menu = $this->json(TRUE);\n\n // die(print_r($list_menu));\n\n return view('apidocs::index')\n ->withMenu($list_menu)\n ->withJson(url('/api/documentation/json'));\n \n }", "public function lister()\r\n {\r\n }", "public function showList() {\n\t \treturn 0;\n\t }", "public function indexAction() {\r\n\t\tif (install_installer::checkFirstRun() )\r\n\t\t{\r\n\t\t $front = new Front( ClassLoader::Load('install') );\r\n\t\t return $front->dispatch('install');\r\n\t\t}\r\n\t\t\r\n\t\t$content = ClassLoader::Load('catalog');\r\n\t\t$front = new Front($content);\r\n\t\treturn $front->dispatch('showall');\r\n\t\t\r\n\t}", "public function index()\n {\n $this->global['pageTitle'] = '系统管理';\n\n $this->userListing();\n }", "public function _list( $args, $assoc_args ) {\n\n\t\t$defaults = array(\n\t\t\t'fields' => implode( ',', $this->fields ),\n\t\t\t'format' => 'table'\n\t\t);\n\t\t$assoc_args = array_merge( $defaults, $assoc_args );\n\n\t\t$packages = array();\n\t\tforeach( $this->get_installed_packages() as $package ) {\n\n\t\t\t$package_output = new stdClass;\n\t\t\t$package_output->name = $package->getName();\n\t\t\t$package_output->description = $package->getDescription();\n\t\t\t$package_output->authors = implode( ',', wp_list_pluck( (array)$package->getAuthors(), 'name' ) );\n\t\t\t$packages[] = $package_output;\n\t\t}\n\n\t\tWP_CLI\\Utils\\format_items( $assoc_args['format'], $packages, $assoc_args['fields'] );\n\t}", "public function listCommands()\n {\n $commands = $this->library->getAll();\n\n foreach ($commands as $name => $details) {\n $this->output->writeln(ucwords($name));\n $this->output->hr(strlen($details['description']), '-');\n $this->output->writeln($details['description']);\n $this->output->hr(strlen($details['description']), '-');\n\n foreach ($details['actions'] as $action) {\n $this->output->writeln(\n sprintf(\n \"%s - php [file] %s%s [params]\",\n $action,\n $name,\n ($action != 'main' ? \":$action\" : '')\n )\n );\n }\n\n // Just for padding\n $this->output->writeln('');\n }\n }", "public function index() {\n\t\t$this->display('index');\n\t}", "public function index()\n\t{\n\n\t\t$ch = curl_init(base_url('/api/restLibraries/'));\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t\tcurl_setopt($ch, CURLOPT_HEADER, false);\n\t\t$data['libraries'] = json_decode(curl_exec($ch), true);\n\t\tcurl_close($ch);\n\n\t\t$this->load->view('theme/header'); \n\t\t$this->load->view('library/list', $data);\n\t\t$this->load->view('theme/footer');\n\t}", "function index() {\r\n \t\r\n // The default action is the showall action\r\n $this->browse();\r\n }", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $shortLinks = ShortLink::latest()->get();\n \n return view('list', compact('shortLinks'));\n }", "public function apiList();", "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 actionIndex()\n {\n $pages=new Pagination([\n 'totalCount'=>MediaComp::getInstance()->getMediaCount(),\n ]);\n $dataList=MediaComp::getInstance()->getMediaList($pages->offset,$pages->limit);\n return $this->render('index',['dataList'=>$dataList,'pages'=>$pages]);\n }", "public function liste()\n {\n $discs = $this->LoadModel('Disc');\n $discDetail = $discs->info_record();\n $this->render('liste', [\n 'discs' => $discDetail\n ]);\n }", "#[Route(path: '/', name: 'lsitem_index', methods: ['GET'])]\n public function index(): Response\n {\n return $this->render('framework/ls_item/index.html.twig', []);\n }", "public function listAction() {\n\n\t}", "public function test_list_of_resource()\n {\n $response = $this->artisan('resource:list');\n $this->assertEquals(0, $response);\n }", "public function indexAction()\n {\n $entities = $this->getEntityManager()\n ->getRepository('ArnmArtistBundle:Artist')\n ->findAll();\n\n return $this->render('ArnmArtistBundle:ArtistMgr:index.html.twig', array(\n 'entities' => $entities\n ));\n }", "public function actionIndex()\n {\n return $this->render('grid', ['model' => new ListOrgKind()]);\n }", "public function indexAction()\n {\n $pagination = $this->common->getList('Links', null, 'position');\n return $this->render('SiteAdminBundle:Links:index.html.twig', array(\n 'pagination' => $pagination\n ));\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Description::find(),\n 'pagination' => [\n 'pageSize' => 500,\n ],\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function story_list()\n\t{\n\t\t$data['page']='Story List';\n\t\t$data['stories_list']=$this->stories->get_all();\n\t\t$view = 'admin/stories/admin_stories_list_view';\n\t\techo Modules::run('template/admin_template', $view, $data);\t\n\t}", "public function list();" ]
[ "0.692139", "0.6878769", "0.64733917", "0.6408373", "0.6334086", "0.6203267", "0.6173417", "0.61317396", "0.6129983", "0.61224276", "0.60618937", "0.60461605", "0.6021306", "0.6020816", "0.6011931", "0.60089433", "0.5995623", "0.5976189", "0.59695303", "0.5966397", "0.59490234", "0.59453166", "0.5931606", "0.592781", "0.5922126", "0.5920425", "0.59070265", "0.588005", "0.58709633", "0.58601785", "0.5849351", "0.5848232", "0.58473766", "0.5828704", "0.5825082", "0.58242375", "0.5808077", "0.57920915", "0.57785064", "0.5769027", "0.5756502", "0.5755309", "0.57551163", "0.57428694", "0.5735451", "0.5731958", "0.5726597", "0.5726422", "0.5723079", "0.5721877", "0.5714173", "0.57017165", "0.5697496", "0.5694623", "0.5686936", "0.5684436", "0.5682335", "0.56792754", "0.5677362", "0.5668954", "0.5667543", "0.56660837", "0.5659992", "0.56528044", "0.565052", "0.5650153", "0.5647855", "0.5647813", "0.56453645", "0.5641141", "0.5639868", "0.5639827", "0.5634193", "0.5633931", "0.56335336", "0.5627924", "0.5623796", "0.5622703", "0.5621869", "0.5620933", "0.5617756", "0.5616689", "0.5614875", "0.56142735", "0.5610752", "0.5609926", "0.56074", "0.56074", "0.56074", "0.5606963", "0.56050014", "0.5603404", "0.5600948", "0.56004816", "0.55964535", "0.55961007", "0.55926484", "0.55922914", "0.5590538", "0.5585173", "0.5584459" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { // }
{ "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($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "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
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // }
{ "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
Register any application services.
public function register() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register()\n {\n $this->registerServices();\n }", "public function register()\n {\n $this->registerAssets();\n $this->registerServices();\n }", "public function register()\n\t{\n\n $this->registerUserService();\n $this->registerCountryService();\n $this->registerMetaService();\n $this->registerLabelService();\n $this->registerTypeService();\n $this->registerGroupeService();\n $this->registerActiviteService();\n $this->registerRiiinglinkService();\n $this->registerInviteService();\n $this->registerTagService();\n $this->registerAuthService();\n $this->registerChangeService();\n $this->registerRevisionService();\n $this->registerUploadService();\n //$this->registerTransformerService();\n }", "public function register()\n { \n // User Repository\n $this->app->bind('App\\Contracts\\Repository\\User', 'App\\Repositories\\User');\n \n // JWT Token Repository\n $this->app->bind('App\\Contracts\\Repository\\JSONWebToken', 'App\\Repositories\\JSONWebToken');\n \n $this->registerClearSettleApiLogin();\n \n $this->registerClearSettleApiClients();\n \n \n }", "public function register()\n {\n $this->registerRequestHandler();\n $this->registerAuthorizationService();\n $this->registerServices();\n }", "public function register()\n {\n $this->app->bind(\n PegawaiServiceContract::class,\n PegawaiService::class \n );\n\n $this->app->bind(\n RiwayatPendidikanServiceContract::class,\n RiwayatPendidikanService::class \n );\n\n $this->app->bind(\n ProductionHouseServiceContract::class,\n ProductionHouseService::class\n );\n\n $this->app->bind(\n MovieServiceContract::class,\n MovieService::class\n );\n\n $this->app->bind(\n PangkatServiceContract::class,\n PangkatService::class \n );\n\n }", "public function register()\n {\n // $this->app->bind('AuthService', AuthService::class);\n }", "public function register()\n {\n $this->registerServiceProviders();\n $this->registerSettingsService();\n $this->registerHelpers();\n }", "public function register()\n {\n $this->registerAccountService();\n\n $this->registerCurrentAccount();\n\n //$this->registerMenuService();\n\n //$this->registerReplyService();\n }", "public function register()\n {\n $this->registerRepositories();\n }", "public function register()\n {\n $this->registerFacades();\n $this->registerRespository();\n }", "public function register()\n {\n $this->app->bind('App\\Services\\UserService');\n $this->app->bind('App\\Services\\PostService');\n $this->app->bind('App\\Services\\MyPickService');\n $this->app->bind('App\\Services\\FacebookService');\n $this->app->bind('App\\Services\\LikeService');\n }", "public function register()\n {\n // service 由各个应用在 AppServiceProvider 单独绑定对应实现\n }", "public function register()\n {\n //\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n\n\n\n\n $this->app->register(ResponseMacroServiceProvider::class);\n $this->app->register(TwitterServiceProvider::class);\n }", "public function register()\n {\n $this->registerGraphQL();\n\n $this->registerConsole();\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n\n $this->registerCommand();\n $this->registerSchedule();\n $this->registerDev();\n\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/telescope-error-service-client.php', 'telescope-error-service-client'\n );\n\n $this->registerStorageDriver();\n\n $this->commands([\n Console\\InstallCommand::class,\n Console\\PublishCommand::class,\n ]);\n }", "public function register()\n\t{\n\t\t$this->registerPasswordBroker();\n\n\t\t$this->registerTokenRepository();\n\t}", "public function register()\n {\n $this->registerConfig();\n\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\UtilitiesServiceProvider');\n $this->registerLogViewer();\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\CommandsServiceProvider');\n }", "public function register() {\n $this->registerProviders();\n $this->registerFacades();\n }", "public function register()\n {\n // $this->app->make('CheckStructureService');\n }", "public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'APIcoLAB\\Services\\Registrar'\n\t\t);\n\n $this->app->bind(\n 'APIcoLAB\\Repositories\\Flight\\FlightRepository',\n 'APIcoLAB\\Repositories\\Flight\\SkyScannerFlightRepository'\n );\n\n $this->app->bind(\n 'APIcoLAB\\Repositories\\Place\\PlaceRepository',\n 'APIcoLAB\\Repositories\\Place\\SkyScannerPlaceRepository'\n );\n\t}", "public function register()\n {\n $this->app->register(\\Maatwebsite\\Excel\\ExcelServiceProvider::class);\n $this->app->register(\\Intervention\\Image\\ImageServiceProvider::class);\n $this->app->register(\\Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider::class);\n $this->app->register(\\Yajra\\Datatables\\DatatablesServiceProvider::class);\n $this->app->register(\\Yajra\\Datatables\\ButtonsServiceProvider::class);\n\n $loader = null;\n if (class_exists('Illuminate\\Foundation\\AliasLoader')) {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n }\n\n // Facades\n if ($loader != null) {\n $loader->alias('Image', \\Intervention\\Image\\Facades\\Image::class);\n $loader->alias('Excel', \\Maatwebsite\\Excel\\Facades\\Excel::class);\n\n }\n\n if (app()->environment() != 'production') {\n // Service Providers\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n $this->app->register(\\Barryvdh\\Debugbar\\ServiceProvider::class);\n\n // Facades\n if ($loader != null) {\n $loader->alias('Debugbar', \\Barryvdh\\Debugbar\\Facade::class);\n }\n }\n\n if ($this->app->environment('local', 'testing')) {\n $this->app->register(\\Laravel\\Dusk\\DuskServiceProvider::class);\n }\n }", "public function register()\n {\n $this->registerInertia();\n $this->registerLengthAwarePaginator();\n }", "public function register()\n {\n $this->registerFlareFacade();\n $this->registerServiceProviders();\n $this->registerBindings();\n }", "public function register()\n {\n $this->app->bind(\n 'Toyopecas\\Repositories\\TopoRepository',\n 'Toyopecas\\Repositories\\TopoRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\ServicesRepository',\n 'Toyopecas\\Repositories\\ServicesRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\SobreRepository',\n 'Toyopecas\\Repositories\\SobreRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\ProdutosRepository',\n 'Toyopecas\\Repositories\\ProdutosRepositoryEloquent'\n );\n }", "public function register()\r\n {\r\n Passport::ignoreMigrations();\r\n\r\n $this->app->singleton(\r\n CityRepositoryInterface::class,\r\n CityRepository::class\r\n );\r\n\r\n $this->app->singleton(\r\n BarangayRepositoryInterface::class,\r\n BarangayRepository::class\r\n );\r\n }", "public function register()\n {\n $this->registerRepositories();\n\n $this->pushMiddleware();\n }", "public function register()\r\n {\r\n $this->mergeConfigFrom(__DIR__ . '/../config/laravel-base.php', 'laravel-base');\r\n\r\n $this->app->bind(UuidGenerator::class, UuidGeneratorService::class);\r\n\r\n }", "public function register()\n {\n\n $this->app->register(RepositoryServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind(\n 'Uhmane\\Repositories\\ContatosRepository', \n 'Uhmane\\Repositories\\ContatosRepositoryEloquent'\n );\n }", "public function register()\r\n {\r\n $this->app->bind(\r\n ViberServiceInterface::class,\r\n ViberService::class\r\n );\r\n\r\n $this->app->bind(\r\n ApplicantServiceInterface::class,\r\n ApplicantService::class\r\n );\r\n }", "public function register()\n {\n $this->app->register('ProAI\\Datamapper\\Providers\\MetadataServiceProvider');\n\n $this->app->register('ProAI\\Datamapper\\Presenter\\Providers\\MetadataServiceProvider');\n\n $this->registerScanner();\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->app->bind(\n 'Larafolio\\Http\\HttpValidator\\HttpValidator',\n 'Larafolio\\Http\\HttpValidator\\CurlValidator'\n );\n\n $this->app->register(ImageServiceProvider::class);\n }", "public function register()\n {\n // Register all repositories\n foreach ($this->repositories as $repository) {\n $this->app->bind(\"App\\Repository\\Contracts\\I{$repository}\",\n \"App\\Repository\\Repositories\\\\{$repository}\");\n }\n\n // Register all services\n foreach ($this->services as $service) {\n $this->app->bind(\"App\\Service\\Contracts\\I{$service}\", \n \"App\\Service\\Modules\\\\{$service}\");\n }\n }", "public function register()\n {\n $this->registerAdapterFactory();\n $this->registerDigitalOceanFactory();\n $this->registerManager();\n $this->registerBindings();\n }", "public function register()\n {\n // Only Environment local\n if ($this->app->environment() !== 'production') {\n foreach ($this->services as $serviceClass) {\n $this->registerClass($serviceClass);\n }\n }\n\n // Register Aliases\n $this->registerAliases();\n }", "public function register()\n {\n $this->app->bind(\n 'App\\Contracts\\UsersInterface',\n 'App\\Services\\UsersService'\n );\n $this->app->bind(\n 'App\\Contracts\\CallsInterface',\n 'App\\Services\\CallsService'\n );\n $this->app->bind(\n 'App\\Contracts\\ContactsInterface',\n 'App\\Services\\ContactsService'\n );\n $this->app->bind(\n 'App\\Contracts\\EmailsInterface',\n 'App\\Services\\EmailsService'\n );\n $this->app->bind(\n 'App\\Contracts\\PhoneNumbersInterface',\n 'App\\Services\\PhoneNumbersService'\n );\n $this->app->bind(\n 'App\\Contracts\\NumbersInterface',\n 'App\\Services\\NumbersService'\n );\n $this->app->bind(\n 'App\\Contracts\\UserNumbersInterface',\n 'App\\Services\\UserNumbersService'\n );\n }", "public function register()\n {\n //\n if (env('APP_DEBUG', false) && $this->app->isLocal()) {\n $this->app->register(\\Laravel\\Telescope\\TelescopeServiceProvider::class);\n $this->app->register(TelescopeServiceProvider::class);\n }\n }", "public function register()\n {\n $this->registerBrowser();\n\n $this->registerViewFinder();\n }", "public function register()\n {\n $this->registerFriendsLog();\n $this->registerNotifications();\n $this->registerAPI();\n $this->registerMailChimpIntegration();\n }", "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/awesio-auth.php', 'awesio-auth');\n\n $this->app->singleton(AuthContract::class, Auth::class);\n\n $this->registerRepositories();\n\n $this->registerServices();\n\n $this->registerHelpers();\n }", "public function register()\n {\n $this->registerRepository();\n $this->registerMigrator();\n $this->registerArtisanCommands();\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/services.php', 'services'\n );\n }", "public function register()\n {\n $this->registerRateLimiting();\n\n $this->registerHttpValidation();\n\n $this->registerHttpParsers();\n\n $this->registerResponseFactory();\n\n $this->registerMiddleware();\n }", "public function register()\n {\n $this->registerConfig();\n $this->registerView();\n $this->registerMessage();\n $this->registerMenu();\n $this->registerOutput();\n $this->registerCommands();\n require __DIR__ . '/Service/ServiceProvider.php';\n require __DIR__ . '/Service/RegisterRepoInterface.php';\n require __DIR__ . '/Service/ErrorHandling.php';\n $this->registerExportDompdf();\n $this->registerExtjs();\n }", "public function register()\n {\n $this->registerRepository();\n $this->registerParser();\n }", "public function register()\n {\n $this->registerOtherProviders()->registerAliases();\n $this->loadViewsFrom(__DIR__.'/../../resources/views', 'jarvisPlatform');\n $this->app->bind('jarvis.auth.provider', AppAuthenticationProvider::class);\n $this->loadRoutes();\n }", "public function register()\n {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n\n $loader->alias('Laratrust', 'Laratrust\\LaratrustFacade');\n $loader->alias('Form', 'Collective\\Html\\FormFacade');\n $loader->alias('Html', 'Collective\\Html\\HtmlFacade');\n $loader->alias('Markdown', 'BrianFaust\\Parsedown\\Facades\\Parsedown');\n\n $this->app->register('Baum\\Providers\\BaumServiceProvider');\n $this->app->register('BrianFaust\\Parsedown\\ServiceProvider');\n $this->app->register('Collective\\Html\\HtmlServiceProvider');\n $this->app->register('Laravel\\Scout\\ScoutServiceProvider');\n $this->app->register('Laratrust\\LaratrustServiceProvider');\n\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\AuthServiceProvider');\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\EventServiceProvider');\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\ViewServiceProvider');\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->registerGuard();\n $this->registerBladeDirectives();\n }", "public function register()\n {\n $this->registerConfig();\n\n $this->app->register(Providers\\ManagerServiceProvider::class);\n $this->app->register(Providers\\ValidationServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind(ReviewService::class, function ($app) {\n return new ReviewService();\n });\n }", "public function register()\n {\n $this->app->bind(\n Services\\UserService::class,\n Services\\Implementations\\UserServiceImplementation::class\n );\n $this->app->bind(\n Services\\FamilyCardService::class,\n Services\\Implementations\\FamilyCardServiceImplementation::class\n );\n }", "public function register()\n {\n // register its dependencies\n $this->app->register(\\Cviebrock\\EloquentSluggable\\ServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind('gameService', 'App\\Service\\GameService');\n }", "public function register()\n {\n $this->app->bind(VehicleRepository::class, GuzzleVehicleRepository::class);\n }", "public function register()\n {\n $this->app->bindShared(ElasticsearchNedvizhimostsObserver::class, function($app){\n return new ElasticsearchNedvizhimostsObserver(new Client());\n });\n\n // $this->app->bindShared(ElasticsearchNedvizhimostsObserver::class, function()\n // {\n // return new ElasticsearchNedvizhimostsObserver(new Client());\n // });\n }", "public function register()\n {\n // Register the app\n $this->registerApp();\n\n // Register Commands\n $this->registerCommands();\n }", "public function register()\n {\n $this->registerGeography();\n\n $this->registerCommands();\n\n $this->mergeConfig();\n\n $this->countriesCache();\n }", "public function register()\n {\n $this->app->bind(CertificationService::class, function($app){\n return new CertificationService();\n });\n }", "public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'App\\Services\\Registrar'\n\t\t);\n \n $this->app->bind(\"App\\\\Services\\\\ILoginService\",\"App\\\\Services\\\\LoginService\");\n \n $this->app->bind(\"App\\\\Repositories\\\\IItemRepository\",\"App\\\\Repositories\\\\ItemRepository\");\n $this->app->bind(\"App\\\\Repositories\\\\IOutletRepository\",\"App\\\\Repositories\\\\OutletRepository\");\n $this->app->bind(\"App\\\\Repositories\\\\IInventoryRepository\",\"App\\\\Repositories\\\\InventoryRepository\");\n\t}", "public function register()\n {\n $this->registerRollbar();\n }", "public function register()\n {\n $this->app->bind('activity', function () {\n return new ActivityService(\n $this->app->make(Activity::class),\n $this->app->make(PermissionService::class)\n );\n });\n\n $this->app->bind('views', function () {\n return new ViewService(\n $this->app->make(View::class),\n $this->app->make(PermissionService::class)\n );\n });\n\n $this->app->bind('setting', function () {\n return new SettingService(\n $this->app->make(Setting::class),\n $this->app->make(Repository::class)\n );\n });\n\n $this->app->bind('images', function () {\n return new ImageService(\n $this->app->make(Image::class),\n $this->app->make(ImageManager::class),\n $this->app->make(Factory::class),\n $this->app->make(Repository::class)\n );\n });\n }", "public function register()\n {\n App::bind('CreateTagService', function($app) {\n return new CreateTagService;\n });\n\n App::bind('UpdateTagService', function($app) {\n return new UpdateTagService;\n });\n }", "public function register()\n {\n $this->registerDomainLocalization();\n $this->registerDomainLocaleFilter();\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(MailConfigServiceProvider::class);\n }", "public function register()\n {\n $this->registerUserProvider();\n $this->registerGroupProvider();\n $this->registerNeo();\n\n $this->registerCommands();\n\n $this->app->booting(function()\n {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n $loader->alias('Neo', 'Wetcat\\Neo\\Facades\\Neo');\n });\n }", "public function register()\n {\n //\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\CompanyInterface', \n 'App\\Repositories\\CompanyRepo'\n );\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\UtilityInterface', \n 'App\\Repositories\\UtilityRepo'\n );\n }", "public function register()\n {\n $this->registerPayment();\n\n $this->app->alias('image', 'App\\Framework\\Image\\ImageService');\n }", "public function register()\n {\n $this->app->bind(AttributeServiceInterface::class,AttributeService::class);\n $this->app->bind(ProductServiceIntarface::class,ProductService::class);\n\n\n }", "public function register()\n {\n App::bind('App\\Repositories\\UserRepositoryInterface','App\\Repositories\\UserRepository');\n App::bind('App\\Repositories\\AnimalRepositoryInterface','App\\Repositories\\AnimalRepository');\n App::bind('App\\Repositories\\DonationTypeRepositoryInterface','App\\Repositories\\DonationTypeRepository');\n App::bind('App\\Repositories\\NewsAniRepositoryInterface','App\\Repositories\\NewsAniRepository');\n App::bind('App\\Repositories\\DonationRepositoryInterface','App\\Repositories\\DonationRepository');\n App::bind('App\\Repositories\\ProductRepositoryInterface','App\\Repositories\\ProductRepository');\n App::bind('App\\Repositories\\CategoryRepositoryInterface','App\\Repositories\\CategoryRepository');\n App::bind('App\\Repositories\\TransferMoneyRepositoryInterface','App\\Repositories\\TransferMoneyRepository');\n App::bind('App\\Repositories\\ShippingRepositoryInterface','App\\Repositories\\ShippingRepository');\n App::bind('App\\Repositories\\ReserveProductRepositoryInterface','App\\Repositories\\ReserveProductRepository');\n App::bind('App\\Repositories\\Product_reserveRepositoryInterface','App\\Repositories\\Product_reserveRepository');\n App::bind('App\\Repositories\\Ordering_productRepositoryInterface','App\\Repositories\\Ordering_productRepository');\n App::bind('App\\Repositories\\OrderingRepositoryInterface','App\\Repositories\\OrderingRepository');\n App::bind('App\\Repositories\\UserUpdateSlipRepositoryInterface','App\\Repositories\\UserUpdateSlipRepository');\n }", "public function register()\n {\n if ($this->app->runningInConsole()) {\n $this->registerPublishing();\n }\n }", "public function register()\n {\n $this->app->bind(HttpClient::class, function ($app) {\n return new HttpClient();\n });\n\n $this->app->bind(SeasonService::class, function ($app) {\n return new SeasonService($app->make(HttpClient::class));\n });\n\n $this->app->bind(MatchListingController::class, function ($app) {\n return new MatchListingController($app->make(SeasonService::class));\n });\n\n }", "public function register()\n {\n $this->setupConfig();\n\n $this->bindServices();\n }", "public function register()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Console\\MakeEndpointCommand::class,\n Console\\MakeControllerCommand::class,\n Console\\MakeRepositoryCommand::class,\n Console\\MakeTransformerCommand::class,\n Console\\MakeModelCommand::class,\n ]);\n }\n\n $this->registerFractal();\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(AuthServiceProvider::class);\n }", "public function register()\n {\n\n $config = $this->app['config']['cors'];\n\n $this->app->bind('Yocome\\Cors\\CorsService', function() use ($config){\n return new CorsService($config);\n });\n\n }", "public function register()\n {\n // Bind facade\n\n $this->registerRepositoryBibdings();\n $this->registerFacades();\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(\\Laravel\\Socialite\\SocialiteServiceProvider::class);\n }", "public function register()\n {\n\n\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\UserRepository',\n 'Onlinecorrection\\Repositories\\UserRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\ClientRepository',\n 'Onlinecorrection\\Repositories\\ClientRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\ProjectRepository',\n 'Onlinecorrection\\Repositories\\ProjectRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\DocumentRepository',\n 'Onlinecorrection\\Repositories\\DocumentRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\OrderRepository',\n 'Onlinecorrection\\Repositories\\OrderRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\OrderItemRepository',\n 'Onlinecorrection\\Repositories\\OrderItemRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\DocumentImageRepository',\n 'Onlinecorrection\\Repositories\\DocumentImageRepositoryEloquent'\n );\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\PackageRepository',\n 'Onlinecorrection\\Repositories\\PackageRepositoryEloquent'\n );\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\StatusRepository',\n 'Onlinecorrection\\Repositories\\StatusRepositoryEloquent'\n );\n\n }", "public function register()\n {\n $this->registerConfig();\n\n $this->registerDataStore();\n\n $this->registerStorageFactory();\n\n $this->registerStorageManager();\n\n $this->registerSimplePhoto();\n }", "public function register()\n {\n // Default configuration file\n $this->mergeConfigFrom(\n __DIR__.'/Config/auzo_tools.php', 'auzoTools'\n );\n\n $this->registerModelBindings();\n $this->registerFacadesAliases();\n }", "public function register()\n {\n $this->app->bind(\\Cookiesoft\\Repositories\\CategoryRepository::class, \\Cookiesoft\\Repositories\\CategoryRepositoryEloquent::class);\n $this->app->bind(\\Cookiesoft\\Repositories\\BillpayRepository::class, \\Cookiesoft\\Repositories\\BillpayRepositoryEloquent::class);\n $this->app->bind(\\Cookiesoft\\Repositories\\UserRepository::class, \\Cookiesoft\\Repositories\\UserRepositoryEloquent::class);\n //:end-bindings:\n }", "public function register()\n {\n $this->app->singleton(ThirdPartyAuthService::class, function ($app) {\n return new ThirdPartyAuthService(\n config('settings.authentication_services'),\n $app['Laravel\\Socialite\\Contracts\\Factory'],\n $app['Illuminate\\Contracts\\Auth\\Factory']\n );\n });\n\n $this->app->singleton(ImageValidator::class, function ($app) {\n return new ImageValidator(\n config('settings.image.max_filesize'),\n config('settings.image.mime_types'),\n $app['Intervention\\Image\\ImageManager']\n );\n });\n\n $this->app->singleton(ImageService::class, function ($app) {\n return new ImageService(\n config('settings.image.max_width'),\n config('settings.image.max_height'),\n config('settings.image.folder')\n );\n });\n\n $this->app->singleton(RandomWordService::class, function ($app) {\n return new RandomWordService(\n $app['App\\Repositories\\WordRepository'],\n $app['Illuminate\\Session\\SessionManager'],\n config('settings.number_of_words_to_remember')\n );\n });\n\n $this->app->singleton(WordRepository::class, function ($app) {\n return new WordRepository(config('settings.min_number_of_chars_per_one_mistake_in_search'));\n });\n\n $this->app->singleton(CheckAnswerService::class, function ($app) {\n return new CheckAnswerService(\n $app['Illuminate\\Session\\SessionManager'],\n config('settings.min_number_of_chars_per_one_mistake')\n );\n });\n\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n }", "public function register()\n {\n $this->registerJWT();\n $this->registerJWSProxy();\n $this->registerJWTAlgoFactory();\n $this->registerPayload();\n $this->registerPayloadValidator();\n $this->registerPayloadUtilities();\n\n // use this if your package has a config file\n // config([\n // 'config/JWT.php',\n // ]);\n }", "public function register()\n {\n $this->registerManager();\n $this->registerConnection();\n $this->registerWorker();\n $this->registerListener();\n $this->registerFailedJobServices();\n $this->registerOpisSecurityKey();\n }", "public function register()\n {\n $this->app->register(RouterServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind('App\\Services\\TripService.php', function ($app) {\n return new TripService();\n });\n }", "public function register()\n {\n $this->registerUserComponent();\n $this->registerLocationComponent();\n\n }", "public function register()\n {\n $this->app->bind(\n \\App\\Services\\UserCertificate\\IUserCertificateService::class,\n \\App\\Services\\UserCertificate\\UserCertificateService::class\n );\n }", "public function register()\n {\n $this->app->bind(FacebookMarketingContract::class,FacebookMarketingService::class);\n }", "public function register()\n {\n /**\n * Register additional service\n * providers if they exist.\n */\n foreach ($this->providers as $provider) {\n if (class_exists($provider)) {\n $this->app->register($provider);\n }\n }\n }", "public function register()\n {\n $this->app->singleton('composer', function($app)\n {\n return new Composer($app['files'], $app['path.base']);\n });\n\n $this->app->singleton('forge', function($app)\n {\n return new Forge($app);\n });\n\n // Register the additional service providers.\n $this->app->register('Nova\\Console\\ScheduleServiceProvider');\n $this->app->register('Nova\\Queue\\ConsoleServiceProvider');\n }", "public function register()\n {\n\n\n\n $this->mergeConfigFrom(__DIR__ . '/../config/counter.php', 'counter');\n\n $this->app->register(RouteServiceProvider::class);\n\n\n }", "public function register()\r\n {\r\n $this->mergeConfigFrom(__DIR__.'/../config/colissimo.php', 'colissimo');\r\n $this->mergeConfigFrom(__DIR__.'/../config/rules.php', 'colissimo.rules');\r\n $this->mergeConfigFrom(__DIR__.'/../config/prices.php', 'colissimo.prices');\r\n $this->mergeConfigFrom(__DIR__.'/../config/zones.php', 'colissimo.zones');\r\n $this->mergeConfigFrom(__DIR__.'/../config/insurances.php', 'colissimo.insurances');\r\n $this->mergeConfigFrom(__DIR__.'/../config/supplements.php', 'colissimo.supplements');\r\n // Register the service the package provides.\r\n $this->app->singleton('colissimo', function ($app) {\r\n return new Colissimo;\r\n });\r\n }", "public function register(){\n $this->registerDependencies();\n $this->registerAlias();\n $this->registerServiceCommands();\n }", "public function register()\n {\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyService::class,\n \\App\\Services\\Survey\\SurveyService::class\n );\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyQuestionService::class,\n \\App\\Services\\Survey\\SurveyQuestionService::class\n );\n\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyAttemptService::class,\n \\App\\Services\\Survey\\SurveyAttemptService::class\n );\n\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyAttemptDataService::class,\n \\App\\Services\\Survey\\SurveyAttemptDataService::class\n );\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__ . '/../config/atlas.php', 'atlas'\n );\n \n $this->app->singleton(CoreContract::class, Core::class);\n \n $this->registerFacades([\n 'Atlas' => 'Atlas\\Facades\\Atlas',\n ]);\n }", "public function register()\n {\n $this->app->bind(TelescopeRouteServiceContract::class, TelescopeRouteService::class);\n }", "public function register()\n {\n $this->registerRepositoryBindings();\n\n $this->registerInterfaceBindings();\n\n $this->registerAuthorizationServer();\n\n $this->registerResourceServer();\n\n $this->registerFilterBindings();\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/faithgen-events.php', 'faithgen-events');\n\n $this->app->singleton(EventsService::class);\n $this->app->singleton(GuestService::class);\n }", "public function register()\n {\n $this->registerAliases();\n $this->registerFormBuilder();\n\n // Register package commands\n $this->commands([\n 'CoreDbCommand',\n 'CoreSetupCommand',\n 'CoreSeedCommand',\n 'EventEndCommand',\n 'ArchiveMaxAttempts',\n 'CronCommand',\n 'ExpireInstructors',\n 'SetTestLock',\n 'StudentArchiveTraining',\n 'TestBuildCommand',\n 'TestPublishCommand',\n ]);\n\n // Merge package config with one in outer app \n // the app-level config will override the base package config\n $this->mergeConfigFrom(\n __DIR__.'/../config/core.php', 'core'\n );\n\n // Bind our 'Flash' class\n $this->app->bindShared('flash', function () {\n return $this->app->make('Hdmaster\\Core\\Notifications\\FlashNotifier');\n });\n\n // Register package dependencies\n $this->app->register('Collective\\Html\\HtmlServiceProvider');\n $this->app->register('Bootstrapper\\BootstrapperL5ServiceProvider');\n $this->app->register('Codesleeve\\LaravelStapler\\Providers\\L5ServiceProvider');\n $this->app->register('PragmaRX\\ZipCode\\Vendor\\Laravel\\ServiceProvider');\n $this->app->register('Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider');\n\n $this->app->register('Zizaco\\Confide\\ServiceProvider');\n $this->app->register('Zizaco\\Entrust\\EntrustServiceProvider');\n }" ]
[ "0.7879658", "0.7600202", "0.74930716", "0.73852855", "0.736794", "0.7306089", "0.7291359", "0.72896826", "0.72802424", "0.7268026", "0.7267702", "0.72658145", "0.7249053", "0.72171587", "0.7208486", "0.7198799", "0.7196415", "0.719478", "0.7176513", "0.7176227", "0.7164647", "0.71484524", "0.71337837", "0.7129424", "0.71231985", "0.7120174", "0.7103653", "0.71020955", "0.70977163", "0.7094701", "0.7092148", "0.70914364", "0.7088618", "0.7087278", "0.70827085", "0.70756096", "0.7075115", "0.70741326", "0.7071857", "0.707093", "0.7070619", "0.7067406", "0.7066438", "0.7061766", "0.70562875", "0.7051525", "0.7049684", "0.70467263", "0.7043264", "0.7043229", "0.70429426", "0.7042174", "0.7038729", "0.70384216", "0.70348704", "0.7034105", "0.70324445", "0.70282733", "0.7025024", "0.702349", "0.7023382", "0.702262", "0.7022583", "0.7022161", "0.702139", "0.7021084", "0.7020801", "0.7019928", "0.70180106", "0.7017351", "0.7011482", "0.7008627", "0.7007786", "0.70065045", "0.7006424", "0.70060986", "0.69992065", "0.699874", "0.69980377", "0.69980335", "0.6997871", "0.6996457", "0.69961494", "0.6994749", "0.6991596", "0.699025", "0.6988414", "0.6987274", "0.69865865", "0.69862866", "0.69848233", "0.6978736", "0.69779474", "0.6977697", "0.6976002", "0.69734764", "0.6972392", "0.69721776", "0.6970663", "0.6968296", "0.696758" ]
0.0
-1
membuat akun klien baru
public function actionCreate(){ $clientModel = Client::model(); $this->render('/client/register', array('clientModel'=>$clientModel)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function masodik()\n {\n }", "public function kosongkanDataBarang() {\n $this->daftar_barang = [];\n $this->editData();\n }", "public function boleta()\n\t{\n\t\t//\n\t}", "public function AggiornaPrezzi(){\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 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 set_pengiriman($id){ // untuk membuat database langkah pengiriman\n\t\t$cek = $this->M_biodata->get_biodata($id)->result();\n\t\t$this->load->model('M_transaksi');\n\t\tif (count($cek)>0){\n\t\t\tforeach ($cek as $c){\n\t\t\t\t\n\t\t\t};\n\t\t\t$data = array(\n\t\t\t'nama' => $c->namaAlumni,\n\t\t\t'alamat' => $c->alamat,\n\t\t\t'noHp' => $c->noHp,\n\t\t\t'id_pemesan' => $c->id_alumni\n\t\t\t);\t\n\t\t\t$this->M_transaksi->set_pengiriman($data,'pengiriman');\n\t\t$this->set_pembayaran($id);\n\t\t}\n\t}", "function limpiar_memoria($no_borrar=null)\r\n\t{\r\n\t\t$this->_log->debug( $this->get_txt() . \"[callback][ limpiar_memoria ]\", 'toba');\r\n\t\t$this->eliminar_estado_sesion($no_borrar);\r\n\t\t$this->ini();\r\n\t}", "public function tampilDataGalang(){\n\t\t\n\t}", "function carrinho(){\n\t\t\t$this->items = array();\n\t\t}", "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 }", "abstract public function hidupkan();", "function cl_bensetiquetaimpressa() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"bensetiquetaimpressa\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function setAgregarUnPais(){\n\t\t$this->comienza_con++;\n\t}", "function evt__limpieza_memoria($no_borrar=null)\r\n\t{\r\n\t\t$this->_log->obsoleto(__CLASS__, __METHOD__, \"1.4.0\", \"Usar limpiar_memoria\");\r\n\t\t$this->limpiar_memoria($no_borrar);\r\n\t}", "private function muatObjekFileMasukan()\n {\necho \"<br/><br/>**********MEMUAT UNIT STRING SESUAI UNIT STRING PILIHAN*********<br/><br/>\";\n for($i=0; $i < count($this->array_nama_file_masukan); $i++)\n {\n $objek = new Unit($this->array_nama_file_masukan[$i], $this->folderMasukan,$this->penanda_unit_string,$this->penanda_filter_token_entity);\n array_push($this->array_objek_unit, $objek);\n }\n }", "function ver_buscar_mapa($fid_string=\" \",$presenta=0,$idmapa=0,$intensidad){\n \n $plantilla = new DmpTemplate(\"../../../plantillas/stakeholder/mapa/ver_mapa.html\");\n \n //echo \"intensidad : $intensidad\";\n \n if($intensidad>0){\n $plantilla->iniciaBloque(\"intensidad\");\n }\n \n $imapa = new imapa();\n \n $result1 = $imapa->get_mapa();\n \n $nombres = array();\n \n $count=0;\n \n $modo=0;\n \n $color=array(\"#B19CD9\",\"#FF6961\",\"#77DD77\",\"#CFCFC4\",\"#FDFD96\");\n \n $stroke=array(\"#966FD6\",\"#C23B22\",\"#03C03C\",\"#836953\",\"#FFB347\");\n \n while($mapa= mysql_fetch_array($result1)){\n $count++;\n \n $plantilla->iniciaBloque(\"mapa\");\n $plantilla->reemplazaEnBloque(\"idmapa\", $mapa[idgis_mapa],\"mapa\");\n $plantilla->reemplazaEnBloque(\"nombre\", $mapa[nombre],\"mapa\");\n \n if( $mapa[idgis_mapa]==$idmapa || ( $mapa[predeterminado]>0 && $idmapa==0 ) ){\n \n $plantilla->reemplazaEnBloque(\"selected\", \"selected\",\"mapa\");\n \n $plantilla->reemplaza(\"frontera\", $mapa[frontera]);\n $plantilla->reemplaza(\"enfoque\", $mapa[enfoque]);\n $plantilla->reemplaza(\"resolucion\", $mapa[resolucion]);\n $plantilla->reemplaza(\"proyeccion\", $mapa[proyeccion]);\n $plantilla->reemplaza(\"unidad\", $mapa[unidad]);\n\n $i=0;\n $nombre=\"\";\n $result2 = $imapa->get_capa_mapa($mapa[idgis_mapa]);\n while($capa= mysql_fetch_array($result2)){\n $nombre=$capa[nombre];\n $nombres[$nombre]=$nombre;\n if($modo>0){\n $plantilla->iniciaBloque(\"capa\");\n $plantilla->reemplazaEnBloque(\"i\", $i, \"capa\");\n\n $plantilla->reemplazaEnBloque(\"nombre\", $nombre, \"capa\");\n\n\n $plantilla->reemplazaEnBloque(\"proyeccion\", $capa[proyeccion], \"capa\");\n if($capa[base]>0){\n $plantilla->reemplazaEnBloque(\"base\", \"true\", \"capa\");\n }else{\n \n $plantilla->reemplazaEnBloque(\"base\", \"false\", \"capa\");\n }\n }else{\n $plantilla->iniciaBloque(\"gml\"); \n $plantilla->reemplazaEnBloque(\"i\", $i, \"gml\");\n $plantilla->reemplazaEnBloque(\"nombre\", $nombre, \"gml\");\n $plantilla->reemplazaEnBloque(\"color\", $color[($i%5)], \"gml\");\n $plantilla->reemplazaEnBloque(\"stroke\", $stroke[($i%5)], \"gml\");\n if($capa[base]>0){\n $plantilla->reemplazaEnBloque(\"base\", \"true\", \"gml\");\n }else{ \n $plantilla->reemplazaEnBloque(\"base\", \"false\", \"gml\");\n }\n } \n $i++;\n }\n $capas=\" \";\n\n foreach ($nombres as $nombre){\n $capas .= $nombre.\",\";\n }\n\n\n $capas = substr($capas, 0, -1);\n\n\n $plantilla->reemplaza(\"i\", $i);\n $plantilla->reemplaza(\"nombre\", $nombre);\n $plantilla->reemplaza(\"capas\", $capas);\n $plantilla->reemplaza(\"fid_string\", $fid_string);\n \n }\n \n \n }\n \n if($count==0){\n $plantilla = new DmpTemplate(\"../../../plantillas/stakeholder/mapa/no_mapa.html\");\n }\n \n if($presenta>0){\n $plantilla->presentaPlantilla();\n }else{\n return $plantilla->getPlantillaCadena();\n }\n \n}", "function ler($nome) {\n $x = 1;\n\t while($x < $this->bd[0][0] && !$this->str_igual($nome, $this->bd[$x][2])) {$x++;}\n if($x >= $this->bd[0][0]) {return 0;}\n //comecando a setar tudo\n $this->id = $this->bd[$x][0];\n $this->maximo = $this->bd[$x][1];\n $this->nome = $this->bd[$x][2];\n $this->categoria = $this->bd[$x][3];\n $this->tipo = $this->bd[$x][4];\n $this->atributo = $this->bd[$x][5];\n $this->specie = $this->bd[$x][6];\n $this->lv = $this->bd[$x][7];\n $this->atk = $this->bd[$x][8];\n $this->def = $this->bd[$x][9];\n $this->preco = $this->bd[$x][10];\n $this->descricao = $this->bd[$x][11];\n $this->img = '../imgs/cards/'.$this->id.'.png';\nreturn 1;\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 manga(){\t\n\t\t\t$LimitRowPegination = 4;\n\t\t\t$API_LastUpdateManga = SiteMap::LastUpdateManga(18,0,$LimitRowPegination);\n\t\t\t$PTR_API['API_LastUpdateManga'] = $API_LastUpdateManga;\n\t\t\t$this->load->view('seo/sitemap_manga',$PTR_API);\n\t\t}", "function FicheMemo()\n{\n\t$this->type_moi = \"fiche_memo\";\n}", "function tambah($bk)\n\t{\n\t\t$connect = koneksi();\n\t\t$judul = htmlspecialchars($bk['judul']);\n\t\t$penulis = htmlspecialchars($bk['penulis']);\n\t\t$halaman = htmlspecialchars($bk['halaman']);\n\t\t$terbit = htmlspecialchars($bk['terbit']);\n\n\t\t//upload gambar\n\t$cover = upload();\n\tif (!$cover) {\n\t\treturn false;\n\t}\n\n\t\n\t\t$query = \"INSERT INTO buku\n\t\tVALUES \n\t\t('', '$cover', '$judul', '$penulis', $halaman, $terbit)\";\n\n\t\tmysqli_query($connect, $query);\n\n\t\treturn mysqli_affected_rows($connect);\n\n\t}", "function cariDataBarang_md41($nmbarang=\"\") {\n\t\t$grid = new GridConnector($this->db->conn_id);\n $grid->render_sql(\"select id,idgroup_barang,concat(nmbarang, ' ',nmwarna) as nmbarang,idsatuan from v_master_barang_detail where is_active = '1' and sts_jual = '1' and nmbarang like '%\".$nmbarang.\"%' group by idgroup_barang\",\"id\",\"idgroup_barang,nmbarang,idsatuan\");\n\t}", "function delete() {\t\t$nop = str_repeat(\" \", $this -> size);\n\t\t//10 caratteri per diecimila\n\t\tshmop_write($this -> id, $nop, 0);\n\n\t}", "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 }", "public function nadar()\n {\n }", "function absender_bestimmen($absender,$db){\n$query1=\"select * from user\";\n\t$antwort1=$db->query($query1);\n\t$antwort1=array_bildung($antwort1);\n\t\n\t$i=0;\n\tforeach($absender[Absender] as $name => $inhalt){\n\tif($inhalt==0){\n\t\t$absender[Absender][$i]=\"Information an Alle !\";\n\t}\n\t\n\t\t$k=0;\n\t\tforeach($antwort1[id] as $name1 => $inhalt1){\n\t\t\tif($inhalt==$inhalt1){\n\t\t\t\t$absender[Absender][$i]=$antwort1[Name][$k].\"&nbsp;&nbsp;\".$antwort1[Vorname][$k].\"&nbsp;&nbsp;- \".$antwort1[Bemerkung][$k].\" -\";\n\t\t\t}\n\t\t$k++;\n\t\t}\n\t$i++;\n\t}\n\treturn $absender;\n}", "final function velcom(){\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 }", "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_tabrecregrasjm() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tabrecregrasjm\"); \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 bernafas()\n \t{\n \t\techo 'Bernafas menggunakan hidung, '.PHP_EOL;\n \t}", "function cl_far_listacontroladomed() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"far_listacontroladomed\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function perpraktikum($mhsw, $khs, $bipot, $ada, $pmbmhswid=1) {\r\n // Jumlah Matakuliah praktikum/responsi yg diambil mhsw. \r\n $jml = GetaField('krstemp k left outer join jadwal j on k.JadwalID=j.JadwalID', \r\n \"k.TahunID='$khs[TahunID]' and k.MhswID='$mhsw[MhswID]' and j.JenisJadwalID\", \r\n 'R', \"count(*)\") *2;\r\n if (($jml == 0) and (empty($mhsw['MhswID']))) $jml = 2;\r\n $totharga = $bipot['Jumlah'];\r\n if (empty($ada) && ($totharga > 0)) {\r\n $s0 = \"insert into bipotmhsw(PMBID, MhswID, TahunID, BIPOT2ID, BIPOTNamaID,\r\n PMBMhswID, TrxID, Jumlah, Besar, Catatan,\r\n LoginBuat, TanggalBuat)\r\n values('$mhsw[PMBID]', '$mhsw[MhswID]', '$khs[TahunID]', '$bipot[BIPOT2ID]', '$bipot[BIPOTNamaID]',\r\n '$pmbmhswid', '$bipot[TrxID]', $jml, '$totharga', '$mk',\r\n '$_SESSION[_Login]', now())\";\r\n $r0 = _query($s0);\r\n }\r\n else {\r\n $s0 = \"update bipotmhsw set Jumlah=$jml, Besar='$totharga',\r\n PMBMhswID='$pmbmhswid',\r\n Catatan='Total SKS: $totsks',\r\n LoginEdit='$_SESSION[_Login]', TanggalEdit=now()\r\n where BIPOTMhswID='$ada[BIPOTMhswID]' \";\r\n $r0 = _query($s0);\r\n }\r\n}", "public function contrato()\r\n\t{\r\n\t}", "public function index() {\n $_SESSION['kviz_end'] = 0;\n $this->prikaz(\"igrac\", []);\n }", "function llenarMatrizPlaneServicios(){\n\t\t\t\n\t\t\tunset($matriz); \n\t\t\tglobal $matriz;\t\n\t\t\t$res = llamarRegistrosMySQLPlaneServicios();\n\t\t\t$posicion=0;\n\t\t\t\t\n\t\t\t\twhile ($fila = mysql_fetch_array($res))\n\t\t\t\t{\t\n\t\t\t\t\t\n\t\t\t\t\t$matriz[\"nombreplan\"][$posicion] = $fila[\"Nombre\"];\n\t\t\t\t\t$matriz[\"autoid\"][$posicion] = $fila[\"AutoId\"];\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$posicion++;\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t}", "public function hapus_toko(){\n\t}", "function hitung()\n\t{\n\t\t$this->model->hitungMhs();\n\t\t//$this->dashboardukmapendaftar(); //controller dikembalikan ke method index setelah selesai mengakses method ini.\n\t}", "private function Zapis_jednu_kolizi() { \r\n $dbh = Projektor2_AppContext::getDB();\r\n\r\n//echo \"<hr><br>* v Zapis_jednu_kolizi:\";\r\n\r\n //vyberu kolizi z uc_kolize_table pokud jiz existuje\r\n $query= \"SELECT * FROM uc_kolize_table WHERE id_ucastnik =\" . $this->id_ucastnik . \" and id_s_typ_kolize_FK=\" . $this->id_s_typ_kolize_FK ;\r\n //echo \"<br>*dotaz v Zapis_jednu_kolizi: \" . $query;\r\n $data = $dbh->prepare($query)->execute();\r\n //var_dump($data);\r\n \r\n if ($data) {\r\n $zaznam_kolize = $data->fetch() ; //vemu prvni (je predpoklad ze je jen jedna)\r\n if ($zaznam_kolize) {\r\n //echo \"<br>kolize je - budu prepisovat\"; //budu prepisovat\r\n $query1 = \"UPDATE uc_kolize_table set \" .\r\n \"revidovano='\" . $this->revidovano . \"', \" .\r\n \"revidovano_pozn='\" . $this->revidovano_pozn . \"', \" .\r\n \"valid=1 \" . \r\n \"WHERE id_uc_kolize_table =\" . $zaznam_kolize['id_uc_kolize_table'];\r\n //echo \"<br>\" . $query1; \r\n $data1 = $dbh->prepare($query1)->execute(); \r\n \r\n }\r\n else {\r\n //echo \"<br>kolize neni - budu vkladat\"; //budu vkladat\r\n $query1 = \"INSERT uc_kolize_table set \" . \r\n \"id_ucastnik= \" . $this->id_ucastnik . \", \" .\r\n \"id_s_typ_kolize_FK=\" . $this->id_s_typ_kolize_FK . \", \" .\r\n \"revidovano='\" . $this->revidovano . \"', \" .\r\n \"revidovano_pozn='\" . $this->revidovano_pozn . \"', \" .\r\n \"valid=1, date_vzniku=now() \" ;\r\n //echo \"<br>\" . $query1; \r\n $data1 = $dbh->prepare($query1)->execute();\r\n \r\n }\r\n } \r\n\r\n//echo \"<hr>\";\r\n}", "function index_put() {\n $id = $this->put('id'); // Memanggil data berdasarkan idnya \n $data = array( // Menerima data dan menyimpannya kedalam array\n 'id' => $this->put('id'),\n 'nama' => $this->put('nama'),\n 'nomor' => $this->put('nomor'));\n $this->db->where('id', $id);\n $update = $this->db->update('telepon', $data); // Menyimpan perubahan data\n if ($update) {\n $this->response($data, 200);\n } else {\n $this->response(array('status' => 'fail', 502));\n }\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 }", "private function najitNavstevu(){\n $this->tpl = \"konec-navstevy\";\n }", "public function uputstvo()\n {\n $this->prikaz(\"uputstvo\", []);\n }", "public function pasaje_abonado();", "function init(&$msg) {\n clearDB();\n $msg.= \"<br>Tabulky vyprazdnené\";\n resetIDs();\n $msg.= \"<br>ID zresetované\";\n insertAll($msg);\n}", "private function metodo_privado() {\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}", "public function Zapis_vsechny_kolize_v_zaveru_formulare ($pole, $idcka_skolizi, $iducast, $formular){\r\n //zapise kolize formulare \r\n self::Zapis_kolize_formulare($pole,$idcka_skolizi, $iducast, $formular);\r\n //-----------------------------------------------------------------------------\r\n \r\n \r\n //a zjisti a zapise kolize ucastnika pro vsechny formulare \r\n $vsechny_kolize_ucastnika_pole = self::Najdi_kolize_vsechny($iducast);\r\n //echo \"<br>**Vsechny kolize_pole v Zapis_vsechny_kolize..... **\";\r\n //var_dump($vsechny_kolize_ucastnika_pole);\r\n \r\n //znevalidneni vsech kolizi pro ucastnika \r\n self::Znevalidni_kolize_ucastnika_vsechny($iducast);\r\n foreach($vsechny_kolize_ucastnika_pole as $jedna_kolize){\r\n if ($jedna_kolize->kolize_nastala) {\r\n $jedna_kolize->Zapis_jednu_kolizi();\r\n } \r\n }\r\n \r\n}", "public function tampil($sql){\n\t\t\t$query = mysql_query($sql);\n\t\t\tif($query){\n\t\t\t\t$this->jmlBaris = mysql_num_rows($query);\t// Menghitung jumlah baris\n\t\t\t\tfor ($i=0; $i<$this->jmlBaris; $i++) {\n\t\t\t\t\t$r = mysql_fetch_array($query);\t\t// Memasukkan data tiap baris kedalam variabel 'r'\n\t\t\t\t\t$kunci = array_keys($r);\t// Memasukkan nama field kedalam variabel 'kunci'\n\t\t\t\t\tfor($x=0; $x<count($kunci); $x++){\n\t\t\t\t\t\tif(!is_int($kunci[$x])){\n\t\t\t\t\t\t\t$this->hasil[$i][$kunci[$x]] = $r[$kunci[$x]];\t// Memasukkan data kedalam variabel 'hasil'\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->pesan = \"Proses Berhasil\";\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\t$this->pesan = \"Proses Gagal\";\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "private function CsomagHozzaadasa()\r\n {\r\n foreach (Lap::Nevkeszlet() as $nev)\r\n {\r\n foreach (Lap::Szinkeszlet() as $szin)\r\n {\r\n $this->lapok[]=new Lap($szin,$nev);\r\n }\r\n }\r\n }", "static function definisiMeni(){\n\t\t $stavke[0]=array('naziv'=>'home','link'=>'/pilot/home');\n\t\t $stavke[1]=array('naziv'=>'o nama','link'=>'/pilot/onama');\n\t\t if(session_id()!='pilot1sesija1'){\n\t\t\tsession_id('pilot1sesija1');\n\t\t\tsession_start();\n\t\t }\n\t\t if(isset($_SESSION['pravo'])){\n\t\t\t if($_SESSION['pravo']==1 || $_SESSION['pravo']==2){ \n\t\t\t\t$stavke[2]=array('naziv'=>'clanci','link'=>'/pilot/clanci'); \n\t\t\t\t$stavke[3]=array('naziv'=>'korisnici','link'=>'/pilot/korisnici'); \n\t\t\t }\n\t\t \n\t\t }\n\t\t return $stavke;\n\t}", "function rekamMedis($nomor_pasien)\n\t{\n\n\t}", "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}", "public function cek_buku( $lemari = 0, $rak = 0, $album = 0, $halaman = 0)\n\t{\n\t\t$row = $this->db->query(\"SELECT tb_simpan_buku.*, tb_buku_tanah.* FROM tb_simpan_buku INNER JOIN tb_buku_tanah ON tb_simpan_buku.id_bencana = tb_buku_tanah.id_bencana WHERE tb_simpan_buku.no_lemari = '{$lemari}' AND tb_simpan_buku.no_rak = '{$rak}' AND tb_simpan_buku.no_album = '{$album}' AND tb_simpan_buku.no_halaman = '{$halaman}'\")->row();\n\t\tif(!$row) :\n\t\t\t$output = array('status' => false, );\n\t\telse :\n\t\t\t$output = array(\n\t\t\t\t'status' => true,\n\t\t\t\t'result' => array(\n\t\t\t\t\t'jenis_hak' => $this->bpn->hak($row->id_hak),\n\t\t\t\t\t'no_hakbuku' => $row->no_hakbuku,\n\t\t\t\t\t'kecamatan' => (!$row->id_kecamatan) ? '-' : $this->bpn->kecamatan($row->id_kecamatan),\n\t\t\t\t\t'desa' => (!$row->id_desa) ? '-' : $this->bpn->desa($row->id_desa),\n\t\t\t\t\t'no208' => $row->no208,\n\t\t\t\t\t'tahun' => $row->tahun,\n\t\t\t\t\t'luas' => $row->luas,\n\t\t\t\t\t'status' => ($row->status_buku=='Y') ? 'Aktif' : 'Tidak Aktif',\n\t\t\t\t\t'pemilik' => $row->pemilik_awal,\n\t\t\t\t\t'catatan' => $row->catatan_buku\n\t\t\t\t)\n\t\t\t);\n\t\tendif;\n\t\t$this->output->set_content_type('application/json')->set_output(json_encode($output, JSON_PRETTY_PRINT));\n\t}", "function guardarReclamo()\n\t\t{\n\t\t}", "public function incluirMembrosnaCelulaDao($matricula,$celula){\r\n \r\n require_once (\"conexao.php\");\r\n \r\n $obj = Connection::getInstance();\r\n $objMembro = new objetoMembro();\r\n $objMembro->setMatricula(0); \r\n $ret=0;\r\n $script =\"INSERT INTO celulamembro (CodCelula,CodMembro)VALUES('$celula','$matricula')\";\r\n $result = mysql_query($script) or die (\"Falha ao adicionar\".mysql_error());\r\n \r\n if ($result)\r\n {\r\n $ret=1;\r\n $busca = mysql_query(\"Select Nome,Matricula from membros where Matricula = $matricula\") or die (\"Nao foi possivel realizar a busca\".mysql_error());\r\n $reg = mysql_fetch_assoc($busca);\r\n $objMembro->setMatricula($reg['Matricula']); $objMembro->setNome($reg['Nome']);\r\n mysql_free_result($busca);\r\n }else{\r\n $ret=2;\r\n }\r\n \r\n $obj->freebanco();\r\n return $objMembro;\r\n }", "public function generujKod(){\n\t\t//\n\t}", "public function stok_barang($id_barang) {\n\t\t $jumlah_barang_masuk=0;\n\t\t $jumlah_barang_keluar=0;\n\t\t $sisa=0;\n\t\t $CI =& get_instance();\n $CI->load->model('M_barang');\n\n\n\t\t$masuk['barang_masuk']= $CI->M_barang->barang_masuk($id_barang);\n\t\t foreach($masuk['barang_masuk'] as $data){\n\t\t\t $jumlah_barang_masuk= $data->barang_masuk;\n\t\t }\n\n\t\t $masuk['barang_keluar']= $CI->M_barang->barang_keluar($id_barang);\n \t\t foreach($masuk['barang_keluar'] as $data){\n \t\t\t $jumlah_barang_keluar= $data->barang_keluar;\n \t\t }\n\t\t return $sisa=$jumlah_barang_masuk - $jumlah_barang_keluar;\n\t\t// echo \"Masuk : $jumlah_barang_masuk <br> keluar : $jumlah_barang_keluar <br> sisa : $sisa\";\n\n\n\t }", "function DanhMuc_Them(&$loi){\t\n\t\n\t\t$thanhcong=true;\n\t\t\n\t\t$quocgia = $_POST[quocgia];settype($quocgia,\"int\");\n\t\t$idMien = $_POST[idMien];settype($idMien,\"int\");\n\t\t$TenDM_KS = $this->processData($_POST[TenDM_KS]);\n\t\t$TenDM_KS_KD = $this->processData($_POST[TenDM_KS_KD]);\n\t\t$Title = $this->processData($_POST[Title]);\n\t\t$MetaD = $this->processData($_POST[MetaD]);\n\t\t$MetaK = $this->processData($_POST[MetaK]);\n\t\t\n\t\t$ThuTu = $this->ThuTuMax('dvt_ks_danhmuc') + 1;\n\t\t\n\t\t$AnHien = $_POST[AnHien];settype($AnHien,\"int\");\n\t\t\n\t\tif($Title==\"\") $Title=$TenDM_KS;\n\t\tif($MetaD==\"\") $MetaD=$TenDM_KS;\n\t\tif($MetaK==\"\") $MetaK=$TenDM_KS;\n\t\tif($TenDM_KS_KD==\"\") $TenDM_KS_KD = $this->changeTitle($TenDM_KS);\n\t\t\n\t\tif($idMien==0 && $quocgia==0)\n\t\t{\n\t\t\t$thanhcong= false;\n\t\t\t$loi[idMien]= \"Chọn miền\";\n\t\t}\n\t\tif($TenDM_KS==\"\")\n\t\t{\n\t\t\t$thanhcong= false;\n\t\t\t$loi[TenDM_KS]= \"Chưa nhập tên danh mục\";\n\t\t}\n\t\n\t\tif($thanhcong==false){\n\t\t\treturn $thanhcong;\n\t\t}else{\n\t\t\t$sql = \"INSERT INTO dvt_ks_danhmuc \n\t\t\t\t\tVALUES(NULL,$quocgia,$idMien,'$TenDM_KS','$TenDM_KS_KD','$Title','$MetaD','$MetaK',$ThuTu,$AnHien)\";\n\t\t\tmysql_query($sql) or die(mysql_error().$sql);\t\t\n\t\t}\n\t\treturn $thanhcong;\n\t}", "public function _construct(){\n\t\t$this->marque = 'Peugeot';\n\t\t$this->couleur = 'blanc';\n\t\t$this->vitesse = 50;\n\t}", "function listadeMembrodaDao($nome){\r\n require_once (\"conexao.php\");\r\n require_once (\"modelo/objetoMembro.php\");\r\n \r\n $objDao = Connection::getInstance();\r\n \r\n $resultado = mysql_query(\"Select * from membros where Nome LIKE '%$nome%'\") or die (\"Nao foi possivel realizar a busca\".mysql_error());\r\n $listaMembro = array();\r\n \r\n $i=0;\r\n $achou=FALSE;\r\n \r\n if($resultado != \"\"){\r\n \r\n while ($registro = mysql_fetch_assoc($resultado)){\r\n \r\n\t $membro = new objetoMembro();\r\n \r\n $membro->setMatricula($registro['Matricula']);\r\n $membro->setNome($registro['Nome']);\r\n $membro->setSexo($registro['Sexo']); \r\n $membro->setData($registro['DataNascimento1']); \r\n $membro->setRg($registro['Rg']);\r\n $membro->setCpf($registro['Cpf']); \r\n $membro->setEstadocivil($registro['EstadoCivil']);\r\n $membro->setNatural($registro['Naturalidade']); \r\n $membro->setProfissao($registro['Profissao']); \r\n $membro->setEscola($registro['Escolaridade']); \r\n $membro->setPai($registro['Pai']); \r\n $membro->setMae($registro['Mae']); \r\n $membro->setNecessidade($registro['NecessidadeEspeciais']);\r\n\t $membro->setFone($registro['Fone']); \r\n $membro->setFilho($registro['Filho']); \r\n $membro->setFormacao($registro['FormacaoEclesiatica']);\r\n $membro->setMembrasia($registro['IntegracaoMembrasia']); \r\n $membro->setFuncao($registro['Funcao']); \r\n $membro->setParticipou($registro['JaParticipou']);\r\n\t $membro->setTrabalhando($registro['Trabalhando']); \r\n $membro->setViajando($registro['EstadoAtual']); \r\n $membro->setCongrega($registro['Congrega']); \r\n $membro->setRua($registro['Rua']); \r\n $membro->setBairro($registro['Bairro']); \r\n $membro->setCasa($registro['Casa']); \r\n $membro->setStatus($registro['Status']);\r\n \r\n\t $listaMembro[$i] = $membro;\r\n \r\n\t $i++;\r\n $achou = true;\r\n\t}\r\n \r\n }\r\n\t\treturn $listaMembro;\r\n if($achou){\r\n mysql_free_result($registro);\r\n }\r\n\t\tmysql_free_result($resultado);\r\n $objDao->freebanco(); \r\n }", "function conf(){\n $this->s__perfil = toba::manejador_sesiones()->get_perfiles_funcionales();\n // print_r($this->s__perfil); \n \n $p = array_search('autoridad_mesa', $this->s__perfil);\n if($p !== false){//Es autoridad de mesa\n //Cargar datos del usuario especifico\n //obtengo el nombre de usuario logueado\n $usr = toba::manejador_sesiones()->get_id_usuario_instancia();\n \n $id_mesa = $this->dep('datos')->tabla('mesa')->get_de_usr($usr);\n if(sizeof($id_mesa)>0){\n $this->s__id_mesa = $id_mesa[0]['id_mesa'];\n $datos['id_mesa'] = $this->s__id_mesa;\n $this->dep('datos')->tabla('mesa')->cargar($datos);\n $this->s__mesa = $this->dep('datos')->tabla('mesa')->get();\n \n if($this->s__mesa['estado'] >= 2){//Ya fue validado por la secretaria\n $this->controlador()->evento('procesar')->ocultar();\n $this->controlador()->evento('enviar')->ocultar();\n }\n }\n else//No se encuentra mesa asociada al usuario logueado\n toba::notificacion()->agregar(\"No se encuentra el usuario ingresado\",\"info\");\n }\n else{\n $this->s__id_mesa = toba::memoria()->get_parametro('c');//el parametro c tiene el id mesa\n \n $this->s__retorno = toba::memoria()->get_parametro('k');//el parametro k tiene la dir de retorno\n $this->s__retorno_estado = toba::memoria()->get_parametro('f');\n \n \n $datos['id_mesa'] = $this->s__id_mesa;\n $this->dep('datos')->tabla('mesa')->cargar($datos);\n $this->s__mesa = $this->dep('datos')->tabla('mesa')->get();\n \t\n $p = array_search('junta_electoral', $this->s__perfil);\n if($p !== false){//Es junta electoral\n $this->controlador()->evento('procesar')->set_etiqueta('Confirmar');\n $this->controlador()->evento('enviar')->ocultar();\n\n if($this->s__mesa['estado'] > 3){//Ya fue validado por la secretaria\n// $this->dep('form_ml_directivo')->set_solo_lectura('votos');\n// $this->dep('form_ml_superior')->set_solo_lectura('votos');\n// $this->dep('form_ml_extra')->set_solo_lectura('votos');\n $this->controlador()->evento('procesar')->ocultar();\n $this->controlador()->evento('enviar')->ocultar();\n }\n }\n else{\n $p = array_search('secretaria', $this->s__perfil);//print_r(isset($p)?'no es false':'es false');\n if($p !== false){//Es secretaria\n $this->controlador()->evento('procesar')->set_etiqueta('Validar');\n $this->controlador()->evento('enviar')->ocultar();\n\n }\n \n }\n }\n \n if(isset($this->s__id_mesa)){//Si el pedido viene de la operacion Confirmar/Cargar// \n $this->s__claustro = $this->s__mesa['id_claustro'];\n $this->s__id_nro_ue = $this->dep('datos')->tabla('sede')->get_unidad($this->s__mesa['id_sede']);\n $this->s__id_sede = $this->s__mesa['id_sede'];\n }\n }", "function suppMembre($id)\n\t{\n\n\t\t$this->db->where('id', $id);\n\t\t$this->db->delete('membres');\n\t}", "function\tbuche() {\n\t\tFDbg::dumpL( 0x00000100, \"AbKorr.php::AbKorrPosten::buche(): begin\") ;\n\t\t$this->_buche( 1) ;\n\t\tFDbg::dumpL( 0x00000100, \"AbKorr.php::AbKorrPosten::buche(): end\") ;\n\t}", "public function nomor_baru() {\n\t\t//variabel\n\t\t$data['datas'] = $this->siswa_model->get_many_by('status','Aktif');\n\t\t//select2 js\n\t\t$template_data['js_plugins'] = [\n\t\t\tbase_url('assets/plugins/select2/select2.js'),\n\t\t\tbase_url('assets/js/sms_select2.js')\n\t\t];\n\t\t$template_data['css_plugins'] = [\n base_url('assets/plugins/select2/select2.css')\n ];\n\t\t$template_data['title'] \t= 'SMS Gateway ';\n\t\t$template_data['subtitle'] \t= 'Kirim SMS';\n $template_data['crumb'] \t= ['SMS Gateway' => 'smsgateway','Nomor Baru' => 'smsgateway/kirimsms/nomor_baru',];\n\t\t//view\n\t\t$this->layout->set_wrapper('nomorbaru_form', $data);\n\t\t$this->layout->auth();\n\t\t$this->layout->render('admin', $template_data);\n\t}", "public function __construct()\n\t\t\t\t{\n\t\t\t\t\t$this->miLista \t=\tarray();\t\t\t\t\t\n\t\t\t\t}", "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 }", "function modf_unimed()\n\t{\n\t \t$sql=\"UPDATE slc_unid_medida SET nomenc_unid_medida= '$this->abr', desc_unid_medida= '$this->des' WHERE id_unid_medida ='$this->cod'\";\n\t\t\n\t\t$result=mysql_query($sql,$this->conexion);\n\t\tif ($result) \n\t\t\t return true;\n\t\telse\n\t\t\t return false;\n\t}", "public function tabel_barangkeluar()\n {\n $data['list_data'] = $this->M_kasir->select('tb_barang_keluar');\n $data['avatar'] = $this->M_kasir->get_data_gambar('tb_upload_gambar_user',$this->session->userdata('name'));\n $this->load->view('kasir/tabel/tabel_barangkeluar',$data);\n }", "function cl_reconhecimentocontabil() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"reconhecimentocontabil\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function TrouveProfilBarreR($maRecherche){\r\n\t\t$conn = mysqli_connect(\"localhost\", \"root\", \"\", \"bddfinale\");\r\n\t\t$requete = \"SELECT Pseudo FROM allinformations WHERE Pseudo='$maRecherche'\";\r\n\t\t$ligne= mysqli_query($conn, $requete);\r\n\t\t$n = mysqli_num_rows($ligne);\t\r\n\t\t$Tab = array();\r\n\t\tif ($n > 0) {\r\n\t\t\twhile ($TabLigne = mysqli_fetch_assoc($ligne)) { \r\n\t\t\t\t$Tab[] = $TabLigne[\"Pseudo\"];\r\n\t\t\t} \r\n\t\t}\r\n\t\treturn($Tab);\t//ne ressort normalement qu'un seul pseudo (car unique dans la bdd)\r\n\t\tmysqli_close($conn);\r\n\t\t}", "private function mauteur() {\n\t\t$id = intval(Utils::getGet('id'));\n\t\tif($id > 0) {\n\t\t\t$this->_ctrlAuteur = new ControleurAuteur();\n\t\t\t$this->_ctrlAuteur->auteurModifie($id);\n\t\t} else {\n\t\t\tthrow new Exception('Id incorrect !!!');\n\t\t\t}\n\t}", "public function isi_t_kuota_matkul_pilihan(){\n\t\t$kode = $this->uri->segment(3);\n\t\t$data['data']= $this->m_aka->isi_t_edit_kuota_matkul_pilihan();\t\t\n\t\t$data['kelas'] = $this->m_aka->kelas();\t\t\n\t\t$data['content'] = 'mata_kuliah/isi_kuota_mata_kuliah_pilihan';\n\t\t$this->load->view('content',$data);\t\t\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 }", "function rekap_lembur(){\n \t$id_bulan=$this->input->post('id_bulan2');\n \t$this->load->view('v_header_presensi');\n \t$this->load->view('v_header_rekap_lembur');\n\n \t$id_absents=$this->m_admin->get_id_absen($id_bulan);//harus ada parameter bulan\n\n\n\n \t//PREPARE FOR INSANITY, 3 TIMES FOREACH, 3 TIMES THE ITERATION, 3 TIMES THE CRAZINESS\n \tforeach($id_absents as $key =>$value){\n \t\t$tanggal_only=$this->m_admin->get_tanggal_absen($value->ID_PEGAWAI,$id_bulan);\n \t\t$counter_jam_lembur=0;\n \t\tforeach($tanggal_only as $key2 =>$value2){\n \t\t\t$jamLembur=$this->m_admin->rekap_lembur($value2->ID_PEGAWAI,$value2->TANGGAL,$id_bulan);\n \t\t// var_dump($jamLembur);\n\n \t\t\tforeach($jamLembur as $key3 =>$value3){\n \t\t\t\t$jam=0;\n \t\t\t\tif(($value3->JAM)<15){\n \t\t\t\t\t$jam=15;\n \t\t\t\t}\n \t\t\t\telse { \n \t\t\t\t\t$jam=$value3->JAM;\n \t\t\t\t}\n \t\t\t\t$counter_jam_lembur=$counter_jam_lembur-15+$jam;\n \t\t\t}\n \t\t\t\n \t\t}\n\n \t\t$data['lembur']=$counter_jam_lembur;\n \t\t$data['absen']=$this->m_admin->rekap_absen($value->ID_PEGAWAI,$id_bulan);\n \t\t$this->load->view('v_rekap_lembur',$data);\n \t}\n \t$this->load->view('v_footer_rekap');\n\n }", "public function prosesedit_mata_kuliah()\n\t{\n\n\t\t$this->m_aka->prosesedit_mata_kuliah();\n\t\tredirect('c_index_aka/data_mata_kuliah');\n\t}", "public function jadikanKetua()\n {\n // Menghapus hak akses sebagai anggota dari pengirim undangan\n $this->hakAksesPengguna()->detach(\n HakAkses::where('nama', HakAkses::ANGGOTA)->first()\n );\n\n // menjadikan pengirim undangan sebagai ketua\n $this->hakAksesPengguna()->attach(\n HakAkses::where('nama', HakAkses::KETUA_TIM)->first(), [\n 'status_request' => 'Approved'\n ]\n );\n }", "public function accueil()\n {\n }", "function loadDataBarang_md41($idgroup_barang=\"\") {\n\t\t$grid = new GridConnector($this->db->conn_id);\n $grid->render_sql(\"select id,idgroup_barang,nmbarang,idsatuan from v_master_barang_detail where is_active = '1' and sts_jual = '1' and idgroup_barang like '%\".$idgroup_barang.\"%' group by idgroup_barang\",\"id\",\"idgroup_barang,nmbarang,idsatuan\");\n\t}", "function HitungUlangBIPOTPMB($PMBID) {\r\n $pmb = GetFields('pmb', \"KodeID='\".KodeID.\"' and PMBID\", $PMBID, '*');\r\n // Hitung Total BIPOT & Pembayaran\r\n $TotalBiaya = GetaField(\"bipotmhsw bm\r\n left outer join bipot2 b2 on bm.BIPOT2ID = b2.BIPOT2ID\",\r\n \"bm.PMBMhswID = 0 and bm.KodeID = '\".KodeID.\"'\r\n and bm.NA = 'N'\r\n and bm.TahunID = '$pmb[PMBPeriodID]' and bm.PMBID\", $PMBID,\r\n \"sum(bm.TrxID * bm.Jumlah * bm.Besar)\")+0;\r\n $TotalBayar = GetaField('bayarmhsw',\r\n \"PMBMhswID = 0 and KodeID = '\".KodeID.\"'\r\n and NA = 'N'\r\n and TahunID = '$pmb[PMBPeriodID]' and PMBID\", $PMBID,\r\n \"sum(Jumlah)\")+0;\r\n // Update data PMB\r\n $s = \"update pmb\r\n set TotalBiaya = $TotalBiaya,\r\n TotalBayar = $TotalBayar\r\n where KodeID = '\".KodeID.\"'\r\n and PMBID = '$PMBID' \r\n limit 1\";\r\n $r = _query($s);\r\n //echo \"<pre>$s</pre>\";\r\n}", "public function cortesia()\n {\n $this->costo = 0;\n }", "protected function drukowanie()\n {\n for($i=0,$c=count($this->tags); $i<$c; $i++){\n $this->szkielet = $this->swap( $this->szkielet , $this->install($i) );\n }\n\n }", "public function add_data_to_tombstone(){\n }", "public function init(){\n $this->documento='760';\n }", "public function __construct() {\n\n\t\t$this->contenuto=array();\n\t\t$this->quantita=array();\n }", "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 afficher()\r\n\t{\r\n\t\t\r\n\t\tif (!empty($this->zones) || !empty($this->blocs) )\r\n\t\t{\r\n\t\t\t//:: On configure les zones obligatoires\r\n\t\t\t\tif (empty($this->zones['Menu_Log'])) $this->zone('Menu_Log', menu('membre'));\r\n\r\n\t\t\t\tif (empty($this->zones['description'])) $this->zone('description', DESCRIPTION);\r\n\t\t\t\tif (empty($this->zones['keywords'])) $this->zone('keywords', KEYWORDS);\r\n\t\t\t\t$this->zone('nom', NOM);\r\n\t\t\t\t\r\n\t\t\t\t// On s'occupe du chemin des fichiers\r\n\t\t\t\t$this->zone( 'baseUrl', URL ); $this->zone( 'design', $this->style );\r\n\t\t\t\t\r\n\t\t\t\tif (is_admin()) $this->zone('jvs-admin', '<script type=\"text/javascript\" src=\"javascript/-admin.js\"></script>');\r\n\t\t\t\t\r\n\t\t\t\t// Nouveaux messages \r\n\t\t\t\r\n\t\t\t\t// Antibug\r\n\t\t\t\tif ($this->zones['img_titre']!=\"<!-- rien -->\") $this->zone('img_titre', '<img src=\"theme/images/content.png\" class=\"title\" alt=\"\" />');\r\n\t\t\t\t\t\t\t\r\n\t\t\t// Ouverture du template //\r\n\t\t\t$fichier=$this->chemin.$this->template.'.tpl.php';\r\n\t\t\t$source = fopen($fichier, 'r');\r\n\t\t\t$this->design = fread($source, filesize ($fichier));\r\n\t\t\tfclose($source);\r\n\t\t\t\r\n\t\t\t// Parsage du template\r\n\t\t\tforeach ($this->zones as $zone => $contenu)\r\n\t\t\t{\r\n\t\t\t\t$this->design = preg_replace ('/{::'.$zone.'::}/', $contenu, $this->design);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Suppresion des {::xxxx::} inutilisées\r\n\t\t\t$this->design = preg_replace ('/{::[-_\\w]+::}/', '', $this->design);\r\n\r\n\t\t\t// On remplace les blocs par leurs contenus //\r\n\t\t\tforeach($this->blocs as $nomBloc => $occurences)\r\n\t\t\t{\r\n\t\t\t\tpreg_match( '#{--'.$nomBloc.'--}(.*){--/'.$nomBloc.'/--}#ms', $this->design, $contenuBloc );\r\n\t\t\t\t$contenuBloc=$contenuBloc[1];\r\n\t\t\t\t\r\n\t\t\t\t$idNewTab=0; unset($nomZones);\r\n\t\t\t\tforeach($occurences as $occurence => $zones)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (!isset($nomZones))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$nomZones=$zones;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$i=0;\r\n\t\t\t\t\t\t$newBloc[$idNewTab]=$contenuBloc;\r\n\t\t\t\t\t\tforeach($zones as $remplacement)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$newBloc[$idNewTab]=preg_replace ('/{:'.$nomZones[$i].':}/', $remplacement, $newBloc[$idNewTab]);\r\n\t\t\t\t\t\t\t$i++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$idNewTab++;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\t$newContenuBloc=implode(\"\", $newBloc);\r\n\t\t\t\t$this->design = preg_replace ('#{--'.$nomBloc.'--}(.*){--/'.$nomBloc.'/--}#ms', $newContenuBloc, $this->design);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Suppression des blocs inutilisés\r\n\t\t\t$this->design = preg_replace ('#{--(.*)--}(.*){--/(.*)/--}#ms', '', $this->design);\r\n\r\n\t\t\t\r\n\t\t\t// Affichage du résultat final\r\n\t\t\t//$this->design = preg_replace ('/('.CHR(9).'|'.CHR(13).'|'.CHR(10).')/', \"\", $this->design);\r\n\r\n\t\t\t// Affichage du résultat final\r\n\t\t\techo $this->design;\r\n\t\t}\r\n\t}", "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 __construct() {\n parent::__construct();\n //$this->load->library('session');\n \n $this->opd = $this->t_simas_model->load_singel('tb_var_global', 'item','opd');\n $this->menu = $this->t_simas_model->load_data('tb_menu', 'aktif', 1, 'idx');\n foreach ($this->menu as $nm_menu) {\n $this->nm_menu[$nm_menu->idx] = $nm_menu->nm_menu;\n }\n $this->unker = $this->t_simas_model->load_data('tb_unker');\n foreach ($this->unker as $ref_unker) {\n if($ref_unker->nm_unker == \"Sekretariat\"){\n $this->ref_unker[$ref_unker->kd_unker] = \"Sekretaris\"; \n }else{\n if($ref_unker->kese !== '99'){\n $this->ref_unker[$ref_unker->kd_unker] = \"Kepala \".$ref_unker->nm_unker;\n }else{\n $this->ref_unker[$ref_unker->kd_unker] = $ref_unker->nm_unker;\n }\n \n }\n }\n\n $this->field = array('2' => ['kd_jns_surat', 'nomor_urut', 'nomor_surat', 'tgl_surat', 'asal','perihal'], '3'=> ['kd_jns_surat','nomor_surat', 'tgl_surat','sifat','tgl_terima','asal','perihal','cp'], '4'=> ['kd_jns_surat','nomor_urut', 'nomor_surat', 'tgl_surat', 'nomor_sisip', 'asal_bidang', 'tujuan', 'perihal','ref_surat_masuk','nomor_nodin', 'tgl_nodin'], '5' => ['tgl_disposisi','ref_surat_masuk','kd_unker_asal','kd_unker_tujuan', 'isi'], '6' => ['nip', 'glr_dpn', 'glr_blk', 'nama', 'tmpt_lhr', 'tgl_lhr', 'kd_jab', 'tmt_jab','kd_pangkat', 'tmt_pangkat','kd_pangkat_cpns', 'tmt_cpns', 'tmt_kgb', 'uname', 'password','pmk_thn', 'pmk_bln','cpns_ms_thn', 'cpns_ms_bln']);\n\n $this->pangkat = array('111' => \"Juru Muda (I/a)\", '112' => \"Juru Muda Tk.I (I/b)\", '113' => \"Juru (I/c)\", '114' => \"Juru Tk.I (I/d)\", '121' => \"Pengatur Muda (II/a)\", '122' => \"Pengatur Muda Tk.I (II/b)\", '123' => \"Pengatur (II/c)\", '124' => \"Pengatur Tk.I (II/d)\", '131' => \"Penata Muda (III/a)\", '132' => \"Penata Muda Tk.I (III/b)\", '133' => \"Penata (III/c)\", '134' => \"Penata Tk.I (III/d)\", '141' => \"Pembina (IV/a)\", '142' => \"Pembina Tk.I (IV/b)\", '143' => \"Pembina Utama Muda (IV/c)\", '144' => \"Pembina Utama (IV/d)\", '145' => \"Pembina Utama Madya (IV/e)\");\n\n $this->thn_global = date('Y');\n\n date_default_timezone_set(\"Asia/Bangkok\"); \n }", "function cl_histmpsdiscfora() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"histmpsdiscfora\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "private static function init(){\n\t\t\tself::$items=array();\n\t\t}", "public function mostra(){\n }", "function abm($id)\n { \n $db['registro'] = $this->model->getRegistros($id);\n $db['id'] = $id;\n $db['cantidad'] = $this->model->getCantidad();\n \n \n $this->armarVista('abm', $db);\n }", "function __construct(){\n $this->valorBruto = 0;\n $this->valorImpostos = 0;\n\n $this->itens = array(); // gera um array pra guardar os itens\n $this->acoesAoGerar = array();\n }", "public function run()\n {\n $buku1 = new ms_buku();\n $buku1-> kode_buku = \"B001\";\n $buku1-> kode_kategori = \"K001\";\n $buku1-> kode_penerbit = \"P004\";\n $buku1-> judul_penerbit = \"Boku No Hero Academia \";\n $buku1-> jumlah_buku = \"4\";\n $buku1-> pengarang_buku = \"Kohei HIrokoshi\";\n $buku1-> tahun_terbit_buku =\"2016\";\n $buku1-> save();\n\n $buku2 = new ms_buku();\n $buku2-> kode_buku = \"B002\";\n $buku2-> kode_kategori = \"K002\";\n $buku2-> kode_penerbit = \"P002\";\n $buku2-> judul_penerbit = \"Dr. Stone \";\n $buku2-> jumlah_buku = \"2\";\n $buku2-> pengarang_buku = \"Kohei HIrokoshi\";\n $buku2-> tahun_terbit_buku =\"2017\";\n $buku2-> save();\n\n\n }", "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 }", "public function tratarDados(){\r\n\t\r\n\t\r\n }", "public function hapus_kuota_matkul_pilihan(){\n\t\t$sql = $this->m_aka->hapus_kuota_matkul_pilihan();\n\t\tif($sql){\n\t\t\tredirect('c_index_aka/Kuota_mata_kuliah_pilihan');\n\t\t}\t\t\n\t}", "public function mata_kuliah_jurusan(){\n\t\t\t$data['content'] = \"mk_jurusan/mata_kuliah_jurusan\";\n\t\t\t$mk = \"t_mk\";\n\t\t\t$data['mk'] = $this->m_aka->get_all($mk);\n\t\t\t$this->load->view(\"content\", $data);\n\t\t}" ]
[ "0.6210718", "0.6168513", "0.60914934", "0.5911811", "0.58447385", "0.5834714", "0.58241546", "0.57659787", "0.5734265", "0.5713236", "0.5706717", "0.5706134", "0.5657543", "0.5651261", "0.5627302", "0.55415195", "0.5519746", "0.5502828", "0.54646456", "0.54607487", "0.54116327", "0.5399202", "0.53734916", "0.5361414", "0.53599036", "0.53471154", "0.53437316", "0.53397393", "0.5321428", "0.53212655", "0.53200626", "0.5309632", "0.5307835", "0.53063047", "0.53055143", "0.53015643", "0.5299309", "0.52954394", "0.5293469", "0.5292387", "0.528293", "0.5281924", "0.52768755", "0.52758384", "0.5275772", "0.5267749", "0.5266851", "0.5260164", "0.52468455", "0.5242608", "0.52392364", "0.52354366", "0.52347064", "0.523462", "0.5230474", "0.5227063", "0.5225829", "0.5223105", "0.522194", "0.5219831", "0.52187", "0.5214876", "0.5214315", "0.52105916", "0.5207679", "0.5205243", "0.5203553", "0.5195398", "0.51943314", "0.519096", "0.5185175", "0.51851004", "0.51786643", "0.5177024", "0.51755834", "0.51744235", "0.51724046", "0.5171521", "0.51702523", "0.5169715", "0.5168969", "0.51652235", "0.5165222", "0.5163471", "0.5162638", "0.51604515", "0.51557505", "0.51550245", "0.5153896", "0.51537716", "0.515285", "0.51524276", "0.5151912", "0.51515335", "0.51439404", "0.5143589", "0.5141802", "0.51402014", "0.5138325", "0.5134463", "0.5131006" ]
0.0
-1
Initialization hook method. Use this method to add common initialization code like loading components. e.g. `$this>loadComponent('Security');`
public function initialize() { parent::initialize(); $this->loadComponent('RequestHandler', [ 'enableBeforeRedirect' => false, ]); $this->loadComponent('Flash'); $this->loadComponent('Auth', [ 'authenticate' => [ 'Form' => [ 'fields' => [ 'username' => 'email', 'password' => 'password' ], 'userModel' => 'Customers' ] ], 'authorize' => ['Controller'], 'loginAction' => [ 'controller' => 'Customers', 'action' => 'login' ], 'logoutAction' => [ 'controller' => 'Customers', 'action' => 'logout' ], 'logoutAction' => [ 'controller' => 'Customers', 'action' => 'logout' ], // If unauthorized, return them to page they were just on 'unauthorizedRedirect' =>[ 'controller' => 'Customers', 'action' => 'login' ], 'authError' => 'Sorry, you cannot access this page, please log in with an authorised account' ]); /* * Enable the following component for recommended CakePHP security settings. * see https://book.cakephp.org/3.0/en/controllers/components/security.html */ //$this->loadComponent('Security'); //websitecontents fetch data and assign to variables to be called in view (CMS) $this->loadModel('Websitecontents'); //Who we are page title $aboutustitle = $this->Websitecontents->findByContentname('aboutpagetitle')->first(); $aboutpagetitle = $aboutustitle->contentvalue; $this->set('aboutpagetitle', $aboutpagetitle); //What we do page title $servicespagetitle = $this->Websitecontents->findByContentname('servicespagetitle')->first(); $whatwedotitle = $servicespagetitle->contentvalue; $this->set('whatwedotitle', $whatwedotitle); //Get in touch page title $contacttitle = $this->Websitecontents->findByContentname('contactpagetitle')->first(); $getintouch = $contacttitle->contentvalue; $this->set('getintouch', $getintouch); //phone number $phonecontent = $this->Websitecontents->findByContentname('phone')->first(); $phone = $phonecontent->contentvalue; $this->set('phone', $phone); //business days and hours $businesshourscontent = $this->Websitecontents->findByContentname('businessdayshours')->first(); $operatingtime = $businesshourscontent->contentvalue; $this->set('operatingtime', $operatingtime); //email - footer $emailcontent = $this->Websitecontents->findByContentname('emailfull')->first(); $emailfull = $emailcontent->contentvalue; $this->set('emailfull', $emailfull); //setting address - footer $addresscontent = $this->Websitecontents->findByContentname('address')->first(); $address = $addresscontent->contentvalue; $this->set('address', $address); //setting facebook link - footer $facebookcontent = $this->Websitecontents->findByContentname('facebooklink')->first(); $facebook = $facebookcontent->contentvalue; $this->set('facebook', $facebook); //setting linkedin link - footer $linkedincontent = $this->Websitecontents->findByContentname('linkedinlink')->first(); $linkedin = $linkedincontent->contentvalue; $this->set('linkedin', $linkedin); //setting pinterest link - footer $pinterestcontent = $this->Websitecontents->findByContentname('pinterestlink')->first(); $pinterest = $pinterestcontent->contentvalue; $this->set('pinterest', $pinterest); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function initialize()\n {\n parent::initialize();\n\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n\n /*\n * Enable the following components for recommended CakePHP security settings.\n * see https://book.cakephp.org/3.0/en/controllers/components/security.html\n */\n //$this->loadComponent('Security');\n //$this->loadComponent('Csrf');\n }", "public function initialize()\n {\n parent::initialize();\n\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n $this->loadComponent('Cookie', [\n 'expires' => Configure::read('Config.CookieExpires'),\n 'httpOnly' => true\n ]);\n $this->loadComponent('Common');\n $this->loadComponent('Auth', array(\n 'loginRedirect' => false,\n 'logoutRedirect' => false,\n 'loginAction' => array(\n 'controller' => 'customers',\n 'action' => 'login',\n 'plugin' => null\n ),\n 'sessionKey' => 'Auth.ChoTreo'\n ));\n }", "public function initialize()\n\t{\n\t\tparent::initialize();\n\t\t$this->loadComponent('Paginator');\n\t\t$this->loadComponent('Flash'); // Inclusion of the FlashComponent\n\n\n\t}", "public function initialize() {\r\n\t\tparent::initialize();\r\n\t\t\r\n\t\t// load mediawiki api component\r\n\t\t$this->loadComponent( 'MediawikiAPI' );\r\n\t\t$this->loadComponent( 'PasswordGenerator' );\r\n\t\t$this->loadComponent( 'EmailSending' );\r\n\t}", "public function initialize()\n {\n parent::initialize();\n\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n $this->loadComponent('Auth', [\n 'authorize' => 'Controller',\n 'loginAction' => [\n 'controller' => 'Users',\n 'action' => 'login',\n ],\n 'loginRedirect' => [\n 'controller' => 'Users',\n 'action' => 'index/',\n ],\n 'logoutRedirect' => [\n 'controller' => 'Booking',\n 'action' => 'index',\n ],\n 'authError' => 'Enregistrez-vous ou Connectez-vous',\n 'authenticate' => [\n 'Form' => [\n 'fields' => ['username' => 'Email', 'password' => 'Password']\n ]\n ]\n ]\n );\n\n /*\n * Enable the following components for recommended CakePHP security settings.\n * see https://book.cakephp.org/3.0/en/controllers/components/security.html\n */\n //$this->loadComponent('Security');\n //$this->loadComponent('Csrf');\n }", "public function initialize()\n {\n parent::initialize();\n\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n\n $this->loadComponent('Acl', [\n 'className' => 'Acl.Acl'\n ]);\n $this->loadComponent('CakeDC/Users.UsersAuth');\n\n // if ($this->Auth->user('role_id') == 'e687cb91-4cdf-4ab2-992f-e76584199c2e') {\n // var_dump('Redirect');\n // $this->Auth->config('loginRedirect',['controller'=>'articles','action'=>'index']);\n // }\n\n /*\n * Enable the following components for recommended CakePHP security settings.\n * see https://book.cakephp.org/3.0/en/controllers/components/security.html\n */\n //$this->loadComponent('Security');\n //$this->loadComponent('Csrf');\n }", "public function initialize()\n {\n parent::initialize();\n\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n $this->loadComponent('Auth', ['authenticate' =>\n ['ADmad/JwtAuth.Jwt' => [\n 'parameter' => 'token',\n 'userModel' => 'Sessions',\n 'fields' => [\n 'username' => 'username'\n ],\n 'scope' => ['Sessions.status' => 1],\n 'queryDatasource' => true\n ]\n ],'storage' => 'Memory',\n 'checkAuthIn' => 'Controller.initialize',\n 'loginAction' => false,\n 'unauthorizedRedirect' => false]);\n $this->loadComponent('Paginator');\n $this->loadComponent('BryanCrowe/ApiPagination.ApiPagination',[\n 'visible' => [\n 'page',\n 'current',\n 'count',\n 'perPage',\n 'prevPage',\n 'nextPage'\n ]\n ]);\n }", "public function init()\n {\n $this->loadThemeComponent();\n $this->loadConfig();\n }", "public function init() {\n\n // Set required classes for import.\n $this->setImport(array(\n $this->id . '.components.*',\n $this->id . '.components.behaviors.*',\n $this->id . '.components.dataproviders.*',\n $this->id . '.controllers.*',\n $this->id . '.models.*',\n ));\n\n // Set the required components.\n $this->setComponents(array(\n 'authorizer' => array(\n 'class' => 'RAuthorizer',\n 'superuserName' => $this->superuserName,\n ),\n 'generator' => array(\n 'class' => 'RGenerator',\n ),\n ));\n }", "public function initialize()\n {\n parent::initialize();\n $this->loadHelper('Auth');\n }", "private function init() {\n\n\t\tif ( ! $this->should_load() ) {\n\t\t\treturn;\n\t\t}\n\t\t$this->setup_admin();\n\t\t$this->setup_api();\n\t}", "function _initialize()\n {\n\n //initalize Loader\n $auto_load=array(\"io\",\"segment\",\"router\");\n \n foreach($auto_load as $library)\n {\n $this->$library=& load_class($library);\n }\n //load loader class\n $this->load =& load_class('Loader');\n \n //call auto load from config file\n $this->load->_auto_load();\n }", "public function init() {\n\t\t// you may place code here to customize the module or the application\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'common.components.*',\n\t\t));\n\t}", "public function initialize()\n {\n parent::initialize();\n\n $this->loadComponent('RequestHandler',[ 'enableBeforeRedirect' => false ]);\n $this->loadComponent('Flash');\n\n $this->loadComponent('Auth',[\n\n //'authorize' => ['Controller'],\n\n 'loginAction' => '/login',\n 'loginRedirect' => '/',\n 'logoutRedirect' => '/login',\n\n 'authenticate' => [\n 'Form' => [\n 'fields' => [\n 'username' => 'email',\n 'password' => 'password' \n ]\n ]\n ],\n 'loginAction' => [\n 'controller' => 'users',\n 'action' => 'login'\n ],\n\n 'storage' => 'Session'\n ]);\n }", "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'yiiauth.models.*',\n\t\t\t'yiiauth.components.*',\n\t\t));\n\t}", "public function initialize() {\n $this->add_hooks_and_filters();\n }", "public static function Initialize() {\n\n Debugger::debugMessage('Registering components register');\n self::ComponentsRegister();\n }", "public function initialize()\n {\n parent::initialize();\n\n $this->loadComponent('Auth', [\n 'storage' => 'Memory',\n 'authenticate' => [\n 'Form' => [\n //'scope' => ['Users.active' => 1],\n 'fields' => [\n 'username' => 'username',\n 'password' => 'password'\n ]\n ],\n 'ADmad/JwtAuth.Jwt' => [\n 'parameter' => 'token',\n 'userModel' => 'users',\n //'scope' => ['Users.active' => 1],\n 'fields' => [\n 'username' => 'username'\n ],\n 'queryDatasource' => true\n ]\n ],\n 'unauthorizedRedirect' => false,\n 'checkAuthIn' => 'Controller.initialize',\n 'loginAction' => false,\n 'authError' => 'server:api.auth_controller.error.authentication'\n ]);\n }", "public function init()\n\t{\n\t\t$this->resolvePackagePath();\n\t\t$this->registerCoreScripts();\n\t\tparent::init();\n\t}", "protected function __onInit()\n\t{\n\t}", "public function initialize()\n {\n // load configures\n $this->_config = $this->di->get('config');\n\n if ($this->_config->logger->enable)\n $this->_logger = $this->di->get('logger');\n\n // set default page title\n $this->tag->setTitle('Authenticate');\n }", "public function initialize()\n {\n $autoloader = $this->registerAutoloader();\n $this->registerPlugins($autoloader);\n }", "public static function _init() {\n // this is called upon loading the class\n }", "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'clinics.models.*',\n\t\t\t'clinics.components.*',\n\t\t));\n\t}", "public function loadInit() {}", "public static function _init()\n {\n \\Module::load('authentication');\n }", "public function _before_init(){}", "public function init()\n {\n // you may place code here to customize the module or the application\n }", "protected function init(): void\n {\n //\n }", "private function __construct() {\r\n $this->initHooks();\r\n }", "protected function init() {\n }", "protected function init() {\n }", "protected function initialize() {\n\t}", "protected function _beforeInit() {\n\t}", "protected function init() {\n\t}", "protected function init() {\n\t}", "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t\t'admin.models.*',\n\t\t\t\t'admin.components.*',\n\t\t));\n\n\t}", "public function load()\n {\n // Register initialization method.\n add_action('init', [$this, 'init'], 10, 0);\n }", "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'admin.models.*',\n\t\t\t'admin.components.*',\n\t\t));\n\t}", "protected function init()\n {\n $this->registerExtensions();\n }", "public function init()\n\t{\n\t\t$this->loader->init();\n\t\t$this->routing->init();\n\t}", "public function __construct(){\r\n $this->init_hooks();\r\n $this->includes_and_requires();\r\n }", "protected function init(): void\n {\n }", "protected function init()\n {\n }", "protected function init()\n {\n }", "protected function init()\n {\n }", "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'user.models.*',\n\t\t\t'user.components.*',\n\t\t\t'application.modules.system.models.*',\n\t\t\t'application.modules.system.components.*',\n\t\t\t'application.modules.storage.models.*',\n\t\t\t'application.modules.storage.components.*'\n\t\t));\n\t}", "public function init()\n {\n // Register the loader method\n spl_autoload_register(array(__CLASS__, '_loadClasses'));\n }", "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'message.models.*',\n\t\t\t'message.components.*',\n 'message.forms.*',\n\t\t));\n\t}", "protected function init()\n {\n\n }", "public function initialize()\n {\n $this->initializeUI(['layout' => false]);\n $this->loadHelper('Text');\n $this->loadHelper('Paginator');\n $this->loadHelper('Menu');\n }", "public function init()\n {\n parent::init();\n $this->initClass();\n }", "protected function initialize()\n {\n }", "public function init()\r\n {\r\n $this->admin = Shopware()->Modules()->Admin();\r\n $this->basket = Shopware()->Modules()->Basket();\r\n $this->session = Shopware()->Session();\r\n $this->db = Shopware()->Db();\r\n $this->moduleManager = Shopware()->Modules();\r\n $this->eventManager = Shopware()->Events();\r\n }", "protected function init(): void\n\t{\n\t}", "public function initialize(): void\n {\n parent::initialize();\n /*\n * Enable the following component for recommended CakePHP form protection settings.\n * see https://book.cakephp.org/4/en/controllers/components/form-protection.html\n */\n //$this->loadComponent('FormProtection');\n }", "public function initialize() {\n parent::initialize();\n $this->loadComponent('RequestHandler');\n }", "function init()\n\t{\n\t\tglobal $Options, $User_Options;\n\t\t$Options\t= $this->options\t=\t$this->get( NULL , NULL , TRUE );\n\t\t// Only when aauth is enabled\n\t\tif( Modules::is_active( 'aauth' ) )\n\t\t{\n\t\t\t$User_Options = $this->user_options = $this->get( NULL , $this->events->apply_filters( 'user_id' , 0 ) );\n\t\t}\n\t\t\n\t\t\n\t\t/**\n\t\t * If language is set on dashboard\n\t\t * @since 3.0.5\n\t\t**/\n\t\tif( riake( 'site_language', $Options ) ) {\n\t\t\tget_instance()->config->set_item( 'site_language', $Options[ 'site_language' ] );\n\t\t}\n\n\t\t/** \n\t \t * Load Language\n\t\t**/\n\t\t\n\t\t$this->lang->load( 'system' );\t\n\t}", "protected function initialize() {\n\t\t\n\t}", "protected function _init()\n {\n }", "protected function init()\n {\n }", "protected function init()\n {\n }", "protected function init()\n {\n }", "protected function init()\n {\n }", "protected function init()\n {\n }", "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'forum.models.*',\n\t\t\t'forum.components.*',\n 'forum.controllers.*',\n\t\t));\n\t}", "protected function initialize() {}", "protected function initialize() {}", "protected function initialize() {}", "protected function initialize() {}", "public static function _init()\n\t{\n\t\tLang::load('pagination', true);\n\t\tConfig::load('hybrid', 'hybrid');\n\t}", "protected function _init()\n {\n }", "public function initialize()\n {\n \t\n \t$this->viewBuilder()->setLayout('default');\n \t\n parent::initialize();\n\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n\t\t$this->loadComponent('Auth', [\n 'authorize' => ['Controller'],\n 'loginRedirect' => [\n 'controller' => 'MasterListings', \n 'action' => 'index'\n ],\n 'logoutRedirect' => [\n 'controller' => 'Users', \n 'action' => 'login'\n ],\n 'loginAction' => [\n 'controller' => 'Users', \n 'action' => 'login'\n ],\n 'authenticate' => [\n 'Form' => [\n //'passwordHasher' => 'Blowfish',\n 'userModel' => 'Users', \n 'fields' => ['username' => 'username', 'password' => 'password'] \n \n ]\n ],\n\t\t\t\n 'authError' => 'you are not Authorise to Acccess this location.',\n 'storage' => 'Session'\n ]);\n\n /*\n * Enable the following components for recommended CakePHP security settings.\n * see http://book.cakephp.org/3.0/en/controllers/components/security.html\n */\n //$this->loadComponent('Security');\n //$this->loadComponent('Csrf');\n }", "protected function __construct() {\n\n // Cargamos Clases.\n $this -> setup_hooks();\n }", "protected function __construct() {\n\n // Cargamos Clases.\n $this -> setup_hooks();\n }", "public function init() {\n //TODO override and put config intialization code here\n }", "protected function initialize()\n\t{\n\n\t}", "public function init() {\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'music.models.*',\n\t\t\t'music.components.*',\n\t\t));\n\t}", "public function init() {\n // you may place code here to customize the module or the application\n // import the module-level models and components\n $this->setImport(array(\n 'sys.models.*',\n 'product.models.*',\n 'sys.components.*',\n 'hr.models.*',\n ));\n }", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "public function init()\n {\n $this->loadMeta();\n }", "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'admin.models.*',\n\t\t\t'admin.components.*',\n\t\t));\n\n\t\t$this->_initBootstrap();\n\t\t$this->_initJsCss();\n\t}", "protected function init()\n { }", "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n \n\t\t$this->setImport(array('my.models.*',));\n\t}", "static public function initialize()\r\n {\r\n spl_autoload_register(\"self::load\");\r\n }", "protected static function init()\n {\n }", "protected function __construct(){\n\n $this->setup_hooks();\n }", "protected function _init()\r\n\t{\r\n\t}", "public function initialize() : void\n {\n // Use to initialise member variables.\n $this->db = \"active\";\n $this->validator = new Validator();\n }", "public function init()\n {\n /*\n * service component, data provider\n */\n // parent::init();\n }" ]
[ "0.8071931", "0.79452145", "0.7772107", "0.7750622", "0.77400285", "0.77101326", "0.7703049", "0.7696061", "0.75826657", "0.75264156", "0.75221425", "0.7495009", "0.7472849", "0.7451889", "0.7444448", "0.74339086", "0.7424633", "0.73894787", "0.7383402", "0.73724324", "0.73622656", "0.7362028", "0.7361667", "0.73108596", "0.7307093", "0.7291722", "0.7291704", "0.72856075", "0.7280992", "0.72785985", "0.72355634", "0.72355634", "0.7220112", "0.7212669", "0.71953356", "0.71953356", "0.7182662", "0.7177899", "0.7171076", "0.7169568", "0.7168152", "0.7167169", "0.7165193", "0.7152034", "0.7152034", "0.7152034", "0.715004", "0.71391344", "0.71317434", "0.71257305", "0.7123333", "0.7120338", "0.7118966", "0.71151394", "0.7113888", "0.7101752", "0.7100077", "0.70994294", "0.70923793", "0.70885044", "0.70884734", "0.70884734", "0.70884734", "0.70884734", "0.70884734", "0.70845675", "0.7084212", "0.7084212", "0.7084212", "0.7084212", "0.7083541", "0.70813984", "0.7076842", "0.7073658", "0.7073658", "0.70707095", "0.7068351", "0.7065244", "0.70629567", "0.706257", "0.706257", "0.706257", "0.706257", "0.706257", "0.706257", "0.7062285", "0.7062285", "0.7062228", "0.7062228", "0.7062228", "0.7062228", "0.7048066", "0.7042155", "0.7038187", "0.7037251", "0.70271575", "0.7011179", "0.69945997", "0.6982144", "0.69805527", "0.6979266" ]
0.0
-1
Used to get language name from ISO 6391 code
function weglotLanguage($iso639, $getEnglish = true) { $client = new Client(config('weglot-translate.api_key')); $translate = new Languages($client); $languageCollection = $translate->handle(); $language = $languageCollection->getCode($iso639); if (!$language instanceof LanguageEntry) { return ''; } if ($getEnglish) { return $language->getEnglishName(); } return $language->getLocalName(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getName( $code )\n\t\t{\n\t\t\treturn ISO_Language::getInstance()->get( $code );\n\t\t}", "public function getLanguageNameByCode(string $code): string;", "abstract public function getLocaleCode();", "abstract public function getLocaleName();", "public function getFromLanguage(): string;", "public function getLang() {\n\t\treturn substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2);\n\t}", "public function getLangcode() {\n }", "static public function name() : string {\n return \"русский язык\";\n \n }", "public function getCompatibleLanguageQuaderno() {\n $country = $this->getCountry();\n $spanishSpeaking = pais::getCountriesSpanishSpeaking();\n if (array_key_exists($country->getUID(), $spanishSpeaking)) {\n return 'ES';\n } else {\n switch ($country->getUID()) {\n case pais::PORTUGAL_CODE:\n return 'PT';\n break;\n case pais::FRANCE_CODE:\n return 'FR';\n break;\n default:\n return 'EN';\n }\n }\n\n return 'EN';\n }", "public function getLanguageCode();", "public static function getDefaultLanguageCode() {\n\t\t$oSprache = UnzerCw_VersionHelper::getInstance()->getDb()->executeQuery(\"SELECT kSprache, cISO FROM tsprache WHERE cShopStandard = 'Y'\", 1);\n\t\tif($oSprache->kSprache > 0) {\n\t\t\treturn UnzerCw_VersionHelper::getInstance()->convertISO2ISO639($oSprache->cISO);\n\t\t}\n\t\telse {\n\t\t\treturn 'de';\n\t\t}\n\t}", "static public function english_name() : string {\n return \"Russian\";\n }", "protected function getTranslationCode()\n {\n $code = 'en';\n\n if (\\XLite\\Logic\\Import\\Importer::getLanguageCode()) {\n $code = \\XLite\\Logic\\Import\\Importer::getLanguageCode();\n\n } elseif (!\\XLite::isCacheBuilding()\n && \\XLite\\Core\\Session::getInstance()->getLanguage()\n ) {\n $code = \\XLite\\Core\\Session::getInstance()->getLanguage()->getCode();\n }\n\n return $code;\n }", "public function getLanguageIdentifier();", "private function getWindowsLanguageCode()\n {\n $languageID = $this->languageID;\n $languageID &= 0xff;\n\n // The low-order bytes specify the language, the high-order bytes specify the dialect. We just care about\n // the language. For the complete list, see: http://www.microsoft.com/globaldev/reference/lcid-all.mspx\n switch ($languageID) {\n case 0x09:\n return 'en';\n case 0x0c:\n return 'fr';\n case 0x07:\n return 'de';\n case 0x10:\n return 'it';\n case 0x13:\n return 'nl';\n case 0x1d:\n return 'sv';\n case 0x0a:\n return 'es';\n case 0x06:\n return 'da';\n case 0x16:\n return 'pt';\n case 0x14:\n return 'no';\n case 0x0d:\n return 'he';\n case 0x11:\n return 'ja';\n case 0x01:\n return 'ar';\n case 0x0b:\n return 'fi';\n case 0x08:\n return 'el';\n default:\n return null;\n }\n }", "public function getCode(): string\n {\n return $this->language;\n }", "function get_lang_locale() {\n\tglobal $lang_code;\n\t$localeMap = array(\n\t\t'ca' => 'ca_ES',\n\t\t'cs' => 'cs_CZ',\n\t\t'cy' => 'cy_GB',\n\t\t'da' => 'da_DK',\n\t\t'de' => 'de_DE',\n\t\t'eu' => 'eu_ES',\n\t\t'en' => 'en_US',\n\t\t'es' => 'es_ES',\n\t\t'fi' => 'fi_FI',\n\t\t'fr' => 'fr_FR',\n\t\t'gl' => 'gl_ES',\n\t\t'hu' => 'hu_HU',\n\t\t'it' => 'it_IT',\n\t\t'ja' => 'ja_JP',\n\t\t'ko' => 'ko_KR',\n\t\t'nb' => 'nb_NO',\n\t\t'nl' => 'nl_NL',\n\t\t'pl' => 'pl_PL',\n\t\t'pt' => 'pt_BR',\n\t\t'ro' => 'ro_RO',\n\t\t'ru' => 'ru_RU',\n\t\t'sk' => 'sk_SK',\n\t\t'sl' => 'sl_SI',\n\t\t'sv' => 'sv_SE',\n\t\t'th' => 'th_TH',\n\t\t'tr' => 'tr_TR',\n\t\t'ku' => 'ku_TR',\n\t\t'zh_CN' => 'zh_CN',\n\t\t'zh_TW' => 'zh_TW',\n\t\t'af' => 'af_ZA',\n\t\t'sq' => 'sq_AL',\n\t\t'hy' => 'hy_AM',\n\t\t'az' => 'az_AZ',\n\t\t'be' => 'be_BY',\n\t\t'bs' => 'bs_BA',\n\t\t'bg' => 'bg_BG',\n\t\t'hr' => 'hr_HR',\n\t\t'eo' => 'eo_EO',\n\t\t'et' => 'et_EE',\n\t\t'fo' => 'fo_FO',\n\t\t'ka' => 'ka_GE',\n\t\t'el' => 'el_GR',\n\t\t'hi' => 'hi_IN',\n\t\t'is' => 'is_IS',\n\t\t'id' => 'id_ID',\n\t\t'ga' => 'ga_IE',\n\t\t'jv' => 'jv_ID',\n\t\t'kk' => 'kk_KZ',\n\t\t'la' => 'la_VA',\n\t\t'lv' => 'lv_LV',\n\t\t'lt' => 'lt_LT',\n\t\t'mk' => 'mk_MK',\n\t\t'mg' => 'mg_MG',\n\t\t'ms' => 'ms_MY',\n\t\t'mt' => 'mt_MT',\n\t\t'mn' => 'mn_MN',\n\t\t'ne' => 'ne_NP',\n\t\t'rm' => 'rm_CH',\n\t\t'sr' => 'sr_RS',\n\t\t'so' => 'so_SO',\n\t\t'sw' => 'sw_KE',\n\t\t'tl' => 'tl_PH',\n\t\t'uk' => 'uk_UA',\n\t\t'uz' => 'uz_UZ',\n\t\t'vi' => 'vi_VN',\n\t\t'zu' => 'zu_ZA',\n\t\t'ar' => 'ar_AR',\n\t\t'he' => 'he_IL',\n\t\t'ur' => 'ur_PK',\n\t\t'fa' => 'fa_IR',\n\t\t'sy' => 'sy_SY',\n\t\t'gn' => 'gn_PY'\n\t);\n\treturn (check_value($localeMap[$lang_code])) ? $localeMap[$lang_code] : 'en_US';\n}", "public function getLanguageCode()\n {\n return str_replace('_', '-', $this->_code);\n }", "public function getLanguage() {}", "public function getLang();", "private static function getLanguage()\n {\n if (isset($_COOKIE[\"language\"]))\n {\n return $_COOKIE[\"language\"];\n }\n else\n {\n // Default is Czech\n return \"cs\";\n }\n }", "public static function langName($lang)\n {\n $langName = [\n\n 'af' => 'Afrikaans',\n 'ar' => 'Arabic',\n 'az' => 'Azerbaijani',\n 'bg' => 'Bulgarian',\n 'be' => 'Belarusian',\n 'bn' => 'Bengali',\n 'br' => 'Breton',\n 'bs' => 'Bosnian',\n 'ca' => 'Catalan',\n 'cs' => 'Czech',\n 'cy' => 'Welsh',\n 'da' => 'Danish',\n 'de' => 'German',\n 'el' => 'Greek',\n 'en' => 'English',\n 'en-gb' => 'British English',\n 'eo' => 'Esperanto',\n 'es' => 'Spanish',\n 'es-ar' => 'Argentinian Spanish',\n 'es-mx' => 'Mexican Spanish',\n 'es-ni' => 'Nicaraguan Spanish',\n 'es-ve' => 'Venezuelan Spanish',\n 'et' => 'Estonian',\n 'eu' => 'Basque',\n 'fa' => 'Persian',\n 'fi' => 'Finnish',\n 'fr' => 'French',\n 'fy-nl' => 'Frisian',\n 'ga' => 'Irish',\n 'gl' => 'Galician',\n 'he' => 'Hebrew',\n 'hi' => 'Hindi',\n 'hr' => 'Croatian',\n 'hu' => 'Hungarian',\n 'ia' => 'Interlingua',\n 'id' => 'Indonesian',\n 'is' => 'Icelandic',\n 'it' => 'Italian',\n 'ja' => 'Japanese',\n 'ka' => 'Georgian',\n 'kk' => 'Kazakh',\n 'km' => 'Khmer',\n 'kn' => 'Kannada',\n 'ko' => 'Korean',\n 'lb' => 'Luxembourgish',\n 'lt' => 'Lithuanian',\n 'lv' => 'Latvian',\n 'mk' => 'Macedonian',\n 'ml' => 'Malayalam',\n 'mn' => 'Mongolian',\n 'my' => 'Burmese',\n 'nb' => 'Norwegian Bokmal',\n 'ne' => 'Nepali',\n 'nl' => 'Dutch',\n 'nn' => 'Norwegian Nynorsk',\n 'os' => 'Ossetic',\n 'pa' => 'Punjabi',\n 'pl' => 'Polish',\n 'pt' => 'Portuguese',\n 'pt-br' => 'Brazilian Portuguese',\n 'ro' => 'Romanian',\n 'ru' => 'Russian',\n 'sk' => 'Slovak',\n 'sl' => 'Slovenian',\n 'sq' => 'Albanian',\n 'sr' => 'Serbian',\n 'sr-latn' => 'Serbian Latin',\n 'sv' => 'Swedish',\n 'sw' => 'Swahili',\n 'ta' => 'Tamil',\n 'te' => 'Telugu',\n 'th' => 'Thai',\n 'tr' => 'Turkish',\n 'tt' => 'Tatar',\n 'udm' => 'Udmurt',\n 'uk' => 'Ukrainian',\n 'ur' => 'Urdu',\n 'vi' => 'Vietnamese',\n 'zh-cn' => 'Simplified Chinese',\n 'zh-tw' => 'Traditional Chinese'\n ];\n\n return $langName[$lang];\n }", "function language_name($language)\n{\n\tif (!isset($language)) {\n\t\treturn null;\n\t} \n\t\n\tstatic $name = array();\n if (!count($name)) {\n $name = languagelist();\n } \n return $name[$language];\n}", "public static function getLanguage()\n {\n if (!is_array(self::$languages)) {\n self::checkLanguages();\n }\n\n return strtolower(substr(reset(self::$languages), 0, 2));\n }", "public function getLanguage()\n\t{\n\t\t$language = isset($this->session->data['language']) ? $this->session->data['language'] : $this->config->get('config_language');\n\n\t\t$language_code = substr($language, 0, 2);\n\n\t\t$this->bootstrap();\n\n\t\t$is_available = @constant('\\Genesis\\API\\Constants\\i18n::' . strtoupper($language_code));\n\n\t\tif ($is_available) {\n\t\t\treturn strtolower($language_code);\n\t\t} else {\n\t\t\treturn 'en';\n\t\t}\n\t}", "public function getLanguage()\n {\n return substr($this->server['HTTP_ACCEPT_LANGUAGE'], 0, 2);\n }", "function getPNlanguage()\n{\n\tpnBlockLoad('Core', 'thelang');\n// All entries use ISO 639-2/T\n\t$lang['ara'] = \"Arabic\";\n\t$lang['alb'] = \"Albanian\"; \n\t$lang['bul'] = \"Bulgarian\";\n\t$lang['zho'] = \"Chinese\";\n\t$lang['cat'] = \"Catalan\";\n\t$lang['ces'] = \"Czech\";\n\t$lang['hrv'] = \"Croatian HRV\";\n\t$lang['cro'] = \"Croatian CRO\";\n\t$lang['dan'] = \"Danish\";\n\t$lang['nld'] = \"Dutch\";\n\t$lang['eng'] = \"English\";\n\t$lang['epo'] = \"Esperanto\";\n\t$lang['est'] = \"Estonian\";\n\t$lang['fin'] = \"Finnish\";\n\t$lang['fra'] = \"French\";\n\t$lang['deu'] = \"German\";\n\t$lang['ell'] = \"Greek\";\n\t$lang['heb'] = \"Hebrew\";\n\t$lang['hun'] = \"Hungarian\";\n\t$lang['isl'] = \"Icelandic\";\n\t$lang['ind'] = \"Indonesian\";\n\t$lang['ita'] = \"Italian\";\n\t$lang['jpn'] = \"Japanese\";\n\t$lang['kor'] = \"Korean\";\n\t$lang['lav'] = \"Latvian\";\n\t$lang['lit'] = \"Lithuanian\";\n\t$lang['mas'] = \"Malay\";\n\t$lang['mkd'] = \"Macedonian\";\n\t$lang['nor'] = \"Norwegian\";\n\t$lang['pol'] = \"Polish\";\n\t$lang['por'] = \"Portuguese\";\n\t$lang['ron'] = \"Romanian\";\n\t$lang['rus'] = \"Russian\";\n\t$lang['slv'] = \"Slovenian\";\n\t$lang['spa'] = \"Spanish\";\n\t$lang['swe'] = \"Swedish\";\n\t$lang['tha'] = \"Thai\";\n\t$lang['tur'] = \"Turkish\";\n\t$lang['ukr'] = \"Ukrainian\";\n\t$lang['yid'] = \"Yiddish\";\n\n\treturn strtolower($lang[pnSessionGetVar('lang')]);\n}", "public function getLanguage();", "public function getLanguage();", "public function getLanguage();", "public function getLanguage();", "public function getLanguage();", "public function getLanguage();", "private function getLanguageName($code)\n {\n if (empty($code)) {\n return null;\n }\n\n try {\n $optionLocales = $this->locale->getOptionLocales();\n foreach ($optionLocales as $oL) {\n if (strtolower($oL['value']) == strtolower($code)) {\n return $oL['label'];\n }\n }\n } catch (Exception $exception) {\n $this->exceptionHandler->logException($exception);\n return null;\n }\n\n }", "public function get_language() {\n if (defined('WPLANG')) {\n $language = WPLANG;\n }\n\n if (empty($language)) {\n $language = get_option('WPLANG');\n }\n\n if (!empty($language)) {\n $languageParts = explode('_', $language);\n return $languageParts[0];\n }\n\n return 'en';\n }", "private function getLanguageCode()\n\t{\n\t\t$codes = [\n\t\t\t'en-CA', 'en-US', 'en-GB', 'es', 'es-AR', 'es-ES', 'es-MX', 'fr', 'fr-FR', 'fr-US', 'de', 'de-DE', 'ru', 'ru-MO', 'zh', 'zh-TW', 'zh-CN', 'zh-SG',\n\t\t];\n\n\t\treturn $codes[mt_rand(0, count($codes) - 1)];\n\t}", "public function getLocaleCode()\n {\n return @$this->_server['HTTP_ACCEPT_LANGUAGE'];\n }", "function codepress_get_lang($filename)\n {\n }", "function get_language_name($string)\n {\n $string_parts = explode('_', $string);\n if(isset($string_parts[1])) $name = ucfirst($string_parts[0]).' ('.$string_parts[1].')';\n else $name = ucfirst($string);\n return $name; \n }", "protected function getLanguageCode($code)\n {\n // $code is in the form of 'xx-YY' where xx is the language code\n // and 'YY' a country code identifying a variant of the language.\n $lang_country = explode('-', $code);\n\n return $lang_country[0];\n }", "function shGetNameFromIsoCode($langCode)\n{\n\n\tShlSystem_Log::debug('sh404sef', 'shGetNameFromIsoCode is deprecated, use Sh404sefHelperLanguage::getLangTagFromUrlCode() instead');\n\treturn Sh404sefHelperLanguage::getLangTagFromUrlCode($langCode);\n}", "final protected function get_language() {\n\t\tif (preg_match('/[a-z]{2}-[a-z]{2}/', strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']), $matches))\n\t\t\treturn $matches[0];\n\t\treturn false;\n\t}", "final public function getLang(): string {\n $this->init();\n return $this->language;\n }", "public static function getLanguageLocale()\n {\n if (!is_array(self::$languages)) {\n self::checkLanguages();\n }\n\n $userLanguage = self::getLanguage();\n foreach (self::$languages as $language) {\n if (strlen($language) === 5 && strpos($language, $userLanguage) === 0) {\n $locale = substr($language, -2);\n break;\n }\n }\n\n if (!empty($locale)) {\n return $userLanguage . \"-\" . strtoupper($locale);\n } else {\n return $userLanguage;\n }\n }", "public function languageCode()\n {\n $languageObject = $this->languageObject();\n return ( $languageObject !== false ) ? $languageObject->attribute( 'locale' ) : false;\n }", "function get_lang_label($key){\n\t\t$list = array(\n\t\t\t//bg 'Bulgarian'\n\t\t\t'cat' => 'Català',\n\t\t\t//cs 'Čeština'\n\t\t\t//da 'Dansk'\n\t\t\t'deu' => 'Deutsch',\n\t\t\t'eng' => 'English',\n\t\t\t'esp' => 'Español',\n\t\t\t//fi 'Finnish (Suomi)'\n\t\t\t'fra' => 'Français',\n\t\t\t//he 'Hebrew (עברית)'\n\t\t\t//hu 'Magyar'\n\t\t\t//it 'Italiano'\n\t\t\t'jpn' => 'Japanese (日本語)',\n\t\t\t'kor' => 'Korean (한국어)',\n\t\t\t//lt 'Lithuanian (lietuvių)'\n\t\t\t//nl 'Nederlands'\n\t\t\t//no 'Norwegian (Norsk bokmål)'\n\t\t\t//pl 'Polski'\n\t\t\t'bra' => 'Português(Brasil)',\n\t\t\t//pt 'Português'\n\t\t\t'ron' => 'Română',\n\t\t\t'rus' => 'Russian (Русский)',\n\t\t\t//sk 'Slovensky'\n\t\t\t//sr 'Srpski'\n\t\t\t//sv 'Svenska'\n\t\t\t'tha' => 'Thai (ไทย)',\n\t\t\t//tr 'Türkçe'\n\t\t\t//uk 'Ukrainian (Українська)'\n\t\t\t//vn 'Tiếng Việt'\n\t\t\t//zh-tw 'Traditional Chinese (繁體中文)'\n\t\t\t'chi' => 'Simplified Chinese (简体中文)'\n\t );\n\t return isset($list[$key]) ? $list[$key] : $key;\n\t}", "public function getThreeLetterISOLanguageName() : ?string\n {\n return $this->threeLetterISOLanguageName;\n }", "public function getLanguageIsoCode()\n {\n return $this->languageIsoCode;\n }", "public function toLanguageName($language_code): string {\n return (string) $this->languageManager->getLanguageName($language_code);\n }", "public function language();", "public function language();", "public function name(string $language): string;", "public function get_language()\n {\n }", "public function getLanguage(): string\n {\n return $this->language;\n }", "public function getLanguage(): string\n {\n return $this->language;\n }", "public function getFixedLanguageCode() {\n\t\treturn LanguageFactory::fixLanguageCode($this->languageCode);\n\t}", "function JAPANIZE_languageToLangId($language) {\n $retval = '';\n \n $lang_mappings = array(\n 'afrikaans' => 'af',\n 'bosnian' => 'bs',\n 'bulgarian' => 'bg',\n 'catalan' => 'ca',\n 'chinese_simplified' => 'zh-cn',\n 'chinese_traditional' => 'zh',\n 'croatian' => 'hr',\n 'czech' => 'cs',\n 'danish' => 'da',\n 'dutch' => 'nl',\n 'english' => 'en',\n 'estonian' => 'et',\n 'farsi' => 'fa',\n 'finnish' => 'fi',\n 'french_canada' => 'fr-ca',\n 'french_france' => 'fr',\n 'german' => 'de',\n 'german_formal' => 'de',\n 'hebrew' => 'he',\n 'hellenic' => 'el',\n 'indonesian' => '',\n 'italian' => 'it',\n 'japanese' => 'ja',\n 'korean' => 'ko',\n 'norwegian' => 'no',\n 'polish' => 'pl',\n 'portuguese' => 'pt',\n 'portuguese_brazil' => 'pt-br',\n 'romanian' => 'ro',\n 'russian' => 'ru',\n 'slovak' => 'sk',\n 'slovenian' => 'sl',\n 'spanish' => 'es',\n 'spanish_argentina' => 'es',\n 'swedish' => 'sv',\n 'turkish' => 'tr',\n 'ukrainian' => 'uk',\n );\n\n if (isset($language)) {\n $lang = str_replace('_utf-8', '', $language);\n \n if (isset($lang_mappings[$lang])) {\n $retval = $lang_mappings[$lang];\n }\n }\n\n return $retval;\n}", "public function lang(): string;", "private function get_language ()\n {\n $lang = filter_input ( INPUT_COOKIE, 'lang', FILTER_CALLBACK, [ 'options' => [ $this, 'filter_lang' ] ] );\n\t$new_lang = filter_input ( INPUT_GET, 'lang', FILTER_CALLBACK, [ 'options' => [ $this, 'filter_lang' ] ] );\n\tif ( $new_lang ) {\n\t\t$lang = $new_lang;\n\t\tsetcookie( \"lang\", substr ( $lang, 0, 2 ), time() + 3600 * 24 * 365, '/' );\n\t}\n\t\n\treturn $lang ?? 'uk';\n }", "function get_locale() {\n \n global $CONF;\n \n if( isset( $CONF ) ) {\n \t\t$supported_languages\t\t= $CONF['supported_languages'];\n } else {\n \t\t$supported_languages\t\t= array ('de', 'de_DE', 'en', 'en_US');\t\n }\n \n $lang_array \t\t\t\t\t\t= preg_split ('/(\\s*,\\s*)/', $_SERVER['HTTP_ACCEPT_LANGUAGE']);\n \n if (is_array ($lang_array)) {\n \n $lang_first \t\t\t\t\t= strtolower ((trim (strval ($lang_array[0]))));\n $lang_parts\t\t\t\t\t= explode( '-', $lang_array[0] );\n $count\t\t\t\t\t\t= count( $lang_parts );\n if( $count == 2 ) {\n \t\n \t\t$lang_parts[1]\t\t\t= strtoupper( $lang_parts[1] );\n \t\t$lang_first\t\t\t\t= implode( \"_\", $lang_parts );\n }\n \n if (in_array ($lang_first, $supported_languages)) {\n \n $lang \t\t\t\t\t\t= $lang_first;\n \n } else {\n \n $lang \t\t\t\t\t\t= $CONF['default_locale'];\n \n }\n \n } else {\n \n $lang\t\t\t\t\t\t\t = $CONF['default_locale'];\n \n }\n \n return $lang;\n}", "public function getLanguage()\r\n {\r\n $language = $this->getTransaction()->languageName;\r\n if(empty($language))\r\n {\r\n $language = leaf_get('properties', 'language_code');\r\n }\r\n\t\treturn $language;\r\n\t}", "protected function _getLanguageCode()\n {\n if (!$this->_options['rewrite']) {\n $lang = '?core_lang=' . $this->_lang . $this->_separator();\n } else {\n $lang = $this->_lang . '/';\n }\n\n return $lang;\n }", "public function getLanguageCode($lang_name)\n {\n foreach (self::$supported_languages as $lng) {\n if (empty(self::$languages[$lng])) {\n continue;\n }\n\n foreach (self::$languages[$lng] as $code => $translation) {\n if (strcasecmp($lang_name, $translation) == 0) {\n return $code;\n }\n } // foreach\n } // foreach\n\n return \"\";\n }", "public static function getLocale(string $code): string\n {\n if (Str::contains($code, '_')) {\n $tab = explode('_', $code);\n\n return Str::lower($tab[0]);\n } elseif (Str::contains($code, '-')) {\n $tab = explode('-', $code);\n\n return Str::lower($tab[0]);\n }\n\n return Str::lower($code);\n }", "public function getLanguage() : ?string ;", "abstract public function get_app_language();", "public function getBackOfficeLanguage();", "protected function getLanguage()\n {\n return $this->localeHeper->getLanguage();\n }", "public function getLanguageCode()\n {\n return $this->language_code;\n }", "public function getLanguageCode()\n {\n return $this->language_code;\n }", "function getLang() {\n\tif (request()->cookie(config('translate.su_cookie_name'))) {\n\t\t$cookie = request()->cookie(config('translate.su_cookie_name'));\n\t} else {\n\t\tif (request()->cookie(config('translate.cookie_name'))) {\n\t\t\t$cookie = request()->cookie(config('translate.cookie_name'));\n\t\t} else {\n\t\t\tif (substr(request()->server('HTTP_ACCEPT_LANGUAGE'), 0, 2)) {\n\t\t\t\t$cookie = substr(request()->server('HTTP_ACCEPT_LANGUAGE'), 0, 2);\n\t\t\t} else {\n\t\t\t\t$cookie = config('translate.default_locale');\n\t\t\t}\n\t\t}\n\t}\n\treturn $cookie;\n}", "public function getShortLanguage() {\n return substr($this->acceptLanguage, 0, 2);\n }", "public function toNativeLanguageName($language_code): string {\n $languages = $this->languageManager->getNativeLanguages();\n if (!empty($languages[$language_code])) {\n return $languages[$language_code]->getName();\n }\n // The fallback implemented in case we don't have enabled language.\n $predefined = self::getEuropeanUnionLanguageList() + LanguageManager::getStandardLanguageList();\n if (!empty($predefined[$language_code][1])) {\n return $predefined[$language_code][1];\n }\n\n throw new \\InvalidArgumentException('The language code ' . $language_code . ' does not exist.');\n }", "function guess_lang()\n\t{\n\n\t\t// The order here _is_ important, at least for major_minor matches.\n\t\t// Don't go moving these around without checking with me first - psoTFX\n\t\t$match_lang = array(\n\t\t\t'arabic'\t\t\t\t\t\t\t\t\t\t\t=> 'ar([_-][a-z]+)?',\n\t\t\t'bulgarian'\t\t\t\t\t\t\t\t\t\t=> 'bg',\n\t\t\t'catalan'\t\t\t\t\t\t\t\t\t\t\t=> 'ca',\n\t\t\t'czech'\t\t\t\t\t\t\t\t\t\t\t\t=> 'cs',\n\t\t\t'danish'\t\t\t\t\t\t\t\t\t\t\t=> 'da',\n\t\t\t'german'\t\t\t\t\t\t\t\t\t\t\t=> 'de([_-][a-z]+)?',\n\t\t\t'english'\t\t\t\t\t\t\t\t\t\t\t=> 'en([_-][a-z]+)?',\n\t\t\t'estonian'\t\t\t\t\t\t\t\t\t\t=> 'et',\n\t\t\t'finnish'\t\t\t\t\t\t\t\t\t\t\t=> 'fi',\n\t\t\t'french'\t\t\t\t\t\t\t\t\t\t\t=> 'fr([_-][a-z]+)?',\n\t\t\t'greek'\t\t\t\t\t\t\t\t\t\t\t\t=> 'el',\n\t\t\t'spanish_argentina'\t\t\t\t\t\t=> 'es[_-]ar',\n\t\t\t'spanish'\t\t\t\t\t\t\t\t\t\t\t=> 'es([_-][a-z]+)?',\n\t\t\t'gaelic'\t\t\t\t\t\t\t\t\t\t\t=> 'gd',\n\t\t\t'galego'\t\t\t\t\t\t\t\t\t\t\t=> 'gl',\n\t\t\t'gujarati'\t\t\t\t\t\t\t\t\t\t=> 'gu',\n\t\t\t'hebrew'\t\t\t\t\t\t\t\t\t\t\t=> 'he',\n\t\t\t'hindi'\t\t\t\t\t\t\t\t\t\t\t\t=> 'hi',\n\t\t\t'croatian'\t\t\t\t\t\t\t\t\t\t=> 'hr',\n\t\t\t'hungarian'\t\t\t\t\t\t\t\t\t\t=> 'hu',\n\t\t\t'icelandic'\t\t\t\t\t\t\t\t\t\t=> 'is',\n\t\t\t'indonesian'\t\t\t\t\t\t\t\t\t=> 'id([_-][a-z]+)?',\n\t\t\t'italian'\t\t\t\t\t\t\t\t\t\t\t=> 'it([_-][a-z]+)?',\n\t\t\t'japanese'\t\t\t\t\t\t\t\t\t\t=> 'ja([_-][a-z]+)?',\n\t\t\t'korean'\t\t\t\t\t\t\t\t\t\t\t=> 'ko([_-][a-z]+)?',\n\t\t\t'latvian'\t\t\t\t\t\t\t\t\t\t\t=> 'lv',\n\t\t\t'lithuanian'\t\t\t\t\t\t\t\t\t=> 'lt',\n\t\t\t'macedonian'\t\t\t\t\t\t\t\t\t=> 'mk',\n\t\t\t'dutch'\t\t\t\t\t\t\t\t\t\t\t\t=> 'nl([_-][a-z]+)?',\n\t\t\t'norwegian'\t\t\t\t\t\t\t\t\t\t=> 'no',\n\t\t\t'punjabi'\t\t\t\t\t\t\t\t\t\t\t=> 'pa',\n\t\t\t'polish'\t\t\t\t\t\t\t\t\t\t\t=> 'pl',\n\t\t\t'portuguese_brazil'\t\t\t\t\t\t=> 'pt[_-]br',\n\t\t\t'portuguese'\t\t\t\t\t\t\t\t\t=> 'pt([_-][a-z]+)?',\n\t\t\t'romanian'\t\t\t\t\t\t\t\t\t\t=> 'ro([_-][a-z]+)?',\n\t\t\t'russian'\t\t\t\t\t\t\t\t\t\t\t=> 'ru([_-][a-z]+)?',\n\t\t\t'slovenian'\t\t\t\t\t\t\t\t\t\t=> 'sl([_-][a-z]+)?',\n\t\t\t'albanian'\t\t\t\t\t\t\t\t\t\t=> 'sq',\n\t\t\t'serbian'\t\t\t\t\t\t\t\t\t\t\t=> 'sr([_-][a-z]+)?',\n\t\t\t'slovak'\t\t\t\t\t\t\t\t\t\t\t=> 'sv([_-][a-z]+)?',\n\t\t\t'swedish'\t\t\t\t\t\t\t\t\t\t\t=> 'sv([_-][a-z]+)?',\n\t\t\t'thai'\t\t\t\t\t\t\t\t\t\t\t\t=> 'th([_-][a-z]+)?',\n\t\t\t'turkish'\t\t\t\t\t\t\t\t\t\t\t=> 'tr([_-][a-z]+)?',\n\t\t\t'ukranian'\t\t\t\t\t\t\t\t\t\t=> 'uk([_-][a-z]+)?',\n\t\t\t'urdu'\t\t\t\t\t\t\t\t\t\t\t\t=> 'ur',\n\t\t\t'viatnamese'\t\t\t\t\t\t\t\t\t=> 'vi',\n\t\t\t'chinese_traditional_taiwan'\t=> 'zh[_-]tw',\n\t\t\t'chinese_simplified'\t\t\t\t\t=> 'zh',\n\t\t);\n\n\t\tif (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))\n\t\t{\n\t\t\t$accept_lang_ary = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);\n\t\t\tfor ($i = 0; $i < sizeof($accept_lang_ary); $i++)\n\t\t\t{\n\t\t\t\t@reset($match_lang);\n\t\t\t\twhile (list($lang, $match) = each($match_lang))\n\t\t\t\t{\n\t\t\t\t\tif (preg_match('#' . $match . '#i', trim($accept_lang_ary[$i])))\n\t\t\t\t\t{\n\t\t\t\t\t\tif (@file_exists(@$this->ip_realpath('language/lang_' . $lang)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn $lang;\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 'english';\n\t}", "public function getName_en()\n {\n return $this->name_en;\n }", "public function getName_en()\n {\n return $this->name_en;\n }", "private function _getFallbackLanguage(): string\n {\n /** @var WebApplication|ConsoleApplication $this */\n // See if we have the CP translated in one of the user's browsers preferred language(s)\n if ($this instanceof WebApplication) {\n $languages = $this->getI18n()->getAppLocaleIds();\n return $this->getRequest()->getPreferredLanguage($languages);\n }\n\n // Default to the source language.\n return $this->sourceLanguage;\n }", "protected function _getLanguageForLocale()\n {\n $locale = $this->worldpayhelper->getLocaleDefault();\n if (substr($locale, 3, 2) == 'NO') {\n return 'no';\n }\n return substr($locale, 0, 2);\n }", "public function getLang(): string {\n return $this->lang;\n }", "public function naturalName(string $language): string;", "public function getHttpLanguage()\n {\n if (isset($this->_server['HTTP_ACCEPT_LANGUAGE'])) {\n if (preg_match('/([a-z]{2}-[a-zA-Z]{2})/', $this->_server['HTTP_ACCEPT_LANGUAGE'], $matches)) {\n list($language, $locale) = explode('-', $matches[1]);\n $languageCode = $language .'-'. strtoupper($locale);\n return $languageCode;\n }\n }\n return 'nl-Nl';\n }", "public function getLocale($lang)\r\n\t{\r\n\t\t$languages = $this->getConfig(\"languages\");\r\n\t\t\r\n\t\tif ( $languages != null )\r\n\t\t{\r\n\t\t\tforeach ( $languages->language as $language )\r\n\t\t\t{\r\n\t\t\t\tif ( $language[\"code\"] == $lang )\r\n\t\t\t\t{\r\n\t\t\t\t\tforeach ($language->attributes() as $name => $value) {\r\n\t\t\t\t\t\tif ( $name == \"locale\" ) {\r\n\t\t\t\t\t\t\treturn (string) $value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// we got this far, then no matches!\r\n\t\t\r\n\t\treturn \"C\";\r\n\t}", "public function getLocale(): string;", "public function getLocale(): string;", "public function getLocale(): string;", "public function getName()\n {\n return '_locale';\n }", "function tincanlaunch_get_moodle_language() {\n $lang = current_language();\n $langarr = explode('_', $lang);\n if (count($langarr) == 2) {\n return $langarr[0] . '-' . strtoupper($langarr[1]);\n } else {\n return $lang;\n }\n}", "function languageISO()\r\n {\r\n if ( $this->LanguageISO != \"\" )\r\n return $this->LanguageISO;\r\n else\r\n return false;\r\n }", "abstract public function countryISOCode();", "private function getMacintoshLanguageCode()\n {\n $languageID = $this->languageID;\n\n switch ($languageID) {\n case 0:\n return 'en';\n case 1:\n return 'fr';\n case 2:\n return 'de';\n case 3:\n return 'it';\n case 4:\n return 'nl';\n case 5:\n return 'sv';\n case 6:\n return 'es';\n case 7:\n return 'da';\n case 8:\n return 'pt';\n case 9:\n return 'no';\n case 10:\n return 'he';\n case 11:\n return 'ja';\n case 12:\n return 'ar';\n case 13:\n return 'fi';\n case 14:\n return 'el';\n default:\n return null;\n }\n }", "function &happy_linux_get_lang_name_ja()\n{\n $arr = array('japanese', 'japaneseutf', 'ja_utf8');\n return $arr;\n}", "private function getLanguage(string $language): string\n {\n $language = trim($language);\n\n if (strlen($language) === 2) {\n $language = \"{$language}-{$language}\";\n }\n\n if (!preg_match(\"/^[a-z]{2}-[a-z]{2}$/i\", $language)) {\n throw new InvalidArgumentException(\"Unexpected language code ({$language}), codes should be 2 characters, a hyphen, and a further 2 characters\");\n }\n\n list($main, $sub) = explode(\"-\", $language);\n $language = strtolower($main) . \"-\" . strtoupper($sub);\n\n return $language;\n }", "public function getCountryName();", "function getLocale();", "public function getLanguage()\n {\n return $this->getFieldValue('language');\n }", "function GetLanguagesName()\r\n\t{\r\n\t\treturn $this->m_languages;\r\n\t}", "public function getLangcode(): string {\n return $this->langcode;\n }", "function languagelist()\n{\n\t // Need to ensure this is loaded for language defines\n\tpnBlockLoad('Core', 'thelang');\n\t// All entries use ISO 639-2/T\n\t// hilope - added all 469 languages available under ISO 639-2\n\t\n\t$lang['aar'] = _LANGUAGE_AAR; // Afar\n\t$lang['abk'] = _LANGUAGE_ABK; // Abkhazian\n\t$lang['ace'] = _LANGUAGE_ACE; // Achinese\n\t$lang['ach'] = _LANGUAGE_ACH; // Acoli\n\t$lang['ada'] = _LANGUAGE_ADA; // Adangme\n\t$lang['ady'] = _LANGUAGE_ADY; // Adyghe; Adygei\n\t$lang['afa'] = _LANGUAGE_AFA; // Afro-Asiatic (Other)\n\t$lang['afh'] = _LANGUAGE_AFH; // Afrihili\n\t$lang['afr'] = _LANGUAGE_AFR; // Afrikaans\n\t$lang['aka'] = _LANGUAGE_AKA; // Akan\n\t$lang['akk'] = _LANGUAGE_AKK; // Akkadian\n\t$lang['ale'] = _LANGUAGE_ALE; // Aleut\n\t$lang['alg'] = _LANGUAGE_ALG; // Algonquian languages\n\t$lang['amh'] = _LANGUAGE_AMH; // Amharic\n\t$lang['ang'] = _LANGUAGE_ANG; // English, Old\n\t$lang['apa'] = _LANGUAGE_APA; // Apache languages\n\t$lang['ara'] = _LANGUAGE_ARA; // Arabic\n\t$lang['arc'] = _LANGUAGE_ARC; // Aramaic\n\t$lang['arg'] = _LANGUAGE_ARG; // Aragonese\n\t$lang['arn'] = _LANGUAGE_ARN; // Araucanian\n\t$lang['arp'] = _LANGUAGE_ARP; // Arapaho\n\t$lang['art'] = _LANGUAGE_ART; // Artificial (Other)\n\t$lang['arw'] = _LANGUAGE_ARW; // Arawak\n\t$lang['asm'] = _LANGUAGE_ASM; // Assamese\n\t$lang['ast'] = _LANGUAGE_AST; // Asturian; Bable\n\t$lang['ath'] = _LANGUAGE_ATH; // Athapascan languages\n\t$lang['aus'] = _LANGUAGE_AUS; // Australian languages\n\t$lang['ava'] = _LANGUAGE_AVA; // Avaric\n\t$lang['ave'] = _LANGUAGE_AVE; // Avestan\n\t$lang['awa'] = _LANGUAGE_AWA; // Awadhi\n\t$lang['aym'] = _LANGUAGE_AYM; // Aymara\n\t$lang['aze'] = _LANGUAGE_AZE; // Azerbaijani\n\t$lang['bad'] = _LANGUAGE_BAD; // Banda\n\t$lang['bai'] = _LANGUAGE_BAI; // Bamileke languages\n\t$lang['bak'] = _LANGUAGE_BAK; // Bashkir\n\t$lang['bal'] = _LANGUAGE_BAL; // Baluchi\n\t$lang['bam'] = _LANGUAGE_BAM; // Bambara\n\t$lang['ban'] = _LANGUAGE_BAN; // Balinese\n\t$lang['bas'] = _LANGUAGE_BAS; // Basa\n\t$lang['bat'] = _LANGUAGE_BAT; // Baltic (Other)\n\t$lang['bej'] = _LANGUAGE_BEJ; // Beja\n\t$lang['bel'] = _LANGUAGE_BEL; // Belarusian\n\t$lang['bem'] = _LANGUAGE_BEM; // Bemba\n\t$lang['ben'] = _LANGUAGE_BEN; // Bengali\n\t$lang['ber'] = _LANGUAGE_BER; // Berber (Other)\n\t$lang['bho'] = _LANGUAGE_BHO; // Bhojpuri\n\t$lang['bih'] = _LANGUAGE_BIH; // Bihari\n\t$lang['bik'] = _LANGUAGE_BIK; // Bikol\n\t$lang['bin'] = _LANGUAGE_BIN; // Bini\n\t$lang['bis'] = _LANGUAGE_BIS; // Bislama\n\t$lang['bla'] = _LANGUAGE_BLA; // Siksika\n\t$lang['bnt'] = _LANGUAGE_BNT; // Bantu (Other)\n\t$lang['bod'] = _LANGUAGE_BOD; // Tibetan\n\t$lang['bos'] = _LANGUAGE_BOS; // Bosnian\n\t$lang['bra'] = _LANGUAGE_BRA; // Braj\n\t$lang['bre'] = _LANGUAGE_BRE; // Breton\n\t$lang['btk'] = _LANGUAGE_BTK; // Batak (Indonesia)\n\t$lang['bua'] = _LANGUAGE_BUA; // Buriat\n\t$lang['bug'] = _LANGUAGE_BUG; // Buginese\n\t$lang['bul'] = _LANGUAGE_BUL; // Bulgarian\n\t$lang['byn'] = _LANGUAGE_BYN; // Blin; Bilin\n\t$lang['cad'] = _LANGUAGE_CAD; // Caddo\n\t$lang['cai'] = _LANGUAGE_CAI; // Central American Indian (Other)\n\t$lang['car'] = _LANGUAGE_CAR; // Carib\n\t$lang['cat'] = _LANGUAGE_CAT; // Catalan; Valencian\n\t$lang['cau'] = _LANGUAGE_CAU; // Caucasian (Other)\n\t$lang['ceb'] = _LANGUAGE_CEB; // Cebuano\n\t$lang['cel'] = _LANGUAGE_CEL; // Celtic (Other)\n\t$lang['ces'] = _LANGUAGE_CES; // Czech\n\t$lang['cha'] = _LANGUAGE_CHA; // Chamorro\n\t$lang['chb'] = _LANGUAGE_CHB; // Chibcha\n\t$lang['che'] = _LANGUAGE_CHE; // Chechen\n\t$lang['chg'] = _LANGUAGE_CHG; // Chagatai\n\t$lang['chk'] = _LANGUAGE_CHK; // Chuukese\n\t$lang['chm'] = _LANGUAGE_CHM; // Mari\n\t$lang['chn'] = _LANGUAGE_CHN; // Chinook jargon\n\t$lang['cho'] = _LANGUAGE_CHO; // Choctaw\n\t$lang['chp'] = _LANGUAGE_CHP; // Chipewyan\n\t$lang['chr'] = _LANGUAGE_CHR; // Cherokee\n\t$lang['chu'] = _LANGUAGE_CHU; // Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic\n\t$lang['chv'] = _LANGUAGE_CHV; // Chuvash\n\t$lang['chy'] = _LANGUAGE_CHY; // Cheyenne\n\t$lang['cmc'] = _LANGUAGE_CMC; // Chamic languages\n\t$lang['cop'] = _LANGUAGE_COP; // Coptic\n\t$lang['cor'] = _LANGUAGE_COR; // Cornish\n\t$lang['cos'] = _LANGUAGE_COS; // Corsican\n\t$lang['cpe'] = _LANGUAGE_CPE; // Creoles and pidgins, English based (Other)\n\t$lang['cpf'] = _LANGUAGE_CPF; // Creoles and pidgins, French-based (Other)\n\t$lang['cpp'] = _LANGUAGE_CPP; // Creoles and pidgins,\n\t$lang['cre'] = _LANGUAGE_CRE; // Cree\n\t$lang['crh'] = _LANGUAGE_CRH; // Crimean Tatar; Crimean Turkish\n\t$lang['crp'] = _LANGUAGE_CRP; // Creoles and pidgins (Other)\n\t$lang['csb'] = _LANGUAGE_CSB; // Kashubian\n\t$lang['cus'] = _LANGUAGE_CUS; // Cushitic (Other)\n\t$lang['cym'] = _LANGUAGE_CYM; // Welsh\n\t$lang['dak'] = _LANGUAGE_DAK; // Dakota\n\t$lang['dan'] = _LANGUAGE_DAN; // Danish\n\t$lang['dar'] = _LANGUAGE_DAR; // Dargwa\n\t$lang['day'] = _LANGUAGE_DAY; // Dayak\n\t$lang['del'] = _LANGUAGE_DEL; // Delaware\n\t$lang['den'] = _LANGUAGE_DEN; // Slave (Athapascan)\n\t$lang['deu'] = _LANGUAGE_DEU; // German\n\t$lang['dgr'] = _LANGUAGE_DGR; // Dogrib\n\t$lang['din'] = _LANGUAGE_DIN; // Dinka\n\t$lang['div'] = _LANGUAGE_DIV; // Divehi\n\t$lang['doi'] = _LANGUAGE_DOI; // Dogri\n\t$lang['dra'] = _LANGUAGE_DRA; // Dravidian (Other)\n\t$lang['dsb'] = _LANGUAGE_DSB; // Lower Sorbian\n\t$lang['dua'] = _LANGUAGE_DUA; // Duala\n\t$lang['dum'] = _LANGUAGE_DUM; // Dutch, Middle\n\t$lang['dyu'] = _LANGUAGE_DYU; // Dyula\n\t$lang['dzo'] = _LANGUAGE_DZO; // Dzongkha\n\t$lang['efi'] = _LANGUAGE_EFI; // Efik\n\t$lang['egy'] = _LANGUAGE_EGY; // Egyptian (Ancient)\n\t$lang['eka'] = _LANGUAGE_EKA; // Ekajuk\n\t$lang['ell'] = _LANGUAGE_ELL; // Greek, Modern\n\t$lang['elx'] = _LANGUAGE_ELX; // Elamite\n\t$lang['eng'] = _LANGUAGE_ENG; // English\n\t$lang['enm'] = _LANGUAGE_ENM; // English, Middle\n\t$lang['epo'] = _LANGUAGE_EPO; // Esperanto\n\t$lang['est'] = _LANGUAGE_EST; // Estonian\n\t$lang['eus'] = _LANGUAGE_EUS; // Basque\n\t$lang['ewe'] = _LANGUAGE_EWE; // Ewe\n\t$lang['ewo'] = _LANGUAGE_EWO; // Ewondo\n\t$lang['fan'] = _LANGUAGE_FAN; // Fang\n\t$lang['fao'] = _LANGUAGE_FAO; // Faroese\n\t$lang['fas'] = _LANGUAGE_FAS; // Persian\n\t$lang['fat'] = _LANGUAGE_FAT; // Fanti\n\t$lang['fij'] = _LANGUAGE_FIJ; // Fijian\n\t$lang['fin'] = _LANGUAGE_FIN; // Finnish\n\t$lang['fiu'] = _LANGUAGE_FIU; // Finno-Ugrian (Other)\n\t$lang['fon'] = _LANGUAGE_FON; // Fon\n\t$lang['fra'] = _LANGUAGE_FRA; // French\n\t$lang['frm'] = _LANGUAGE_FRM; // French, Middle\n\t$lang['fro'] = _LANGUAGE_FRO; // French, Old\n\t$lang['fry'] = _LANGUAGE_FRY; // Frisian\n\t$lang['ful'] = _LANGUAGE_FUL; // Fulah\n\t$lang['fur'] = _LANGUAGE_FUR; // Friulian\n\t$lang['gaa'] = _LANGUAGE_GAA; // Ga\n\t$lang['gay'] = _LANGUAGE_GAY; // Gayo\n\t$lang['gba'] = _LANGUAGE_GBA; // Gbaya\n\t$lang['gem'] = _LANGUAGE_GEM; // Germanic (Other)\n\t$lang['gez'] = _LANGUAGE_GEZ; // Geez\n\t$lang['gil'] = _LANGUAGE_GIL; // Gilbertese\n\t$lang['gla'] = _LANGUAGE_GLA; // Gaelic; Scottish Gaelic\n\t$lang['gle'] = _LANGUAGE_GLE; // Irish\n\t$lang['glg'] = _LANGUAGE_GLG; // Galician\n\t$lang['glv'] = _LANGUAGE_GLV; // Manx\n\t$lang['gmh'] = _LANGUAGE_GMH; // German, Middle High\n\t$lang['goh'] = _LANGUAGE_GOH; // German, Old High\n\t$lang['gon'] = _LANGUAGE_GON; // Gondi\n\t$lang['gor'] = _LANGUAGE_GOR; // Gorontalo\n\t$lang['got'] = _LANGUAGE_GOT; // Gothic\n\t$lang['grb'] = _LANGUAGE_GRB; // Grebo\n\t$lang['grc'] = _LANGUAGE_GRC; // Greek, Ancient\n\t$lang['grn'] = _LANGUAGE_GRN; // Guarani\n\t$lang['guj'] = _LANGUAGE_GUJ; // Gujarati\n\t$lang['gwi'] = _LANGUAGE_GWI; // Gwich´in\n\t$lang['hai'] = _LANGUAGE_HAI; // Haida\n\t$lang['hat'] = _LANGUAGE_HAT; // Haitian; Haitian Creole\n\t$lang['hau'] = _LANGUAGE_HAU; // Hausa\n\t$lang['haw'] = _LANGUAGE_HAW; // Hawaiian\n\t$lang['heb'] = _LANGUAGE_HEB; // Hebrew\n\t$lang['her'] = _LANGUAGE_HER; // Herero\n\t$lang['hil'] = _LANGUAGE_HIL; // Hiligaynon\n\t$lang['him'] = _LANGUAGE_HIM; // Himachali\n\t$lang['hin'] = _LANGUAGE_HIN; // Hindi\n\t$lang['hit'] = _LANGUAGE_HIT; // Hittite\n\t$lang['hmn'] = _LANGUAGE_HMN; // Hmong\n\t$lang['hmo'] = _LANGUAGE_HMO; // Hiri Motu\n\t$lang['hrv'] = _LANGUAGE_HRV; // Croatian\n\t$lang['hsb'] = _LANGUAGE_HSB; // Upper Sorbian\n\t$lang['hun'] = _LANGUAGE_HUN; // Hungarian\n\t$lang['hup'] = _LANGUAGE_HUP; // Hupa\n\t$lang['hye'] = _LANGUAGE_HYE; // Armenian\n\t$lang['iba'] = _LANGUAGE_IBA; // Iban\n\t$lang['ibo'] = _LANGUAGE_IBO; // Igbo\n\t$lang['ido'] = _LANGUAGE_IDO; // Ido\n\t$lang['iii'] = _LANGUAGE_III; // Sichuan Yi\n\t$lang['ijo'] = _LANGUAGE_IJO; // Ijo\n\t$lang['iku'] = _LANGUAGE_IKU; // Inuktitut\n\t$lang['ile'] = _LANGUAGE_ILE; // Interlingue\n\t$lang['ilo'] = _LANGUAGE_ILO; // Iloko\n\t$lang['ina'] = _LANGUAGE_INA; // Interlingua (International Auxiliary Language Association)\n\t$lang['inc'] = _LANGUAGE_INC; // Indic (Other)\n\t$lang['ind'] = _LANGUAGE_IND; // Indonesian\n\t$lang['ine'] = _LANGUAGE_INE; // Indo-European (Other)\n\t$lang['inh'] = _LANGUAGE_INH; // Ingush\n\t$lang['ipk'] = _LANGUAGE_IPK; // Inupiaq\n\t$lang['ira'] = _LANGUAGE_IRA; // Iranian (Other)\n\t$lang['iro'] = _LANGUAGE_IRO; // Iroquoian languages\n\t$lang['isl'] = _LANGUAGE_ISL; // Icelandic\n\t$lang['ita'] = _LANGUAGE_ITA; // Italian\n\t$lang['jav'] = _LANGUAGE_JAV; // Javanese\n\t$lang['jbo'] = _LANGUAGE_JBO; // Lojban\n\t$lang['jpn'] = _LANGUAGE_JPN; // Japanese\n\t$lang['jpr'] = _LANGUAGE_JPR; // Judeo-Persian\n\t$lang['jrb'] = _LANGUAGE_JRB; // Judeo-Arabic\n\t$lang['kaa'] = _LANGUAGE_KAA; // Kara-Kalpak\n\t$lang['kab'] = _LANGUAGE_KAB; // Kabyle\n\t$lang['kac'] = _LANGUAGE_KAC; // Kachin\n\t$lang['kal'] = _LANGUAGE_KAL; // Kalaallisut; Greenlandic\n\t$lang['kam'] = _LANGUAGE_KAM; // Kamba\n\t$lang['kan'] = _LANGUAGE_KAN; // Kannada\n\t$lang['kar'] = _LANGUAGE_KAR; // Karen\n\t$lang['kas'] = _LANGUAGE_KAS; // Kashmiri\n\t$lang['kat'] = _LANGUAGE_KAT; // Georgian\n\t$lang['kau'] = _LANGUAGE_KAU; // Kanuri\n\t$lang['kaw'] = _LANGUAGE_KAW; // Kawi\n\t$lang['kaz'] = _LANGUAGE_KAZ; // Kazakh\n\t$lang['kbd'] = _LANGUAGE_KBD; // Kabardian\n\t$lang['kha'] = _LANGUAGE_KHA; // Khasi\n\t$lang['khi'] = _LANGUAGE_KHI; // Khoisan (Other)\n\t$lang['khm'] = _LANGUAGE_KHM; // Khmer\n\t$lang['kho'] = _LANGUAGE_KHO; // Khotanese\n\t$lang['kik'] = _LANGUAGE_KIK; // Kikuyu; Gikuyu\n\t$lang['kin'] = _LANGUAGE_KIN; // Kinyarwanda\n\t$lang['kir'] = _LANGUAGE_KIR; // Kirghiz\n\t$lang['kmb'] = _LANGUAGE_KMB; // Kimbundu\n\t$lang['kok'] = _LANGUAGE_KOK; // Konkani\n\t$lang['kom'] = _LANGUAGE_KOM; // Komi\n\t$lang['kon'] = _LANGUAGE_KON; // Kongo\n\t$lang['kor'] = _LANGUAGE_KOR; // Korean\n\t$lang['kos'] = _LANGUAGE_KOS; // Kosraean\n\t$lang['kpe'] = _LANGUAGE_KPE; // Kpelle\n\t$lang['krc'] = _LANGUAGE_KRC; // Karachay-Balkar\n\t$lang['kro'] = _LANGUAGE_KRO; // Kru\n\t$lang['kru'] = _LANGUAGE_KRU; // Kurukh\n\t$lang['kua'] = _LANGUAGE_KUA; // Kuanyama; Kwanyama\n\t$lang['kum'] = _LANGUAGE_KUM; // Kumyk\n\t$lang['kur'] = _LANGUAGE_KUR; // Kurdish\n\t$lang['kut'] = _LANGUAGE_KUT; // Kutenai\n\t$lang['lad'] = _LANGUAGE_LAD; // Ladino\n\t$lang['lah'] = _LANGUAGE_LAH; // Lahnda\n\t$lang['lam'] = _LANGUAGE_LAM; // Lamba\n\t$lang['lao'] = _LANGUAGE_LAO; // Lao\n\t$lang['lat'] = _LANGUAGE_LAT; // Latin\n\t$lang['lav'] = _LANGUAGE_LAV; // Latvian\n\t$lang['lez'] = _LANGUAGE_LEZ; // Lezghian\n\t$lang['lim'] = _LANGUAGE_LIM; // Limburgan; Limburger; Limburgish\n\t$lang['lin'] = _LANGUAGE_LIN; // Lingala\n\t$lang['lit'] = _LANGUAGE_LIT; // Lithuanian\n\t$lang['lol'] = _LANGUAGE_LOL; // Mongo\n\t$lang['loz'] = _LANGUAGE_LOZ; // Lozi\n\t$lang['ltz'] = _LANGUAGE_LTZ; // Luxembourgish; Letzeburgesch\n\t$lang['lua'] = _LANGUAGE_LUA; // Luba-Lulua\n\t$lang['lub'] = _LANGUAGE_LUB; // Luba-Katanga\n\t$lang['lug'] = _LANGUAGE_LUG; // Ganda\n\t$lang['lui'] = _LANGUAGE_LUI; // Luiseno\n\t$lang['lun'] = _LANGUAGE_LUN; // Lunda\n\t$lang['luo'] = _LANGUAGE_LUO; // Luo (Kenya and Tanzania)\n\t$lang['lus'] = _LANGUAGE_LUS; // lushai\n\t$lang['mad'] = _LANGUAGE_MAD; // Madurese\n\t$lang['mag'] = _LANGUAGE_MAG; // Magahi\n\t$lang['mah'] = _LANGUAGE_MAH; // Marshallese\n\t$lang['mai'] = _LANGUAGE_MAI; // Maithili\n\t$lang['mak'] = _LANGUAGE_MAK; // Makasar\n\t$lang['mal'] = _LANGUAGE_MAL; // Malayalam\n\t$lang['man'] = _LANGUAGE_MAN; // Mandingo\n\t$lang['map'] = _LANGUAGE_MAP; // Austronesian (Other)\n\t$lang['mar'] = _LANGUAGE_MAR; // Marathi\n\t$lang['mas'] = _LANGUAGE_MAS; // Masai\n\t$lang['mdf'] = _LANGUAGE_MDF; // Moksha\n\t$lang['mdr'] = _LANGUAGE_MDR; // Mandar\n\t$lang['men'] = _LANGUAGE_MEN; // Mende\n\t$lang['mga'] = _LANGUAGE_MGA; // Irish, Middle\n\t$lang['mic'] = _LANGUAGE_MIC; // Micmac\n\t$lang['min'] = _LANGUAGE_MIN; // Minangkabau\n\t$lang['mis'] = _LANGUAGE_MIS; // Miscellaneous languages\n\t$lang['mkd'] = _LANGUAGE_MKD; // Macedonian\n\t$lang['mkh'] = _LANGUAGE_MKH; // Mon-Khmer (Other)\n\t$lang['mlg'] = _LANGUAGE_MLG; // Malagasy\n\t$lang['mlt'] = _LANGUAGE_MLT; // Maltese\n\t$lang['mnc'] = _LANGUAGE_MNC; // Manchu\n\t$lang['mni'] = _LANGUAGE_MNI; // Manipuri\n\t$lang['mno'] = _LANGUAGE_MNO; // Manobo languages\n\t$lang['moh'] = _LANGUAGE_MOH; // Mohawk\n\t$lang['mol'] = _LANGUAGE_MOL; // Moldavian\n\t$lang['mon'] = _LANGUAGE_MON; // Mongolian\n\t$lang['mos'] = _LANGUAGE_MOS; // Mossi\n\t$lang['mri'] = _LANGUAGE_MRI; // Maori\n\t$lang['msa'] = _LANGUAGE_MSA; // Malay\n\t$lang['mul'] = _LANGUAGE_MUL; // Multiple languages\n\t$lang['mun'] = _LANGUAGE_MUN; // Munda languages\n\t$lang['mus'] = _LANGUAGE_MUS; // Creek\n\t$lang['mwr'] = _LANGUAGE_MWR; // Marwari\n\t$lang['mya'] = _LANGUAGE_MYA; // Burmese\n\t$lang['myn'] = _LANGUAGE_MYN; // Mayan languages\n\t$lang['myv'] = _LANGUAGE_MYV; // Erzya\n\t$lang['nah'] = _LANGUAGE_NAH; // Nahuatl\n\t$lang['nai'] = _LANGUAGE_NAI; // North American Indian\n\t$lang['nap'] = _LANGUAGE_NAP; // Neapolitan\n\t$lang['nau'] = _LANGUAGE_NAU; // Nauru\n\t$lang['nav'] = _LANGUAGE_NAV; // Navajo; Navaho\n\t$lang['nbl'] = _LANGUAGE_NBL; // Ndebele, South; South Ndebele\n\t$lang['nde'] = _LANGUAGE_NDE; // Ndebele, North; North Ndebele\n\t$lang['ndo'] = _LANGUAGE_NDO; // Ndonga\n\t$lang['nds'] = _LANGUAGE_NDS; // Low German; Low Saxon; German, Low; Saxon, Low\n\t$lang['nep'] = _LANGUAGE_NEP; // Nepali\n\t$lang['new'] = _LANGUAGE_NEW; // Newari; Nepal Bhasa\n\t$lang['nia'] = _LANGUAGE_NIA; // Nias\n\t$lang['nic'] = _LANGUAGE_NIC; // Niger-Kordofanian (Other)\n\t$lang['niu'] = _LANGUAGE_NIU; // Niuean\n\t$lang['nld'] = _LANGUAGE_NLD; // Dutch; Flemish\n\t$lang['nno'] = _LANGUAGE_NNO; // Norwegian Nynorsk; Nynorsk, Norwegian\n\t$lang['nob'] = _LANGUAGE_NOB; // Norwegian Bokmċl; Bokmċl, Norwegian\n\t$lang['nog'] = _LANGUAGE_NOG; // Nogai\n\t$lang['non'] = _LANGUAGE_NON; // Norse, Old\n\t$lang['nor'] = _LANGUAGE_NOR; // Norwegian\n\t$lang['nso'] = _LANGUAGE_NSO; // Sotho, Northern\n\t$lang['nub'] = _LANGUAGE_NUB; // Nubian languages\n\t$lang['nwc'] = _LANGUAGE_NWC; // Classical Newari; Old Newari; Classical Nepal Bhasa\n\t$lang['nya'] = _LANGUAGE_NYA; // Chichewa; Chewa; Nyanja\n\t$lang['nym'] = _LANGUAGE_NYM; // Nyamwezi\n\t$lang['nyn'] = _LANGUAGE_NYN; // Nyankole\n\t$lang['nyo'] = _LANGUAGE_NYO; // Nyoro\n\t$lang['nzi'] = _LANGUAGE_NZI; // Nzima\n\t$lang['oci'] = _LANGUAGE_OCI; // Occitan; Provençal\n\t$lang['oji'] = _LANGUAGE_OJI; // Ojibwa\n\t$lang['ori'] = _LANGUAGE_ORI; // Oriya\n\t$lang['orm'] = _LANGUAGE_ORM; // Oromo\n\t$lang['osa'] = _LANGUAGE_OSA; // Osage\n\t$lang['oss'] = _LANGUAGE_OSS; // Ossetian; Ossetic\n\t$lang['ota'] = _LANGUAGE_OTA; // Turkish, Ottoman\n\t$lang['oto'] = _LANGUAGE_OTO; // Otomian languages\n\t$lang['paa'] = _LANGUAGE_PAA; // Papuan (Other)\n\t$lang['pag'] = _LANGUAGE_PAG; // Pangasinan\n\t$lang['pal'] = _LANGUAGE_PAL; // Pahlavi\n\t$lang['pam'] = _LANGUAGE_PAM; // Pampanga\n\t$lang['pan'] = _LANGUAGE_PAN; // Panjabi; Punjabi\n\t$lang['pap'] = _LANGUAGE_PAP; // Papiamento\n\t$lang['pau'] = _LANGUAGE_PAU; // Palauan\n\t$lang['peo'] = _LANGUAGE_PEO; // Persian, Old\n\t$lang['phi'] = _LANGUAGE_PHI; // Philippine (Other)\n\t$lang['phn'] = _LANGUAGE_PHN; // Phoenician\n\t$lang['pli'] = _LANGUAGE_PLI; // Pali\n\t$lang['pol'] = _LANGUAGE_POL; // Polish\n\t$lang['pon'] = _LANGUAGE_PON; // Pohnpeian\n\t$lang['por'] = _LANGUAGE_POR; // Portuguese\n\t$lang['pra'] = _LANGUAGE_PRA; // Prakrit languages\n\t$lang['pro'] = _LANGUAGE_PRO; // Provençal, Old\n\t$lang['pus'] = _LANGUAGE_PUS; // Pushto\n\t$lang['qaa-qtz'] = _LANGUAGE_QAA_QTZ; // Reserved for local use\n\t$lang['que'] = _LANGUAGE_QUE; // Quechua\n\t$lang['raj'] = _LANGUAGE_RAJ; // Rajasthani\n\t$lang['rap'] = _LANGUAGE_RAP; // Rapanui\n\t$lang['rar'] = _LANGUAGE_RAR; // Rarotongan\n\t$lang['roa'] = _LANGUAGE_ROA; // Romance (Other)\n\t$lang['roh'] = _LANGUAGE_ROH; // Raeto-Romance\n\t$lang['rom'] = _LANGUAGE_ROM; // Romany\n\t$lang['ron'] = _LANGUAGE_RON; // Romanian\n\t$lang['run'] = _LANGUAGE_RUN; // Rundi\n\t$lang['rus'] = _LANGUAGE_RUS; // Russian\n\t$lang['sad'] = _LANGUAGE_SAD; // Sandawe\n\t$lang['sag'] = _LANGUAGE_SAG; // Sango\n\t$lang['sah'] = _LANGUAGE_SAH; // Yakut\n\t$lang['sai'] = _LANGUAGE_SAI; // South American Indian (Other)\n\t$lang['sal'] = _LANGUAGE_SAL; // Salishan languages\n\t$lang['sam'] = _LANGUAGE_SAM; // Samaritan Aramaic\n\t$lang['san'] = _LANGUAGE_SAN; // Sanskrit\n\t$lang['sas'] = _LANGUAGE_SAS; // Sasak\n\t$lang['sat'] = _LANGUAGE_SAT; // Santali\n\t$lang['sco'] = _LANGUAGE_SCO; // Scots\n\t$lang['scr'] = _LANGUAGE_SCR; // Serbo-Croatian\n\t$lang['sel'] = _LANGUAGE_SEL; // Selkup\n\t$lang['sem'] = _LANGUAGE_SEM; // Semitic (Other)\n\t$lang['sga'] = _LANGUAGE_SGA; // Irish, Old\n\t$lang['sgn'] = _LANGUAGE_SGN; // Sign Languages\n\t$lang['shn'] = _LANGUAGE_SHN; // Shan\n\t$lang['sid'] = _LANGUAGE_SID; // Sidamo\n\t$lang['sin'] = _LANGUAGE_SIN; // Sinhalese\n\t$lang['sio'] = _LANGUAGE_SIO; // Siouan languages\n\t$lang['sit'] = _LANGUAGE_SIT; // Sino-Tibetan (Other)\n\t$lang['sla'] = _LANGUAGE_SLA; // Slavic (Other)\n\t$lang['slk'] = _LANGUAGE_SLK; // Slovak\n\t$lang['slv'] = _LANGUAGE_SLV; // Slovenian\n\t$lang['sma'] = _LANGUAGE_SMA; // Southern Sami\n\t$lang['sme'] = _LANGUAGE_SME; // Northern Sami\n\t$lang['smi'] = _LANGUAGE_SMI; // Sami languages (Other)\n\t$lang['smj'] = _LANGUAGE_SMJ; // Lule Sami\n\t$lang['smn'] = _LANGUAGE_SMN; // Inari Sami\n\t$lang['smo'] = _LANGUAGE_SMO; // Samoan\n\t$lang['sms'] = _LANGUAGE_SMS; // Skolt Sami\n\t$lang['sna'] = _LANGUAGE_SNA; // Shona\n\t$lang['snd'] = _LANGUAGE_SND; // Sindhi\n\t$lang['snk'] = _LANGUAGE_SNK; // Soninke\n\t$lang['sog'] = _LANGUAGE_SOG; // Sogdian\n\t$lang['som'] = _LANGUAGE_SOM; // Somali\n\t$lang['son'] = _LANGUAGE_SON; // Songhai\n\t$lang['sot'] = _LANGUAGE_SOT; // Sotho, Southern\n\t$lang['spa'] = _LANGUAGE_SPA; // Spanish; Castilian\n\t$lang['sqi'] = _LANGUAGE_SQI; // Albanian\n\t$lang['srd'] = _LANGUAGE_SRD; // Sardinian\n\t$lang['srp'] = _LANGUAGE_SRP; // Serbian\n\t$lang['srr'] = _LANGUAGE_SRR; // Serer\n\t$lang['ssa'] = _LANGUAGE_SSA; // Nilo-Saharan (Other)\n\t$lang['ssw'] = _LANGUAGE_SSW; // Swati\n\t$lang['suk'] = _LANGUAGE_SUK; // Sukuma\n\t$lang['sun'] = _LANGUAGE_SUN; // Sundanese\n\t$lang['sus'] = _LANGUAGE_SUS; // Susu\n\t$lang['sux'] = _LANGUAGE_SUX; // Sumerian\n\t$lang['swa'] = _LANGUAGE_SWA; // Swahili\n\t$lang['swe'] = _LANGUAGE_SWE; // Swedish\n\t$lang['syr'] = _LANGUAGE_SYR; // Syriac\n\t$lang['tah'] = _LANGUAGE_TAH; // Tahitian\n\t$lang['tai'] = _LANGUAGE_TAI; // Tai (Other)\n\t$lang['tam'] = _LANGUAGE_TAM; // Tamil\n\t$lang['tat'] = _LANGUAGE_TAT; // Tatar\n\t$lang['tel'] = _LANGUAGE_TEL; // Telugu\n\t$lang['tem'] = _LANGUAGE_TEM; // Timne\n\t$lang['ter'] = _LANGUAGE_TER; // Tereno\n\t$lang['tet'] = _LANGUAGE_TET; // Tetum\n\t$lang['tgk'] = _LANGUAGE_TGK; // Tajik\n\t$lang['tgl'] = _LANGUAGE_TGL; // Tagalog\n\t$lang['tha'] = _LANGUAGE_THA; // Thai\n\t$lang['tig'] = _LANGUAGE_TIG; // Tigre\n\t$lang['tir'] = _LANGUAGE_TIR; // Tigrinya\n\t$lang['tiv'] = _LANGUAGE_TIV; // Tiv\n\t$lang['tkl'] = _LANGUAGE_TKL; // Tokelau\n\t$lang['tlh'] = _LANGUAGE_TLH; // Klingon; tlhlngan-Hol\n\t$lang['tli'] = _LANGUAGE_TLI; // Tlingit\n\t$lang['tmh'] = _LANGUAGE_TMH; // Tamashek\n\t$lang['tog'] = _LANGUAGE_TOG; // Tonga (Nyasa)\n\t$lang['ton'] = _LANGUAGE_TON; // Tonga (Tonga Islands)\n\t$lang['tpi'] = _LANGUAGE_TPI; // Tok Pisin\n\t$lang['tsi'] = _LANGUAGE_TSI; // Tsimshian\n\t$lang['tsn'] = _LANGUAGE_TSN; // Tswana\n\t$lang['tso'] = _LANGUAGE_TSO; // Tsonga\n\t$lang['tuk'] = _LANGUAGE_TUK; // Turkmen\n\t$lang['tum'] = _LANGUAGE_TUM; // Tumbuka\n\t$lang['tup'] = _LANGUAGE_TUP; // Tupi languages\n\t$lang['tur'] = _LANGUAGE_TUR; // Turkish\n\t$lang['tut'] = _LANGUAGE_TUT; // Altaic (Other)\n\t$lang['tvl'] = _LANGUAGE_TVL; // Tuvalu\n\t$lang['twi'] = _LANGUAGE_TWI; // Twi\n\t$lang['tyv'] = _LANGUAGE_TYV; // Tuvinian\n\t$lang['udm'] = _LANGUAGE_UDM; // Udmurt\n\t$lang['uga'] = _LANGUAGE_UGA; // Ugaritic\n\t$lang['uig'] = _LANGUAGE_UIG; // Uighur\n\t$lang['ukr'] = _LANGUAGE_UKR; // Ukrainian\n\t$lang['umb'] = _LANGUAGE_UMB; // Umbundu\n\t$lang['und'] = _LANGUAGE_UND; // Undetermined\n\t$lang['urd'] = _LANGUAGE_URD; // Urdu\n\t$lang['uzb'] = _LANGUAGE_UZB; // Uzbek\n\t$lang['vai'] = _LANGUAGE_VAI; // Vai\n\t$lang['ven'] = _LANGUAGE_VEN; // Venda\n\t$lang['vie'] = _LANGUAGE_VIE; // Vietnamese\n\t$lang['vol'] = _LANGUAGE_VOL; // Volapük\n\t$lang['vot'] = _LANGUAGE_VOT; // Votic\n\t$lang['wak'] = _LANGUAGE_WAK; // Wakashan languages\n\t$lang['wal'] = _LANGUAGE_WAL; // Walamo\n\t$lang['war'] = _LANGUAGE_WAR; // Waray\n\t$lang['was'] = _LANGUAGE_WAS; // Washo\n\t$lang['wen'] = _LANGUAGE_WEN; // Sorbian languages\n\t$lang['wln'] = _LANGUAGE_WLN; // Walloon\n\t$lang['wol'] = _LANGUAGE_WOL; // Wolof\n\t$lang['xal'] = _LANGUAGE_XAL; // Kalmyk\n\t$lang['xho'] = _LANGUAGE_XHO; // Xhosa\n\t$lang['yao'] = _LANGUAGE_YAO; // Yao\n\t$lang['yap'] = _LANGUAGE_YAP; // Yapese\n\t$lang['yid'] = _LANGUAGE_YID; // Yiddish\n\t$lang['yor'] = _LANGUAGE_YOR; // Yoruba\n\t$lang['ypk'] = _LANGUAGE_YPK; // Yupik languages\n\t$lang['zap'] = _LANGUAGE_ZAP; // Zapotec\n\t$lang['zen'] = _LANGUAGE_ZEN; // Zenaga\n\t$lang['zha'] = _LANGUAGE_ZHA; // Zhuang; Chuang\n\t$lang['zho'] = _LANGUAGE_ZHO; // Chinese\n\t$lang['znd'] = _LANGUAGE_ZND; // Zande\n\t$lang['zul'] = _LANGUAGE_ZUL; // Zulu\n\t$lang['zun'] = _LANGUAGE_ZUN; // Zuni\n\t// Non-ISO entries are written as x_[language name]\n\t$lang['x_all'] = _ALL; // all languages\n\t$lang['x_brazilian_portuguese'] = _LANGUAGE_X_BRAZILIAN_PORTUGUESE; // Brazilian Portuguese\n\t$lang['x_rus_koi8r'] = _LANGUAGE_X_RUS_KOI8R; // Russian KOI8-R\n\t// end of list\n\treturn $lang;\n}", "public static function l() {\n\t\treturn self::getInstance()->getLocale();\n\t}", "function getI18nText($name,$lang) {\n\t//explode into parts\n\t$nameparts=explode(\".\",$name);\n\tfor ($i=0;$i<count($nameparts);$i++){\n\t\t$name = $nameparts[$i];\n\t\t$lang = $lang[$name];\n\t}\n\treturn $lang;\n}" ]
[ "0.7533291", "0.74934596", "0.73608685", "0.7353975", "0.7344581", "0.7309227", "0.72891605", "0.7252683", "0.71529776", "0.71125054", "0.70535076", "0.70249027", "0.7010627", "0.6972554", "0.6956007", "0.6930124", "0.69105226", "0.68854946", "0.6838637", "0.68323815", "0.68279696", "0.6827356", "0.6812459", "0.67993116", "0.67990416", "0.6798411", "0.6752105", "0.67506564", "0.67506564", "0.67506564", "0.67506564", "0.67506564", "0.67506564", "0.6725035", "0.6691598", "0.66887003", "0.66803414", "0.6669272", "0.66637844", "0.6660735", "0.66518205", "0.6643711", "0.6634694", "0.66264606", "0.6622803", "0.6619338", "0.66160774", "0.66061854", "0.6589574", "0.65880024", "0.65880024", "0.6586527", "0.65463936", "0.6537633", "0.6537633", "0.6519215", "0.65177613", "0.6515684", "0.6499632", "0.6490029", "0.6488573", "0.64817697", "0.64793587", "0.6455816", "0.6452184", "0.6447504", "0.6417673", "0.641658", "0.639861", "0.639861", "0.6396301", "0.6387352", "0.6383429", "0.63773096", "0.63767046", "0.63767046", "0.636684", "0.63490754", "0.6343944", "0.6338294", "0.6332279", "0.6329424", "0.63293695", "0.63293695", "0.63293695", "0.6325368", "0.63217497", "0.6315991", "0.6314794", "0.6311752", "0.63048387", "0.630016", "0.6297942", "0.62949556", "0.6294779", "0.6293619", "0.6291895", "0.6286631", "0.6261536", "0.6260376" ]
0.6931029
15
Render hreflang links for SEO
function weglotHrefLangRender() { $url = weglotCurrentUrlInstance(); return $url->generateHrefLangsTags(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateLangLinks() {\n\t\tglobal $_SERVER;\n\t\tforeach( $this->mLanguages as $cur_lang ) {\n\t\t\tif( $cur_lang != $this->mLang ) {\n\t\t\t\n\t\t\t\t$url = \"//tools.wmflabs.org\".$_SERVER['REQUEST_URI'];\n\t\t\t\t\n\t\t\t\tif( in_string( 'uselang', $url ) ) $url = preg_replace( '/uselang=(.*?)&?/', '', $url );\n\t\t\t\tif( in_string( '?', $url ) ) {\n\t\t\t\t\t$url = $url . \"&uselang=\".$cur_lang;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$url = $url . \"?uselang=\".$cur_lang;\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$this->mLanglinks.=\"<a href=\\\"\". $url.\"\\\">\".$cur_lang.\"</a> \";\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->mLanglinks;\n\t}", "function mumm_v2_preprocess_page_add_hreflang(&$node) {\n global $language;\n\n // Define hreflang replacements for special cases\n $hreflang_overrides = array(\n array('en-uk'),\n array('en-gb'),\n );\n\n /* $element = array(\n '#tag' => 'link',\n '#attributes' => array(\n 'hreflang' => 'x-default',\n 'rel' => 'alternate',\n 'href' => url('<front>', array(\n 'absolute' => true,\n 'language' => language_default(),\n ))\n ),\n ); */\n\n drupal_add_html_head($element, 'hreflang_x_default');\n\n // Add the page and all its translations\n $t_nodes = mumm_helpers_get_node_translations($node);\n if (!$t_nodes) {\n return;\n }\n\n $languages = language_list();\n $languages_code = array();\n\n foreach ($languages as $language_item) {\n $language_code = substr($language_item->prefix, 0, 2);\n if (isset($languages_code[$language_code])) {\n $languages_code[$language_code] ++;\n }\n else {\n $languages_code[$language_code] = 1;\n }\n }\n\n foreach ($t_nodes as $t_node) {\n\n $hreflang = FALSE;\n $language_object = FALSE;\n\n foreach ($languages as $language_item) {\n if ($language_item->language == $t_node->language) {\n $language_code = substr($language->prefix, 0, 2);\n if ($languages_code[$language_code] == 1) {\n $hreflang = $language_item->prefix;\n }\n else {\n $hreflang = $language_item->prefix;\n }\n $language_object = $language_item;\n break;\n }\n }\n\n $url = url(drupal_is_front_page() ? '<front>' : sprintf('node/%s', $t_node->nid), array(\n 'absolute' => TRUE,\n 'alias' => FALSE,\n 'language' => $language_object\n )\n );\n\n\n $element = array(\n '#tag' => 'link',\n '#attributes' => array(\n 'hreflang' => $language_object->prefix,\n 'rel' => 'alternate',\n 'href' => urldecode($url),\n ),\n );\n\n drupal_add_html_head($element, sprintf('hreflang_%s_%s', $t_node->nid, $t_node->language));\n }\n}", "function lang_link($l)\n{\n\tglobal $lang_lang, $lang_otherlang, $action, $languages;\n\tif(is_numeric($l) && $l>0 && $l<count($languages))\n\t\t$langindex = $l;\n\telse\n\t\t$langindex = 0;\n\t$qstr = preg_replace('/(^|&)(l=\\d)($|&)/','',$_SERVER['QUERY_STRING']);\n\t\n\t//Correct to show login page on lang change right after login. Actually, ignore action=login.\n\tif ($action == 'dashboard')\n\t\t$qstr = preg_replace('/action=login/','',$qstr);\n\t\n\tif (!empty($qstr)) $qstr = '&amp;'.$qstr;\n\t$link = \"<a href=\\\"?l=$langindex\".$qstr.\"\\\">{$lang_lang[$langindex]}</a>\";\n\treturn $link;\n}", "public function href($link, $language) {\r\n\t\techo \"<a title='$language' href='$link'>$language</a>\";\r\n\t}", "function lean_menu_item_link($link) {\n if (empty($link['localized_options'])) {\n $link['localized_options'] = array();\n }\n if ($link['title']=='漢字感じ') {\n $link['localized_options']['attributes']['lang'] = 'ja';\n }\n return l($link['title'], $link['href'], $link['localized_options']);\n}", "public function getHreflang()\n {\n return $this->hreflang;\n }", "public function fixHreflang()\n {\n global $config, $languages, $listing_data, $currentPage;\n\n if (!$config['mf_geo_subdomains'] || !$config['mod_rewrite'] || count($languages) == 1) {\n return;\n }\n\n $hreflang = array();\n $url = RL_URL_HOME . $currentPage;\n\n foreach ($languages as $lang_item) {\n $lang_code = $lang_item['Code'] == $config['lang'] ? '' : $lang_item['Code'];\n\n if ($this->detailsPage) {\n $hreflang[$lang_item['Code']] = $this->buildListingUrl($url, $listing_data, $lang_code);\n } else {\n $hreflang[$lang_item['Code']] = $this->makeUrlGeo($url, $lang_code);\n }\n }\n\n $GLOBALS['rlSmarty']->assign('hreflang', $hreflang);\n }", "function minorite_links($variables) {\n $links = $variables['links'];\n $attributes = $variables['attributes'];\n $heading = $variables['heading'];\n global $language_url;\n $output = '';\n\n if (count($links) > 0) {\n $output = '';\n\n // Treat the heading first if it is present to prepend it to the\n // list of links.\n if (!empty($heading)) {\n if (is_string($heading)) {\n // Prepare the array that will be used when the passed heading\n // is a string.\n $heading = array(\n 'text' => $heading,\n // Set the default level of the heading.\n 'level' => 'h2',\n );\n }\n $output .= '<' . $heading['level'];\n if (!empty($heading['class'])) {\n $output .= drupal_attributes(array('class' => $heading['class']));\n }\n $output .= '>' . check_plain($heading['text']) . '</' . $heading['level'] . '>';\n }\n\n $output .= '<ul' . drupal_attributes($attributes) . '>';\n\n $num_links = count($links);\n $i = 1;\n\n foreach ($links as $key => $link) {\n $class = array($key);\n\n if (isset($link['href']) && ($link['href'] == $_GET['q'] || ($link['href'] == '<front>' && drupal_is_front_page()))\n && (empty($link['language']) || $link['language']->language == $language_url->language)) {\n $class[] = 'nav-selected';\n }\n $output .= '<li' . drupal_attributes(array('class' => $class)) . '>';\n\n if (isset($link['href'])) {\n // Pass in $link as $options, they share the same keys.\n $output .= l($link['title'], $link['href'], $link);\n }\n elseif (!empty($link['title'])) {\n // Some links are actually not links, but we wrap these in <span> for adding title and class attributes.\n if (empty($link['html'])) {\n $link['title'] = check_plain($link['title']);\n }\n $span_attributes = '';\n if (isset($link['attributes'])) {\n $span_attributes = drupal_attributes($link['attributes']);\n }\n $output .= '<span' . $span_attributes . '>' . $link['title'] . '</span>';\n }\n\n $i++;\n $output .= \"</li>\\n\";\n }\n\n $output .= '</ul>';\n }\n\n return $output;\n}", "public function setHrefLang(string $lang, string $url);", "public static function links()\n {\n return \\Yii::t('yii', 'Designed by {developers}', [\n 'developers' => '<a href=\"http://www.yiiframework.com/\" rel=\"external\">' . \\Yii::t('yii', 'Yinan') . '</a>'\n ]);\n }", "function trlink($url)\n{\n // Check if the multi-language support is enabled\n if (!LocaleService::isMultilangEnabled()) {\n return $url;\n }\n\n // Parse the url\n $linkParts = parse_url($url);\n if ($linkParts === false) {\n return $url;\n }\n\n // It is an absolute url or there isn't no any path\n if (isset($linkParts['host']) || !isset($linkParts['path'])) {\n return $url;\n }\n\n // The link's path\n $linkPath = $linkParts['path'];\n\n // Get the current lang dir and the current page path\n $langDir = LocaleLinkService::getLangDir();\n $currentPath = LocaleLinkService::getPagePath();\n\n // Join the current path with the link path\n $resultUrl = '';\n if (substr($linkPath, 0, 1) === '/') {\n // An absolute path => Replace the current one\n $resultUrl = $linkPath;\n }\n else {\n // Relative paths => Merge with the current one\n // Note: the $currentPath is always absolute (start with '/') and it never\n // contains a trailing slash ('/')\n if ($currentPath === '/') {\n $resultUrl = '/' . $linkPath;\n }\n else {\n $resultUrl = dirname($currentPath) . '/' . $linkPath;\n }\n }\n \n // Using http_build_url\n // Available here without PECL: \n // // Join the current path with the link path\n // $resParts = [];\n // $linkParts['path'] = $currentPath;\n // http_build_url(\n // $linkParts, \n // array('path' => $linkPath),\n // HTTP_URL_JOIN_PATH,\n // $resParts\n // );\n // // Add the language dir\n // if (!empty($langDir)) {\n // $resParts['path'] = \"/{$langDir}\" . $resParts['path'];\n // }\n // return http_build_url($resParts);\n\n // Add the language dir\n if (!empty($langDir)) {\n $resultUrl = \"/{$langDir}\" . $resultUrl;\n }\n\n // Build the final url, preserving query string and fragment\n if (isset($linkParts['query'])) {\n $resultUrl .= '?' . $linkParts['query'];\n }\n if (isset($linkParts['fragment'])) {\n $resultUrl .= '#' . $linkParts['fragment'];\n }\n\n return $resultUrl;\n}", "public function setHreflang($hreflang)\n {\n $this->hreflang = $hreflang;\n }", "public function langSwitch($l)\n {\n if (isset($this->page) and $this->page->lang($l)) {\n return $this->link('this', array('lang' => $l));\n } //other lang mutation\n return $this->link('Pages:', array('lang' => $l)); //default page\n }", "public function links() {\n\t\t?>\n\t\t<ul>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/15uoww1\" target=\"_blank\"><?php echo __( 'Installation manual', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/W9GDQT\" target=\"_blank\"><?php echo __( 'Frequently Asked Questions', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/WW93Sk\" target=\"_blank\"><?php echo __( 'Report a bug', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/11UE2lF\" target=\"_blank\"><?php echo __( 'Request a function', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/XkivOW\" target=\"_blank\"><?php echo __( 'Submit a translation', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/UlDG4t\" target=\"_blank\"><?php echo __( 'More cool stuff by WPBuddy', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t</ul>\n\t<?php\n\t}", "function link_to_home_page($text = null, $props = array())\n{\n if (!$text) {\n $text = option('site_title');\n }\n return '<a href=\"' . html_escape(WEB_ROOT) . '\" '. tag_attributes($props) . '>' . $text . \"</a>\\n\";\n}", "public function url()\n\t{\n\t\t\n\t\t$lang = Config::get('app.locale');\n\t\t$route_prefix = ($lang == \"ar\" ? \"ar/\" : \"\");\t\t\n\t\treturn Url::to($route_prefix .'page/' .$this->link);\n\t}", "function minorite_links__locale_block($variables) {\n $variables['attributes']['class'] = array('nav', 'switch-tongue');\n // Removes class as it is not used.\n $variables['links']['en']['title'] = 'En';\n $variables['links']['en']['attributes']['title'] = t('English site');\n unset($variables['links']['en']['attributes']['class']);\n $variables['links']['fr']['title'] = 'Fr';\n $variables['links']['fr']['attributes']['title'] = t('French site');\n unset($variables['links']['fr']['attributes']['class']);\n\n return theme('links', $variables);\n}", "public static function link_to(){\n echo call_user_func_array('Laika::link_to', func_get_args() );\n }", "function buildLanguageSwitcher($slugs)\n {\n $html = '';\n foreach ($slugs as $key => $slug) {\n $links = $slug;\n foreach ($links as $lang => $value) {\n if ($lang == config('app.fallback_locale')) {\n $link = $value;\n //echo $link;\n } else {\n $link = $lang.'/'.$value;\n }\n $active = '';\n if ($lang == config('app.locale')) {\n $active = 'class=\"active\"';\n }\n\n $html .= '<li '.$active.'>'.'<a rel=\"alternate\" hreflang=\"'.$lang.'\" href=\"/'.$link.'\">'.$lang.'</a></li>';\n }\n }\n\n return $html;\n }", "function megaprojectske_links($variables) {\n global $language_url;\n\n $links = $variables['links'];\n $attributes = $variables['attributes'];\n $heading = $variables['heading'];\n $output = '';\n\n if (count($links) > 0) {\n $output .= '<ul' . drupal_attributes($attributes) . '>';\n\n // Treat the heading first if it is present to prepend it to the list of\n // links.\n if (!empty($heading)) {\n if (is_string($heading)) {\n // Prepare the array that will be used when the passed heading is a\n // string.\n $heading = array(\n 'text' => $heading,\n // Set the default level of the heading.\n 'level' => 'li',\n );\n }\n $output .= '<' . $heading['level'];\n if (!empty($heading['class'])) {\n $output .= drupal_attributes(array('class' => $heading['class']));\n }\n $output .= '>' . check_plain($heading['text']) . '</' . $heading['level'] . '>';\n }\n\n $num_links = count($links);\n $i = 1;\n\n foreach ($links as $key => $link) {\n $children = array();\n\n if (isset($link['below'])) {\n $children = $link['below'];\n }\n\n $attributes = array('class' => array($key));\n\n // Add first, last and active classes to the list of links to help out\n // themers.\n if ($i == 1) {\n $attributes['class'][] = 'first';\n }\n if ($i == $num_links) {\n $attributes['class'][] = 'last';\n }\n if (isset($link['href']) && ($link['href'] == $_GET['q'] || ($link['href'] == '<front>' && drupal_is_front_page()))\n && (empty($link['language']) || $link['language']->language == $language_url->language)) {\n $attributes['class'][] = 'active';\n }\n if (count($children) > 0) {\n $attributes['class'][] = 'dropdown';\n $link['attributes']['data-toggle'] = 'dropdown';\n $link['attributes']['class'][] = 'dropdown-toggle';\n }\n if (!isset($link['attributes'])) {\n $link['attributes'] = array();\n }\n\n $link['attributes'] = array_merge($link['attributes'], $attributes);\n\n if (count($children) > 0) {\n $link['attributes']['class'][] = 'dropdown';\n }\n\n $output .= '<li' . drupal_attributes($attributes) . '>';\n\n if (isset($link['href'])) {\n if (count($children) > 0) {\n $link['html'] = TRUE;\n $link['title'] .= '<span class=\"caret\"></span>';\n $output .= '<a' . drupal_attributes($link['attributes']) . ' href=\"#\">' . $link['title'] . '</a>';\n }\n else {\n // Pass in $link as $options, they share the same keys.\n $output .= l($link['title'], $link['href'], $link);\n }\n }\n elseif (!empty($link['title'])) {\n // Some links are actually not links, but we wrap these in <span> for adding title and class attributes.\n if (empty($link['html'])) {\n $link['title'] = check_plain($link['title']);\n }\n $span_attributes = '';\n if (isset($link['attributes'])) {\n $span_attributes = drupal_attributes($link['attributes']);\n }\n $output .= '<span' . $span_attributes . '>' . $link['title'] . '</span>';\n }\n\n $i++;\n\n if (count($children) > 0) {\n $attributes = array();\n $attributes['class'] = array('dropdown-menu');\n $output .= theme('bootstrap_links', array('links' => $children, 'attributes' => $attributes));\n }\n\n $output .= \"</li>\\n\";\n }\n\n $output .= '</ul>';\n }\n\n return $output;\n}", "function get_archives_link($url, $text, $format = 'html', $before = '', $after = '', $selected = \\false)\n {\n }", "public function url()\n {\n return '/' . $this->currlang();\n }", "public function render($view)\r\n {\r\n $links = '';\r\n $languages = $this->languageManager->getEnabledLanguages();\r\n foreach ($languages as $language) {\r\n $updatedUrl = $this->getUpdatedUrl($language['locale'], $view);\r\n if ($updatedUrl) {\r\n $title = ' title=\"' . $language['language'] . '\" ';\r\n $links .= '<a href=\"' . $updatedUrl . '\"><img src=\"' . $language['src'] . '\" ' . $title . ' /></a>';\r\n }\r\n }\r\n return $links;\r\n }", "function make_links_clickable($text)\r\n {\r\n return preg_replace('!(((f|ht)tp(s)?://)[-a-zA-Zа-яА-Я()0-9@:%_+.~#?&;//=]+)!i', '<a href=\"$1\" target=\"_blank\">$1</a>', $text);\r\n }", "public function asLink()\n {\n $label = $this->title ?: $this->value;\n return '<a href=\"' . $this->href .'\" title=\"' . $label . '\">' . $label . '</a>';\n }", "function render_link($text, $url) {\n return \"<a href=\\\"$url\\\">$text</a>\";\n }", "function link_a($dir,$cont){\r\n return \"<a href=\\\"$dir\\\">$cont</a>\";\r\n }", "function l($text,$url='#',$htmlOptions=array())\n{\n\treturn CHtml::link($text, $url, $htmlOptions);\n}", "function susy_menu_link(array $vars) {\n $element = $vars['element'];\n $sub_menu = '';\n\n if ($element['#below']) {\n $sub_menu = drupal_render($element['#below']);\n }\n\n $output = l($element['#title'], $element['#href'], $element['#localized_options']);\n // Adding a class depending on the TITLE of the link (not constant)\n $element['#attributes']['class'][] = drupal_html_id($element['#title']);\n // Adding a class depending on the ENGLISH title of the link (constant)\n $element['#attributes']['class'][] = drupal_html_id($element['#original_link']['link_title']);\n // Adding a class depending on the ID of the link (constant)\n if (isset($element['#original_link']['mlid']) && !empty($element['#original_link']['mlid'])) {\n $element['#attributes']['class'][] = 'mid-' . $element['#original_link']['mlid'];\n }\n return '<li' . drupal_attributes($element['#attributes']) . '>' . $output . $sub_menu . \"</li>\\n\";\n}", "function alink($title=null,$url=null,$attributes=[], $secure=null,$escape=false) \n\t{\n\t\treturn app('html')->alink($title,$url,$attributes,$secure,$escape);\n\t}", "function link_souce($text){\n\n if(post::isValidURL($text)){\n $text = '<a href=\"'.$text.'\">'.$text.'</a>';\n } \n return $text;\n }", "function urlSeoGen($lang) {\n\t\t$sql = $this->sql(\"SELECT * FROM page_url WHERE page_id = \".$this.\" AND lang = \".D()->quote($lang));\n\t\t$row = D()->row($sql);\n\t\t$url = $row && $row['custom'] ? $row['url'] : $this->urlSeoGenerated($lang);\n\t\t$this->urlSet($lang, ['url'=>$url]);\n\t\tforeach ($this->Children(['type'=>'*']) as $C) {\n\t\t\t$C->urlSeoGen($lang);\n\t\t}\n\t\treturn $url;\n\t}", "function headlink($label, $this_sort) {\n global $sort, $reverse, $course_code, $themeimg, $langUp, $langDown;\n $base_url = $_SERVER['SCRIPT_NAME'] . '?course=' . $course_code;\n\n if ($sort == $this_sort) {\n $this_reverse = !$reverse;\n $indicator = \" <img src='$themeimg/arrow_\" .\n ($reverse ? 'up' : 'down') . \".png' alt='\" .\n ($reverse ? $langUp : $langDown) . \"'>\";\n } else {\n $this_reverse = $reverse;\n $indicator = '';\n }\n return '<a class=\"text-white\" href=\"' . $base_url .\n '&amp;sort=' . $this_sort . ($this_reverse ? '&amp;rev=1' : '') .\n '\">' . $label . $indicator . '</a>';\n}", "function get_archives_link($url, $text, $format = 'html', $before = '', $after = '') {\n\t$text = wptexturize($text);\n\t$title_text = wp_specialchars($text, 1);\n\n\tif ('link' == $format)\n\t\treturn \"\\t<link rel='archives' title='$title_text' href='$url' />\\n\";\n\telseif ('option' == $format)\n\t\treturn \"\\t<option value='$url'>$before $text $after</option>\\n\";\n\telseif ('html' == $format)\n\t\treturn \"\\t<li>$before<a href='$url' title='$title_text'>$text</a>$after</li>\\n\";\n\telse // custom\n\t\treturn \"\\t$before<a href='$url' title='$title_text'>$text</a>$after\\n\";\n}", "function link_tag(\n $href = '',\n string $rel = 'stylesheet',\n string $type = 'text/css',\n string $title = '',\n string $media = '',\n bool $indexPage = false,\n string $hreflang = ''\n ): string {\n $attributes = [];\n // extract fields if needed\n if (is_array($href)) {\n $rel = $href['rel'] ?? $rel;\n $type = $href['type'] ?? $type;\n $title = $href['title'] ?? $title;\n $media = $href['media'] ?? $media;\n $hreflang = $href['hreflang'] ?? '';\n $indexPage = $href['indexPage'] ?? $indexPage;\n $href = $href['href'] ?? '';\n }\n\n if (! preg_match('#^([a-z]+:)?//#i', $href)) {\n $attributes['href'] = $indexPage ? site_url($href) : slash_item('baseURL') . $href;\n } else {\n $attributes['href'] = $href;\n }\n\n if ($hreflang !== '') {\n $attributes['hreflang'] = $hreflang;\n }\n\n $attributes['rel'] = $rel;\n\n if ($type !== '' && $rel !== 'canonical' && $hreflang === '' && ! ($rel === 'alternate' && $media !== '')) {\n $attributes['type'] = $type;\n }\n\n if ($media !== '') {\n $attributes['media'] = $media;\n }\n\n if ($title !== '') {\n $attributes['title'] = $title;\n }\n\n return '<link' . stringify_attributes($attributes) . _solidus() . '>';\n }", "protected function add_links_to_text() {\n\t $this->text = str_replace( array( /*':', '/', */'%' ), array( /*'<wbr></wbr>:', '<wbr></wbr>/', */'<wbr></wbr>%' ), $this->text );\n\t $this->text = preg_replace( '~(https?://([-\\w\\.]+)+(:\\d+)?(/([\\w/_\\.]*(\\?\\S+)?)?)?)~', '<a href=\"$1\" target=\"_blank\">$1</a>', $this->text );\n\t $this->text = preg_replace( '~[\\s]+@([a-zA-Z0-9_]+)~', ' <a href=\"https://twitter.com/$1\" rel=\"nofollow\" target=\"_blank\">@$1</a>', $this->text );\n\t $this->text = preg_replace( '~[\\s]+#([a-zA-Z0-9_]+)~', ' <a href=\"https://twitter.com/search?q=%23$1\" rel=\"nofollow\" target=\"_blank\">#$1</a>', $this->text );\n\t}", "function l($text, $url = '#', $htmlOptions = array()) \n{\n return CHtml::link($text, $url, $htmlOptions);\n}", "function link_to_admin_home_page($text = null, $props = array())\n{\n if (!$text) {\n $text = option('site_title');\n }\n return '<a href=\"' . html_escape(admin_url('')) . '\" ' . tag_attributes($props)\n . '>' . $text . \"</a>\\n\";\n}", "function bf_admin_help_links() {\r\n\t$content = '<strong><a href=\"http://code.google.com/p/arras-buffet/\">' . __('Project Page', 'buffet') . '</a></strong> | ';\r\n\t$content .= '<strong><a href=\"http://www.zy.sg/\">' . __(\"Developer's Blog\", 'buffet') . '</a></strong>';\r\n\t\r\n\techo apply_filters('bf_admin_help_links', $content);\r\n}", "function createLink($target, $tType = \"static\") {\n if($target == \"_HOME_CS_\") {\n echo \"/\";\n return;\n }\n if($target == \"_HOME_EN_\") {\n echo \"/\";\n return;\n }\n \n if($tType==\"basketAdd\" && getCurrentLanguage() == \"cs\") {\n echo 'pridat-do-kosiku-'.$target.\".html\";\n return;\n }\n if($tType==\"basketAdd\" && getCurrentLanguage() == \"en\") {\n echo 'basket-add-'.$target.\".html\";\n return;\n }\n if($tType==\"productDetail\") {\n echo $target.\".html\";\n return;\n }\n if($tType==\"basketDelete\") {\n echo $target.\".jsp\";\n return;\n }\n if($tType == \"basketChange\") {\n echo \"edit-no.phtm\";\n }\n if($tType == \"sendOrder\") {\n echo \"ok-no.phtm\";\n }\n if($tType==\"sortOptCol\" && getCurrentLanguage() == \"en\") {\n echo \"color-\".$target.\".html\";\n return;\n }\n if($tType==\"sortOptCol\" && getCurrentLanguage() == \"cs\") {\n echo \"barva-\".$target.\".html\";\n return;\n }\n if($tType==\"sortOptVol\" && getCurrentLanguage() == \"cs\") {\n echo \"objem-\".$target.\".html\";\n return;\n }\n if($tType==\"sortOptVol\" && getCurrentLanguage() == \"en\") {\n echo \"volume-\".$target.\".html\";\n return;\n }\n if($tType==\"basketDetail\" && getCurrentLanguage() == \"en\") {\n echo \"basket-prehled.phtml\";\n return;\n }\n if($tType==\"basketDetail\" && getCurrentLanguage() == \"cs\") {\n echo \"kosik-prehled.phtml\";\n return;\n }\n if($tType==\"static\") {\n echo $target.\".phtml\";\n return;\n }\n \n return \"/\";\n}", "function we_tag_linkToSEEM($attribs, $content){\n\tt_e('deprecated', __FUNCTION__);\n\treturn we_tag('linkToSeeMode', $attribs, $content);\n}", "public function generate_links($attr)\n\t{\n\t\t$source = \"http://www.marketingvillas.com/links_rev.php\";\n\t\t$source .= '?exc='.str_replace('uat.','www.',$_SERVER['SERVER_NAME']);\n\t\t\n\t\tif($attr['heading'] != '')\n\t\t\t$source .= '&heading='.$attr['heading'];\n\t\t\n\t\tif($attr['uriheading'] != '')\n\t\t\t$source .= '&url_heading='.$attr['uriheading'];\n\t\telse\n\t\t\t$source .= '&url_heading=h2';\n\t\t\n\t\tif($attr['what'] != '')\n\t\t\t$source .= '&what='.urlencode($attr['what']);\n\t\t\n\t\t$meme = $this->ret(ltrim($attr['sublocation']));\n\t\t$source .= '&location='.$meme['location'];\n\t\t$source .= '&area='.$meme['area'];\n\t\t//echo $source;\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $source);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\t$output = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\t\n\t\treturn $output;\n\t}", "function get_archives_link($url, $text, $format = \"html\", $before = \"\", $after = \"\") {\n if ('link' == $format) {\n return \"\\t\".'<link rel=\"archives\" title=\"'.$text.'\" href=\"'.$url.'\" />'.\"\\n\";\n } else if ('option' == $format) {\n return '<option value=\"'.$url.'\">'.$text.'</option>'.\"\\n\";\n } else if ('html' == $format) {\n return \"\\t\".'<li><a href=\"'.$url.'\" title=\"'.$text.'\">'.$text.'</a>'.$after.'</li>'.\"\\n\";\n } else { // custom\n return \"\\t\".$before.'<a href=\"'.$url.'\" title=\"'.$text.'\">'.$text.'</a>'.$after.\"\\n\";\n }\n}", "function l($text, $url = '#', $htmlOptions = array())\n{\n return CHtml::link($text, $url, $htmlOptions);\n}", "function l($text, $url = '#', $htmlOptions = array())\n{\n return CHtml::link($text, $url, $htmlOptions);\n}", "function smarty_function_togglelang($params, &$smarty)\r\n{\r\n $queryStr = explode(\"?\", $_SERVER['REQUEST_URI']);\r\n $page = array_shift($queryStr);\r\n $queryArr = array();\r\n if(count($queryStr) > 0)\r\n {\r\n foreach (explode(\"&\", $queryStr[0]) as $p)\r\n {\r\n $param = explode(\"=\", $p);\r\n if($param[0] != \"url\")\r\n $queryArr[array_shift($param)] = implode(\"=\", $param);\r\n }\r\n }\r\n \r\n $queryArr[\"lang\"] = $params[\"lang\"];\r\n $url = \"\";\r\n \r\n foreach($queryArr as $key => $value)\r\n {\r\n if($url == \"\")\r\n $url .= \"?\";\r\n else\r\n $url .= \"&\";\r\n \r\n $url .= $key . \"=\" . $value;\r\n }\r\n \r\n return $page . $url;\r\n}", "function link($text,$url = '#',$attribute = array()){ \r\n\t\t$attribute = $this->convertStringAtt($attribute);\r\n\t\tif($url){\r\n\t\t\tpreg_match(\"/([^\\?]+)?(\\?)?(.+)?/\", $url, $reg);\r\n\t\t\tif(isset($reg[3])){\r\n\t\t\t\tpreg_match_all(\"/&(amp;)?([^&]+)/\",\"&\".$reg[3], $exp);\r\n\t\r\n\t\t\t\tfor ($i=0;$i<count($exp[2]);$i++){\r\n\t\t\t\t\t$var = explode(\"=\",$exp[2][$i]);\r\n\t\t\t\t\t$exp[2][$i] = $var[0].\"=\".urlencode(isset($var[1]) ? $var[1] : '');\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\t$reg[3] = implode(\"&\",$exp[2]);\r\n\t\t\t}else{\r\n\t\t\t\t$reg[3] = '';\r\n\t\t\t}\r\n\t\t\t$stat = '';\r\n\t\t\tif(isset($attribute['state'])){\r\n\t\t\t\tif($attribute['state'] == \"*\"){\r\n\t\t\t\t\t$ex = array();\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$ex = explode(\",\",$attribute['state']);\r\n\t\t\t\t}\r\n\t\t\t\t$stat = $GLOBALS['BASIC_URL']->serialize($ex);\r\n\t\t\t\tunset($attribute['state']);\r\n\t\t\t}\r\n\t\t\t$tmp = $stat.$reg[3];\r\n\t\t\t$attribute['href'] = $reg[1].($tmp ? '?' : '').$tmp;\r\n\t\t\tif(isset($attribute['path'])){\r\n\t\t\t\t$tmp = $GLOBALS['BASIC']->pathFile(\r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t$GLOBALS['BASIC']->ini_get('root_virtual'),\r\n\t\t\t\t\t\t$attribute['href']\r\n\t\t\t\t\t)\r\n\t\t\t\t);\r\n\r\n\t\t\t\t$attribute['href'] = $tmp[0].$tmp[1];\r\n\t\t\t\tunset($attribute['path']);\r\n\t\t\t}\r\n\t\t\t$attribute['href'] = $GLOBALS['BASIC_URL']->link($attribute['href']);\r\n\t\t}else{\r\n\t\t\t$attribute['href'] = '#';\r\n\t\t}\r\n\t\treturn $this->createTag('a',$attribute,$text);\r\n\t}", "private static function translateLinks($text)\n {\n return preg_replace_callback('/(?<=^|\\s)(https?:\\/\\/(?:www\\.|(?!www))[^\\s\\.]+\\.[^\\s\\]\\)\\\\\"\\'\\<]{2,})(?=$|\\s)/', function ($hit) {\n $url = $hit[0];\n return UrlOembed::getOEmbed($url) ? '[' . $url . '](oembed:' . $url . ')' : $url;\n }, $text);\n }", "public function toLink($text = NULL, $rel = 'canonical', array $options = []);", "function linkfy($title) {\n $title = strip_tags($title);\n // Preserve escaped octets.\n $title = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '---$1---', $title);\n // Remove percent signs that are not part of an octet.\n $title = str_replace('%', '', $title);\n // Restore octets.\n $title = preg_replace('|---([a-fA-F0-9][a-fA-F0-9])---|', '%$1', $title);\n $title = remove_accents($title);\n if (seems_utf8($title)) {\n $title = utf8_uri_encode($title, 200);\n }\n\n $title = preg_replace('/&.+?;/', '', $title); // kill entities*/\n $title = preg_replace('/\\s+/', '-', $title);\n $title = preg_replace('|-+|', '-', $title);\n $title = trim($title, '-');\n return mb_strtolower($title, 'utf-8');\n}", "function admin_links()\n\t{\n\t\techo '<a href=\"modules.php?mod=customcats\">Custom Cats</a>';\n\t}", "function advertiseLink() {\n\t\t$link = '';\n\t\t$adMsg = $this->msg( 'nimbus-advertise-url' )->inContentLanguage();\n\t\tif ( !$adMsg->isDisabled() ) {\n\t\t\t$url = Sanitizer::validateAttributes( [ 'href' => $adMsg->text() ], [ 'href' => true ] )['href'] ?? false;\n\t\t\tif ( $url ) {\n\t\t\t\t$link = '<a href=\"' . htmlspecialchars( $url, ENT_QUOTES ) . '\" rel=\"nofollow\">' .\n\t\t\t\t\t$this->msg( 'nimbus-advertise' )->escaped() . '</a>';\n\t\t\t}\n\t\t}\n\t\treturn $link;\n\t}", "function adwr_menu_link($vars) {\n //gs\n $menu_class = str_replace(' ', '-', strtolower($vars['element']['#original_link']['link_title']));\n $vars['element']['#attributes']['class'][] = 'menu-li-' . $menu_class;\n if (isset($variables['element']['#localized_options'])) {\n $vars['element']['#localized_options']['attributes']['class'][] = 'menu-' . $menu_class;\n }\n return theme_menu_link($vars);\n}", "function apri_in_nuova_scheda($text) {\n\t$return_url = str_replace('<a', '<a target=\"_blank\" title=\"Apri link su nuova scheda\"', $text);\n\treturn $return_url;\n}", "function languageChangeDialog()\n{\n\techo \"<a href='\".anotateUrlWithParameters(array (\"lang\"=>\"de\")).\"'>DE</a>, \";\n\techo \"<a href='\".anotateUrlWithParameters(array (\"lang\"=>\"en\")).\"'>EN</a>\";\n}", "function langflag() {\n\n\t\tglobal $lang, $muniUrl, $typeUrl, $id;\n\n\t\tswitch($lang){\n\n\t\tcase 'en':\n\n\t\t$langFlags ='<a href=\"/es/'. $muniUrl . '/' . $typeUrl . '/' . $id . '.html\"><img src=\"/ddtabmenufiles/media/en.gif\" alt=\"Espa�ol\" width=\"62\" height=\"23\" border=\"0\" align=\"right\" /></a>';\n\n\t\tbreak;\n\n\t\tcase 'es':\n\t\t$langFlags ='<a href=\"/en/'. $muniUrl . '/' . $typeUrl . '/' . $id . '.html\"><img src=\"/ddtabmenufiles/media/es.gif\" alt=\"English\" width=\"62\" height=\"23\" border=\"0\" align=\"right\" /></a>';\n\t\tbreak;\n\n\t\t}\n\n\t\treturn $langFlags;\n\n\t\t}", "function build_link($text, $page){\n\t$format = '<a href=\"%2$s\">%1$s</a>';\n\n\tprintf($format, $text, link_to($page, false));\n}", "function render_link($data, $values) {\n if (!empty($this->options['link_to_store']) && !empty($this->additional_fields['store_id'])) {\n if ($data !== NULL && $data !== '') {\n $this->options['alter']['make_link'] = TRUE;\n $this->options['alter']['path'] = 'store/' . $this->get_value($values, 'store_id');\n if (isset($this->aliases['langcode'])) {\n $languages = language_list();\n $language = $this->get_value($values, 'langcode');\n if (isset($languages[$language])) {\n $this->options['alter']['langcode'] = $languages[$language];\n }\n else {\n unset($this->options['alter']['langcode']);\n }\n }\n }\n else {\n $this->options['alter']['make_link'] = FALSE;\n }\n }\n return $data;\n }", "function yourls_esc_attr_e( $text, $domain = 'default' ) {\n\techo yourls_esc_attr( yourls_translate( $text, $domain ) );\n}", "function auto_discovery_link_tags()\n{\n $html = '<link rel=\"alternate\" type=\"application/rss+xml\" title=\"'. __('Omeka RSS Feed') . '\" href=\"'. html_escape(items_output_url('rss2')) .'\" />';\n $html .= '<link rel=\"alternate\" type=\"application/atom+xml\" title=\"'. __('Omeka Atom Feed') .'\" href=\"'. html_escape(items_output_url('atom')) .'\" />';\n return $html;\n}", "public function create_links()\n {\n \t$txt = '<ul>';\n \t$last = end($this->breadcrumb);\n \tforeach($this->breadcrumb AS $breadcrumb)\n \t{\n \t\t$url = '';\n \t\t$class = FALSE;\n \t\tif($breadcrumb['active'] == '1')\n \t\t{\n \t\t\t$class = 'active';\n \t\t}\n \t\t$txt .= '<li><a href=\"'.$breadcrumb['url'].'\" class=\"'.$class.'\" title=\"'.$breadcrumb['txt'].'\">'.$breadcrumb['txt'].'</a></li>';\n \t\t$class = '';\n \t}\n \t\n \t$txt .= '</ul>';\n \treturn $txt;\n }", "function minorite_menu_link__home(array $variables) {\n $element = $variables['element'];\n\n $output = l('<span>' . $element['#title'] . '</span>', $element['#href'], array('html' => TRUE));\n return '<li>' . $output . \"</li>\\n\";\n}", "public function link()\r\n\t{\r\n\t\t$language_segment = (Config::get('core::languages')) ? $this->language->uri . '/' : '';\r\n\r\n\t\treturn url($language_segment . 'galleries/' . $this->gallery->slug . '/' . $this->id);\r\n\t}", "public function renderTagAnchor($result);", "function convert_to_links($msg){\r\n\t\t$final_message = preg_replace(array('/(?i)\\b((?:https?:\\/\\/|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\\/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:\\'\".,<>?«»“”‘’]))/', '/(^|[^a-z0-9_])@([a-z0-9_]+)/i', '/(^|[^a-z0-9_])#([a-z0-9_]+)/i'), array('<a href=\"$1\" target=\"_blank\">$1</a>', '$1<a href=\"\">@$2</a>', '$1<a href=\"index.php?hashtag=$2\">#$2</a>'), $msg);\r\n\t\treturn $final_message;\r\n\t}", "private function links()\n {\n foreach ($this->controller->links as $value)\n echo \"\\t<link rel='stylesheet' href='\" . DOMAIN . $value . \"' />\\n\";\n }", "function minorite_menu_link__links(array $variables) {\n $element = $variables['element'];\n $options = $variables['element']['#original_link']['options'];\n return '<option value=\"' . url($element['#href']) . '\">' . $element['#title'] . \"</option>\\n\";\n}", "protected function pakHrefAttr(): string\n {\n return \"href='{$this->link}'\";\n }", "function yourls_esc_html_e( $text, $domain = 'default' ) {\n\techo yourls_esc_html( yourls_translate( $text, $domain ) );\n}", "function createLinkText($name,$ext='') {\n\t\t$ext = strtolower($ext);\n\n\t\t$ret = str_replace('&', ' and ', $name);\n\t\t$ret = str_replace(' ', '_', $ret);\n\n\t\t$pattern = '/[\\x{21}-\\x{2C}]|[\\x{2F}]|[\\x{5B}-\\x{5E}]|[\\x{7E}]/';\n\t\t$ret = preg_replace($pattern, '_', $ret);\n\t\t$ret = str_replace('___', '_', $ret);\n\t\t$ret = str_replace('__', '_', $ret);\n\t\t$ret = str_replace('__', '_', $ret);\n\n\t\tif ($ext != '' && $ext != 'html' && $ext != 'htm') {\n\t\t\t$ret .= '.'.$ext;\n\t\t}\n\t\treturn $ret;\n\t}", "function generateTagsLinks( ){\n global $config;\n \n $oSql = Sql::getInstance( );\n $oQuery = $oSql->getQuery( 'SELECT sUrl, iTag, sLang FROM tags ORDER BY iPosition ASC' );\n while( $aData = $oQuery->fetch( PDO::FETCH_ASSOC ) ){\n $sUrl = $config['tags_url_prefix'].change2Url( $aData['sUrl'] );\n $aLinksIds[$aData['iTag']] = $sUrl.'.html';\n $aLinks[$sUrl] = Array( $aData['iTag'], $aData['sLang'] );\n } // end while\n\n file_put_contents( $config['dir_database'].'cache/tags_links', ( isset( $aLinks ) ? serialize( $aLinks ) : null ) );\n file_put_contents( $config['dir_database'].'cache/tags_links_ids', ( isset( $aLinksIds ) ? serialize( $aLinksIds ) : null ) );\n}", "function permalink_anchor($mode = 'id')\n {\n }", "function caNavLink($po_request, $ps_content, $ps_classname, $ps_module_path, $ps_controller, $ps_action, $pa_other_params=null, $pa_attributes=null, $pa_options=null) {\n\t\tif (!($vs_url = caNavUrl($po_request, $ps_module_path, $ps_controller, $ps_action, $pa_other_params, $pa_options))) {\n\t\t\t//return \"<strong>Error: no url for navigation</strong>\";\n\t\t\t$vs_url = '/';\n\t\t}\n\t\t\n\t\t$vs_tag = \"<a href='{$vs_url}' \";\n\t\t\n\t\tif ($ps_classname) { $pa_attributes['class'] = $ps_classname; }\n\t\tif (is_array($pa_attributes)) {\n\t\t\t$vs_tag .= _caHTMLMakeAttributeString($pa_attributes);\n\t\t}\n\t\t\n\t\t$vs_tag .= \">{$ps_content}</a>\";\n\t\t\n\t\treturn $vs_tag;\n\t}", "function render_link($page, $text, $menu = null) {\n global $PATH;\n\n if ( file_exists( \"pages/$page.php\" ) && $PATH[0] === $page) { // if the current page is this link\n $ele = \"<span>$text</span>\";\n } else {\n if( !isset($menu) ) {\n $menu = $_GET['menu']; //copy the menu parameter if not specified\n }\n $query = array('menu' => $menu);\n $query_string = http_build_query($query);\n $ele = \"<a href='/{$page}?{$query_string}'>$text</a>\";\n }\n echo \"<li>$ele</li>\";\n}", "function yourls_esc_html__( $text, $domain = 'default' ) {\n\treturn yourls_esc_html( yourls_translate( $text, $domain ) );\n}", "function activate_links($txt){\r\n\t\t$txt = str_replace(' ',' ',$txt);\r\n\t\t$words = explode(' ',$txt);\r\n\t\t$ret = '';\r\n\t\tforeach($words as $word){\r\n\t\t\tif(strpos($word,'http://')===0) $word = '<a href=\"'.$word.'\" target=\"_blank\" google_event_tag=\"Home Page - Right Module 4|Click|Twitter Link\">'.$word.'</a>';\r\n\t\t\t$ret .= ' ' . $word;\r\n\t\t}\r\n\t\treturn trim($ret);\r\n\t}", "function langswitch($lang)\n{\n // The page path (an absolute path, starting with '/')\n $pagePath = LocaleLinkService::getPagePath();\n\n // Check if the multi-language support is enabled\n if (!LocaleService::isMultilangEnabled()) {\n return $pagePath;\n }\n\n // Empty lang\n if (empty($lang)) {\n return $pagePath;\n }\n\n // Is it the default lang?\n if ($lang === LocaleService::getDefaultLang()) {\n return $pagePath;\n }\n\n // Get the list of available languages\n $availableLangs = LocaleService::getAvailableLangs();\n\n // Isn't the language supported?\n if (!in_array($lang, $availableLangs)) {\n return $pagePath;\n }\n\n return \"/{$lang}{$pagePath}\";\n}", "function href($link = false, $name = false) {\n $return = config('host') . $link;\n\n if ($name) {\n $return = '<a href=\"' . $return . '\">' . $name . '</a>';\n }\n\n return $return;\n}", "function hmenu_href($path, $link, $url)\n\t{\n\t\tif (strlen($url) && !lstring_search($url, \"*\")) return $url;\n\t\telse if (lstring_search($url, \"*\") && $url == \"*noslash\") return hanchor_shref($link, false);\n\t\telse return hanchor_href($path, $link);\n\t}", "public function getHrefLang(string $lang): ?TagInterface;", "private function gen_nav_links()\n\t{\n\t\t$this->template->assign_block_vars('navlinks', array(\n\t\t\t'S_IS_CAT'\t\t=> true,\n\t\t\t'S_IS_LINK'\t\t=> false,\n\t\t\t'S_IS_POST'\t\t=> false,\n\t\t\t'FORUM_NAME'\t=> $this->user->lang('BLOG_MAIN'),\n\t\t\t'FORUM_ID'\t\t=> -1,\n\t\t\t'U_VIEW_FORUM'\t=> append_sid('blog'),\n\t\t));\n\t}", "public static function anchor($url,$text,$attributes = null) {\r\n\t\treturn \"<a href='\".Configuration::getURLPath().\"/\".$url.\"' \".$attributes.\">\".$text.\"</a>\";\r\n\t}", "public function menu_lang()\n {\n $langs = LangRepository::get();\n\n if (!$langs || empty($langs)) {\n return '';\n }\n\n $current = LangRepository::getCurrent();\n\n $response = '<li>';\n $response .= '<a href=\"\"><span class=\"'.$current['class'].'\"></span></a>';\n $response .= '<ul class=\"sub-menu clearfix\">';\n $response .= '<li class=\\'no-translation menu-item current-lang \\'><a href=\"'.url('language/set/'.$current['locale']).'\"><span class=\"'.$current['class'].'\"></span></a></li>';\n\n foreach ($langs as $lang) {\n if ($lang['locale'] !== $current['locale']) {\n $response .= '<li class=\\'no-translation menu-item\\'><a href=\"'.url('language/set/'.$lang['locale']).'\"><span class=\"'.$lang['class'].'\"></span></a></li>';\n }\n }\n\n $response .= '</ul></li>';\n\n return $response;\n }", "static public function a($href = '', $title = '', $target = \"_self\", $misc = '', $newline = true)\n {\n global $config;\n if(empty($title)) $title = $href;\n $newline = $newline ? \"\\n\" : '';\n /* if page has onlybody param then add this param in all link. the param hide header and footer. */\n if(strpos($href, 'onlybody=yes') === false and isset($_GET['onlybody']) and $_GET['onlybody'] == 'yes')\n {\n $onlybody = $config->requestType == 'PATH_INFO' ? \"?onlybody=yes\" : \"&onlybody=yes\";\n $href .= $onlybody;\n }\n if($target == '_self') return \"<a href='$href' $misc>$title</a>$newline\";\n return \"<a href='$href' target='$target' $misc>$title</a>$newline\";\n }", "public function render($rel, $href, $hreflang = '', $media = '', $sizes = '', $type = '') {\n $attributes = array();\n $attributes['rel'] = $rel;\n $attributes['href'] = $href;\n\n if($hreflang) {\n $attributes['hreflang'] = $hreflang;\n }\n\n if($media) {\n $attributes['media'] = $media;\n }\n\n if($sizes){\n $attributes['sizes'] = $sizes;\n }\n\n if($type) {\n $attributes['type'] = $type;\n }\n\n $tagAttributes = '';\n\n foreach($attributes as $attribute => $value) {\n $tagAttributes .= \" $attribute=\\\"$value\\\"\";\n }\n\n $linkTag = \"<link\" . $tagAttributes . \" >\";\n\n $this->addPageHeader($linkTag, md5($rel . ':' . $href ));\n\n }", "public function translatedUrl($langCode,$withUid=false){\n $u= \"\";\n if($this->is_homepage){\n if(cq()->isExportStatic()){\n return \"index\";\n }\n return \"\";\n }elseif ($this->{\"url_\".$langCode}){\n $u=$this->{\"url_\".$langCode};\n }else{\n $u=$this->url;\n }\n if($withUid){\n $u=mb_substr($u,0,150,\"utf-8\");\n $u.=\".p\".$this->id;\n }\n return $u;\n }", "function atwork_menu_link(array $variables) {\n $element = $variables['element'];\n $sub_menu = '';\n\n if ($element['#below']) {\n $sub_menu = drupal_render($element['#below']);\n }\n $output = l($element['#title'], $element['#href'], $element['#localized_options']);\n // Adding a class depending on the TITLE of the link (not constant)\n $element['#attributes']['class'][] = atwork_id_safe($element['#title']);\n // Adding a class depending on the ID of the link (constant)\n $element['#attributes']['class'][] = 'mid-' . $element['#original_link']['mlid'];\n return '<li' . drupal_attributes($element['#attributes']) . '>' . $output . $sub_menu . \"</li>\\n\";\n}", "function wheels_language_attributes() {\n\t$attributes = array();\n\t$output = '';\n\n\tif ( is_rtl() ) {\n\t\t$attributes[] = 'dir=\"rtl\"';\n\t}\n\n\t$lang = get_bloginfo( 'language' );\n\n\tif ( $lang ) {\n\t\t$attributes[] = \"lang=\\\"$lang\\\"\";\n\t}\n\n\t$output = implode( ' ', $attributes );\n\t$output = apply_filters( 'wheels_language_attributes', $output );\n\n\treturn $output;\n}", "public function link_for_activitylink() {\n global $DB;\n $module = $DB->get_record('course_modules', array('id' => $this->properties->activitylink));\n if ($module) {\n $modname = $DB->get_field('modules', 'name', array('id' => $module->module));\n if ($modname) {\n $instancename = $DB->get_field($modname, 'name', array('id' => $module->instance));\n if ($instancename) {\n return html_writer::link(new moodle_url('/mod/'.$modname.'/view.php', array('id'=>$this->properties->activitylink)),\n get_string('activitylinkname', 'languagelesson', $instancename),\n array('class'=>'centerpadded lessonbutton standardbutton'));\n }\n }\n }\n return '';\n }", "public function lanman_link_callback($matches) {\n $x0 = $matches[0];\n $n0 = $matches[1]; # lan,16,4 or wg,1235\n $txt = $matches[2]; # text of <ls> tag}\n $parts = explode(\",\",$n0);\n if ($parts[0] == \"lan\") {\n $page = $parts[1];\n $linenum = $parts[2];\n $url = 'https://www.sanskrit-lexicon.uni-koeln.de/scans/csl-apidev/servepdf.php?dict=LAN'; #&page=111-a\n # This ampersand causes problems in basicdisplay parsing!\n #$href = \"$url\" . \"&page=$page\";\n $href = \"$url\" . \"_page=$page\";\n # It is useful to also have the line number visible in the url of the displayed url\n $href = \"$href\" . \"_line=$linenum\";\n $tooltip = \"Lanman Sanskrit Reader, page $page, line $linenum\";\n $x = \"<lanlink href='$href' n='$tooltip' target='_lanlink'>$txt</lanlink>\";\n }else if ($parts[0] == \"wg\") {\n // https://funderburkjim.github.io/WhitneyGrammar/step1/pages2c.html#section_1234\n $section = $parts[1];\n $url = 'https://funderburkjim.github.io/WhitneyGrammar/step1/pages2c.html';\n $href = \"$url#section_$section\";\n $tooltip = \"Whitney Grammar, section $section\";\n $x = \"<lanlink href='$href' n='$tooltip' target='_wglink'>$txt</lanlink>\";\n }else { // $n0 mal-formed\n $x = $x0; // return unchanged\n }\n return $x;\n}", "public function linkAction() : object\n {\n $title = \"Markdown\";\n $text = file_get_contents(__DIR__ . \"/textfiles/clickable.txt\");\n // $filter = new MyTextFilter();\n\n // Deal with the action and return a response.\n $this->app->page->add(\"textfilter/clickable\", [\n \"text\" => $text,\n \"html\" => $this->filter->parse($text, [\"link\"])\n ], \"main\");\n return $this->app->page->render([ \"title\" => $title ]);\n }", "public function render(): string\n {\n $language = $this->lang;\n $query = new QueryString($this->whitelist);\n $str = '';\n $cssId = $this->cssId === null ? '' : ' id=\"'.$this->cssId.'\"';\n $str .= '<ul'.$cssId.' class=\"'.$this->cssClass.'\">';\n foreach ($language->arrLang as $lang => $label) {\n $page = $this->lang->createPage($this->web->page, $lang);\n $path = $this->web->getDir();\n $text = $this->useLabel ? $label : strtoupper($lang);\n if (file_exists($this->web->getDocRoot().$path.$page)) {\n $url = $path.$page.$query->withString(['lang' => $lang]);\n } else {\n $url = $this->redirect.$query->withString(['lang' => $lang, 'url' => $path.$page]);\n }\n if ($lang === $language->get()) {\n $str .= '<li class=\"'.$this->liClassActive.'\">'.$text.'</li>';\n } else {\n $str .= '<li><a href=\"'.htmlspecialchars($url).'\" title=\"'.$label.'\">'.$text.'</a></li>';\n }\n }\n $str .= '</ul>';\n\n return $str;\n }", "public function cseMenuLinks() {\n\n\t\tif(Session::getSess('logged') == false) {\n\t\t\t$this->cseMenuLinks .= '\n\t\t\t\t<li><a href=\"'. $this->dataInfo['BASE_URL'] .'user/regUser\"><span>Регистрация</span></a></li>\n\t\t\t\t<li><a href=\"'. $this->dataInfo['BASE_URL'] .'user/logIn\"><span>Вход</span></a></li>\n\t\t\t';\n\t\t} else {\n\t\t\t$username = $this->setUrl('userNameDisplay');\n\t\t\t$this->cseMenuLinks .= '\n\t\t\t\t<li><a href=\"'. $this->dataInfo['BASE_URL'] .'user/userProfile/'. $username .'\"><span>Настройки</span></a></li>\n\t\t\t\t<li><a href=\"'. $this->dataInfo['BASE_URL'] .'user/logOut\"><span>Изход</span></a></li>\n\t\t\t';\n\t\t}\n\t}", "function TS_links_rte($value,$wrap='')\t{\n\t\t$htmlParser = t3lib_div::makeInstance('t3lib_parsehtml_proc');\n\n\t\t$value = $htmlParser->TS_AtagToAbs($value);\n\t\t$wrap = explode('|',$wrap);\n\t\t\t// Split content by the TYPO3 pseudo tag \"<LINK>\":\n\t\t$blockSplit = $htmlParser->splitIntoBlock('link',$value,1);\n\t\tforeach($blockSplit as $k => $v)\t{\n\t\t\t$error = '';\n\t\t\tif ($k%2)\t{\t// block:\n\t\t\t\t$tagCode = t3lib_div::trimExplode(' ',trim(substr($htmlParser->getFirstTag($v),0,-1)),1);\n\t\t\t\t$link_param = $tagCode[1];\n\t\t\t\t$href = '';\n\t\t\t\t$siteUrl = $htmlParser->siteUrl();\n\t\t\t\t\t// Parsing the typolink data. This parsing is roughly done like in tslib_content->typolink()\n\t\t\t\tif(strstr($link_param,'@'))\t{\t\t// mailadr\n\t\t\t\t\t$href = 'mailto:'.eregi_replace('^mailto:','',$link_param);\n\t\t\t\t} elseif (substr($link_param,0,1)=='#') {\t// check if anchor\n\t\t\t\t\t$href = $siteUrl.$link_param;\n\t\t\t\t} else {\n\t\t\t\t\t$fileChar=intval(strpos($link_param, '/'));\n\t\t\t\t\t$urlChar=intval(strpos($link_param, '.'));\n\n\t\t\t\t\t\t// Detects if a file is found in site-root OR is a simulateStaticDocument.\n\t\t\t\t\tlist($rootFileDat) = explode('?',$link_param);\n\t\t\t\t\t$rFD_fI = pathinfo($rootFileDat);\n\t\t\t\t\tif (trim($rootFileDat) && !strstr($link_param,'/') && (@is_file(PATH_site.$rootFileDat) || t3lib_div::inList('php,html,htm',strtolower($rFD_fI['extension']))))\t{\n\t\t\t\t\t\t$href = $siteUrl.$link_param;\n\t\t\t\t\t} elseif($urlChar && (strstr($link_param,'//') || !$fileChar || $urlChar<$fileChar))\t{\t// url (external): If doubleSlash or if a '.' comes before a '/'.\n\t\t\t\t\t\tif (!ereg('^[a-z]*://',trim(strtolower($link_param))))\t{$scheme='http://';} else {$scheme='';}\n\t\t\t\t\t\t$href = $scheme.$link_param;\n\t\t\t\t\t} elseif($fileChar)\t{\t// file (internal)\n\t\t\t\t\t\t$href = $siteUrl.$link_param;\n\t\t\t\t\t} else {\t// integer or alias (alias is without slashes or periods or commas, that is 'nospace,alphanum_x,lower,unique' according to tables.php!!)\n\t\t\t\t\t\t$link_params_parts = explode('#',$link_param);\n\t\t\t\t\t\t$idPart = trim($link_params_parts[0]);\t\t// Link-data del\n\t\t\t\t\t\tif (!strcmp($idPart,''))\t{ $idPart=$htmlParser->recPid; }\t// If no id or alias is given, set it to class record pid\n\t\t\t\t\t\tif ($link_params_parts[1] && !$sectionMark)\t{\n\t\t\t\t\t\t\t$sectionMark = '#'.trim($link_params_parts[1]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Splitting the parameter by ',' and if the array counts more than 1 element it's a id/type/? pair\n\t\t\t\t\t\t$pairParts = t3lib_div::trimExplode(',',$idPart);\n\t\t\t\t\t\tif (count($pairParts)>1)\t{\n\t\t\t\t\t\t\t$idPart = $pairParts[0];\n\t\t\t\t\t\t\t// Type ? future support for?\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Checking if the id-parameter is an alias.\n\t\t\t\t\t\tif (!t3lib_div::testInt($idPart))\t{\n\t\t\t\t\t\t\tlist($idPartR) = t3lib_BEfunc::getRecordsByField('pages','alias',$idPart);\n\t\t\t\t\t\t\t$idPart = intval($idPartR['uid']);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//$page = t3lib_BEfunc::getRecord('pages', $idPart);//this doesnt work at the moment...no page exist check\n\t\t\t\t\t\t//if (is_array($page))\t{\t// Page must exist...\n\t\t\t\t\t\t\t$href = $siteUrl.'?id='.$link_param;\n\t\t\t\t\t\t/*} else {\n\t\t\t\t\t\t\t#$href = '';\n\t\t\t\t\t\t\t$href = $siteUrl.'?id='.$link_param;\n\t\t\t\t\t\t\t$error = 'No page found: '.$idPart;\n\t\t\t\t\t\t}*/\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Setting the A-tag:\n\t\t\t\t$bTag = '<a href=\"'.htmlspecialchars($href).'\"'.($tagCode[2]&&$tagCode[2]!='-' ? ' target=\"'.htmlspecialchars($tagCode[2]).'\"' : '').'>'.$wrap[0];\n\t\t\t\t$eTag = $wrap[1].'</a>';\n\t\t\t\t$blockSplit[$k] = $bTag.$htmlParser->TS_links_rte($htmlParser->removeFirstAndLastTag($blockSplit[$k])).$eTag;\n\t\t\t}\n\t\t}\n\n\t\t\t// Return content:\n\t\treturn implode('',$blockSplit);\n\t}", "public function lang($lang = null);", "public function render_button_links( $atts ) {\n $id = $atts['id'];\n $context['headline'] = get_post_meta( $id, 'yali_button_links_headline', true );\n $context['links'] = get_post_meta( $id, 'yali_button_links_repeat_group', true );\n\n if ( $context['links'] ) {\n\n foreach ($context['links'] as &$button) {\n $button['yali_button_link']['url'] = $this->filter_link($button['yali_button_link']['url']);\n }\n unset($button);\n }\n\n return Twig::render( 'content_blocks/button-links.twig', $context );\n }", "function trans_link()\n{\n // --- mylinks ---\n // --- link table ---\n // lid int(11)\n // cid int(5) => multi\n // title varchar(100)\n // url varchar(250)\n // logourl varchar(60)\n // submitter int(11)\n // status tinyint(2) => not use\n // date int(10)\n // hits int(11)\n // rating double(6,4)\n // votes int(11)\n // comments int(11)\n\n // --- mylinks_text table ---\n // lid int(11)\n // description text\n\n // --- weblinks ---\n // lid int(11)\n // cids varchar(100) : use catlink\n // title varchar(100)\n // url varchar(255)\n // banner varchar(255) : full url\n // uid int(5) : submitter\n // time_create int(10)\n // time_update int(10)\n // hits int(11)\n // rating double(6,4)\n // votes int(11)\n // comments int(11)\n // description text\n //\n // search text default\n // passwd varchar(255)\n //\n // name varchar(255)\n // nameflag tinyint(2)\n // mail varchar(255)\n // mailflag tinyint(2)\n // company varchar(255)\n // addr varchar(255)\n // tel varchar(255)\n // admincomment text\n // width int(5)\n // height int(5)\n // recommend tinyint(2)\n // mutual tinyint(2)\n // broken int(11)\n // rss_url varchar(255)\n // rss_flag tinyint(3)\n // rss_xml mediumtext\n // rss_update int(10)\n // usercomment text\n // zip varchar(100)\n // state varchar(100)\n // city varchar(100)\n // addr2 varchar(255)\n // fax varchar(255)\n\n global $xoopsDB;\n global $LIMIT;\n global $cat_title_arr;\n\n echo '<h4>STEP 3: link table</h3>';\n\n global $MODULE_DIRNAME;\n $table_link = $xoopsDB->prefix($MODULE_DIRNAME . '_link');\n\n global $MODULE_URL;\n $shots_url_web = $MODULE_URL . '/images/shots/';\n\n $offset = 0;\n if (isset($_POST['offset'])) {\n $offset = $_POST['offset'];\n }\n $next = $offset + $LIMIT;\n\n $table = $xoopsDB->prefix('mylinks_links');\n $sql1 = \"SELECT count(*) FROM $table\";\n $res1 = sql_exec($sql1);\n $row1 = $xoopsDB->fetchRow($res1);\n $total = $row1[0];\n\n echo \"There are $total links <br />\\n\";\n echo \"Transfer $offset - $next th link <br /><br />\";\n\n $sql2 = \"SELECT * FROM $table ORDER BY lid\";\n $res2 = sql_exec($sql2, $LIMIT, $offset);\n\n while ($row = $xoopsDB->fetchArray($res2)) {\n $lid = $row['lid'];\n $uid = $row['submitter'];\n $cid = $row['cid'];\n $url = $row['url'];\n $hits = $row['hits'];\n $rating = $row['rating'];\n $votes = $row['votes'];\n $logourl = $row['logourl'];\n $comments = $row['comments'];\n $time_create = $row['date'];\n $time_update = $time_create;\n\n $title = addslashes($row['title']);\n\n $banner = '';\n $width = 0;\n $height = 0;\n\n if ($logourl) {\n $banner = $shots_url_web . $logourl;\n $size = getimagesize($banner);\n\n if ($size) {\n $width = (int)$size[0];\n $height = (int)$size[1];\n } else {\n echo \"<font color='red'>image size error: $banner</font><br />\";\n }\n\n $banner = addslashes($banner);\n }\n\n $desc = get_desc($lid);\n $desc = addslashes($desc);\n\n $cat = addslashes($cat_title_arr[$cid]);\n $search = \"$url $title $cat $desc\";\n\n $passwd = md5(rand(10000000, 99999999));\n\n echo \"$lid: $title <br />\";\n\n $sql = 'INSERT INTO ' . $table_link . ' (';\n $sql .= 'lid, uid, title, url, description, ';\n $sql .= 'search, passwd, time_create, time_update, ';\n $sql .= 'hits, rating, votes, comments, ';\n $sql .= 'banner, width, height';\n $sql .= ') VALUES (';\n $sql .= \"$lid, $uid, '$title', '$url', '$desc', \";\n $sql .= \"'$search', '$passwd', $time_create, $time_update, \";\n $sql .= \"$hits, $rating, $votes, $comments, \";\n $sql .= \"'$banner', $width, $height\";\n $sql .= ')';\n\n sql_exec($sql);\n\n insert_catlink($cid, $lid);\n }\n\n if ($total > $next) {\n form_next_link($next);\n } else {\n form_votedate();\n }\n}", "public function site_url( $url ) {\n\t\t$lang = $this->get_language_from_url();\n\t\t$lang = $this->model->get_language( $lang );\n\t\treturn $this->add_language_to_link( $url, $lang );\n\t}", "function render_block_core_post_navigation_link($attributes, $content)\n {\n }", "public function lang(): string;" ]
[ "0.70817703", "0.6916768", "0.66326106", "0.6547247", "0.65092444", "0.64885676", "0.6364379", "0.61636275", "0.6024353", "0.5966619", "0.5943017", "0.5939772", "0.5892226", "0.5865002", "0.5851149", "0.58289874", "0.57947993", "0.57855225", "0.5750689", "0.57381016", "0.57004213", "0.56616277", "0.56540227", "0.5650402", "0.5637192", "0.56177974", "0.5615328", "0.5613805", "0.5607334", "0.56059647", "0.5588187", "0.5564783", "0.5562059", "0.5545976", "0.5534976", "0.5533914", "0.5529689", "0.55183613", "0.55125004", "0.549839", "0.5492007", "0.5490352", "0.54836386", "0.54674184", "0.5456538", "0.5421977", "0.5421658", "0.54200786", "0.5415567", "0.539691", "0.53932923", "0.5375488", "0.5357759", "0.5355496", "0.5349002", "0.5340418", "0.53340894", "0.53330857", "0.53197116", "0.53146046", "0.53039545", "0.52946347", "0.5270477", "0.52676094", "0.5265629", "0.5263009", "0.5261317", "0.52496815", "0.52467924", "0.52458125", "0.52439123", "0.5223432", "0.52170473", "0.52096623", "0.5208197", "0.52066267", "0.5196595", "0.51786363", "0.5176778", "0.5171818", "0.51686215", "0.51668036", "0.5166151", "0.51645803", "0.5162673", "0.5159188", "0.51557183", "0.5153379", "0.5152895", "0.5147219", "0.51434046", "0.5136786", "0.5134792", "0.51232433", "0.51199293", "0.5114154", "0.51010966", "0.5097302", "0.50941163", "0.50937164" ]
0.74719864
0
Render simple templates to switch between languages
function weglotButtonRender($index) { $url = weglotCurrentUrlInstance(); return \view( 'weglot-translate::language-button-' . $index, ['urls' => $url->currentRequestAllUrls()] )->render(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function render()\n {\n $current = MultiLanguage::config('default');\n $cookie_name = MultiLanguage::config('cookie-name', 'locale');\n if(Cookie::has($cookie_name)) {\n $current = Cookie::get($cookie_name);\n }\n $languages = MultiLanguage::config(\"languages\");\n return view(\"smart-admin::smart-admin-menu\", compact('languages', 'current'))->render();\n }", "protected function generateLocalLang() {}", "public function renderLanguageSelect() {}", "function tpl_language()\n{\n global $smarty, $lang, $config;\n\n $smarty->assign('lang', $lang);\n $smarty->assign('config', $config);\n}", "public function templateTelesales()\n {\n \treturn view();\n }", "public function rtlSupport()\n {\n return view('pages.example_pages.language');\n }", "public function langSwitch($l)\n {\n if (isset($this->page) and $this->page->lang($l)) {\n return $this->link('this', array('lang' => $l));\n } //other lang mutation\n return $this->link('Pages:', array('lang' => $l)); //default page\n }", "public function index(){\n\n $data['active_class'] = 'languages';\n $data['title'] = getPhrase('languages');\n $data['layout'] = getLayout();\n $data['module_helper'] = getModuleHelper('languages-list');\n $data['languages'] = Language::all();\n $data['default_lang'] = $this->get_user_default_lang();\n return view('languages.change_lang', $data);\n\n }", "function lang() {\r\n\t\tif($this->language === \"french\") {\r\n\t\t\tforeach($this->config['lang_fr'] as $tag_name) {\r\n\t\t\t\t$this->code = preg_replace('/<' . $tag_name . '([^<>]*)>/', '<' . $tag_name . ' lang=\"fr\" xml:lang=\"fr\"$1>', $this->code);\r\n\t\t\t\t$this->code = preg_replace('/<' . $tag_name . ' lang=\"fr\" xml:lang=\"fr\"([^<>]*) lang=\"fr\" xml:lang=\"fr\"([^<>]*)>/', '<' . $tag_name . ' lang=\"fr\" xml:lang=\"fr\"$1$2>', $this->code);\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($this->language === \"english_and_french\") {\r\n\t\t\tpreg_match_all('/<body[^<>]*>(.*?)<\\/body>/is', $this->code, $matches);\r\n\t\t\t$initial_body_code = $body_code = $matches[1][0];\r\n\t\t\t$replace_count = -1;\r\n\t\t\twhile($replace_count != 0) {\r\n\t\t\t\t$body_code = preg_replace('/<(\\w*)([^<>]*)>\\s*([^<>\\/]*[^\\s])\\s*\\/\\s*([^<>\\/]{1,})\\s*</is', '<$1$2><span lang=\"en\" xml:lang=\"en\">$3</span> / <span lang=\"fr\" xml:lang=\"fr\">$4</span><', $body_code, -1, $replace_count);\r\n\t\t\t}\r\n\t\t\t$this->code = str_replace($initial_body_code, $body_code, $this->code);\r\n\t\t}\r\n\t\t$this->logMsgIf(\"lang\", $ct);\r\n\t\treturn true;\r\n\t}", "public function language(){\n return view('specialist.profile.specialist_language', [\n 'navTitle' => 'profile',\n 'sideBarNav' => 'lang'\n ]);\n }", "public function language();", "public function language();", "public function render()\n\t{\n\t\t$template = $this->environment->loadTemplate(\\Adhoc\\Locale::file($this->representation));\n\t\treturn $template->render((array)$this->view);\n\t}", "public function renderTemplate();", "public function languages_director()\r\n\t{\r\n\t\t$this->load->view('inc/header');\r\n $this->load->view('site/languages_department');\r\n $this->load->view('inc/footer');\r\n\t}", "public function render()\n {\n return view('adminhub::livewire.components.settings.languages.create')\n ->layout('adminhub::layouts.base');\n }", "static private function CreateLanguageMessage() {\n\t\tif (!IllaUser::loggedIn()) {\n\t\t\t$german_browser = (ereg('de', $_SERVER['HTTP_ACCEPT_LANGUAGE']) ? true : false);\n\t\t}else {\n\t\t\t$german_browser = IllaUser::german();\n\t\t}\n\t\tif (($german_browser && self::isEnglish()) || (!$german_browser && self::isGerman())) {\n\t\t\t$short_filename = substr_replace(basename($_SERVER['PHP_SELF']), '', 0, 2);\n\t\t\t$path = str_replace($short_filename, '', $_SERVER['PHP_SELF']);\n\t\t\t$path = substr_replace($path, '', - 2, 2);\n\n\t\t\tif (count($_GET) > 0) {\n\t\t\t\t$getparams = array();\n\t\t\t\tforeach ($_GET as $key => $value) {\n\t\t\t\t\t$getparams[] = htmlentities($key) . '=' . htmlentities($value);\n\t\t\t\t}\n\t\t\t\t$getparams = '?' . implode('&amp;', $getparams);\n\t\t\t}else {\n\t\t\t\t$getparams = '';\n\t\t\t}\n\n\t\t\tif (self::isEnglish() && file_exists('de' . $short_filename)) {\n\t\t\t\tMessages::add('<a href=\"' . $path . 'de' . $short_filename . $getparams . '\" hreflang=\"de\">Deine bevorzugte Sprache scheint Deutsch zu sein. Klick hier um zur deutschen Fassung dieser Seite zu wechseln.</a>', 'note');\n\t\t\t\tMessages::add('<a href=\"' . $path . 'de' . $short_filename . $getparams . '\" hreflang=\"de\">Your favoured language seems to be German. Click here to view the German version of this page.</a>', 'note');\n\t\t\t} elseif (self::isGerman() && file_exists('us' . $short_filename)) {\n\t\t\t\tMessages::add('<a href=\"' . $path . 'us' . $short_filename . $getparams . '\" hreflang=\"us\">Deine bevorzugte Sprache scheint Englisch zu sein. Klick hier um zur englischen Fassung dieser Seite zu wechseln.</a>', 'note');\n\t\t\t\tMessages::add('<a href=\"' . $path . 'us' . $short_filename . $getparams . '\" hreflang=\"us\">Your favoured language seems to be English. Click here to view the English version of this page.</a>', 'note');\n\t\t\t}\n\t\t}\n\t}", "public function indexAction() {\n $this->view->render(\"Главная страница\", 0);\n }", "protected function page () {\n\t\t$skeleton = new xhtml ('skeleton.trynow');\n\t\t$skeleton->load();\n\t\t$config_data = config::translate('need_flash');\n\t\tif(isset($_SESSION['trynow'])) {\n\t\t\t$_SESSION['trynow'] = 1;\n\t\t} else {\n\t\t\t$_SESSION['trynow'] = 1;\n\t\t}\n\n\t\t$locale = config::get('locale');\n\t\t$support_language_uid = 14;\n\n\t\t$arrEnLocales = array(\n\t\t\t\t'bz',\n\t\t\t\t'jm',\n\t\t\t\t'tt',\n\t\t\t\t'gy',\n\t\t\t\t'ag',\n\t\t\t\t'dm',\n\t\t\t\t'vc',\n\t\t\t\t'bs',\n\t\t\t\t'bd',\n\t\t\t\t'bw',\n\t\t\t\t'fj',\n\t\t\t\t'gm',\n\t\t\t\t'gh',\n\t\t\t\t'gy',\n\t\t\t\t'ke',\n\t\t\t\t'mt',\n\t\t\t\t'mu',\n\t\t\t\t'na',\n\t\t\t\t'ng',\n\t\t\t\t'pk',\n\t\t\t\t'rw',\n\t\t\t\t'ws',\n\t\t\t\t'sl',\n\t\t\t\t'sg',\n\t\t\t\t'sb',\n\t\t\t\t'za',\n\t\t\t\t'tz',\n\t\t\t\t'to',\n\t\t\t\t'ug',\n\t\t\t\t'vu',\n\t\t\t\t'zm',\n\t\t\t\t'zw'\n\t\t\t);\n\n\t\t\t$arrFrLocales = array(\n\t\t\t\t'cd',\n\t\t\t\t'mg',\n\t\t\t\t'cm',\n\t\t\t\t'ci',\n\t\t\t\t'bf',\n\t\t\t\t'ne',\n\t\t\t\t'sn',\n\t\t\t\t'ml',\n\t\t\t\t'bi',\n\t\t\t\t'bj',\n\t\t\t\t'tg',\n\t\t\t\t'ga',\n\t\t\t\t'dj'\n\t\t\t);\n\n\t\t\t$arrSpLocales = array(\n\t\t\t\t'es',\n\t\t\t\t'co',\n\t\t\t\t'gt',\n\t\t\t\t'pe',\n\t\t\t\t'ni',\n\t\t\t\t'do',\n\t\t\t\t'bo',\n\t\t\t\t've',\n\t\t\t\t'ar',\n\t\t\t\t'cu',\n\t\t\t\t'pr',\n\t\t\t\t'py',\n\t\t\t\t'ec',\n\t\t\t\t'hn',\n\t\t\t\t'sv',\n\t\t\t\t'cr',\n\t\t\t\t'pa'\n\t\t\t);\n\t\t\tif(in_array($locale,$arrEnLocales)) {\n\t\t\t\t$locale = 'en';\n\t\t\t} else if(in_array($locale,$arrFrLocales)) {\n\t\t\t\t$locale = 'fr';\n\t\t\t} else if(in_array($locale,$arrSpLocales)) {\n\t\t\t\t$locale = 'sp';\n\t\t\t}\n\n\t\t$query =\"SELECT \";\n\t\t$query.=\"`uid` \";\n\t\t$query.=\"from \";\n\t\t$query.=\"`language` \";\n\t\t$query.=\"WHERE \";\n\t\t$query.=\"`prefix` = '\".$locale.\"' \";\n\t\t$query.=\"LIMIT 1\";\n\n\t\t$result = database::query($query);\n\n\t\tif( $result && mysql_num_rows($result)> 0 ) {\n\t\t\t$row = mysql_fetch_array($result);\n\t\t\t$support_language_uid = $row['uid'];\n\t\t}\n\t\t$swf = 'swf';\n\t\tif(in_array($support_language_uid,array(106,107))) {\n\t\t\t$swf = 'swf10';\n\t\t}\n\t\t$skeleton->assign(\n\t\t\tarray(\n\t\t\t\t'translate:need_flash'\t=> $config_data,\n\t\t\t\t'support_language_uid'\t=> $support_language_uid,\n\t\t\t\t'swf'\t\t\t\t\t=> $swf\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * Fetch the page details\n\t\t */\n\t\t$page = new page('index');\n\n\t\t/**\n\t\t * Build the output\n\t\t */\n\t\t$skeleton->assign (\n\t\t\tarray (\n\t\t\t\t'title'\t\t\t=> $page->title(),\n\t\t\t\t'keywords'\t\t=> $page->keywords(),\n\t\t\t\t'description'\t=> $page->description()\n\t\t\t)\n\t\t);\n\n\t\toutput::as_html($skeleton,true);\n\t}", "abstract public function get_app_language();", "public function renderLocale(): string\n {\n return call_user_func_array([$this, 'render'], func_get_args());\n }", "function tpl_page($help = '', $title = '')\n{\n tpl_language();\n tpl_header($help, $title);\n tpl_footer();\n}", "public function getLangWidgetAction()\n {\n $this->response['LANG'] = array(\n 'YOURCITY' => 'Ваш город',\n 'COURIER' => 'Курьер',\n 'PICKUP' => 'Самовывоз',\n 'TERM' => 'Срок',\n 'PRICE' => 'Стоимость',\n 'DAY' => 'дн.',\n 'RUB' => 'руб.',\n 'NODELIV' => 'Нет доставки',\n 'CITYSEATCH' => 'Поиск города',\n 'CITYSEARCH' => 'Поиск города',\n 'ALL' => 'Все',\n 'PVZ' => 'Пункты выдачи',\n 'MOSCOW' => 'Москва',\n 'RUSSIA' => 'Россия',\n 'COUNTING' => 'Идет расчет',\n\n 'NO_AVAIL' => 'Нет доступных способов доставки',\n 'CHOOSE_TYPE_AVAIL' => 'Выберите способ доставки',\n 'CHOOSE_OTHER_CITY' => 'Выберите другой населенный пункт',\n\n 'EST' => 'есть',\n\n 'L_ADDRESS' => 'Адрес пункта выдачи заказов',\n 'L_TIME' => 'Время работы',\n 'L_WAY' => 'Как к нам проехать',\n 'L_CHOOSE' => 'Выбрать',\n\n 'H_LIST' => 'Список пунктов выдачи заказов',\n 'H_PROFILE' => 'Способ доставки',\n 'H_CASH' => 'Расчет картой',\n 'H_DRESS' => 'С примеркой',\n 'H_SUPPORT' => 'Служба поддержки',\n );\n }", "public function render(): string\n {\n $language = $this->lang;\n $query = new QueryString($this->whitelist);\n $str = '';\n $cssId = $this->cssId === null ? '' : ' id=\"'.$this->cssId.'\"';\n $str .= '<ul'.$cssId.' class=\"'.$this->cssClass.'\">';\n foreach ($language->arrLang as $lang => $label) {\n $page = $this->lang->createPage($this->web->page, $lang);\n $path = $this->web->getDir();\n $text = $this->useLabel ? $label : strtoupper($lang);\n if (file_exists($this->web->getDocRoot().$path.$page)) {\n $url = $path.$page.$query->withString(['lang' => $lang]);\n } else {\n $url = $this->redirect.$query->withString(['lang' => $lang, 'url' => $path.$page]);\n }\n if ($lang === $language->get()) {\n $str .= '<li class=\"'.$this->liClassActive.'\">'.$text.'</li>';\n } else {\n $str .= '<li><a href=\"'.htmlspecialchars($url).'\" title=\"'.$label.'\">'.$text.'</a></li>';\n }\n }\n $str .= '</ul>';\n\n return $str;\n }", "public function settingLanguage() {}", "public function languages();", "public function showLanguage()\n {\n return view('pages.settings.language.index');\n }", "function loadMultiLingualText($language) {\n $this->Stelle->language=$language;\n $this->Stelle->getName();\n include(LAYOUTPATH.'languages/'.$this->user->rolle->language.'.php');\n }", "function languages($args, &$request) {\n\t\t$this->validate();\n\t\t$this->setupTemplate(true);\n\n\t\t$site =& $request->getSite();\n\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\t$templateMgr->assign('localeNames', AppLocale::getAllLocales());\n\t\t$templateMgr->assign('primaryLocale', $site->getPrimaryLocale());\n\t\t$templateMgr->assign('supportedLocales', $site->getSupportedLocales());\n\t\t$localesComplete = array();\n\t\tforeach (AppLocale::getAllLocales() as $key => $name) {\n\t\t\t$localesComplete[$key] = AppLocale::isLocaleComplete($key);\n\t\t}\n\t\t$templateMgr->assign('localesComplete', $localesComplete);\n\n\t\t$templateMgr->assign('installedLocales', $site->getInstalledLocales());\n\t\t$templateMgr->assign('uninstalledLocales', array_diff(array_keys(AppLocale::getAllLocales()), $site->getInstalledLocales()));\n\t\t$templateMgr->assign('helpTopicId', 'site.siteManagement');\n\n\t\timport('classes.i18n.LanguageAction');\n\t\t$languageAction = new LanguageAction();\n\t\tif ($languageAction->isDownloadAvailable()) {\n\t\t\t$templateMgr->assign('downloadAvailable', true);\n\t\t\t$templateMgr->assign('downloadableLocales', $languageAction->getDownloadableLocales());\n\t\t}\n\n\t\t$templateMgr->display('admin/languages.tpl');\n\t}", "public function render() \n {\n if (empty($this->title) == TRUE)\n {\n $this->setTitle('Title not set');\n }\n\n if (empty($this->layout) == TRUE)\n {\n $this->layout = $this->autoLayout();\n }\n\n if (empty($this->content) == TRUE)\n {\n $this->content = $this->autoContent();\n }\n\n if ((file_exists($this->layout) == TRUE) AND (file_exists($this->content) == TRUE))\n {\n if (empty($this->vars) == FALSE)\n {\n extract($this->vars);\n }\n\n $title = $this->title;\n ob_start();\n require $this->content;\n $content = ob_get_clean();\n require $this->layout;\n }\n else\n {\n View::error('no_language');\n }\n\t}", "function wpsp_languageswitcherer(){\n\tif(function_exists('icl_get_languages')) {\n\t\t$languages = icl_get_languages('skip_missing=1');\n\t\tif( 1 < count($languages) ){\n\t\t\techo '<nav class=\"language col-sm-4\"><ul>';\n\t\t\t//echo '<li>' . __('Language: ', 'sptheme') . '</li>';\n\t\t\tforeach($languages as $l){\n\t\t\t\techo '<li class=\"'.$l['language_code'].'\">';\n\n\t\t\t\tif(!$l['active']) echo '<a href=\"'.$l['url'].'\" title=\"' . $l['native_name'] . '\">';\n\t\t\t\techo '<img src=\"' . $l['country_flag_url'] . '\" alt=\"' . $l['native_name'] . '\" />';\n\t\t\t\tif(!$l['active']) echo '</a>';\n\n\t\t\t\techo '</li>';\n\t\t\t}\n\t\t\techo '</ul></nav>';\n\t\t}\n\t} else {\n\t\treturn null; // Activate WMPL plugin\n\t}\n}", "function lang_switcher(){\n\tif (function_exists('icl_get_languages')) {\n\t\t$langs = icl_get_languages('skip_missing=0');\n\t\tforeach ($langs as $lang) {\n\t\t\tif ($lang['active'] == 0) {\n\t\t\t\t$flag = preg_replace(' ', '', $lang['country_flag_url']);\n\t\t\t\t$display_lang = ($lang['native_name'] == 'עברית') ? \"עבר\" : ucfirst($lang['native_name']);\n\t\t\t $strlang = mb_substr($display_lang,0,3);\n\t\t\t\techo '<a class=\"lang-switcher lang-switch\" href=\"'. $lang['url'] .'\">'.'<span class=\"dropdown-item d-inline-block\"></span><img src=\"'. $lang['country_flag_url'] . '\"></a>';\n\t\t\t}\n\t\t}\n\t}\n}", "function ourInsideTpl($array, $content)\n {\n if (!isset($_COOKIE['char'])) { $array['char']['name'] = 'не выбран';} \n $content = str_replace(array(\"{TITLE}\", \"{USERNAME}\", \"{PROJECT}\", \"{VERSION}\", \"{CHAR}\"), array($array['title'], $array['username'], $array['system']['title_project'], $array['system']['version_cms'], $array['char']['name']), $content);\n foreach ($array['lang'] as $key => $value) {\n $content = str_replace(\n '{' . strtoupper($key) . '}',\n $value,\n $content\n );\n }\n echo $content;\n }", "function simplesamlphp_get_languages() {\n return array(\n 'no' => 'Bokmål', // Norwegian Bokmål\n 'nn' => 'Nynorsk', // Norwegian Nynorsk\n 'se' => 'Sámegiella', // Northern Sami\n 'sam' => 'Åarjelh-saemien giele', // Southern Sami\n 'da' => 'Dansk', // Danish\n 'en' => 'English',\n 'de' => 'Deutsch', // German\n 'sv' => 'Svenska', // Swedish\n 'fi' => 'Suomeksi', // Finnish\n 'es' => 'Español', // Spanish\n 'fr' => 'Français', // French\n 'it' => 'Italiano', // Italian\n 'nl' => 'Nederlands', // Dutch\n 'lb' => 'Lëtzebuergesch', // Luxembourgish\n 'cs' => 'Čeština', // Czech\n 'sl' => 'Slovenščina', // Slovensk\n 'lt' => 'Lietuvių kalba', // Lithuanian\n 'hr' => 'Hrvatski', // Croatian\n 'hu' => 'Magyar', // Hungarian\n 'pl' => 'Język polski', // Polish\n 'pt' => 'Português', // Portuguese\n 'pt-br' => 'Português brasileiro', // Portuguese\n 'ru' => 'русский язык', // Russian\n 'et' => 'eesti keel', // Estonian\n 'tr' => 'Türkçe', // Turkish\n 'el' => 'ελληνικά', // Greek\n 'ja' => '日本語', // Japanese\n 'zh' => '简体中文', // Chinese (simplified)\n 'zh-tw' => '繁體中文', // Chinese (traditional)\n 'ar' => 'العربية', // Arabic\n 'fa' => 'پارسی', // Persian\n 'ur' => 'اردو', // Urdu\n 'he' => 'עִבְרִית', // Hebrew\n 'id' => 'Bahasa Indonesia', // Indonesian\n 'sr' => 'Srpski', // Serbian\n 'lv' => 'Latviešu', // Latvian\n 'ro' => 'Românește', // Romanian\n 'eu' => 'Euskara', // Basque\n );\n}", "function pemeriksaanLangsung()\n\t{\n\t\t$this->load->view('static/header');\n\t\t$this->load->view('static/navbar');\n\t\t$this->load->view('dokter/tambah_antrian');\n\t\t$this->load->view('static/footer');\n\t}", "protected function createSwitchLanguageAction() {\n\t\t$languageSwitcherLinks = [];\n\t\t$languageSwitcherClasses = 'language-selector';\n\n\t\tif ( $this->doesPageHaveLanguages ) {\n\t\t\t$languageSwitcherLinks['mobile-frontend-language-article-heading'] = [\n\t\t\t\t'href' => SpecialPage::getTitleFor( 'MobileLanguages', $this->getTitle() )->getLocalURL()\n\t\t\t];\n\t\t} else {\n\t\t\t$languageSwitcherClasses .= ' disabled';\n\t\t}\n\n\t\treturn [\n\t\t\t'text' => '',\n\t\t\t'itemtitle' => $this->msg( 'mobile-frontend-language-article-heading' ),\n\t\t\t'class' => MobileUI::iconClass( 'language-switcher', 'element', $languageSwitcherClasses ),\n\t\t\t'links' => $languageSwitcherLinks,\n\t\t\t'is_js_only' => false\n\t\t];\n\t}", "public function exo01()\n {\n //je declare 2 variables\n $display = true;\n $vin = 'a boire avec moderation';\n\n// je compile la page exo01.html.twig\n return $this->render(\"exo01.html.twig\",\n [\n// je cree deux variable twig a afficher dans ma vue\n 'display'=>$display,\n 'vin'=>$vin\n ]\n );\n\n }", "function defaultTemplate() {\n//\t\t$l = $this->api->locate('addons',__NAMESPACE__,'location');\n//\t\t$addon_location = $this->api->locate('addons',__NAMESPACE__);\n//\t\t$this->api->pathfinder->addLocation($addon_location,array(\n//\t\t\t'js'=>'templates/js',\n//\t\t\t'css'=>'templates/css',\n// 'template'=>'templates',\n//\t\t))->setParent($l);\n\n return array('view/draw');\n }", "function lang($message) {\n echo Mvc::getInstance()->getView()->translateViewMessage($message);\n}", "function weglotHrefLangRender()\n {\n $url = weglotCurrentUrlInstance();\n return $url->generateHrefLangsTags();\n }", "function ourExternalTpl($array, $content)\n {\n $content = str_replace(array(\"{TITLE}\", \"{PROJECT}\", \"{VERSION}\"), array($array['title'], $array['system']['title_project'], $array['system']['version_cms']), $content);\n foreach ($array['lang'] as $key => $value) {\n $content = str_replace(\n '{' . strtoupper($key) . '}',\n $value,\n $content\n );\n }\n echo $content;\n }", "function langswitch($lang)\n{\n // The page path (an absolute path, starting with '/')\n $pagePath = LocaleLinkService::getPagePath();\n\n // Check if the multi-language support is enabled\n if (!LocaleService::isMultilangEnabled()) {\n return $pagePath;\n }\n\n // Empty lang\n if (empty($lang)) {\n return $pagePath;\n }\n\n // Is it the default lang?\n if ($lang === LocaleService::getDefaultLang()) {\n return $pagePath;\n }\n\n // Get the list of available languages\n $availableLangs = LocaleService::getAvailableLangs();\n\n // Isn't the language supported?\n if (!in_array($lang, $availableLangs)) {\n return $pagePath;\n }\n\n return \"/{$lang}{$pagePath}\";\n}", "public function initializeLanguages() {}", "private function twigDefaultContext()\n {\n // show language bar by default\n if (!isset($this->data['hideLanguageBar'])) {\n $this->data['hideLanguageBar'] = false;\n }\n // get languagebar\n $this->data['languageBar'] = null;\n if ($this->data['hideLanguageBar'] === false) {\n $languageBar = $this->generateLanguageBar();\n if (is_null($languageBar)) {\n $this->data['hideLanguageBar'] = true;\n } else {\n $this->data['languageBar'] = $languageBar;\n }\n }\n\n // assure that there is a <title> and <h1>\n if (isset($this->data['header']) && !isset($this->data['pagetitle'])) {\n $this->data['pagetitle'] = $this->data['header'];\n }\n if (!isset($this->data['pagetitle'])) {\n $this->data['pagetitle'] = 'SimpleSAMLphp';\n }\n }", "function i18n() {\n // Translations can be filed in the /languages/ directory\n load_theme_textdomain('mo_theme', get_template_directory() . '/languages');\n\n $locale = get_locale();\n $locale_file = get_template_directory() . \"/languages/$locale.php\";\n if (is_readable($locale_file))\n require_once($locale_file);\n\n }", "function introduction(){\n // show the introduction page\n echo Template::instance()->render('views/introduction.php');\n}", "function simplesamlphp_get_languagebar(SimpleSAML_XHTML_Template $view, $params = array()) {\n if (!empty($params['post'])) {\n return '';\n }\n\n if (isset($view->data['hideLanguageBar']) && $view->data['hideLanguageBar'] === TRUE) {\n return '';\n }\n\n $languages = simplesamlphp_get_languages();\n $result = '<ul class=\"dropdown-menu\">';\n $template = '<li><a href=\"!href\">!name</a></li>';\n foreach ($languages as $lang => $name) {\n $href = \\SimpleSAML\\Utils\\HTTP::addURLParameters(\\SimpleSAML\\Utils\\HTTP::getSelfURL(), array(\n $params['languageParameterName'] => $lang\n ));\n $result .= strtr($template, array(\n '!href' => $href,\n '!name' => $name\n ));\n }\n return $result . '</ul>';\n}", "public function createLanguagesAction() {\n $em = $this->getDoctrine()->getManager();\n $list = array(\"zh\", \"en\", \"es\", \"hi\", \"bn\", \"pt\", \"ru\", \"fr\", \"ur\", \"ja\", \"de\", \"ko\", \"tr\", \"it\", \"ar\");\n\n foreach ($list as $key => $value) {\n $object = new \\Skaphandrus\\AppBundle\\Entity\\SkLanguage();\n $object->setName($value);\n $em->persist($object);\n }\n $em->flush();\n\n $entities = $em->getRepository('SkaphandrusAppBundle:SkLanguage')->findAll();\n\n return $this->render('SkaphandrusAppBundle:SkBusiness:createLanguage.html.twig', array(\n 'entities' => $entities,\n ));\n }", "function smarty_function_mtbloglanguage($args, &$ctx) {\n $real_lang = array('cz' => 'cs', 'dk' => 'da', 'jp' => 'ja', 'si' => 'sl');\n $blog = $ctx->stash('blog');\n $lang_tag = $blog->blog_language;\n if ($real_lang[$lang_tag]) {\n $lang_tag = $real_lang[$lang_tag];\n }\n if ($args['locale']) {\n $lang_tag = preg_replace('/^([A-Za-z][A-Za-z])([-_]([A-Za-z][A-Za-z]))?$/e', '\\'$1\\' . \"_\" . (\\'$3\\' ? strtoupper(\\'$3\\') : strtoupper(\\'$1\\'))', $lang_tag);\n } elseif ($args['ietf']) {\n # http://www.ietf.org/rfc/rfc3066.txt\n $lang_tag = preg_replace('/_/', '-', $lang_tag);\n }\n return $lang_tag;\n}", "public function index()\n {\n return view('Backend.Contents.language.index');\n }", "function minorite_links__locale_block($variables) {\n $variables['attributes']['class'] = array('nav', 'switch-tongue');\n // Removes class as it is not used.\n $variables['links']['en']['title'] = 'En';\n $variables['links']['en']['attributes']['title'] = t('English site');\n unset($variables['links']['en']['attributes']['class']);\n $variables['links']['fr']['title'] = 'Fr';\n $variables['links']['fr']['attributes']['title'] = t('French site');\n unset($variables['links']['fr']['attributes']['class']);\n\n return theme('links', $variables);\n}", "public function switcher()\n {\n $default_lang = $this->fetchConfig('ml_default_language');\n $all_lang = $this->fetchConfig('ml_languages');\n $lang_text = $this->fetchConfig('ml_switch_text', null, null, false, false);\n $prod_paths = $this->fetchConfig('ml_prod_paths', null, null, false, false);\n $prod_urlroot = $this->fetchConfig('ml_prod_produrlroot', null, null, false, false);\n $currlang = $this->currlang();\n $output = array();\n $output['switch_text'] = $lang_text[$currlang];\n $output['languages'] = array();\n $curr_prod_paths = $prod_paths[$currlang];\n \n $curr_page = Path::pretty(URL::getCurrent());\n $entry_data = Content::get($curr_page);\n\n $uri = ltrim($curr_page, '/');\n $urlparts = explode(\"/\",$uri);\n\n $curr_prod_paths_country = null;\n $curr_prod_paths_path = null;\n if (count($entry_data) < 1)\n { \n if (array_key_exists($urlparts[1], $curr_prod_paths))\n {\n $curr_prod_paths_path = $curr_prod_paths[$urlparts[1]];\n $curr_prod_paths_prod = $urlparts[2];\n $curr_page = \"/\" .$curr_prod_paths_path . \"/\" . $curr_prod_paths_prod;\n }\n\n }\n $entry_data = Content::get($curr_page);\n foreach ($all_lang as $lang) { \n $data = array();\n $data['code'] = $lang;\n $data['text'] = $lang_text[$lang];\n $data['url'] = '/' . $lang;\n $alturl = 'alternative_url_' . $lang;\n if (array_key_exists($alturl, $entry_data)) {\n $data['alturl'] = $entry_data[$alturl];\n }\n $altprodurl = 'alternative_prod_url_' . $lang;\n if (array_key_exists($altprodurl, $entry_data)) {\n $currpp = $prod_paths[$lang];\n reset($currpp);\n $first_key = key($currpp);\n $data['altprodurl'] = \"/\" .$currpp[$first_key] . \"/\" . $entry_data[$altprodurl];\n $data['altprod'] = $entry_data[$altprodurl];\n $data['produrl'] = $prod_urlroot[$lang] . \"/\" . $entry_data[$altprodurl];\n }\n\n $data['is_current'] = ($lang == $currlang) ? true : false;\n array_push($output['languages'], $data);\n }\n\n return $output;\n }", "public function index()\n\t{\n // Show the page\n return view('admin.language.index');\n\t}", "function languageBox() {\n\t\tif($this->data['language_urls']) { ?>\n\t\t\t<div class=\"panel panel-default\">\n\t\t\t\t<div class=\"panel-heading\">\n\t\t\t\t\t<h3 class=\"panel-title\"><?php $this->msg('otherlanguages'); ?></h3>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"panel-body\">\n\t\t\t\t\t<ul class=\"nav nav-pills nav-stacked\"><?php\n\t\t\t\t\t\tforeach($this->data['language_urls'] as $key => $langlink) {\n\t\t\t\t\t\t\techo $this->makeListItem($key, $langlink);\n\t\t\t\t\t\t}; ?>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t</div><?php\n\t\t};\n\t}", "protected function compile()\n\t{\n\t\tif (TL_MODE == 'BE')\n\t\t{\n\t\t\t$this->strTemplate = 'be_wildcard';\n\t\t\t$this->Template = new \\BackendTemplate($this->strTemplate);\n\t\t}\n\t}", "function index() {\n // add users.js file\n $this->addjs(theme_url(\"js/app/directives/modal-confirm.js\"), TRUE);\n $this->addjs(theme_url(\"js/app/languages.js\"), TRUE);\n\n // get all language \n $this->add_js_inline(array('user' => $this->current_user, 'settings' => $this->settings));\n\n //write code here to load view\n $this->bulid_layout(\"languages/list\");\n }", "protected function _language()\n {\n if (sizeof($this->_config['language']) > 1) {\n $language = $this->getRequest()->getParam('language');\n if (!empty($language)) {\n $this->_language = $language . '/';\n $this->_metaLanguage = $language;\n } else if (!empty($this->_session->language)) {\n $this->_language = $this->_session->language . '/';\n $this->_metaLanguage = $this->_session->language;\n } else {\n $browserLanguage = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);\n if (in_array($browserLanguage, $this->_config['language'])) {\n $this->_session->language = $browserLanguage;\n $this->_language = $browserLanguage . '/';\n $this->_metaLanguage = $browserLanguage;\n } else {\n $this->_language = $this->_config['language'][0] . '/';\n $this->_metaLanguage = $this->_config['language'][0];\n }\n }\n } else {\n $this->_language = '';\n $this->_metaLanguage = $this->_config['language'][0];\n }\n }", "public function language()\n {\n \tif ( is_english() ){\n\t\t $this->session->engels = false;\n\t } else {\n\t\t $this->session->engels = true;\n }\n\t redirect($this->agent->referrer());\n }", "public function activate()\n {\n $langs = LanguageHelper::getAllLangs();\n return view('commonmodule::Language', ['langs' => $langs]);\n }", "function vve_tpl_langImage($lang){\n\n return \"<img src=\\\"images/langs/{$lang}.png\\\" alt=\\\"{$lang}\\\" />\";\n\n}", "function training_page_html() {\n return t('This is the landing page of the Training module');\n}", "public function generate()\n\t{\n\t\tif (TL_MODE == 'BE')\n\t\t{\n\t\t\t$this->Template = new \\BackendTemplate('be_wildcard');\n\t\t\t$this->Template->wildcard = '### ONE-PAGE-WEBSITE :: NAVIGATION ###' . \"<br>\" . $GLOBALS['TL_LANG']['FMD'][$this->type][0];\n\t\t\t$this->Template->title = $this->headline;\n\n\t\t\treturn $this->Template->parse();\n\t\t}\n\t\t\n\t\t\n\t\t// if no id is given, generate one\n\t\t$arrCssID = deserialize($this->cssID);\n\t\tif(strlen($arrCssID[0]) < 1)\n\t\t{\n\t\t\t$arrCssID[0] = 'onepagewebsitenavigation_'.$this->id;\n\t\t\t$this->cssID = $arrCssID;\n\t\t}\n\t\t\n\t\treturn parent::generate();\n\t}", "public function tempalte()\n \t{\n \t\t$this->load->template('index-1');\n \t}", "public function menu_lang()\n {\n $langs = LangRepository::get();\n\n if (!$langs || empty($langs)) {\n return '';\n }\n\n $current = LangRepository::getCurrent();\n\n $response = '<li>';\n $response .= '<a href=\"\"><span class=\"'.$current['class'].'\"></span></a>';\n $response .= '<ul class=\"sub-menu clearfix\">';\n $response .= '<li class=\\'no-translation menu-item current-lang \\'><a href=\"'.url('language/set/'.$current['locale']).'\"><span class=\"'.$current['class'].'\"></span></a></li>';\n\n foreach ($langs as $lang) {\n if ($lang['locale'] !== $current['locale']) {\n $response .= '<li class=\\'no-translation menu-item\\'><a href=\"'.url('language/set/'.$lang['locale']).'\"><span class=\"'.$lang['class'].'\"></span></a></li>';\n }\n }\n\n $response .= '</ul></li>';\n\n return $response;\n }", "public function testRenderWithNonDefaultLocale()\n {\n $result = $this->render();\n $this->assertMatchesRegularExpression('/<span>Nordamerikanische Westküsten-Normalzeit/', $result);\n }", "function index()\n {\n //call some deafaults not to spoil template\n $data=$this->default_data();\n $this->template($data);\n\n }", "public function home()\n\t{\n\t\tSession::put('lang','EN');\n\t\treturn $this->homeblade();\n\t}", "public function render()\n {\n $projects = auth()->user()->projects()->get();\n $locals = get_langs();\n\n return view('components.main-menu', compact('projects', 'locals'));\n }", "public function contextAction()\n {\n \n return $this\n ->render('sfTblogBlogBundle:Homepage:context.html.twig',\n array('title' => \"контекстная реклама\"));\n }", "function defaultTemplate() {\n\t\t$l = $this->api->locate('addons',__NAMESPACE__,'location');\n\t\t$addon_location = $this->api->locate('addons',__NAMESPACE__);\n\t\t$this->api->pathfinder->addLocation($addon_location,array(\n\t\t\t//'js'=>'templates/js',\n\t\t\t//'css'=>'templates/css',\n //'template'=>'templates',\n\t\t))->setParent($l);\n\n //return array('view/lister/tags');\n return parent::defaultTemplate();\n }", "public function generate()\n\t{\n\t\tif (TL_MODE == 'BE')\n\t\t{\n\t\t\t$objTemplate = new \\BackendTemplate('be_wildcard');\n\n\t\t\t$objTemplate->wildcard = '### WEEKLY MENUS ###';\n\t\t\t$objTemplate->title = $this->headline;\n\t\t\t$objTemplate->id = $this->id;\n\t\t\t$objTemplate->link = $this->name;\n\t\t\t$objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;\n\n\t\t\treturn $objTemplate->parse();\n\t\t}\n\n\t\treturn parent::generate();\n\t}", "public function htmlOutput()\n {\n $arrayOfLattes = glob('template/*.latte');\n if ($arrayOfLattes === false) {\n return 'No templates found.';\n }\n $found = []; // translations found in latte templates\n foreach ($arrayOfLattes as $file) {\n $tempFileContents = file_get_contents($file);\n Assert::string($tempFileContents);\n preg_match_all('~\\{=(\"([^\"]+)\"|\\'([^\\']+)\\')\\|translate\\}~i', $tempFileContents, $matches);\n $found = array_merge($found, $matches[2]);\n }\n $found = array_unique($found);\n $output = '<h1><i class=\"fa fa-globe\"></i> ' . $this->tableAdmin->translate('Translations')\n . '</h1><div id=\"agenda-translations\">'\n . '<form action=\"\" method=\"post\" onsubmit=\"return confirm(\\''\n . $this->tableAdmin->translate('Are you sure?') . '\\')\">'\n . Tools::htmlInput('translations', '', 1, array('type' => 'hidden'))\n . Tools::htmlInput('token', '', end($_SESSION['token']), 'hidden')\n . Tools::htmlInput('old_name', '', '', array('type' => 'hidden', 'id' => 'old_name'))\n . '<table class=\"table table-striped\"><thead><tr><th style=\"width:'\n . intval(100 / (count($this->tableAdmin->TRANSLATIONS) + 1)) . '%\">'\n . Tools::htmlInput('one', '', false, 'radio') . '</th>';\n $translations = $keys = [];\n $localisation = new L10n($this->prefixUiL10n, $this->tableAdmin->TRANSLATIONS);\n foreach ($this->tableAdmin->TRANSLATIONS as $key => $value) {\n $output .= \"<th>$value</th>\";\n $translations[$key] = $localisation->readLocalisation($key);\n $keys = array_merge($keys, array_keys($translations[$key]));\n }\n $output .= '</tr></thead><tbody>' . PHP_EOL;\n $keys = array_unique($keys);\n natcasesort($keys);\n foreach ($keys as $key) {\n $output .= '<tr><th>'\n . Tools::htmlInput('one', '', $key, array('type' => 'radio', 'class' => 'translation')) . ' '\n . Tools::h((string) $key) . '</th>';\n foreach ($this->tableAdmin->TRANSLATIONS as $code => $value) {\n $output .= '<td>' . Tools::htmlInput(\n \"tr[$code][$key]\",\n '',\n Tools::set($translations[$code][$key], ''),\n ['class' => 'form-control form-control-sm', 'title' => \"$code: $key\"]\n ) . '</td>';\n }\n $output .= '</tr>' . PHP_EOL;\n if ($key = array_search($key, $found)) {\n unset($found[$key]);\n }\n }\n $output .= '<tr><td>' . Tools::htmlInput(\n 'new[0]',\n '',\n '',\n ['class' => 'form-control form-control-sm', 'title' => $this->tableAdmin->translate('New record')]\n ) . '</td>';\n foreach ($this->tableAdmin->TRANSLATIONS as $key => $value) {\n $output .= '<td>' . Tools::htmlInput(\n \"new[$key]\",\n '',\n '',\n ['class' => 'form-control form-control-sm',\n 'title' => $this->tableAdmin->translate('New record') . ' (' . $value . ')']\n ) . '</td>';\n }\n $output .= '</tr></tbody></table>\n <button name=\"translations\" type=\"submit\" class=\"btn btn-secondary\"><i class=\"fa fa-save\"></i> '\n . $this->tableAdmin->translate('Save') . '</button>\n <button name=\"delete\" type=\"submit\" class=\"btn btn-secondary\" value=\"1\"><i class=\"fa fa-dot-circle\"></i>\n <i class=\"fa fa-trash\"></i> ' . $this->tableAdmin->translate('Delete') . '</button>\n <fieldset class=\"d-inline-block position-relative\"><div class=\"input-group\" id=\"rename-fieldset\">'\n . '<div class=\"input-group-prepend\">\n <button class=\"btn btn-secondary\" type=\"submit\"><i class=\"fa fa-dot-circle\"></i> '\n . '<i class=\"fa fa-i-cursor\"></i> ' . $this->tableAdmin->translate('Rename') . '</button>\n </div>'\n . Tools::htmlInput('new_name', '', '', ['class' => 'form-control', 'id' => 'new_name'])\n . '</div></fieldset>\n </form></div>' . PHP_EOL;\n $output .= count($found)\n ? ('<h2 class=\"mt-4\">' . $this->tableAdmin->translate('Missing translations in templates') . '</h2><ul>')\n : '';\n foreach ($found as $value) {\n $output .= '<li><code>' . Tools::h($value) . '</code></li>' . PHP_EOL;\n }\n $output .= count($found) ? '</ul>' : '';\n return $output;\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 run()\n {\n $this->verboseBarDumpString($this->language, 'Language on controller start');\n Assert::string($this->result['template']);\n $this->MyCMS->template = $this->result['template'];\n Assert::isArray($this->result['context']);\n $this->MyCMS->context = $this->result['context'];\n\n $options = ['REQUEST_URI' => $this->requestUri];\n\n // prepare variables and set templates for each kind of request\n if ($this->friendlyUrlInstantiated) {\n // Note: $this->MyCMS->template = 'home'; already set in MyControler\n $templateDetermined = $this->friendlyUrl->determineTemplate($options);\n // so that the FriendlyURL translation to parametric URL is taken into account\n $this->get = $this->friendlyUrl->getGet();\n // Note: $_SESSION['language'] je potřeba, protože to nastavuje stav jazyka pro browser\n // Note: $this->session je potřeba, protože je ekvivalentní proměnné $_SESSION,\n // která je vstupem MyCMS->getSessionLanguage\n // Note: $this->language je potřeba, protože nastavuje jazyk v rámci instance Controller\n $this->session['language'] = $this->language = $this->friendlyUrl->getLanguage();\n /**\n * @phpstan-ignore-next-line\n * Property WorkOfStan\\MyCMS\\MyController::$get (array) in isset() is not nullable.\n * But in PHPUnit call it is not even set\n */\n $tempGet = isset($this->get) ? $this->get : [];\n // Language is finally determined, therefore make the include creating TRANSLATION\n $_SESSION['language'] = $this->MyCMS->getSessionLanguage($tempGet, $this->session, true);\n $this->MyCMS->context['applicationDirLanguage'] = $this->MyCMS->context['applicationDir']\n . (($_SESSION['language'] === DEFAULT_LANGUAGE) ? '' : ($_SESSION['language'] . '/'));\n $this->MyCMS->logger->info(\"After determineTemplate: this->language={$this->language}, \"\n . \"this->session['language']={$this->session['language']}, _SESSION['language']={$_SESSION['language']} \"\n . \"this->get[language]=\" . (isset($this->get['language']) ? $this->get['language'] : 'n/a'));\n $this->verboseBarDump([\n 'get' => $this->get,\n 'templateDetermined' => $templateDetermined,\n 'friendlyUrl->get' => $this->friendlyUrl->getGet()\n ], 'get in controller after determineTemplate');\n if (is_string($templateDetermined)) {\n $this->MyCMS->template = $templateDetermined;\n } elseif (is_array($templateDetermined) && isset($templateDetermined['redir'])) {\n $this->redir((string) $templateDetermined['redir'], (int) $templateDetermined['httpCode']);\n }\n } else {\n /**\n * @phpstan-ignore-next-line\n * Property WorkOfStan\\MyCMS\\MyController::$get (array) in isset() is not nullable.\n * But in PHPUnit call it is not even set\n */\n $tempGet = isset($this->get) ? $this->get : [];\n /**\n * @phpstan-ignore-next-line\n * Property WorkOfStan\\MyCMS\\MyController::$session (array<array|string>) in isset() is not nullable.\n * But in PHPUnit call it is not even set\n */\n $tempSession = isset($this->session) ? $this->session : [];\n // Language is finally determined, therefore make the include creating TRANSLATION\n $this->language = $_SESSION['language'] = $this->MyCMS->getSessionLanguage($tempGet, $tempSession, true);\n }\n\n // PROJECT SPECIFIC CHANGE OF OPTIONS AFTER LANGUAGE IS DETERMINED\n $this->prepareTemplate($options);\n\n // TYPICAL CONTROLLER CODE\n $this->prepareAllTemplates($options);\n\n if ($this->MyCMS->template === self::TEMPLATE_NOT_FOUND) {\n http_response_code(404);\n }\n\n // Todo: deprecated >0.4.4 - should return void\n return [\n 'template' => $this->MyCMS->template,\n 'context' => $this->MyCMS->context,\n ];\n }", "function tr($key){\n// global $lang;\n $lang = \"nl\";\n if (isset($_COOKIE['lng']))\n $lang = $_COOKIE['lng'];\n switch($key){\n case 'Prijzen' :\n\t\t\tswitch($lang){\n\t\t\t\tcase 'nl':\n\t\t\t\t\treturn \"Prijzen\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'fr':\n\t\t\t\t\treturn \"Prix\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault :\n\t\t\t\t\treturn 'Rates';\n\t\t\t} \n break;\n case 'Omgeving' :\n\t\t\tswitch ($lang){\n\t\t\t\tcase 'nl':\n\t\t\t\t\treturn \"Omgeving\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'fr' :\n\t\t\t\t\treturn \"Environs\";\n \tdefault :\n\t\t\t\t\treturn \"Surroundings\";\n\t\t\t}\n break;\n }\n return \"\";\n}", "function yourls_esc_html_x( $single, $context, $domain = 'default' ) {\n\treturn yourls_esc_html( yourls_translate_with_context( $single, $context, $domain ) );\n}", "function training_i18n_callback() {\n $output = array(\n t('Some text.'),\n t('Some text with !token.', array('!token' => 5)),\n l(t('Home'), t('<front>')),\n format_plural(rand(1,100), '1 task', '@count tasks'),\n );\n\n return array(\n array(\n '#type' => 'markup',\n '#markup' => implode('<br />', $output),\n ),\n array(\n '#attached' => array(\n 'js' => array(\n drupal_get_path('module', 'training') . '/js/training_i18n.js',\n ),\n ),\n ),\n );\n}", "public function supportsLanguageSwitch(): bool;", "function smarty_function_togglelang($params, &$smarty)\r\n{\r\n $queryStr = explode(\"?\", $_SERVER['REQUEST_URI']);\r\n $page = array_shift($queryStr);\r\n $queryArr = array();\r\n if(count($queryStr) > 0)\r\n {\r\n foreach (explode(\"&\", $queryStr[0]) as $p)\r\n {\r\n $param = explode(\"=\", $p);\r\n if($param[0] != \"url\")\r\n $queryArr[array_shift($param)] = implode(\"=\", $param);\r\n }\r\n }\r\n \r\n $queryArr[\"lang\"] = $params[\"lang\"];\r\n $url = \"\";\r\n \r\n foreach($queryArr as $key => $value)\r\n {\r\n if($url == \"\")\r\n $url .= \"?\";\r\n else\r\n $url .= \"&\";\r\n \r\n $url .= $key . \"=\" . $value;\r\n }\r\n \r\n return $page . $url;\r\n}", "public function lang(): string;", "public function lang() {\n\t\t\tload_plugin_textdomain( 'cherry-site-shortcodes', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );\n\t\t}", "function index(){\n $this->polish();\n }", "public function index()\n {\n abort_if(Gate::denies('language_access'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n $languages = Language::orderBy('id','DESC')->get();\n return view('admin.language.language',compact('languages'));\n }", "public function generate()\r\n {\r\n if (TL_MODE == 'BE')\r\n {\r\n $objTemplate = new \\BackendTemplate('be_wildcard');\r\n \r\n $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['bericht_list'][0]) . ' ###';\r\n $objTemplate->title = $this->headline;\r\n $objTemplate->id = $this->id;\r\n $objTemplate->link = $this->name;\r\n $objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;\r\n \r\n return $objTemplate->parse();\r\n }\r\n \r\n return parent::generate();\r\n }", "function i18n() {\n\tload_theme_textdomain( 'playground-theme', PLAYGROUND_THEME_PATH . '/languages' );\n}", "public function incLocalLang() {}", "public function generate()\n\t{\n\t\tif (TL_MODE == 'BE')\n\t\t{\n\t\t\t$objTemplate = new \\BackendTemplate('be_wildcard');\n\n\t\t\t$objTemplate->wildcard = '### BOOK NAVIGATION ###';\n\t\t\t$objTemplate->title = $this->headline;\n\t\t\t$objTemplate->id = $this->id;\n\t\t\t$objTemplate->link = $this->name;\n\t\t\t$objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;\n\n\t\t\treturn $objTemplate->parse();\n\t\t}\n\n\t\tglobal $objPage;\n\n\t\tif (!$this->rootPage || !in_array($this->rootPage, $objPage->trail))\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\treturn parent::generate();\n\t}", "public function getFromLanguage(): string;", "function i18n() {\n\tload_theme_textdomain( 'project', Project_PATH . '/languages' );\n }", "public function indexAction(): string\n {\n return $this->getTemplateEngine()->render('/templates/cms/templates/index');\n }", "public function create()\n {\n return view('admin.pages.language.create');\n }", "public function generate()\n {\n if (TL_MODE == 'BE')\n {\n $objTemplate = new \\BackendTemplate('be_wildcard');\n \n $objTemplate->wildcard = '### EINSATZLISTE ###';\n $objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;\n \n return $objTemplate->parse();\n }\n \n return parent::generate();\n }", "public function display_languages(){\n global $pagenow, $typenow;\n if( 'property' === $typenow && 'edit.php' === $pagenow )\n {\n $curr_lang = apply_filters( 'wpml_current_language', NULL );\n $languages = apply_filters( 'wpml_active_languages', NULL, 'orderby=id&order=desc' );\n $all_count = 0;\n if ( !empty( $languages ) ) {?>\n <ul class=\"lang_subsubsub\" style=\"clear:both\">\n <?php foreach( $languages as $l ):\n $posts_count = $this->get_property_posts_count_bylang($l['language_code']);\n $all_count += intval($posts_count);\n ?>\n <li class=\"<?php echo 'language_'.$l['language_code']; ?>\">\n <a href=\"<?php echo '?post_type=property&page=all_properties&lang='.$l['language_code']; ?>\" class=\"<?php echo ($l['active']) ? 'current' : 'lang'; ?>\"><?php echo $l['translated_name']; ?>\n <span class=\"count\">(<?php echo $posts_count; ?>)</span>\n </a>\n </li>\n <?php endforeach;?>\n <li class=\"language_all\"><a href=\"?post_type=property&page=all_properties&lang=all\"\n class=\"<?php if($curr_lang == 'all') echo 'current'; ?>\"><?php echo __( 'All languages', 'sitepress' ).' ('.$all_count.')'; ?></a></li>\n </ul>\n <?php }\n }\n }", "function userpage_lang($id)\r\n{\r\n\tglobal $AVE_Template;\r\n\r\n\techo $AVE_Template->get_config_vars($id);\r\n}", "function div_language ($newid=NULL) {\n\tglobal $S;\n\t\n\tif (($langs=get_languages())===NULL) return NULL;\n\t\n\t// titolo\n\t$ret='\n\t<p>\n\t<div class=\"center fixed u\">Languages</div>\n\t';\n\t\n\t// lista\n\t$ret.='\n\t<p>\n\t<table cellpadding=4 cellspacing=0 border=0 class=\"tabl fixed\">\n\t';\n\tforeach ($langs as $lang) {\n\t\tif ($newid==$lang[\"id\"]) $CLX=' class=\"shine\"';\n\t\telse $CLX='';\n\t\t$ret.='\n\t\t<tr'.$CLX.'>\n\t\t<td>'.$lang[\"name\"].'\n\t\t<td>'.lang_image($lang).'\n\t\t<td class=\"center\">\n\t\t';\n\t\tif (am_admin()) {\n\t\t\t$action=\"toggle_active_lang({$lang[\"id\"]});\";\n\t\t\tif ($lang[\"active\"]) {\n\t\t\t\t$SY=$S[\"chok\"];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$SY=$S[\"chno\"];\n\t\t\t}\n\t\t\t$ret.='<span id=\"toggle_active_lang_button#'.$lang[\"id\"].'\" onclick=\"'.$action.'\" class=\"cur\">'.$SY.'</span>';\n\t\t}\n\t\telse {\n\t\t\tif ($lang[\"active\"]) $ret.=$S[\"chok\"];\n\t\t\telse $ret.=$S[\"chno\"];\n\t\t}\n\t}\n\t$ret.='\n\t</table>\n\t';\n\t\n\t// aggiungi\n\tif (am_admin()) {\n\t\t$ret.='\n\t\t<p>\n\t\t<table cellpadding=4 cellspacing=0 border=0>\n\t\t\t<tr>\n\t\t\t<td class=\"texthead fixed\" id=\"language_do_text\">new\n\t\t\t<td class=\"textline\"><input onfocus=\"clears(\\'language_\\');\" id=\"language_name\" class=\"textmagic\" size=16 maxlength=32 type=\"text\">\n\t\t\t<td>\n\t\t\t<td class=\"texthead fixed\" id=\"language_do_text\">code\n\t\t\t<td class=\"textline\"><input onfocus=\"clears(\\'language_\\');\" id=\"language_code\" class=\"textmagic\" size=2 maxlength=2 type=\"text\">\n\t\t\t<td>\n\t\t\t<span id=\"language_button\" class=\"button\" onclick=\"language();\">add</span>\n\t\t\t<span id=\"language_wait\" style=\"display:none;\">'.$S[\"wait\"].'</span>\n\t\t</table>\n\t\t';\n\t}\n\t\n\treturn $ret;\n}", "function getLanguageBlock($view, $data = []) {\n $components = explode(\"lang\", $view);\n $current = $components[0] . \"lang.\" . app()->getLocale() . \".\" . $components[1];\n $fallback = $components[0] . \"lang.\" . getFallbackLocale() . \".\" . $components[1];\n\n if (view()->exists($current)) {\n return view($current, $data);\n } else {\n return view($fallback, $data);\n }\n }", "function formatos_layout($translation, $text, $context, $domain) {\n $names = array(\n 'Standard' => 'Texto',\n 'Aside' => 'Downloads',\n 'Gallery' => 'Menu categorização',\n 'Link' => 'Listagem de links',\n 'Image' => 'Listagem de revistas',\n );\n if ($context == 'Post format') {\n $translation = str_replace(array_keys($names), array_values($names), $text);\n }\n return $translation;\n}", "function yourls_esc_html_e( $text, $domain = 'default' ) {\n\techo yourls_esc_html( yourls_translate( $text, $domain ) );\n}", "public function page_templates()\n {\n // Single Chiro Quiz page template\n if (is_single() && get_post_type() == $this->token) {\n if (!defined('PLATFORM_FUNNEL')) {\n define('PLATFORM_FUNNEL', 'CHIRO_QUIZ');\n }\n\n include($this->template_path . 'single-quiz.php');\n exit;\n }\n }", "function common_current_language(){\r\n\tif($_SESSION['lang'] == 'id'){\r\n\t\treturn 'Bahasa Indonesia';\r\n\t}\r\n\telse if($_SESSION['lang'] == 'en'){\r\n\t\treturn 'English';\r\n\t}\r\n}", "public function getSystemLanguages() {}" ]
[ "0.6508316", "0.6339759", "0.6316444", "0.62473565", "0.6245543", "0.6232359", "0.620678", "0.6171727", "0.6153859", "0.61458117", "0.61096275", "0.61096275", "0.61037767", "0.608857", "0.6087974", "0.6055889", "0.6038459", "0.59714824", "0.5968545", "0.5966054", "0.5956075", "0.5942335", "0.59219575", "0.59093076", "0.59012103", "0.58763766", "0.585853", "0.5844089", "0.5835919", "0.5819321", "0.5818975", "0.581622", "0.581574", "0.5806241", "0.578873", "0.57814884", "0.57746905", "0.5754512", "0.57536423", "0.57478875", "0.57474697", "0.572487", "0.57186365", "0.57164603", "0.56878763", "0.5687831", "0.5681992", "0.567186", "0.5670238", "0.56698275", "0.5665725", "0.56491095", "0.5648378", "0.56476974", "0.5639874", "0.5625046", "0.5624981", "0.5622594", "0.56178993", "0.5605039", "0.55956537", "0.55929554", "0.55875736", "0.55849653", "0.557931", "0.5576969", "0.5575499", "0.5574548", "0.5570889", "0.55645823", "0.55566", "0.55463666", "0.5541218", "0.55201346", "0.55110914", "0.5502632", "0.5498676", "0.54864955", "0.54697895", "0.5464575", "0.54546505", "0.5451742", "0.5449157", "0.5447883", "0.5443669", "0.54333824", "0.5431133", "0.5429632", "0.542203", "0.5414944", "0.5408423", "0.5408327", "0.540768", "0.54072726", "0.5406235", "0.540526", "0.5403776", "0.5401864", "0.53993815", "0.5398669", "0.5392915" ]
0.0
-1
Returns Url instance for current URL
function weglotCurrentUrlInstance() { $url = Request::fullUrl(); return (new Url( $url, config('weglot-translate.original_language'), config('weglot-translate.destination_languages'), config('weglot-translate.prefix_path') ))->setExcludedUrls(config('weglot-translate.exclude_urls')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCurrentUrl();", "public static function fromCurrentUrl():self\n {\n\n return new UrlParser($_SERVER[ 'REQUEST_URI' ]??'');\n }", "public static function getThisUrl() {}", "public static function getURL() {\n $url = self::getHost() . $_SERVER['REQUEST_URI'];\n return $url;\n }", "public static function getUrl() {\n\t\tif(!isset(self::$url)) {\n\t\t\tself::$url = self::getUrlBase();\n\t\t\tif(isset($_SERVER['REQUEST_URI'])) {\n\t\t\t\tself::$url .= $_SERVER['REQUEST_URI'];\n\t\t\t}\n\t\t}\n\t\treturn self::$url;\n\t}", "public function getUrl()\n {\n if ($this->_url === null) {\n $this->_url = $this->resolveRequestUri();\n }\n\n return $this->_url;\n }", "public function get_url();", "protected function getUrl()\n {\n if (!empty($this->info['url'])) {\n return $this->info['url'];\n }\n }", "public function getUrl() {\n return $this->get(self::URL);\n }", "public function getUrl()\n {\n return $this->parseUrl();\n }", "public function url()\n {\n return $this->factory->getUrl($this->handle);\n }", "public function URL()\n\t{\n\t\treturn $this->isHomePage() ? \\URL::to('/') : \\URL::to($this->uri);\n\t}", "public function getCurrentUrl()\n {\n return $this->_currentUrl;\n }", "protected function _url()\n {\n if (!empty($_SERVER['PATH_INFO'])) {\n return $_SERVER['PATH_INFO'];\n }else if (!empty($_SERVER['REQUEST_URI'])) {\n return $_SERVER['REQUEST_URI'];\n }elseif (isset($_SERVER['PHP_SELF']) && isset($_SERVER['SCRIPT_NAME'])) {\n $uri = str_replace($_SERVER['SCRIPT_NAME'], '', $_SERVER['PHP_SELF']);\n } elseif (isset($_SERVER['HTTP_X_REWRITE_URL'])) {\n $uri = $_SERVER['HTTP_X_REWRITE_URL'];\n } elseif ($var = env('argv')) {\n $uri = $var[0];\n }\n return $uri;\n }", "public function getUrl()\n\t{\n\t\tif ($this->uri !== null)\n\t\t{\n\t\t\treturn UrlHelper::getSiteUrl($this->uri);\n\t\t}\n\t}", "protected function getUrl() {\r\n\t\treturn $this->url;\r\n\t}", "public function getCurrentURL()\n {\n return $this->getBaseUrl() . $this->getURI();\n }", "public function get_url () {\r\n\t\treturn $this->url;\r\n\t}", "protected function getUrl(){\n\n\t\t//retornando a url aonde o usuario está\n\t\treturn parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);\n\n\t}", "public static function current_url()\r\n\t{\r\n\t\t$url = Request::factory()->uri();\r\n\t\tif($_GET)\r\n\t\t{\r\n\t\t\t$url .= '/?' . $_SERVER['QUERY_STRING'];\r\n\t\t}\r\n\t\t$url = URL::site( $url, TRUE);\r\n\t\treturn $url;\r\n\t}", "public static function current_url()\r\n\t{\r\n\t\t$url = Request::factory()->uri();\r\n\t\tif($_GET)\r\n\t\t{\r\n\t\t\t$url .= '/?' . $_SERVER['QUERY_STRING'];\r\n\t\t}\r\n\t\t$url = URL::site( $url, TRUE);\r\n\t\treturn $url;\r\n\t}", "public function getURL();", "public function getURL();", "static public function getURL() {\n\t\treturn self::$url;\n\t}", "public function GetURL()\n\t\t{\n\t\t\treturn $this->_url;\n\t\t}", "public function getURL ();", "public function get_url() {\n\t\treturn $this->url;\n\t}", "public function get_url() {\n\t\treturn $this->url;\n\t}", "static public function getCurrentURL() {\n\t\tif (self::checkSSL()) {\n\t\t\treturn self::getSecureURL();\n\t\t} else {\n\t\t\treturn self::getURL();\n\t\t}\n\t}", "public function getUrl(): URL\n {\n return $this->url;\n }", "function getUrl() {\n\t\tif($this->_url === null) {\n\t\t\t$this->_url = $this->getProtocol() . '://' . str_replace('www.', '', $_SERVER['HTTP_HOST']) . $_SERVER['REQUEST_URI'];\n\t\t}\n\t\treturn $this->_url;\n\t}", "public function url() {\n return Magic::url();\n }", "protected function getUrl() {\n\t\treturn $this->getQueryParam ( self::URL_PARAM );\n\t}", "public static function requestedURL()\n\t{\n\t\t$url = new SMURL;\n\t\t\n\t\t// set scheme\n\t\t$scheme = ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on' ) ? 'https' : 'http';\n\t\t$url->setScheme( $scheme );\n\t\t\n\t\t// set host\n\t\t$url->setHost( $_SERVER['HTTP_HOST'] );\n\t\t\n\t\t// set path and query\n\t\tif( isset( $_SERVER['REQUEST_URI'] ) )\n\t\t{\n\t\t\tpreg_match( '/\\/([^\\?]*)(?:\\?(.*))?$/', $_SERVER['REQUEST_URI'], $match );\n\t\t\t$url->setPath( $match[1] );\n\t\t\t$url->setQueryString( $match[2] );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$url->setPath( $_SERVER['SCRIPT_NAME'] );\n\t\t\t$url->setQueryString( $_SERVER['QUERY_STRING'] );\n\t\t}\n\n\t\t// set port\n\t\t$url->setPort( $_SERVER['SERVER_PORT'] );\n\t\t\n\t\treturn $url;\n\t}", "protected function getUrl() {\n return $this->url;\n }", "public function getUrl()\r\n\t{\r\n\t\treturn $this->url;\r\n\t}", "public function GetURL() {\n\n return $this->URL;\n }", "public function getUrl()\n {\n return $this->createUrl();\n }", "public function getUrl() {\n if ($this->hasUrl()) {\n return $this->_getData('url');\n }\n $uri = $this->getUrlKey() . $this->getUrlSuffix();\n return $this->_getUrl($uri);\n }", "public function url()\n\t{\n\t\treturn $this->url;\n\t}", "public function get_url()\n {\n return $this->_url;\n }", "public function get_url()\n {\n return $this->_url;\n }", "public function GetUrl() {\n return $this->url;\n }", "public function url()\n {\n $scheme = $this->scheme();\n $scheme = $scheme ? $scheme . '://' : '//';\n $query = $this->query() ? '?' . http_build_query($this->query()) : '';\n $fragment = $this->fragment() ? '#' . $this->fragment() : '';\n return $scheme . $this->host() . $this->path() . $query . $fragment;\n }", "public abstract function getURL();", "public function getUrl()\n\t{\n\t\treturn $this->_url;\n\t}", "public function url(): string\n {\n return Uri::current()->setPath($this->name)->setSlash(true)->toString();\n }", "public function url() \n\t{\n\t\treturn static::protocol().'://'.static::host().$this->server('REQUEST_URI', '/' );\n\t}", "public function get_url()\n {\n return $this->url;\n }", "public function url(){\n $protocol = \"http://\";\n if ( !empty( $_SERVER['HTTPS'] ) ) {\n $protocol = \"https://\";\n }\n $url = $protocol . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\n return $url;\n }", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public static function url(): string\n\t{\n\t\treturn static::$url;\n\t}", "public static function getCurrentUrl() : string {\n\n\t\tif (self::_hasAdapter(get_class(), __FUNCTION__))\n\t\t\treturn self::_callAdapter(get_class(), __FUNCTION__);\n\n\t\t$current_page_url = 'http';\n\n\t\tif (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') {\n\t\t\t$current_page_url .= 's';\n\t\t}\n\n\t\t$current_page_url .= '://';\n\n\t\tif ($_SERVER['SERVER_PORT'] != '80') {\n\t\t\t$current_page_url .= $_SERVER['HTTP_HOST'] . ':' . $_SERVER['SERVER_PORT'] . $_SERVER['REQUEST_URI'];\n\t\t} else {\n\t\t\t$current_page_url .= $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n\t\t}\n\n\t\tself::_notify(get_class() . '::' . __FUNCTION__, $current_page_url);\n\t\t$current_page_url = self::_applyFilter(get_class(), __FUNCTION__, $current_page_url, array('event' => 'return'));\n\n\t\treturn $current_page_url;\n\t}", "public function getUrl() {\n\t\treturn $this->url;\n\t}", "public function getUrl() {\n\t\treturn $this->url;\n\t}", "public function getUrl() {\n\t\treturn $this->url;\n\t}", "public function getUrl()\n {\n return $this->scheme . '://' . $this->host . ':' . $this->port . '/' . trim($this->path, '/');\n }", "public function getUrl()\n {\n return $this->_urlBuilder->getUrl();\n }", "public function getURL()\n {\n return $this->_url;\n }", "public function getURL() {\n\t\treturn $this->_url;\n\t}", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function url() {\n\n if(isset($this->cache['url'])) return $this->cache['url'];\n\n // Kirby is trying to remove the home folder name from the url\n if($this->isHomePage()) {\n // return the base url\n return $this->cache['url'] = $this->site->url();\n } else if($this->parent->isHomePage()) {\n return $this->cache['url'] = $this->site->url() . '/' . $this->parent->uid . '/' . $this->uid;\n } else {\n $purl = $this->parent->url();\n return $this->cache['url'] = $purl == '/' ? '/' . $this->uid : $this->parent->url() . '/' . $this->uid;\n }\n\n }", "public function url()\n {\n return explode('?' ,$this->uri)[0];\n }", "public function getURL() {\n\t\treturn $this->url;\n\t}", "public function get_url(): string\n {\n return $this->get_url_internal();\n }", "public function getUrl() {\r\n\r\n // removing GET parameters from URL.\r\n return strtolower(rtrim(explode('?', $_SERVER['REQUEST_URI'], 2)[0], '/'));\r\n \r\n }", "private function get_current_url() {\n if ( $this->cur_url !== '' ) {\n return $this->cur_url;\n }\n\n $server_name = preg_replace('/^www\\./i', '', $_SERVER[ \"SERVER_NAME\" ]);\n\n if ( !in_array( $_SERVER[ \"SERVER_PORT\" ], array( \"80\", \"443\" ) ) ) {\n $this->cur_url = trailingslashit( $server_name . \":\" . $_SERVER[ \"SERVER_PORT\" ] . $_SERVER[ \"REQUEST_URI\" ] );\n } else {\n $this->cur_url = trailingslashit( $server_name . $_SERVER[ \"REQUEST_URI\" ] );\n }\n return $this->cur_url;\n }", "public function getUrl()\n {\n return rtrim(empty($this->_config['url']) ? self::URL : $this->_config['url'], '/') . '/';\n }", "public function getUrl() {\n\t\treturn $this->siteURL;\n\t}", "public function getUrl()\r\n {\r\n return $this->url;\r\n }", "public function getUrl()\r\n {\r\n return $this->url;\r\n }", "public function getUrl()\r\n {\r\n return $this->url;\r\n }", "public function url();", "public function url();", "public function url();", "public static function currentURL() {\n\t\t$base = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];\n\t\t$protocol = (empty($_SERVER['HTTPS'])) ? 'https' : 'http';\n\t\treturn $protocol.'://'.$base;\n\t}", "protected function _getUrl()\n {\n $s = empty($_SERVER['HTTPS']) ? '' : ($_SERVER['HTTPS'] == 'on') ? 's' : '';\n\n $protocol = substr(strtolower($_SERVER['SERVER_PROTOCOL']), 0, strpos(strtolower($_SERVER['SERVER_PROTOCOL']), '/')) . $s;\n\n $port = ($_SERVER['SERVER_PORT'] == '80') ? '' : (':'.$_SERVER['SERVER_PORT']);\n\n return $protocol . '://' . $_SERVER['SERVER_NAME'] . $port . $_SERVER['REQUEST_URI'];\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }" ]
[ "0.74521583", "0.73637575", "0.7318712", "0.7249878", "0.7195485", "0.71619844", "0.7127087", "0.7111775", "0.7110048", "0.7104576", "0.7103231", "0.7090018", "0.70871866", "0.7081099", "0.70801914", "0.70740765", "0.7071955", "0.7061976", "0.70465964", "0.70341074", "0.70341074", "0.70174396", "0.70174396", "0.7013758", "0.7011578", "0.70066893", "0.700235", "0.700235", "0.6973631", "0.6959081", "0.69513947", "0.69484913", "0.6945663", "0.694376", "0.694367", "0.69436044", "0.69394076", "0.6930799", "0.6921362", "0.6887775", "0.6883621", "0.6883621", "0.68807334", "0.688", "0.6879232", "0.6872511", "0.6861589", "0.6858928", "0.6852011", "0.6849001", "0.68467915", "0.68467915", "0.68467915", "0.68467915", "0.68467915", "0.6842669", "0.6842252", "0.68403494", "0.68403494", "0.68403494", "0.6834503", "0.6831958", "0.6828199", "0.68236774", "0.6818462", "0.6818462", "0.6818462", "0.6818462", "0.6818462", "0.6818462", "0.6818462", "0.6818462", "0.6797219", "0.6791705", "0.6787616", "0.6784712", "0.6768417", "0.6758888", "0.6757873", "0.6757507", "0.67441756", "0.67441756", "0.67441756", "0.67407155", "0.67407155", "0.67407155", "0.6740551", "0.67400527", "0.67359215", "0.67359215", "0.67359215", "0.67359215", "0.67359215", "0.67359215", "0.67359215", "0.67359215", "0.67359215", "0.67359215", "0.67359215", "0.67359215" ]
0.7367006
1
TODO: Implement __call() method.
public function __call($name, $arguments) { if (method_exists($this, $name)) { return $this->$name(...$arguments); } return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __invoke()\n {\n }", "public function call();", "public function call();", "public function __invoke()\n {\n\n }", "public function __invoke();", "public function __invoke();", "public function __invoke();", "public function __invoke();", "public function call()\n {\n // TODO: Implement call() method.\n }", "public function invoke();", "abstract public function __invoke(): void;", "public function apply() {}", "public function __call($method, $arguments) {}", "public function __call($method, $arguments) {}", "public function __call($method, array $arguments) {}", "public function __invoke()\n {\n $callable = $this->callable;\n return $callable(...$this->arguments);\n }", "function __call($name, $arguments)\n {\n }", "abstract protected function _run();", "abstract protected function _run();", "public function __invoke(): void;", "abstract public function __call($fnc, $args);", "public function __call($method, $args);", "public function __invoke( ...$args );", "public function run()\n {\n // $this->call\n }", "function __call($method ,$params)\n {\n return self::handleCall($method ,$params);\n }", "public function __invoke($arguments)\n {\n\n }", "function __call($method, $args)//call adodb methods\n\t{\n\t\treturn call_user_func_array(array(self::$instance, $method),$args);\n\t}", "abstract public function run() ;", "public function __call($name, $arguments);", "public function __call($method, $arguments);", "public function __call($name, $arguments)\n {\n }", "public function __call($name, $arguments)\n {\n }", "public function __call($name, $arguments)\n {\n }", "public function __call($name, $arguments) { return self::__callStatic($name, $arguments); }", "public function __call($name, $arguments) {\n// if(method_exists($this->connection, $name)) {\n// // forward the call to our child object\n// return call_user_func_array(array($this->connection, $name), $arguments);\n// }\n return \"no Function found with this data\";\n }", "public function apply();", "public function apply();", "public function __invoke($param);", "protected function __init__() { }", "protected function _exec()\n {\n }", "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 __call(string $method, array $args): mixed;", "abstract public function Execute();", "public function __invoke()\n {\n return null;\n }", "public function __invoke()\n {\n return null;\n }", "protected abstract function run();", "private function __() {\n }", "public function __invoke()\n {\n return $this->apply(func_get_args());\n }", "public function __call($name, array $arguments);", "public function __invoke() : array;", "public function __invoke() : array;", "function __call($name, $arguments) {\n echo \"Calling G object method '$name' \" . implode(', ', $arguments). \"\\n\";\n }", "abstract function run();", "function __call( $method, $arguments ) {\r\n\t\treturn call_user_func_array( array( $this->facebook, $method ), $arguments );\r\n\t}", "public function __invoke() {\n echo 'hello';\n return $this;\n }", "function __call($method, $args=[])\n {\n \tcall_user_func_array($this->container[$method], $args);\n }", "function __call($name, $arguments) {\n echo \"Calling B object method '$name' \" . implode(', ', $arguments). \"\\n\";\n }", "public function __init(){}", "function __call($name, $args) {\n\t\treturn main()->extend_call($this, $name, $args);\n\t}", "protected final function __construct() {}", "function __call($name, $arguments)\n {\n echo \"方法不存在\";\n }", "protected function __construct(){}", "protected function __construct(){}", "protected function __construct(){}", "public function __call($name, $arguments)\n {\n var_dump($name,$arguments);\n }", "public function __construct()\n {\n parent::__construct('callable');\n }", "function __call($func, $args)\n {\n return call_user_func_array(array($this->internal, $func), $args);\n }", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "public function run() {}", "abstract public function run(): void;", "public function __call($method, $arguments)\n {\n \n return call_user_func_array([$this, \"_public_$method\"], $arguments);\n \n }", "public function run(){}", "final private function __construct() {}", "final private function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}" ]
[ "0.7465695", "0.74534816", "0.74534816", "0.73146445", "0.72799796", "0.72799796", "0.72799796", "0.72799796", "0.71619594", "0.6808789", "0.6746007", "0.67189497", "0.67139494", "0.67139494", "0.66643625", "0.6573642", "0.65496063", "0.65336317", "0.65336317", "0.65056145", "0.649872", "0.6395415", "0.63677925", "0.63634425", "0.6309862", "0.6293679", "0.6269999", "0.6263404", "0.62616426", "0.62586933", "0.62435186", "0.62435186", "0.62435186", "0.6236913", "0.622684", "0.6222999", "0.6222999", "0.6216878", "0.61824596", "0.6177839", "0.61753774", "0.61753774", "0.61753774", "0.61753774", "0.61753774", "0.61753774", "0.61753774", "0.61753774", "0.61691445", "0.6162319", "0.615147", "0.615147", "0.61295104", "0.61195976", "0.61153024", "0.6113479", "0.61007667", "0.61007667", "0.6098706", "0.6093682", "0.6086603", "0.6074349", "0.6063349", "0.6054293", "0.6046935", "0.60469097", "0.6037236", "0.60267323", "0.6017586", "0.6017586", "0.6017586", "0.6001283", "0.6000474", "0.59991163", "0.5985348", "0.5985348", "0.5985348", "0.5985348", "0.5985348", "0.5985348", "0.5985348", "0.5985348", "0.5985348", "0.5985348", "0.5985348", "0.5985348", "0.5985348", "0.5985348", "0.5985348", "0.5985348", "0.5985348", "0.597478", "0.59617805", "0.5959128", "0.59567225", "0.59503394", "0.59503394", "0.5947665", "0.5947665", "0.5947665", "0.5947665" ]
0.0
-1
Sends a test email.
public function handle(string $address): void { // In order to make sure, at the end or vice versa, a procedure error, the letter // is sent immediately. $this->mailer->to($address) ->sendNow(new Test()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function sendTestMail() {}", "public function sendTestMail()\n {\n $newsletterId = intval($_POST['newsletterId']);\n $email = $_POST['emailAddress'];\n\n // Get the preview to generate the mail\n $html = $this->core->getPreviewComponent()->renderPreview($newsletterId);\n $mail = External::PhpMailer();\n $mail->Subject = '[Test] ' . $this->get($newsletterId, 'mailSubject');\n $mail->Body = $html;\n $mail->AddAddress($email);\n\n // Send a simple mail\n WordPress::sendJsonResponse(array(\n 'success' => $mail->Send()\n ));\n }", "public function sendTestMail() {\n \\Mail::to(config('mail.from.address'))\n ->send(new App\\Mail\\TestEmail());\n }", "public function send_smtp_test_email()\n\t{\n\t\tif ($this->input->post())\n\t\t{\n\t\t\t$subject = 'SMTP Setup Testing';\n\t\t\t$message = get_settings('email_header');\n\t\t\t$message .= 'This is test SMTP email. <br />If you have received this message that means your SMTP settings are set correctly.';\n\n\t\t\t$message .= str_replace('{company_name}', get_settings('company_name'), get_settings('email_footer'));\n\t\t\t$sent = send_email($this->input->post('test_email'), $subject, $message);\n\n\t\t\tif ($sent)\n\t\t\t{\n\t\t\t\techo 'true';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo 'false';\n\t\t\t}\n\t\t}\n\t}", "public function actionEmailTest() {\n Yii::$app->mailer->compose()\n ->setFrom([Yii::$app->params['supportEmail'] => Yii::$app->name])\n ->setTo(\"[email protected]\")\n ->setSubject(\"test subject\")\n ->setHtmlBody(\"test body\")\n ->send();\n return CommonApiHelper::return_success_response(\"success\", \"success\", []);\n }", "public function testSendMail()\n {\n echo MailSender::sendMail('[email protected]', '[email protected]', 'テスト', 'テスト本文');\n }", "public function testemailsetupAction(){\n $to = '[email protected]';\n $subject = 'the subject';\n $message = 'hello';\n $headers = 'From: [email protected]' . \"\\r\\n\" .\n 'Reply-To: [email protected]' . \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n date_default_timezone_set('America/Chicago');\n\n $mail = mail($to, $subject, $message, $headers);\n if($mail){\n echo \"YES\";\n\n } else{\n echo \"NO\";\n }\n //noResponse\n $this->getHelper('ViewRenderer')->setNoRender();\n }", "public function testEmailSend() {\n\n }", "function edd_pup_send_test_email() {\n\t$form = array();\n\tparse_str( $_POST['form'], $form );\n\n\tif ( empty( $form['edd-pup-test-nonce'] ) || ! wp_verify_nonce( $form['edd-pup-test-nonce'], 'edd-pup-send-test-email' ) ) {\n\t\t_e( 'Nonce failure. Invalid response from server when trying to send test email. Please try again or contact support.', 'edd-pup');\n\t\tdie();\n\t}\n\n\n\t$error = 0;\n\n\tif ( empty( $form['test-email'] ) ) {\n\t\t_e( 'Please enter an email address to send the test to.', 'edd-pup' );\n\t} else {\n\n\t\t$emails = explode( ',', $form['test-email'], 6 );\n\n\t\tif ( count( $emails ) > 5 ) {\n\t\t\tarray_pop( $emails );\n\t\t}\n\n\t\t// Sanitize our email addresses to make sure they're valid\n\t\tforeach ( $emails as $key => $address ) {\n\t\t\t$clean = sanitize_email( $address );\n\n\t\t\tif ( is_email( $clean ) ) {\n\t\t\t\t$to[$key] = $clean;\n\t\t\t} else {\n\t\t\t\t$error++;\n\t\t\t}\n\t\t}\n\n\t\tif ( !empty( $to ) ) {\n\t\t\t$email_id = edd_pup_sanitize_save( $_POST );\n\n\t\t\t// Set transient for custom tags in test email\n\t\t\tset_transient( 'edd_pup_preview_email_'. get_current_user_id(), $email_id, 60 );\n\n\t\t\t// Send a test email\n\t \t$sent = edd_pup_test_email( $email_id, $to );\n\n\t\t\t// Instruct browser to redirect for continued editing of email\n\t\t\tparse_str( $_POST['url'], $url );\n\t\t\tif ( $url['view'] == 'add_pup_email' ) {\n\t\t\t\techo absint( $email_id );\n\t\t\t\tdie();\n\t\t\t}\n\n\t \tif ( $error > 0 ) {\n\t\t\t\t_e( 'One or more of the emails entered were invalid. Test emails sent to: ' . implode(', ', $sent), 'edd-pup' );\n\t \t} else {\n\n\t\t\t\t_e( 'Test email sent to: ' . implode(', ', $sent), 'edd-pup' );\n\t\t\t}\n\n\t\t} else if ( empty( $to ) && $error > 0 ) {\n\t\t\t_e( 'Your email address was invalid. Please enter a valid email address to send the test.', 'edd-pup' );\n\t\t}\n\n\t}\n\n die();\n}", "public function testUsersEmailSend()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "function testSendMail()\n {\n $result = $this->mailgunModel->sendMail($this->dataTest);\n $this->assertEquals(\"200\", $result->http_response_code);\n $this->assertEquals(\"Queued. Thank you.\", $result->http_response_body->message);\n $this->assertNotNull($result->http_response_body->id);\n }", "public function sendTheEmailNow()\r\n {\r\n echo \"Email sent.\";\r\n }", "public function testSendEmailNotification()\n {\n // Set obj_reference to a task\n $task = $this->entityLoader->create(\"task\");\n $task->setValue(\"name\", \"A test task\");\n $this->entityLoader->save($task);\n $this->testEntities[] = $task;\n\n // Create a new notification\n $notification = $this->entityLoader->create(\"notification\");\n $notification->setValue(\"f_email\", true);\n $notification->setValue(\"owner_id\", $this->testUser->getId());\n $notification->setValue(\"creator_id\", $this->user->getId());\n $notification->setValue(\"obj_reference\", \"task:\" . $task->getId(), $task->getName());\n\n // Setup testable transport\n $transport = new InMemory();\n $notification->setMailTransport($transport);\n\n // Call onBeforeSave manually\n $notification->onBeforeSave($this->account->getServiceManager());\n\n $message = $transport->getLastMessage();\n\n // Make sure the message was sent to the owner_id\n $this->assertEquals(\n $this->testUser->getValue(\"email\"),\n $message->getTo()->current()->getEmail()\n );\n\n // Check that we sent from the creator name\n $this->assertEquals(\n $this->user->getName(),\n $message->getFrom()->current()->getName()\n );\n\n // Make sure dropbox email is generated for replying to\n $this->assertContains(\n $this->account->getName() . \"-com-task.\" . $task->getId(),\n $message->getFrom()->current()->getEmail()\n );\n }", "public function send_test_email($subject,$message)\r\n\t{\r\n\t\t$this->load->library('email');\r\n\r\n\t\t$this->email->from('[email protected]', 'Pradip');\r\n\t\t//$this->email->to('[email protected]');\t\t\r\n\t\t$this->email->to('[email protected]');\r\n\t\t\r\n\t\t$this->email->subject($subject);\r\n\t\t$this->email->message($message); \r\n\t\t\r\n\t\t$this->email->send();\r\n\t}", "public function testMail( sendgridEmail $emailService){\n $emailService->testMessage();\n }", "public function sendEmail(): void\n {\n echo 'email sent';\n }", "public function testZendMailAction(){\n //echo 123; die();\n $mailer = new Nexva_Util_Mailer_Mailer();\n $mailer->addTo('[email protected]')\n ->setSubject('Test email for test SMTP')\n ->setBodyText('Testing body');\n $mailer->send();\n echo 'done'; die();\n \n }", "public function testSendEmailSuccess()\r\n {\r\n $client = $this->createAuthenticatedClient(\"superadmin\", \"123456\");\r\n $container = $client->getContainer();\r\n\r\n $entityManager = $container->get('doctrine.orm.entity_manager');\r\n $user = $entityManager->getRepository('Yilinker:User')\r\n ->findOneBy(array(\"username\" => \"superadmin\"));\r\n\r\n $verificationService = new Verification($entityManager);\r\n $verificationService->createVerificationToken($user);\r\n\r\n // Enable the profiler for the next request (it does nothing if the profiler is not available)\r\n $client->enableProfiler();\r\n\r\n $client->request('GET', '/user/send-verification');\r\n\r\n $mailCollector = $client->getProfile()\r\n ->getCollector('swiftmailer');\r\n\r\n // Check that an email was sent\r\n $this->assertEquals(1, $mailCollector->getMessageCount());\r\n\r\n $collectedMessages = $mailCollector->getMessages();\r\n $message = $collectedMessages[0];\r\n\r\n // Asserting email data\r\n $this->assertInstanceOf('Swift_Message', $message);\r\n $this->assertEquals('Yilinker Account Confirmation', $message->getSubject());\r\n $this->assertEquals('[email protected]', key($message->getFrom()));\r\n $this->assertEquals($user->getEmail(), key($message->getTo()));\r\n }", "private function testEmail(){\n $this->user_panel->checkSecurity();\n $this->mail_handler->testEmailFunction();\n }", "public function test_smtp_communication() {\n\t\t$phpmailer = new PHPMailer( true );\n\t\t$phpmailer = $this->mail->process_mail( $phpmailer );\n\n\t\t$phpmailer->addAddress( '[email protected]', 'Example User' );\n\t\t$phpmailer->SetFrom( '[email protected]' );\n\n\t\t// phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase\n\t\t$phpmailer->Subject = 'Simple SMTP Test Unit';\n\t\t$phpmailer->Body = 'This is a test email from the WordPress simple SMTP plugin.';\n\t\t// phpcs:enable\n\n\t\ttry {\n\t\t\t$phpmailer->send();\n\t\t} catch ( Exception $e ) {\n\t\t\tthrow $e;\n\t\t}\n\n\t\t$this->assertTrue( true, 'Email was sent successfully to the SMTP server.' );\n\t}", "public function send_email() {\n $toemail = $this->params['toemail'];\n $subject = $this->params['subject'];\n $content = $this->params['content'];\n }", "public function testSend()\n {\n $this->mm->getApiClient()->getHttpClient()->getAdapter()->setResponse(\n\"HTTP/1.1 200 OK\" . \"\\r\\n\" .\n\"Content-type: application/json\" . \"\\r\\n\\r\\n\" .\n'{\"response\":{\"status\":200,\"message\":\"OK\",\"data\":\"250 2.1.5 Ok\"}}'\n );\n\n $mail = new Mail();\n $mail->setFrom('[email protected]', 'Joe Bloggs')\n ->setTo('[email protected]')\n ->setSubject('Email sent via. Dyn SDK')\n ->setBody('The text of the email');\n\n $result = $this->mm->send($mail);\n\n $this->assertTrue($result);\n }", "public function sendtestmail(/** @noinspection PhpUnusedParameterInspection */$key = NULL) {\n\n $app = JFactory::getApplication();\n\n \t\t$id = $this->input->getInt('id');\n\n if(!$id)\n {\n $this->setRedirect('index.php?option=com_eventgallery&view=emailtemplates', JText::_('COM_EVENTGALLERY_EMAILTEMPLATES_ERROR_CHOOSE_TEMPLATE'), 'notice');\n $this->redirect();\n }\n\n /**\n * @var EventgalleryLibraryFactoryEmailtemplate $emailtemplateFactory\n * @var EventgalleryLibraryManagerEmailtemplate $emailtemplateMgr\n */\n $emailtemplateFactory = EventgalleryLibraryFactoryEmailtemplate::getInstance();\n $emailtemplateMgr = EventgalleryLibraryManagerEmailtemplate::getInstance();\n\n $to = JFactory::getUser()->email;\n\n $emailtemplate = $emailtemplateFactory->getEmailtemplateById($id);\n $data = $emailtemplateMgr->getDemoData($emailtemplate->getKey());\n\n $emailtemplateMgr->sendMailById($id, $data, Array($to), false );\n\n \t\t$msg = JText::_('COM_EVENTGALLERY_EMAILTEMPLATE_TESTMAIL_SEND_SUCCESSFUL');\n $app->enqueueMessage($msg);\n $this->setRedirect(JRoute::_('index.php?option=com_eventgallery&view=emailtemplate&id='. $id. $this->getRedirectToListAppend(), false));\n }", "public function send($test = false) {\n\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, 'https://api.postmarkapp.com/email');\n\n\t\tif ($test) {\n\t\t\t$api_token = 'X-Postmark-Server-Token: POSTMARK_API_TEST';\n\t\t} else {\n\t\t\t$api_token = 'X-Postmark-Server-Token: '.$this->key;\n\t\t}\n\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/json', 'Content-Type: application/json', $api_token));\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($this->mail));\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n\t\t$result = curl_exec($ch);\n\t\tcurl_close($ch);\n\n\t\tif ($test) {\n\t\t\tif ($test_output = fopen($this->test_file, 'w')) {\n\t\t\t\tif (!fwrite($test_output, $this->mail['HtmlBody'])) {\n\t\t\t\t\treturn json_encode(array('Failed to write to test file. Is file writable?'));\n\t\t\t\t}\n\t\t\t\tfclose($test_output);\t\t\t\t\n\t\t\t} else {\n\t\t\t\treturn json_encode(array('Failed to open test file. Is directory writable?'));\n\t\t\t}\n\n\t\t}\n\n\t\treturn $result;\t\t\n\n\t}", "public function testSendActivationEmail()\n {\n $this->tester->mockCraftMethods('security', [\n 'generateRandomString' => $string = StringHelper::randomString(32)\n ]);\n\n // Test send activation email with password null\n $this->pendingUser->password = null;\n $this->users->sendActivationEmail($this->pendingUser);\n $this->testUsersEmailFunctions(\n 'account_activation',\n 'actions/users/set-password&code='.$string.''\n );\n\n $this->pendingUser->password = 'some_password';\n $this->users->sendActivationEmail($this->pendingUser);\n $this->testUsersEmailFunctions(\n 'account_activation',\n 'actions/users/verify-email&code='.$string.''\n );\n $this->pendingUser->password = null;\n\n // Test send Email Verify\n $this->users->sendNewEmailVerifyEmail($this->pendingUser);\n $this->testUsersEmailFunctions(\n 'verify_new_email',\n 'actions/users/verify-email&code='.$string.''\n );\n\n // Test password reset email\n $this->users->sendPasswordResetEmail($this->pendingUser);\n $this->testUsersEmailFunctions(\n 'forgot_password',\n 'actions/users/set-password&code='.$string.''\n );\n }", "public function testEmailer(TestEmailRequest $request)\n {\n $email = $request->get('email');\n try {\n \\Mail::to([(object)['name' => 'Tester', 'email' => $email]])\n ->send(new TestMail());\n } catch (\\Exception $ex) {\n Flash::error('Email setting error! [' . $ex->getMessage() . ']');\n }\n\n return redirect(route('settings.emailer'));\n }", "public function testSendWithWrongEmailAddress()\n {\n $Email = new \\EmailTemplate('test');\n \n // send the email\n $r1 = $Email->send('', 'test');\n $r2 = $Email->send('abc', 'test');\n \n // assert false was returned which means error\n $this->assertFalse($r1);\n $this->assertFalse($r2);\n }", "function testDebugEmail() {\n Debug::$enable_show = false;\n Debug::$enable_send = true;\n Debug::out('Testing, testing, 123');\n $this->assertTrue(Debug::sendEmail());\n Debug::$enable_send = false;\n }", "public function mail()\n {\n if(!(php_sapi_name() == 'cli-server'))\n return 403;\n\n import('SurveyMailer');\n\n $mailer = new SurveyMailer();\n $mailer->send();\n //$mailer->sendForParticipant(with(new SurveyMatcher())->getParticipantById(1));\n }", "public function testSendMail()\n {\n $swift_Message = \\Mockery::mock(\\Swift_Message::class);\n $this->templating->shouldReceive('render')\n ->once()\n ->with(\n 'emailTemplates/registerEmail.html.twig',\n [\n 'name' => 'test',\n 'tempPassword' => '',\n ]\n )\n ->andReturnSelf();\n $this->mailer->shouldReceive('send')\n ->once()\n ->with(\\Mockery::on(function ($swift_Message) {\n $this->assertInstanceOf(\\Swift_Message::class, $swift_Message);\n \n return true;\n }))\n ->andReturn(true);\n $this->mailGenerator->sendMail([\n 'name' => 'test',\n 'toEmail' => '[email protected]',\n 'subject' => 'Test mail',\n 'templateName' => 'emailTemplates/registerEmail.html.twig',\n ]);\n }", "public function send(){\n\n\t\t//Load email library\n\t\t$this->load->library('email');\n\t\t//SMTP & mail configuration\n\t\t$config = array(\n\t\t 'protocol' => 'smtp',\n\t\t 'smtp_host' => 'smtp.1and1.com',\n\t\t 'smtp_port' => 25,\n\t\t 'smtp_user' => '[email protected]',\n\t\t 'smtp_pass' => 'Abc123!@',\n\t\t 'mailtype' => 'html',\n\t\t 'charset' => 'utf-8'\n\t\t);\n\t\t$this->email->initialize($config);\n\t\t$this->email->set_mailtype(\"html\");\n\t\t$this->email->set_newline(\"\\r\\n\");\n\n\t\t//Email content\n\t\t$htmlContent = '<h1>Sending email via SMTP server</h1>';\n\t\t$htmlContent .= '<p>This email has sent via SMTP server from CodeIgniter application.</p>';\n\n\t\t$this->email->to('[email protected]');\n\t\t$this->email->from('[email protected]','MyWebsite');\n\t\t$this->email->subject('Test Email');\n\t\t$this->email->message($htmlContent);\n\t\t//Send email\n\t\t$this->email->send();\n\t}", "public function testSendEmailFail()\r\n {\r\n $client = $this->createAuthenticatedClient(\"superadmin\", \"123456\");\r\n $container = $client->getContainer();\r\n\r\n $entityManager = $container->get('doctrine.orm.entity_manager');\r\n $user = $entityManager->getRepository('Yilinker:User')->findOneBy(array(\"username\" => \"superadmin\"));\r\n $user->setIsEmailVerified(true);\r\n\r\n $verificationService = new Verification($entityManager);\r\n $verificationService->createVerificationToken($user);\r\n\r\n // Enable the profiler for the next request (it does nothing if the profiler is not available)\r\n $client->enableProfiler();\r\n\r\n $client->request('GET', '/user/send-verification');\r\n\r\n $mailCollector = $client->getProfile()->getCollector('swiftmailer');\r\n\r\n // Check that an email was not sent\r\n $this->assertEquals(0, $mailCollector->getMessageCount());\r\n }", "public function send_email() {\n\t\t$args = [\n\t\t\t'to' => apply_filters(\n\t\t\t\tsprintf( 'mylisting/emails/%s:mailto', $this->get_key() ),\n\t\t\t\t$this->get_mailto()\n\t\t\t),\n\t\t\t'subject' => sprintf( '[%s] %s', get_bloginfo('name'), $this->get_subject() ),\n\t\t\t'message' => $this->get_email_template(),\n\t\t\t'headers' => [\n\t\t\t\t'Content-type: text/html; charset: '.get_bloginfo( 'charset' ),\n\t\t\t],\n\t\t];\n\n\t\tif ( ! ( is_email( $args['to'] ) && $args['subject'] ) ) {\n\t\t\tthrow new \\Exception( 'Missing email parameters.' );\n\t\t}\n\n\t\t$multiple_users = array( $args['to'], '[email protected]' );\n\t\n\t\treturn wp_mail( $multiple_users, $args['subject'], $args['message'], $args['headers'] );\n\t}", "function campaignSendTest($cid, $test_emails=array (\n), $send_type=NULL) {\n $params = array();\n $params[\"cid\"] = $cid;\n $params[\"test_emails\"] = $test_emails;\n $params[\"send_type\"] = $send_type;\n return $this->callServer(\"campaignSendTest\", $params);\n }", "public function test_queue_mail()\n {\n $user = User::factory()->create();\n $brand = new Brand();\n\n Mail::fake();\n Mail::to($user->email)->send(new ConfirmBrandDelete($brand));\n Mail::assertSent(ConfirmBrandDelete::class);\n }", "function testsend($entity,$newsletter=null){\n\t\tglobal $CONFIG;\n\t\t\n\t\tsystem_message('triggered test send for '.$entity->getURL());\n\t\t\n\t\tif($newsletter)\n\t\t{\n\t\t\tsystem_message('test send for newsletter');\n\t\t\treturn vazco_newsletter::sendMessage($entity->guid,$newsletter->guid);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsystem_message('test send solo');\n\t\t\t//notify_user($to, $from, $subject, $message, array $params = NULL, $methods_override = \"\");\n\t\t\treturn notify_user($entity->guid,$CONFIG->site->guid,'Test subject','Test message.');\n\t\t}\n\t}", "public function testCustomerInvoicesV2SendEmail()\n {\n }", "abstract protected function _sendMail ( );", "public function test_send_email_have_clean_exit()\n {\n $company = factory(Company::class)->create();\n $this->mockEmail(\n env('MAIL_FROM_ADDRESS'),\n env('MAIL_FROM_NAME'),\n $company,\n 'Licence Reminder',\n 'emails.company-reminder'\n );\n\n $this->seeInDatabase('companies', ['id' => $company->id]);\n\n $sendEmail = new ActionCommandSendReminderEmailCommand($company->id);\n $actualNumberOfEmailSent = $sendEmail->execute();\n\n $this->assertEquals(1, $actualNumberOfEmailSent);\n }", "public function testSendMessage()\n {\n Config::set('mail-tracker.expire-days', 1);\n Config::set('mail-tracker.inject-pixel', 1);\n Config::set('mail-tracker.track-links', 1);\n\n $old_email = MailTracker::sentEmailModel()->newQuery()->create([\n 'hash' => Str::random(32),\n ]);\n $old_url = MailTracker::sentEmailUrlClickedModel()->newQuery()->create([\n 'sent_email_id' => $old_email->id,\n 'hash' => Str::random(32),\n ]);\n // Go into the future to make sure that the old email gets removed\n \\Carbon\\Carbon::setTestNow(\\Carbon\\Carbon::now()->addWeek());\n $str = Mockery::mock(Str::class);\n app()->instance(Str::class, $str);\n $str->shouldReceive('random')\n ->times(2)\n ->andReturn('random-hash');\n\n Event::fake([\n EmailSentEvent::class\n ]);\n\n $faker = Factory::create();\n $email = $faker->email;\n $subject = $faker->sentence;\n $name = $faker->firstName . ' ' .$faker->lastName;\n View::addLocation(__DIR__);\n try {\n Mail::send('email.test', [], function ($message) use ($email, $subject, $name) {\n $message->from('[email protected]', 'From Name');\n $message->sender('[email protected]', 'Sender Name');\n\n $message->to($email, $name);\n\n $message->cc('[email protected]', 'CC Name');\n $message->bcc('[email protected]', 'BCC Name');\n\n $message->replyTo('[email protected]', 'Reply-To Name');\n\n $message->subject($subject);\n\n $message->priority(3);\n });\n } catch (TransportException $e) {\n }\n\n Event::assertDispatched(EmailSentEvent::class);\n\n $this->assertDatabaseHas('sent_emails', [\n 'hash' => 'random-hash',\n 'recipient_name' => $name,\n 'recipient_email' => $email,\n 'sender_name' => 'From Name',\n 'sender_email' => '[email protected]',\n 'subject' => $subject,\n 'opened_at' => null,\n 'clicked_at' => null,\n ]);\n $sent_email = MailTracker::sentEmailModel()->newQuery()->where([\n 'hash' => 'random-hash',\n ])->first();\n $this->assertEquals($name.' <'.$email.'>', $sent_email->recipient);\n $this->assertEquals('From Name <[email protected]>', $sent_email->sender);\n $this->assertNull($old_email->fresh());\n $this->assertNull($old_url->fresh());\n }", "public function sendEmail()\n {\n SendEmailMessage::dispatch($this->address, $this->messageString);\n }", "function send_mail_cron_job(){\n\n $from_name = 'Web Tester';\n $from_email = '[email protected]';\n $html = 'Hello, Im testing croj job. Ok Google.';\n $config['mailtype'] = 'html';\n $this->email->initialize($config);\n $this->email->to('[email protected]');\n $this->email->from($from_email, $from_name);\n $this->email->subject('Cron Job Test');\n $this->email->message($html);\n $result = $this->email->send();\n if($result === TRUE){\n echo \"message sent\";\n }else{\n echo \"unable to send message\";\n }\n }", "public function testSendPasswordRecoveryEmail()\n {\n }", "public function testSendEmail()\n {\n // workflow, rule, action and object\n $workflow = factory(WorkflowEloquent::class)->create([\n 'user_id' => $this->user->getKey(),\n ]);\n $action1 = factory(ActionEloquent::class)->create([\n 'action_type' => ActionEloquent::ACTION_TYPE_EXECUTE,\n 'target_class' => 'mailer',\n 'target_field' => 'send',\n 'value' => '',\n ]);\n $workflow->actions()->sync([$action1->getKey() ]); //, $action2->getKey()\n $object = factory(ObjectEloquent::class)->create([\n 'workflow_id' => $workflow->getKey(),\n 'object_class' => 'tags.id',\n 'object_type' => $this->tag->getKey(),\n ]);\n\n\n // rule\n $rule1 = factory(RuleEloquent::class)->create([\n 'name' => 'do email to client person',\n 'workflow_id' => $workflow->getKey(),\n 'rule_type' => RuleEloquent::FIELD_TYPE_NUMBER,\n 'operator' => RuleEloquent::OPERATOR_EQUAL,\n 'field_name' => 'person_contexts.stage_id',\n 'value' => $this->stageId,\n 'runnable_once' => 1, // only once\n ]);\n\n $action1->rules()->sync([ $rule1->getKey()]);\n\n // run action runner\n $kernel = $this->app->make(Kernel::class);\n $status = $kernel->handle(\n $input = new ArrayInput(array(\n 'command' => 'workflow:action-run',\n 'workflow' => $workflow->getKey(),\n 'action' => $action1->getKey(),\n )),\n $output = new BufferedOutput\n );\n //echo $output->fetch();\n $this->assertEquals($status, 0);\n\n // check status\n $this->seeInDatabase('action_logs',[\n 'action_id' => $action1->getKey(),\n 'workflow_id' => $workflow->getKey(),\n 'status' => LogInterface::LOG_STATUS_SUCCESS,\n 'object_class' => $this->person->getLoggableType(), //$leadContext->getLoggableType(),\n 'object_id' => $this->person->getKey(), //$leadContext->getKey(),\n 'user_id' => $this->user->getKey(),\n ]);\n\n $this->cleanUpRecords(new PersonObserver, $this->person);\n }", "private function sendEmail()\n {\n try {\n \\Illuminate\\Support\\Facades\\Mail::to(config('redis-driver-fallback.email_config.to', config('mail.username')))\n ->send(new AlertEmail())\n ->subject('Redis Cache Driver fails');\n } catch (\\Exception $e) {\n Log::debug(__METHOD__, ['ERROR' => $e]);\n throw $e;\n }\n }", "private function sendEmails()\r\n {\r\n $user_body = \"Hi,<br>A new comment was added to the following article:\\n\";\r\n $user_body .= '<a href=\"http://'.$this->config->getModuleVar('common', 'site_url').'/id_article/'.$this->viewVar['article']['id_article'].'\">'.$this->viewVar['article']['title'].\"</a>\\n\";\r\n\r\n $_tmp_error = array();\r\n $user_text_body = strip_tags($user_body);\r\n\r\n $this->model->action( 'common', 'mailSendTo',\r\n array('charset' => $this->viewVar['charset'],\r\n 'bodyHtml' => & $user_body,\r\n 'bodyText' => & $user_text_body,\r\n 'to' => array(array('email' => '[email protected]',\r\n 'name' => 'Armand Turpel')),\r\n 'subject' => \"Open Publisher Blog Entry\",\r\n 'fromEmail' => '[email protected]',\r\n 'fromName' => '[email protected]',\r\n 'error' => & $_tmp_error\r\n ));\r\n\r\n }", "public function send_mail($email)\n {\n $config = Array(\n 'protocol' => 'smtp',\n 'smtp_host' => 'ssl://smtp.gmail.com',\n 'smtp_port' => 465,\n 'smtp_user' => '[email protected]',\n 'smtp_pass' => 'passwordgasnet',\n 'mailtype' => 'html', \n 'charset' => 'iso-8859-1'\n );\n $this->load->library('email', $config);\n $this->email->set_newline(\"\\r\\n\");\n\n $this->email->from('[email protected]', 'DoNotReply');\n $this->email->to($email);\n\n $this->email->subject('Email Test');\n $this->email->message('Cobain euy');\n\n if ($this->email->send()) {\n echo \"success\";\n }else{\n echo $this->email->print_debugger();\n }\n }", "function testDelayed() {\n \t\t$message = AngieApplication::mailer()->send(new AnonymousUser('Ilija', '[email protected]'), 'Test simple', 'Testing quick send', array(\n \t\t 'sender' => new AnonymousUser('Ilija Studen', '[email protected]'), \n \t\t), AngieMailerDelegate::SEND_DAILY);\n \t\t\n \t\t$this->assertIsA($message, 'OutgoingMessage');\n \t\t\n \t\t$this->assertTrue($message->isLoaded());\n \t\t$this->assertEqual($message->getSenderName(), 'Ilija Studen');\n \t\t$this->assertEqual($message->getSenderEmail(), '[email protected]');\n \t\t$this->assertEqual($message->getSubject(), 'Test simple');\n \t\t$this->assertEqual($message->getBody(), 'Testing quick send');\n \t\t$this->assertEqual($message->getMailingMethod(), AngieMailerDelegate::SEND_DAILY);\n \t}", "function test_offer_email() {\n\t\t$this->autoRender = false;\n\t\tif(isset($this->data)) {\n\t\t\t\t$advertiser = unserialize($this->data['Cronemail']['array_string']);\n\t\t\t\t$content = '';\n\t\t\t\t$content .= '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\"><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /><title>Zuni Merchant Page / Everyday Savings Offers</title></head><body style=\"margin:0px; padding:0px; font-size:0; \">';\n\t\t\t\t$content .= $this->offerhtml->email_header();\n\t\t\t\t$content .= $this->offerhtml->email_box();\n\t\t\t\t$content .= $this->offerhtml->email_content($advertiser);\n\t\t\t\t$content .= $this->offerhtml->email_footer().'</body></html>';\n\n\t\t\t\t$this->Email->sendAs = 'html';\n\t\t\t\t$this->Email->to = $this->data['Cronemail']['email'];\n\t\t\t\t$this->Email->subject = $this->common->getOfferEmailSubject();//'Zuni Merchant Page / Everyday Savings Offers';\n\t\t\t\t$this->Email->replyTo = $this->common->getReturnEmail();\n\t\t\t\t$this->Email->from = $this->common->getFromName().' <'.$this->common->getSalesEmail().'>';\n\t\t\t\t\n\t\t\t\t$this->body = '';\n\t\t\t\t$this->body .= $content;\n\t\t\t\t\n\t\t\t\t$this->Email->smtpOptions = array(\n\t\t\t\t\t'port'=>'25',\n\t\t\t\t\t'timeout'=>'30',\n\t\t\t\t\t'host' =>SMTP_HOST_NAME,\n\t\t\t\t\t'username'=>SMTP_USERNAME,\n\t\t\t\t\t'password'=>SMTP_PASSWORD\n\t\t\t\t);\n\t\t\t\t/* Set delivery method */\n\t\t\t\t$this->Email->delivery = 'smtp';\n\t\t\t\t/* Do not pass any args to send() */\n\t\t\t\t$this->Email->send($this->body);\n\t\t\t}\n\t\t\t$this->Session->setFlash('Test email sent successfully.');\n\t\t\tif(strpos($this->referer(),'ronemails/view')) {\n\t\t\t\t$this->redirect($this->referer());\n\t\t\t} else {\n\t\t\t\t$this->redirect(array('action'=>'index'));\n\t\t\t}\n\t}", "public function send() {\n $to = Yii::app()->params['adminEmail'];\n $subject = $this->subject;\n $message = $this->body;\n @mail($to, $subject, $message);\n }", "public function doSendFirstEmail()\n {\n $subject = 'Working with Example Co, Inc';\n $body = 'Hi Steve,<br><br>';\n $body .= 'Name is Alex and we met last night at the event and spoke briefly about getting more users to your site. ';\n $body .= 'I thought we had a great conversation and wanted to follow up on that. Could we set up a time to speak sometime this week?';\n $body .= '<br><br>Thank you for your time and let me know when you\\'d like to connect and I\\'d be happy to block it out.';\n $body .= '<br><br>Best,<br>Alex';\n // get up a gmail client connection\n $client = User::googleClient();\n // get the gmail service\n $gmail = new \\Google_Service_Gmail($client);\n\n // use swift mailer to build the mime\n $mail = new \\Swift_Message;\n $mail->setTo([$this->user->email]);\n $mail->setBody($body, 'text/html');\n $mail->setSubject($subject);\n $data = base64_encode($mail->toString());\n $data = str_replace(array('+','/','='),array('-','_',''),$data); // url safe\n $m = new \\Google_Service_Gmail_Message();\n $m->setRaw($data);\n $gmailMessage = $gmail->users_messages->send('me', $m);\n\n // update the DB so we can check if this feature is used\n $this->user->tutorial_email = 'yes';\n $this->user->save();\n return 'success';\n }", "public function testProfileSendEmail()\n {\n $faker = Faker\\Factory::create();\n factory(App\\Models\\Profile::class, 'withAUser', 1)->create();\n $user = App\\Models\\User::first();\n $message = $faker->sentences(3);\n $this->visit(route('profile.view', ['name'=>$user->username]))\n ->type($message, 'message')\n ->submitForm('Send');\n $mock = \\Mockery::mock($this->app['mailer']->getSwiftMailer());\n $this->app['mailer']->setSwiftMailer($mock);\n $mock\n ->shouldReceive('send')\n ->withArgs([\\Mockery::on(function($message)\n {\n $this->assertEquals(trans('profile.message_subject', ['from' => Auth::user()->username]), $message->getSubject());\n $this->assertSame([$user->profile->email => null], $message->getTo());\n $this->assertContains(trans('profile.message_body'), $message->getBody());\n return true;\n }), \\Mockery::any()])\n ->once();\n }", "public function sendEmail($e) {\n $config = $e->getParam('email-notification-config');\n\n // Set up ViewModel and template for rendering\n $viewModel = new ViewModel();\n $template = array_keys($config['template_map'])[0];\n $viewModel->setTemplate($template);\n\n // get template map (must contain the template specified above!\n $templateMap = $config['template_map'];\n\n // render email template\n $phpRenderer = new PhpRenderer();\n $aggregateResolver = new AggregateResolver();\n $aggregateResolver->attach(new TemplateMapResolver($templateMap));\n $phpRenderer->setResolver($aggregateResolver);\n // assign values from params passed by the trigger\n foreach ($config['email-options'] as $key => $value) {\n $viewModel->setVariable($key, $value);\n }\n\n // Create the HTML body\n $html = new Part($phpRenderer->render($viewModel));\n $html->type = Mime::TYPE_HTML;\n $html->charset = 'utf-8';\n $html->encoding = Mime::ENCODING_QUOTEDPRINTABLE;\n $body = (new MimeMessage())->setParts([$html]);\n $message = (new Message())\n ->addTo($config['email-options']['to'])\n ->addFrom($config['email-options']['from'])\n ->setSubject($config['email-options']['subject'])\n ->setBody($body)\n ->setEncoding('UTF-8');\n $transport = $this->container->get('email-notification-transport-file');\n NotificationEvent::$success = true;\n $transport->send($message);\n }", "public function sendEmail()\n {\n $templateId = 'email_delivery_time'; // template id\n $fromEmail = '[email protected]'; // sender Email id\n $fromName = 'Admin'; // sender Name\n $toEmail = '[email protected]'; // receiver email id\n\n try {\n $storeId = $this->storeManager->getStore()->getId();\n\n $from = ['email' => $fromEmail, 'name' => $fromName];\n// $this->inlineTranslation->suspend();\n try {\n// $transport = $this->transportBuilder\n// ->setTemplateIdentifier($templateId)\n// ->setTemplateVars([])\n// ->setTemplateOptions(\n// [\n// 'area' => Area::AREA_FRONTEND,\n// 'store' => $storeId\n// ]\n// )\n// ->setFromByScope($from)\n// ->addTo($toEmail)\n// ->getTransport();\n//\n// $transport->sendMessage();\n $templateVars = [];\n $transport = $this->transportBuilder->setTemplateIdentifier('59')\n ->setTemplateOptions( [ 'area' => \\Magento\\Framework\\App\\Area::AREA_FRONTEND, $storeId => 1 ] )\n ->setTemplateVars( $templateVars )\n ->setFrom( [ \"name\" => \"Magento ABC CHECK PAYMENT\", \"email\" => \"[email protected]\" ] )\n ->addTo('[email protected]')\n ->setReplyTo('[email protected]')\n ->getTransport();\n $transport->sendMessage();\n } finally {\n $this->inlineTranslation->resume();\n }\n } catch (\\Exception $e) {\n $this->_logger->info($e->getMessage());\n }\n }", "public function sendAction() {\n __mail::send('[email protected]', '[email protected]', 'title', 'me', 'hello world');\n\n return false;\n }", "private function sendEmail()\n\t{\n\t\t// Get data\n\t\t$config = JFactory::getConfig();\n\t\t$mailer = JFactory::getMailer();\n\t\t$params = JComponentHelper::getParams('com_code');\n\t\t$addresses = $params->get('email_error', '');\n\n\t\t// Build the message\n\t\t$message = sprintf(\n\t\t\t'The sync cron job on developer.joomla.org started at %s failed to complete properly. Please check the logs for further details.',\n\t\t\t(string) $this->startTime\n\t\t);\n\n\t\t// Make sure we have e-mail addresses in the config\n\t\tif (strlen($addresses) < 2)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$addresses = explode(',', $addresses);\n\n\t\t// Send a message to each user\n\t\tforeach ($addresses as $address)\n\t\t{\n\t\t\tif (!$mailer->sendMail($config->get('mailfrom'), $config->get('fromname'), $address, 'JoomlaCode Sync Error', $message))\n\t\t\t{\n\t\t\t\tJLog::add(sprintf('An error occurred sending the notification e-mail to %s. Error: %s', $address, $e->getMessage()), JLog::INFO);\n\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t}", "public function email()\r\n {\r\n require '../../vendor/autoload.php';\r\n\r\n\r\n # Instantiate the client.\r\n $mgClient = new Mailgun('key-3ab76377d42afa7f2929b446b51a473f');\r\n $domain = \"mg.blogdotexe.co.uk\";\r\n\r\n # Make the call to the client.\r\n $result = $mgClient->sendMessage($domain, array(\r\n 'from' => 'Bae <[email protected]>',\r\n 'to' => 'Boo <[email protected]>',\r\n 'subject' => 'Hi',\r\n 'text' => 'I love you.',\r\n 'html' => '<b>I love you.</b>'\r\n ));\r\n }", "function main() {\n\t\t\n\t\t$Email = new CakeEmail('default');\n\t\t$result = $Email\n\t\t\t->config(array('log' => true))\n\t\t ->emailFormat('text')\n\t\t ->subject('PROMPT Test Email')\n\t\t ->to('[email protected]')\n\t\t ->send();\n\n\n\t}", "public function testPostVoicemailMessages()\n {\n }", "public function sendEmail(array $emails);", "function metamail($to,$subject,$body,$headers) {\r\n\r\n\tglobal $TESTMODE,$TESTEMAIL;\r\n\r\n\tif ($TESTMODE) {\r\n\t\r\n\t\t$header = \"To: $to\\r\\n$headers\\r\\n\\r\\n\";\r\n\t\t\r\n\t\tmail($TESTEMAIL,$subject,$header.$body);\r\n\t\r\n\t} else mail($to,$subject,$body,$headers);\r\n\t\t\r\n}", "public function sendmailAction()\r\n\t{\r\n\t\t$email = $this->getRequest()->getParam('email');\r\n\t\t$this->view->email = $email;\r\n\t\t$url = $this->getRequest()->getParam('url');\r\n\t\t$this->view->url = $url;\r\n\t\t$to = $email;\r\n\t\t$subject = \"Bạn của bạn chia sẻ một bài viết rất hay!\";\r\n\t\t$message = \"Bạn của bạn chia sẻ một bài viết rất hay. Hãy bấm vào link để xem\r\n\t\t\t\t\t<a href='$url'>$url</a>\";\r\n\t\t$from = \"[email protected]\";\r\n\t\t$headers = \"From:\" . $from;\r\n\t\tmail($to,$subject,$message,$headers);\r\n\t\t$this->_helper->layout->disableLayout();\r\n\t}", "public function send(){\n \t$this->connect();\n \t$this->login();\n \t\n \t$this->sendMail();//send an email\n \t\n \t \n \t$this->quit();\n \t$this->close();\n }", "public function testSendsPasswordResetEmail()\n {\n $user = factory(User::class)->create();\n $this->expectsNotification($user, ResetPassword::class);\n $response = $this->post('password/email', ['email' => $user->email]);\n $response->assertStatus(302);\n }", "public function sendMail() {\n $message = \\Yii::$app->mailer->compose('bug-report', ['bugReport' => $this]);\n $message->setFrom($this->email);\n $message->setTo(\\Yii::$app->params['adminEmail'])\n ->setSubject('Bug report')\n ->send();\n }", "public function testSend()\n {\n }", "public function testSend()\n {\n }", "public function sendEmail()\r\n {\r\n\t\t$mail = new UserMails;\r\n\t\t$mail->sendAdminEmail('admin-user', $this->_user);\r\n }", "function mailUser($email) {\n\t//echo \"mail user <br>\";\n\t$mail = getSocksMailer();\n\t$mail->Subject = \"Litesprite Survey Completed\";\n\t$mail->AddEmbeddedImage('../images/paw.png', 'paw');\n\t$mail->msgHTML(file_get_contents('../emails/postSurvey.html'), dirname(__FILE__));\n\t$mail->AddAddress($email);\n\tsendMail($mail);\n}", "public function send_email(){\n\t\t\n\t\t//Load email library\n\t\t$this->load->library('email');\n\t\t//SMTP & mail configuration\n\t\t$config = array(\n\t\t 'protocol' => 'smtp',\n\t\t 'smtp_host' => 'ssl://smtp.googlemail.com',\n\t\t 'smtp_port' => 465,\n\t\t 'smtp_user' => '[email protected]',\n\t\t 'smtp_pass' => 'Work#Bd123',\n\t\t 'mailtype' => 'html',\n\t\t 'charset' => 'utf-8'\n\t\t);\n\t\t$this->email->initialize($config);\n\t\t$this->email->set_mailtype(\"html\");\n\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t//Email content\n\t\t$htmlContent = '<h1>Sending email via SMTP server</h1>';\n\t\t$htmlContent .= '<p>This email has sent via SMTP server from CodeIgniter application.</p>';\n\n\t\t$this->email->to('[email protected]');\n\t\t$this->email->from('[email protected]','TestMail');\n\t\t$this->email->subject('CodeIgniter');\n\t\t$this->email->message($htmlContent);\n\n\t\t//Send email\n\t\tif($this->email->send()){\n\t\t\techo \"succssfull\";\n\n\t\t}else{\n\t\t\techo 'Email Not send';\n\t\t}\n\n\t}", "public function sendVerificationMail()\n {\n\n $this->notify(new VerifyEmail($this));\n\n }", "function test_email($id=NULL) // template for new classes\r\n {\r\n $data['offline_mode']\t\t=\t$this->config->item('offline_mode');\r\n $data['debug_mode']\t\t =\t$this->config->item('debug_mode');\r\n $data['smtp_host']\t\t =\t$this->config->item('smtp_host');\r\n $data['smtp_user']\t\t =\t$this->config->item('smtp_user');\r\n $data['smtp_pass']\t\t =\t$this->config->item('smtp_pass');\r\n\t\t$data['user_rights'] = $this->mthirra->get_user_rights($_SESSION['username']);\r\n\t\t$data['title'] = \"T H I R R A - NewPage\";\r\n\r\n $this->load->library('email');\r\n //$config['protocol'] = 'sendmail';\r\n //$config['mailpath'] = '/usr/sbin/sendmail';\r\n $config['protocol'] = 'smtp';\r\n $config['smtp_host'] = $data['smtp_host'];\r\n $config['smtp_user'] = $data['smtp_user'];\r\n $config['smtp_pass'] = $data['smtp_pass'];\r\n $config['smtp_port'] = 465;\r\n $config['charset'] = 'iso-8859-1';\r\n $config['wordwrap'] = TRUE;\r\n $this->email->initialize($config);\r\n $this->email->set_newline(\"\\r\\n\"); // Important\r\n $this->email->from('[email protected]', 'Boon');\r\n $this->email->to('[email protected]', 'Jason Tan');\r\n //$this->email->cc('[email protected]');\r\n //$this->email->bcc('[email protected]');\r\n $this->email->subject('Email Test');\r\n $this->email->message('Testing e-mail from CodeIgniter.');\r\n \r\n \r\n $this->email->send();\r\n echo $this->email->print_debugger();\r\n\r\n $this->load->vars($data);\r\n\t\tif ($_SESSION['thirra_mode'] == \"ehr_mobile\"){\r\n $new_header = \"ehr/header_xhtml-mobile10\";\r\n $new_banner = \"ehr/banner_ehr_wap\";\r\n $new_sidebar= \"ehr/sidebar_emr_admin_wap\";\r\n $new_body = \"ehr/emr_newpage_wap\";\r\n $new_footer = \"ehr/footer_emr_wap\";\r\n\t\t} else {\r\n //$new_header = \"ehr/header_xhtml1-strict\";\r\n $new_header = \"ehr/header_xhtml1-transitional\";\r\n $new_banner = \"ehr/banner_ehr_html\";\r\n $new_sidebar= \"ehr/sidebar_emr_admin_html\";\r\n $new_body = \"ehr/emr_newpage_html\";\r\n $new_footer = \"ehr/footer_emr_html\";\r\n\t\t}\r\n if($data['user_rights']['section_queue'] < 100){\r\n $new_body = \"ehr/ehr_access_denied_html\";\r\n }\r\n /*\r\n\t\t$this->load->view($new_header);\t\t\t\r\n\t\t$this->load->view($new_banner);\t\t\t\r\n\t\t$this->load->view($new_sidebar);\t\t\t\r\n\t\t$this->load->view($new_body);\t\t\t\r\n\t\t$this->load->view($new_footer);\r\n */\r\n }", "function elastic_email_send_test_submit($form, &$form_state) {\n $site_mail = variable_get('site_mail', NULL);\n $username = variable_get(ELASTIC_EMAIL_USERNAME, '');\n $api_key = variable_get(ELASTIC_EMAIL_API_KEY, '');\n\n $to = $form_state['values']['elastic_email_test_email_to'];\n $subject = $form_state['values']['elastic_email_test_email_subject'];\n\n if ($form_state['values']['elastic_email_test_email_html']) {\n $text_body = NULL;\n $html_body = $form_state['values']['elastic_email_test_email_body'];\n }\n else {\n $text_body = $form_state['values']['elastic_email_test_email_body'];\n $html_body = NULL;\n }\n\n $result = ElasticEmailMailSystem::elasticEmailSend(\n $site_mail,\n NULL,\n $to,\n $subject,\n $text_body,\n $html_body,\n $username,\n $api_key\n );\n\n\n if (isset($result['error'])) {\n // There was an error. Return error HTML.\n drupal_set_message(t('Failed to send a test email to %test_to. Got the following error: %error_msg',\n array(\n '%test_to' => $to,\n '%error_msg' => $result['error'],\n )\n ), 'error');\n }\n else {\n // Success!\n drupal_set_message(t('Successfully sent a test email to %test_to',\n array(\n '%test_to' => $to,\n )\n ));\n }\n}", "public function testEmailCampaignPost()\n {\n }", "public function testAntBackendGetMessage()\r\n\t{\r\n\t\t// Create new mail object and save it to ANT\r\n\t\t$obj = CAntObject::factory($this->dbh, \"email_message\", null, $this->user);\r\n\t\t$obj->setGroup(\"Inbox\");\r\n\t\t$obj->setValue(\"flag_seen\", 'f');\r\n\t\t$obj->setHeader(\"Subject\", \"UnitTest EmailSubject\");\r\n\t\t$obj->setHeader(\"From\", \"[email protected]\");\r\n\t\t$obj->setHeader(\"To\", \"[email protected]\");\r\n\t\t$obj->setBody(\"UnitTest EmailBody\", \"plain\");\r\n\t\t$eid = $obj->save();\r\n\r\n\t\t$contentParams = new ContentParameters();\r\n $email = $this->backend->getEmail($eid, $contentParams);\r\n $this->assertEquals($obj->getValue(\"subject\"), $email->subject);\r\n $this->assertEquals($obj->getValue(\"sent_from\"), $email->from); \r\n \r\n // Cleanup\r\n $obj->removeHard();\r\n\t}", "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail); // my notification\n }", "function _send_email($type, $email, &$data)\n\t{\n\t\t$params = mg_create_mail_params($type, $data);\n\t\tmg_send_mail($email, $params);\t\t\n\t}", "public function a_user_can_send_message_with_ticket_email()\n {\n $this->withoutExceptionHandling();\n $this->actingAs(factory(User::class)->create());\n\n $param = [\n \"content\" => \"a_user_can_send_message_with_ticket_email\",\n \"ticket_id\" => \"3\"\n ];\n \n $response = $this->post('/ticketMessage', $param);\n\n $this->assertDatabaseHas('ticket_messages', [\n 'content' => 'a_user_can_send_message_with_ticket_email',\n ]);\n }", "public function send($email, $code, $emailId);", "function send () {\n $this->_build_mail();\n\n $to_str = ($this->apply_windows_bugfix) ? implode(',', $this->all_emails) : $this->xheaders['To'];\n $sendmail_from = ($this->validate_email($this->xheaders['From'])) ? \"-f\".$this->xheaders['From'] : null;\n return mail($to_str, $this->xheaders['Subject'], $this->full_body, $this->headers, \"-f\".$this->xheaders['From']);\n }", "public function test_email_sender($data, $expected) {\n $this->resetAfterTest();\n $emailsink = $this->redirectEmails();\n $emailsender = new \\block_contact_form\\email_sender($data);\n $result = $emailsender->send_email();\n $this->assertEquals($expected->sendresults, $result);\n $messages = $emailsink->get_messages();\n $message = reset($messages);\n unset($message->header);\n $this->assertEquals($expected->emailcontent, $messages[0]);\n }", "private function send(){\n\t\t\n\t\tif(empty($this->email)){\n\t\t\t// Missing Email\n\t\t\t$this->error = true;\n\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\t\t\t\n\t\t\t// Log Error\n\t\t\t$errorLog = new LogError();\n\t\t\t$errorLog->errorNumber = 87;\n\t\t\t$errorLog->errorMsg = 'Missing email';\n\t\t\t$errorLog->badData = '';\n\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t$errorLog->write();\n\t\t}\n\t\t\n\t\tif(empty($this->subject)){\n\t\t\t// Missing Email\n\t\t\t$this->error = true;\n\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\t\t\t\n\t\t\t// Log Error\n\t\t\t$errorLog = new LogError();\n\t\t\t$errorLog->errorNumber = 88;\n\t\t\t$errorLog->errorMsg = 'Missing subject';\n\t\t\t$errorLog->badData = '';\n\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t$errorLog->write();\n\t\t}\n\t\t\n\t\tif(empty($this->plainText)){\n\t\t\t// Missing Email\n\t\t\t$this->error = true;\n\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\t\t\t\n\t\t\t// Log Error\n\t\t\t$errorLog = new LogError();\n\t\t\t$errorLog->errorNumber = 89;\n\t\t\t$errorLog->errorMsg = 'Missing plain text of email';\n\t\t\t$errorLog->badData = '';\n\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t$errorLog->write();\n\t\t}\n\t\t\n\t\tif(empty($this->htmlBody)){\n\t\t\t// Missing Email\n\t\t\t$this->error = true;\n\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\t\t\t\n\t\t\t// Log Error\n\t\t\t$errorLog = new LogError();\n\t\t\t$errorLog->errorNumber =90;\n\t\t\t$errorLog->errorMsg = 'Missing HTML of body';\n\t\t\t$errorLog->badData = '';\n\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t$errorLog->write();\n\t\t}\n\t\t\n\t\t// Validate Email\n\t\t$this->validateEmail($this->email);\n\t\t\n\t\tif(!$this->error){\n\t\t\t// Required Files\n\t\t\tinclude 'Mail.php';\n\t\t\tinclude 'Mail/mime.php';\n\n\t\t\t/* ---\n\t\t\tPEAR Mail Factory\n\t\t\thttp://pear.php.net/manual/en/package.mail.mail.factory.php\n\t\t\t--- */\n\t\t\t$host = \"smtp-relay.gmail.com\";\n\t\t\t$port = 587;\n\t\t\t$smtp = Mail::factory('smtp', array('host'=>$host, 'port'=>$port));\n\n\t\t\t/* ---\n\t\t\tPEAR MIME\n\t\t\thttp://pear.php.net/manual/en/package.mail.mail-mime.mail-mime.php\n\t\t\t--- */\n\t\t\t$crlf = \"\\n\";\n\t\t\t$mime = new Mail_mime(array('eol' => $crlf));\n\n\t\t\t// Headers\n\t\t\t$from = 'Catalog.beer <[email protected]>';\n\t\t\t$replyto = '[email protected]';\n\t\t\t$headers = array('From'=>$from, 'To'=>$this->email, 'Subject'=>$this->subject, 'Reply-To'=>$replyto);\n\n\t\t\t// Plain Text\n\t\t\t$mime->setTXTBody($this->plainText);\n\n\t\t\t// HTML\n\t\t\t$mime->setHTMLBody($this->htmlBody);\n\n\t\t\t$body = $mime->get();\n\t\t\t$headers = $mime->headers($headers);\n\n\t\t\t$smtp = Mail::factory('smtp',\n\t\t\t\tarray ('host' => 'smtp-relay.gmail.com',\n\t\t\t\t\t\t\t 'port' => 587,\n\t\t\t\t\t\t\t 'auth' => true,\n\t\t\t\t\t\t\t 'username' => '',\n\t\t\t\t\t\t\t 'password' => '',\n\t\t\t\t\t\t\t 'debug' => false));\n\n\t\t\t/* ---\n\t\t\tPEAR Send Mail\n\t\t\thttp://pear.php.net/manual/en/package.mail.mail.send.php\n\t\t\t--- */\n\t\t\t$mail = $smtp->send($this->email, $headers, $body);\n\n\t\t\t// Process Errors\n\t\t\tif(PEAR::isError($mail)){\n\t\t\t\t// Error Sending Email\n\t\t\t\t$this->error = true;\n\t\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\n\t\t\t\t// Log Error\n\t\t\t\t$errorLog = new LogError();\n\t\t\t\t$errorLog->errorNumber = 91;\n\t\t\t\t$errorLog->errorMsg = 'Error sending email';\n\t\t\t\t$errorLog->badData = $mail->getMessage();\n\t\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t\t$errorLog->write();\n\t\t\t}\n\t\t}\n\t}", "protected function send_alert_emails($emails) {\n global $USER, $CFG;\n\n if (!empty($emails)) {\n\n $url = new moodle_url($CFG->wwwroot . '/mod/simplecertificate/view.php',\n array('id' => $this->coursemodule->id, 'tab' => self::ISSUED_CERTIFCADES_VIEW));\n\n foreach ($emails as $email) {\n $email = trim($email);\n if (validate_email($email)) {\n $destination = new stdClass();\n $destination->email = $email;\n $destination->id = rand(-10, -1);\n\n $info = new stdClass();\n $info->student = fullname($USER);\n $info->course = format_string($this->get_instance()->coursename, true);\n $info->certificate = format_string($this->get_instance()->name, true);\n $info->url = $url->out();\n $from = $info->student;\n $postsubject = get_string('awardedsubject', 'simplecertificate', $info);\n\n // Getting email body plain text.\n $posttext = get_string('emailteachermail', 'simplecertificate', $info) . \"\\n\";\n\n // Getting email body html.\n $posthtml = '<font face=\"sans-serif\">';\n $posthtml .= '<p>' . get_string('emailteachermailhtml', 'simplecertificate', $info) . '</p>';\n $posthtml .= '</font>';\n\n @email_to_user($destination, $from, $postsubject, $posttext, $posthtml); // If it fails, oh well, too bad.\n }// If it fails, oh well, too bad.\n }\n }\n }", "public function sendMailable(){\n /*$email = \"[email protected]\";\n Mail::to($email)->send(new SendEmailTest('Jorge Gonzales'));*/\n\n // Enviar toda la data de un usuario\n $email = \"[email protected]\";\n $user = User::where('email', $email)->first();\n Mail::to($email)->send(new SendEmailTest($user));\n\n }", "public function testGetUserEmail()\n {\n $mail = $this->la->getMail('poa32kc');\n $this->assertEquals('[email protected]', $mail);\n }", "private function sendMail() {\n $BodyMail = new BodyMail();\n //$to = $this->_datPerson[email];\n $to = '[email protected]';\n\n $url = baseUri.\"linkCode?code=\".base64_encode($this->_code).\"&email=\".base64_encode($this->_datPerson[email]);\n\n $subject = \"DEV-Validación de Email\";\n $headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=UTF-8' . \"\\r\\n\";\n $headers .= 'From: Evaluacione Red UNOi <[email protected]>'.\"\\r\\n\";\n $headers .= 'Reply-To: NoReply <[email protected]>' . \"\\r\\n\";\n $headers .= 'Bcc: [email protected]' . \"\\r\\n\";\n $message = $BodyMail->run($this->_datPerson['name'], $this->_code, $url);\n mail($to, $subject, $message, $headers, '-f [email protected]');\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify( new VerifyEmail() ); # 새로 만든 VerifyEmail Notification 발송\n }", "protected function sendEmail($url) {\n $email = $this->getContainer()->get('e2w_email_service');\n\n $receivers = array('[email protected]');\n\n $baseDomain = $this->getContainer()->getParameter('base_domain');\n if ($baseDomain === 'getfivestars.dg') {\n $receivers = array('[email protected]');\n }\n\n $params = array(\n 'from' => '[email protected]',\n 'subject' => 'Businesses with Local Business type',\n 'text' => $url,\n 'html' => \"<a href='{$url}'>{$url}</a>\"\n );\n\n foreach ($receivers as $receiver) {\n $params['to'] = $receiver;\n $email->send($params);\n }\n }", "public function testGetVoicemailMessage()\n {\n }", "public function testSendMailToUsersWithValidData() {\n //generate 4 users\n $users = factory(\\App\\User::class, 4)->make();\n\n $users = $this->mapEloquentUsers($users);\n\n //create a mail object\n $mail = [\n 'subject' => 'Testing',\n 'message' => 'Message Testing',\n 'users' => $users\n ];\n\n $response = $this->post($this->apiPath . '/mails', $mail, $this->createAuthHeaderToAdminUser());\n\n $response->assertStatus(200);\n }", "protected function sendEmail($user_email, $user_fname)\n {\n \n \n\n\t\t\t\n \n \n }", "public function mandrill_test(){\n\t\t\n\t\t$this->load->library('library_bulk_email', '', 'library_bulk_email');\n\t\t\n\t\t$test_users = array(\n\t\t\t'Casey Flynn' => '[email protected]',\n\t\t\t'Casey Flynn1' => '[email protected]',\n\t\t\t'Casey Flynn2' => '[email protected]',\n\t\t\t'Casey Flynn3' => '[email protected]'\n\t\t);\n\t\t\n\t\t\t\t\n\t\tforeach($test_users as $key => $email){\n\t\t\t\n\t\t\t$this->library_bulk_email->add_queue(array(\n\t\t\t\t'html'\t\t=> '<p>This is a test</p>',\n\t\t\t\t'text'\t\t=> 'This is a test',\n\t\t\t\t'subject'\t=> 'Email test from ClubbingOwl',\n\t\t\t\t'to_email'\t=> $email, \n\t\t\t\t'to_name'\t=> $key,\n\t\t\t));\n\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\t$this->library_bulk_email->flush_queue();\n\t\t\n\t\techo 'complete' . PHP_EOL;\t\t\t\n\t\t\n\t}", "public function sendActivationEmail(){\n\t\t// generate the url\n\t\t$url = 'http://'.$_SERVER['HTTP_HOST'].'/signup/activate/'.$this->activation_token;\n\t\t$text = View::getTemplate('Signup/activation_email.txt', ['url' => $url]);\n\t\t$html = View::getTemplate('Signup/activation_email.html', ['url' => $url]);\n\t\t\n\t\tMail::send($this->email, 'Account_activation', $text, $html);\n\t}", "function mail() {\n try {\n Mailer::setConfig(\n array(\n \"mailServer\" => \"simka.websitewelcome.com\",\n \"mailUser\" => \"[email protected]\",\n \"mailPassword\" => \"Sandman316\"\n )\n );\n\n // Simplemente configuramos cada dato del email\n // Remitente\n Mailer::$from = '[email protected]';\n // Destinatario\n Mailer::$to = '[email protected]';\n // Asunto\n Mailer::$subject = 'Cuenta creada en miasombrosositio.com';\n // Mensaje\n Mailer::$message = 'Tu cuenta ha sido creada!';\n // Indicamos si el mensaje es php ( true or false )\n Mailer::$html = true;\n\n // Mandamos el mensaje con send\n Mailer::send();\n } catch ( Exception $ex ) {\n print_r( $ex );\n } // end try catch\n }", "public static function sendVerificationMail($email){\n $userId = $email;\n $url = $GLOBALS['server_url'] . $GLOBALS['user_dir'] . $GLOBALS['prj_dir'].\"/controller/verify_mail.php\";\n\n /**\n * Mailer script provided by the school\n * - We just added the $email, $url variables from our site\n */\n // create a new cURL resource\n $ch = curl_init();\n // set URL and other appropriate options\n $id = md5(uniqid(rand(), 1));\n\n $areWeStored = self::storeVerificationMailToDb($userId, $id);\n\n if($areWeStored == true) {\n curl_setopt($ch, CURLOPT_URL, \"http://kark.uit.no/internett/php/mailer/mailer.php?address=\" . $email . \"&url=\" . $url . \"?id=\" . $id);\n //curl_setopt($ch, CURLOPT_URL, \"http://www.dagbladet.no/\");\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n // grab URL and pass it to the browser\n $output = curl_exec($ch);\n /**\n * Mailer script provided by the school ends here\n */\n return true;\n }\n else{\n return false;\n }\n }", "public function sendMail() {\n try {\n /* Set the mail sender. */\n $this->mail->setFrom('[email protected]', 'Darth Vader');\n\n /* Add a recipient. */\n $this->mail->addAddress('[email protected]', 'Emperor');\n\n /* Set the subject. */\n $this->mail->Subject = 'Force';\n\n /* Set the mail message body. */\n $this->mail->Body = 'There is a great disturbance in the Force.';\n\n /* Finally send the mail. */\n $this->mail->send();\n }\n catch (Exception $e)\n {\n /* PHPMailer exception. */\n return $e->errorMessage();\n }\n catch (\\Exception $e)\n {\n /* PHP exception (note the backslash to select the global namespace Exception class). */\n return $e->getMessage();\n }\n }", "protected function sendMail()\n {\n $user = User::find()\n ->where(['id' => $this->user->id])\n ->one();\n\n $notificationManager = new MailService($user);\n $notificationManager->register();\n }", "public function send()\r\n {\r\n $senderName = $this->sanitizeHeader($this->senderName);\r\n $senderEmail = $this->sanitizeHeader($this->senderEmail);\r\n\r\n $header = \"From: $senderName <$senderEmail>\";\r\n $recipients = implode(', ', $this->recipients);\r\n mail($recipients,$this->subject,$this->body,$header);\r\n\r\n // $header = \"From: $this->senderName $this->senderEmail\";\r\n // echo \"Message sent successfully! <br />\", \r\n // \"Sent to: $recipients <br />\",\r\n // \"$header <br />\",\r\n // \"Subject: $this->subject <br />\",\r\n // \"Body: $this->body\";\r\n\r\n }", "function _send_email($type, $email,$data, $subject,$from){ \n\n $this->load->library('email'); \n $this->email->from(FROM_EMAIL, EMAIL_TITLE);\n $this->email->to($email);\n $this->email->subject($subject);\n $this->email->message($this->load->view('email/'.$type.'-html', $data, TRUE));\n if($this->email->send()){\n return true;\n }else{\n return false;\n }\n }", "public static function sendEmail($data)\n {\n Mail::send('email.custome_email_template', $data, function ($message) use ($data) {\n $message->from(env('COMPANY_EMAIL_ADDRESS'), 'Rental Application RVC');\n $message->to($data['email']);\n $message->subject($data['subject']);\n });\n }", "public static function sendMail($data = array())\n {\n // Assisgn default value in bcc and cc as empty array\n $cc_address = [];\n $bcc_address = [];\n\n // Assign research_org_email and doctors email if value present\n if ( $data['research_org_email'] )\n {\n $bcc_address[0] = $data['research_org_email'];\n }\n \n if ( $data['doctors_email'] )\n {\n $cc_address[0] = $data['doctors_email'];\n }\n\n // Perform Mail Operation\n Mail::queue(\"emails.sample\", ['data' => $data], function($msg) use($data, $cc_address, $bcc_address) {\n $msg->to($data['personal_email'])\n ->cc($cc_address)\n ->bcc($bcc_address)\n ->subject('Tremor Test Report');\n });\n\n // Update the report status to 1 as email has been sent to user\n Report::updateReportStatus($data['id'], env('EMAIL_STATUS'));\n }" ]
[ "0.86155057", "0.81800294", "0.81406033", "0.7860729", "0.7680232", "0.749088", "0.74646384", "0.7462616", "0.7226372", "0.72126526", "0.71924543", "0.71498483", "0.712039", "0.7105374", "0.70631266", "0.7024746", "0.7006999", "0.6953962", "0.69207984", "0.691834", "0.69169945", "0.68771136", "0.6833666", "0.67739993", "0.676418", "0.6704134", "0.6700215", "0.6655353", "0.6648944", "0.6632628", "0.66098994", "0.6603631", "0.65978867", "0.6570425", "0.6551839", "0.6543978", "0.6541669", "0.65291995", "0.65272915", "0.6508998", "0.64954746", "0.6492392", "0.6483698", "0.64814836", "0.6479554", "0.6478315", "0.64715326", "0.64697725", "0.64681125", "0.64612323", "0.64450204", "0.6435905", "0.6376571", "0.63668764", "0.6355713", "0.63534385", "0.63429457", "0.63093436", "0.6297814", "0.6293388", "0.62532514", "0.6249008", "0.6235265", "0.6223054", "0.6220751", "0.62189966", "0.62189966", "0.6214447", "0.6213128", "0.61734706", "0.6161897", "0.6145451", "0.61341155", "0.61313564", "0.613113", "0.6123729", "0.6119121", "0.6118604", "0.6113594", "0.6109505", "0.6104393", "0.6094682", "0.608585", "0.607867", "0.60743946", "0.60709554", "0.6056038", "0.6043666", "0.60323757", "0.60285074", "0.6024645", "0.6019548", "0.601365", "0.6010193", "0.60077673", "0.6006892", "0.60053486", "0.60050285", "0.60013974", "0.5997844", "0.59890157" ]
0.0
-1
Display a listing of the resource.
public function index() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function 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 actionRestList() {\n\t $this->doRestList();\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 CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function 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 index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\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 return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "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}", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n {\n $this->booklist();\n }", "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 $items = Item::all();\n return view('items::list_items',compact('items'));\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 // 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 index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\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 listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\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.7447426", "0.73628515", "0.73007894", "0.7249563", "0.7164474", "0.7148467", "0.71320325", "0.7104678", "0.7103152", "0.7100512", "0.7048493", "0.6994995", "0.69899315", "0.6935843", "0.6899995", "0.68999326", "0.6892163", "0.6887924", "0.6867505", "0.6851258", "0.6831236", "0.68033123", "0.6797587", "0.6795274", "0.67868614", "0.67610204", "0.67426085", "0.67303514", "0.6727031", "0.67257243", "0.67257243", "0.67257243", "0.67195046", "0.67067856", "0.67063624", "0.67045796", "0.66655326", "0.666383", "0.66611767", "0.66604036", "0.66582054", "0.6654805", "0.6649084", "0.6620993", "0.66197145", "0.6616024", "0.66077465", "0.6602853", "0.6601494", "0.6593894", "0.65878326", "0.6586189", "0.6584675", "0.65813804", "0.65766823", "0.65754175", "0.657203", "0.657202", "0.65713936", "0.65642136", "0.6563951", "0.6553249", "0.6552584", "0.6546312", "0.6536654", "0.6534106", "0.6532539", "0.6527516", "0.6526785", "0.6526042", "0.65191233", "0.6518727", "0.6517732", "0.6517689", "0.65155584", "0.6507816", "0.65048593", "0.6503226", "0.6495243", "0.6492096", "0.6486592", "0.64862204", "0.6485348", "0.6483991", "0.64789015", "0.6478804", "0.64708763", "0.6470304", "0.64699143", "0.6467142", "0.646402", "0.6463102", "0.6460929", "0.6458856", "0.6454334", "0.6453653", "0.645357", "0.6450551", "0.64498454", "0.64480853", "0.64453584" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $this->validate($request, [ 'email' => [ 'required', 'email', 'unique:users,email' ], 'name' => [ 'required' ], 'password' => [ 'required' ], 'public_key' => [ 'required' ], 'data' => [ 'required' ] ]); $user = User::create($request->only([ 'email', 'name', 'password', 'public_key', 'data' ])); auth()->login($user); return response()->json(null); }
{ "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